diff --git a/dev/checksums/vendor b/dev/checksums/vendor
index 40c4c1a63..70e55a4a1 100644
--- a/dev/checksums/vendor
+++ b/dev/checksums/vendor
@@ -1 +1 @@
-8718aa88d39b7ede22c7e7734da8533165776f51210905afc360a996ca3a7356
\ No newline at end of file
+fa162564940d9a81e4dd0b20ae8775d32f2ea5c615e33ebcc8adf035d958c352
\ No newline at end of file
diff --git a/public/dist/styles.css b/public/dist/styles.css
index 1c5ba8547..a7b76acd4 100644
--- a/public/dist/styles.css
+++ b/public/dist/styles.css
@@ -1 +1 @@
-html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after{content:"";content:none}q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.dummy-style{color:red}:root{--font-body: -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Roboto, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--font-code: Lucida Console, DejaVu Sans Mono, Ubuntu Mono, Monaco, monospace;--color-primary: #206ea7;--color-primary-light: rgba(32,110,167,0.15);--color-link: #206ea7;--color-page: #206ea7;--color-page-draft: #7e50b1;--color-chapter: #af4d0d;--color-book: #077b70;--color-bookshelf: #a94747;--color-positive: #0f7d15;--color-negative: #ab0f0e;--color-info: #0288D1;--color-warning: #cf4d03;--bg-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='100%25' width='100%25'%3E%3Cdefs%3E%3Cpattern id='doodad' width='19' height='19' viewBox='0 0 40 40' patternUnits='userSpaceOnUse' patternTransform='rotate(143)'%3E%3Crect width='100%25' height='100%25' fill='rgba(42, 67, 101,0)'/%3E%3Cpath d='M-10 30h60v20h-60zM-10-10h60v20h-60' fill='rgba(26, 32, 44,0)'/%3E%3Cpath d='M-10 10h60v20h-60zM-10-30h60v20h-60z' fill='rgba(0, 0, 0,0.05)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23doodad)' height='200%25' width='200%25'/%3E%3C/svg%3E")}:root.dark-mode{--bg-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='100%25' width='100%25'%3E%3Cdefs%3E%3Cpattern id='doodad' width='19' height='19' viewBox='0 0 40 40' patternUnits='userSpaceOnUse' patternTransform='rotate(143)'%3E%3Crect width='100%25' height='100%25' fill='rgba(42, 67, 101,0)'/%3E%3Cpath d='M-10 30h60v20h-60zM-10-10h60v20h-60' fill='rgba(26, 32, 44,0)'/%3E%3Cpath d='M-10 10h60v20h-60zM-10-30h60v20h-60z' fill='rgba(255, 255, 255,0.05)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23doodad)' height='200%25' width='200%25'/%3E%3C/svg%3E");color-scheme:only dark;--color-positive: #4aa850;--color-negative: #e85c5b;--color-warning: #de8a5a}:root:not(.dark-mode){color-scheme:only light}.m-none{margin:0 !important}.mx-none{margin-inline-start:0 !important;margin-inline-end:0 !important}.my-none{margin-top:0 !important;margin-bottom:0 !important}.mt-none{margin-top:0 !important}.mr-none{margin-inline-end:0 !important}.mb-none{margin-bottom:0 !important}.ml-none{margin-inline-start:0 !important}.m-xxs{margin:3px !important}.mx-xxs{margin-inline-start:3px !important;margin-inline-end:3px !important}.my-xxs{margin-top:3px !important;margin-bottom:3px !important}.mt-xxs{margin-top:3px !important}.mr-xxs{margin-inline-end:3px !important}.mb-xxs{margin-bottom:3px !important}.ml-xxs{margin-inline-start:3px !important}.m-xs{margin:6px !important}.mx-xs{margin-inline-start:6px !important;margin-inline-end:6px !important}.my-xs{margin-top:6px !important;margin-bottom:6px !important}.mt-xs{margin-top:6px !important}.mr-xs{margin-inline-end:6px !important}.mb-xs{margin-bottom:6px !important}.ml-xs{margin-inline-start:6px !important}.m-s{margin:12px !important}.mx-s{margin-inline-start:12px !important;margin-inline-end:12px !important}.my-s{margin-top:12px !important;margin-bottom:12px !important}.mt-s{margin-top:12px !important}.mr-s{margin-inline-end:12px !important}.mb-s{margin-bottom:12px !important}.ml-s{margin-inline-start:12px !important}.m-m{margin:16px !important}.mx-m{margin-inline-start:16px !important;margin-inline-end:16px !important}.my-m{margin-top:16px !important;margin-bottom:16px !important}.mt-m{margin-top:16px !important}.mr-m{margin-inline-end:16px !important}.mb-m{margin-bottom:16px !important}.ml-m{margin-inline-start:16px !important}.m-l{margin:24px !important}.mx-l{margin-inline-start:24px !important;margin-inline-end:24px !important}.my-l{margin-top:24px !important;margin-bottom:24px !important}.mt-l{margin-top:24px !important}.mr-l{margin-inline-end:24px !important}.mb-l{margin-bottom:24px !important}.ml-l{margin-inline-start:24px !important}.m-xl{margin:32px !important}.mx-xl{margin-inline-start:32px !important;margin-inline-end:32px !important}.my-xl{margin-top:32px !important;margin-bottom:32px !important}.mt-xl{margin-top:32px !important}.mr-xl{margin-inline-end:32px !important}.mb-xl{margin-bottom:32px !important}.ml-xl{margin-inline-start:32px !important}.m-xxl{margin:48px !important}.mx-xxl{margin-inline-start:48px !important;margin-inline-end:48px !important}.my-xxl{margin-top:48px !important;margin-bottom:48px !important}.mt-xxl{margin-top:48px !important}.mr-xxl{margin-inline-end:48px !important}.mb-xxl{margin-bottom:48px !important}.ml-xxl{margin-inline-start:48px !important}.m-auto{margin:auto !important}.mx-auto{margin-inline-start:auto !important;margin-inline-end:auto !important}.my-auto{margin-top:auto !important;margin-bottom:auto !important}.mt-auto{margin-top:auto !important}.mr-auto{margin-inline-end:auto !important}.mb-auto{margin-bottom:auto !important}.ml-auto{margin-inline-start:auto !important}.p-none{padding:0 !important}.px-none{padding-inline-start:0 !important;padding-inline-end:0 !important}.py-none{padding-top:0 !important;padding-bottom:0 !important}.pt-none{padding-top:0 !important}.pr-none{padding-inline-end:0 !important}.pb-none{padding-bottom:0 !important}.pl-none{padding-inline-start:0 !important}.p-xxs{padding:3px !important}.px-xxs{padding-inline-start:3px !important;padding-inline-end:3px !important}.py-xxs{padding-top:3px !important;padding-bottom:3px !important}.pt-xxs{padding-top:3px !important}.pr-xxs{padding-inline-end:3px !important}.pb-xxs{padding-bottom:3px !important}.pl-xxs{padding-inline-start:3px !important}.p-xs{padding:6px !important}.px-xs{padding-inline-start:6px !important;padding-inline-end:6px !important}.py-xs{padding-top:6px !important;padding-bottom:6px !important}.pt-xs{padding-top:6px !important}.pr-xs{padding-inline-end:6px !important}.pb-xs{padding-bottom:6px !important}.pl-xs{padding-inline-start:6px !important}.p-s{padding:12px !important}.px-s{padding-inline-start:12px !important;padding-inline-end:12px !important}.py-s{padding-top:12px !important;padding-bottom:12px !important}.pt-s{padding-top:12px !important}.pr-s{padding-inline-end:12px !important}.pb-s{padding-bottom:12px !important}.pl-s{padding-inline-start:12px !important}.p-m{padding:16px !important}.px-m{padding-inline-start:16px !important;padding-inline-end:16px !important}.py-m{padding-top:16px !important;padding-bottom:16px !important}.pt-m{padding-top:16px !important}.pr-m{padding-inline-end:16px !important}.pb-m{padding-bottom:16px !important}.pl-m{padding-inline-start:16px !important}.p-l{padding:24px !important}.px-l{padding-inline-start:24px !important;padding-inline-end:24px !important}.py-l{padding-top:24px !important;padding-bottom:24px !important}.pt-l{padding-top:24px !important}.pr-l{padding-inline-end:24px !important}.pb-l{padding-bottom:24px !important}.pl-l{padding-inline-start:24px !important}.p-xl{padding:32px !important}.px-xl{padding-inline-start:32px !important;padding-inline-end:32px !important}.py-xl{padding-top:32px !important;padding-bottom:32px !important}.pt-xl{padding-top:32px !important}.pr-xl{padding-inline-end:32px !important}.pb-xl{padding-bottom:32px !important}.pl-xl{padding-inline-start:32px !important}.p-xxl{padding:48px !important}.px-xxl{padding-inline-start:48px !important;padding-inline-end:48px !important}.py-xxl{padding-top:48px !important;padding-bottom:48px !important}.pt-xxl{padding-top:48px !important}.pr-xxl{padding-inline-end:48px !important}.pb-xxl{padding-bottom:48px !important}.pl-xxl{padding-inline-start:48px !important}.p-auto{padding:auto !important}.px-auto{padding-inline-start:auto !important;padding-inline-end:auto !important}.py-auto{padding-top:auto !important;padding-bottom:auto !important}.pt-auto{padding-top:auto !important}.pr-auto{padding-inline-end:auto !important}.pb-auto{padding-bottom:auto !important}.pl-auto{padding-inline-start:auto !important}.gap-none{gap:0 !important}.gap-x-none{column-gap:0 !important}.gap-y-none{row-gap:0 !important}.gap-xxs{gap:3px !important}.gap-x-xxs{column-gap:3px !important}.gap-y-xxs{row-gap:3px !important}.gap-xs{gap:6px !important}.gap-x-xs{column-gap:6px !important}.gap-y-xs{row-gap:6px !important}.gap-s{gap:12px !important}.gap-x-s{column-gap:12px !important}.gap-y-s{row-gap:12px !important}.gap-m{gap:16px !important}.gap-x-m{column-gap:16px !important}.gap-y-m{row-gap:16px !important}.gap-l{gap:24px !important}.gap-x-l{column-gap:24px !important}.gap-y-l{row-gap:24px !important}.gap-xl{gap:32px !important}.gap-x-xl{column-gap:32px !important}.gap-y-xl{row-gap:32px !important}.gap-xxl{gap:48px !important}.gap-x-xxl{column-gap:48px !important}.gap-y-xxl{row-gap:48px !important}.gap-auto{gap:auto !important}.gap-x-auto{column-gap:auto !important}.gap-y-auto{row-gap:auto !important}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}*{box-sizing:border-box;outline-color:var(--color-primary);outline-width:1px}*:focus{outline-style:dotted}html{height:100%;overflow-y:scroll;background-color:#f2f2f2}html.flexbox{overflow-y:hidden}html.dark-mode{background-color:#111}body{font-size:14px;line-height:1.6;color:#444;-webkit-font-smoothing:antialiased;height:100%;display:flex;flex-direction:column}html.dark-mode body{color:#aaa}body,button,input,select,label,textarea{font-family:var(--font-body)}pre,#markdown-editor-input,.text-mono,.code-base,span.code,code{font-family:var(--font-code)}h1{font-size:3.425em;line-height:1.22222222em;margin-top:.48888889em;margin-bottom:.48888889em}h2{font-size:2.8275em;line-height:1.294117647em;margin-top:.8627451em;margin-bottom:.43137255em}h3{font-size:2.333em;line-height:1.221428572em;margin-top:.78571429em;margin-bottom:.43137255em}h4{font-size:1.666em;line-height:1.375em;margin-top:.78571429em;margin-bottom:.43137255em}h1,h2,h3,h4,h5,h6{font-weight:400;position:relative;display:block;font-family:var(--font-heading, var(--font-body));color:#222}html.dark-mode h1,html.dark-mode h2,html.dark-mode h3,html.dark-mode h4,html.dark-mode h5,html.dark-mode h6{color:#bbb}h5{font-size:1.4em}h5,h6{line-height:1.2em;margin-top:.78571429em;margin-bottom:.66em}@media screen and (max-width: 600px){h1{font-size:2.8275em}h2{font-size:2.333em}h3{font-size:1.666em}h4{font-size:1.333em}h5{font-size:1.161616em}}.list-heading{font-size:2rem}h2.list-heading{font-size:1.333rem}a{color:var(--color-link);fill:currentColor;cursor:pointer;text-decoration:none;transition:filter ease-in-out 80ms;line-height:1.6}a:hover{text-decoration:underline}a.icon{display:inline-block}a svg{position:relative;display:inline-block}a:focus img:only-child{outline:2px dashed var(--color-link);outline-offset:2px}a.no-link-style{color:inherit}a.no-link-style:hover{text-decoration:none}.blended-links a{color:inherit}.blended-links a svg{fill:currentColor}p,ul,ol,pre,table,blockquote{margin-top:.3em;margin-bottom:1.375em}hr{border:0;height:1px;background:#eaeaea;margin-bottom:24px}html.dark-mode hr{background:#555}hr.faded{background-image:linear-gradient(to right, #FFF, #e3e0e0 20%, #e3e0e0 80%, #FFF)}hr.darker{background:#ddd}html.dark-mode hr.darker{background:#666}hr.margin-top,hr.even{margin-top:24px}strong,b,.bold,.strong{font-weight:bold}strong>strong,strong>b,strong>.bold,strong>.strong,b>strong,b>b,b>.bold,b>.strong,.bold>strong,.bold>b,.bold>.bold,.bold>.strong,.strong>strong,.strong>b,.strong>.bold,.strong>.strong{font-weight:bolder}em,i,.italic{font-style:italic}small,p.small,span.small,.text-small{font-size:.75rem}sup,.superscript{vertical-align:super;font-size:.8em}sub,.subscript{vertical-align:sub;font-size:.8em}pre{font-size:12px;border:1px solid #ddd;background-color:#fff;border-color:#ddd;border-radius:4px;padding-inline-start:26px;position:relative;padding-top:3px;padding-bottom:3px}html.dark-mode pre{background-color:#2b2b2b}html.dark-mode pre{border-color:#111}pre:before{content:"";display:block;position:absolute;top:0;width:22.4px;inset-inline-start:0;height:100%;background-color:#f5f5f5;border-inline-end:1px solid #ddd}html.dark-mode pre:before{background-color:#313335}html.dark-mode pre:before{border-inline-end:none}@media print{pre{padding-left:12px}pre:before{display:none}}blockquote{display:block;position:relative;border-left:4px solid rgba(0,0,0,0);border-left-color:var(--color-primary);background-color:#f8f8f8;padding:12px 16px 12px 32px;overflow:auto}html.dark-mode blockquote{background-color:#333}blockquote:before{content:"“";font-size:2em;font-weight:bold;position:absolute;top:12px;left:12px;color:#777}.text-mono{font-family:var(--font-code)}.text-uppercase{text-transform:uppercase}.text-capitals{text-transform:capitalize}.code-base,span.code,code{font-size:.84em;border:1px solid #ddd;border-radius:3px;background-color:#f8f8f8;border-color:#ddd}html.dark-mode .code-base,html.dark-mode span.code,html.dark-mode code{background-color:#2b2b2b}html.dark-mode .code-base,html.dark-mode span.code,html.dark-mode code{border-color:#444}code{display:inline;padding:1px 3px;white-space:pre-wrap;line-height:1.2em}span.code{padding:1px 6px}pre code{background-color:rgba(0,0,0,0);border:0;font-size:1em;display:block;line-height:1.6}span.highlight{font-weight:bold;padding:2px 4px}ul,ol{padding-left:32px;padding-right:32px;display:flow-root}ul p,ol p{margin:0}ul{list-style:disc}ul ul{list-style:circle}ul label{margin:0}ol{list-style:decimal}li>ol,li>ul{margin-top:0;margin-bottom:0;margin-block-end:0;margin-block-start:0;padding-block-end:0;padding-block-start:0;padding-left:19.2px;padding-right:19.2px}li.checkbox-item,li.task-list-item{display:list-item;list-style:none;margin-left:-19.2px;margin-inline-start:-19.2px;margin-inline-end:0}li.checkbox-item input[type=checkbox],li.task-list-item input[type=checkbox]{margin-right:6px;margin-inline-end:6px;margin-inline-start:0}li.checkbox-item li.checkbox-item,li.checkbox-item li.task-list-item,li.task-list-item li.checkbox-item,li.task-list-item li.task-list-item{margin-left:6px;margin-inline-start:6px;margin-inline-end:0}.underlined{text-decoration:underline}.text-center{text-align:center}.text-left{text-align:start}.text-right{text-align:end}@media screen and (min-width: 361px){.text-xxs-center{text-align:center}.text-xxs-left{text-align:start}.text-xxs-right{text-align:end}}@media screen and (min-width: 401px){.text-xs-center{text-align:center}.text-xs-left{text-align:start}.text-xs-right{text-align:end}}@media screen and (min-width: 601px){.text-s-center{text-align:center}.text-s-left{text-align:start}.text-s-right{text-align:end}}@media screen and (min-width: 881px){.text-m-center{text-align:center}.text-m-left{text-align:start}.text-m-right{text-align:end}}@media screen and (min-width: 1001px){.text-l-center{text-align:center}.text-l-left{text-align:start}.text-l-right{text-align:end}}@media screen and (min-width: 1101px){.text-xl-center{text-align:center}.text-xl-left{text-align:start}.text-xl-right{text-align:end}}.text-bigger{font-size:1.1em}.text-large{font-size:1.6666em}.no-color{color:inherit}.break-text{white-space:normal;word-wrap:break-word;overflow-wrap:break-word}.text-limit-lines-1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-limit-lines-2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.header-group{margin:16px 0}.header-group h1,.header-group h2,.header-group h3,.header-group h4,.header-group h5,.header-group h6{margin:0}span.sep{color:#bbb;padding:0 6px}.list>*{display:block}.svg-icon{width:1em;height:1em;display:inline-block;position:relative;bottom:-0.105em;margin-inline-end:6px;pointer-events:none;fill:currentColor}.primary-background{background-color:var(--color-primary) !important}.primary-background-light{background-color:var(--color-primary-light)}html.dark-mode .primary-background-light{background:#000}html.dark-mode .primary-background-light .text-link{color:#aaa !important}.link-background{background-color:var(--color-link) !important}.text-pos,.text-pos:hover,.text-pos-hover:hover{color:var(--color-positive) !important;fill:var(--color-positive) !important}.text-warn,.text-warn:hover,.text-warn-hover:hover{color:var(--color-warning) !important;fill:var(--color-warning) !important}.text-neg,.text-neg:hover,.text-neg-hover:hover{color:var(--color-negative) !important;fill:var(--color-negative) !important}.text-primary,.text-primary:hover,.text-primary-hover:hover{color:var(--color-primary) !important;fill:var(--color-primary) !important}.text-link,.text-link:hover,.text-link-hover:hover{color:var(--color-link) !important;fill:var(--color-link) !important}.text-muted{color:#575757 !important;fill:currentColor !important}html.dark-mode .text-muted{color:#888 !important}.text-dark{color:#222 !important;fill:currentColor !important}html.dark-mode .text-dark{color:#ccc !important}.text-white{color:#fff;fill:currentColor !important}.text-bookshelf,.text-bookshelf:hover{color:var(--color-bookshelf);fill:var(--color-bookshelf)}.text-book,.text-book:hover{color:var(--color-book);fill:var(--color-book)}.text-page,.text-page:hover{color:var(--color-page);fill:var(--color-page)}.text-page.draft,.text-page.draft:hover{color:var(--color-page-draft);fill:var(--color-page-draft)}.text-chapter,.text-chapter:hover{color:var(--color-chapter);fill:var(--color-chapter)}.bg-white{background-color:#fff}.bg-book{background-color:var(--color-book)}.bg-chapter{background-color:var(--color-chapter)}.bg-bookshelf{background-color:var(--color-bookshelf)}.container{max-width:1400px;margin-inline-start:auto;margin-inline-end:auto;padding-inline-start:16px;padding-inline-end:16px}.container.medium{max-width:1100px}.container.small{max-width:840px}.container.very-small{max-width:480px}.grid{display:grid;grid-column-gap:24px;grid-row-gap:24px}.grid>*{min-width:0}.grid.half{grid-template-columns:1fr 1fr}.grid.third{grid-template-columns:1fr 1fr 1fr}.grid.left-focus{grid-template-columns:2fr 1fr}.grid.right-focus{grid-template-columns:1fr 3fr}.grid.gap-y-xs{grid-row-gap:6px}.grid.gap-xl{grid-column-gap:32px;grid-row-gap:32px}.grid.gap-xxl{grid-column-gap:48px;grid-row-gap:48px}.grid.v-center{align-items:center}.grid.v-end{align-items:end}.grid.no-gap{grid-row-gap:0;grid-column-gap:0}.grid.no-row-gap{grid-row-gap:0}@media screen and (max-width: 880px){.grid.third:not(.no-break){grid-template-columns:1fr 1fr}.grid.half:not(.no-break),.grid.left-focus:not(.no-break),.grid.right-focus:not(.no-break){grid-template-columns:1fr}.grid.half.collapse-xs{grid-template-columns:1fr 1fr}.grid.gap-xl{grid-column-gap:16px;grid-row-gap:16px}.grid.right-focus.reverse-collapse>*:nth-child(2){order:0}.grid.right-focus.reverse-collapse>*:nth-child(1){order:1}}@media screen and (max-width: 600px){.grid.third:not(.no-break){grid-template-columns:1fr}}@media screen and (max-width: 400px){.grid.half.collapse-xs{grid-template-columns:1fr}}#content{flex:1 0 auto}body.flexbox{display:flex;flex-direction:column;align-items:stretch;height:100%;min-height:100%;max-height:100%;overflow:hidden}body.flexbox #content{flex:1;display:flex;min-height:0}.flex-fill{display:flex;align-items:stretch;min-height:0;max-width:100%;position:relative}.flex-container-row{display:flex;flex-direction:row}.flex-container-row.v-center{align-items:center}.flex-container-column{display:flex;flex-direction:column}.flex-container-row.inline,.flex-container-column.inline{display:inline-flex !important}.flex-container-column.wrap,.flex-container-row.wrap{flex-wrap:wrap}.flex{min-height:0;flex:1;max-width:100%}.flex.fit-content{flex-basis:auto;flex-grow:0}.flex.fill-area{flex-grow:1;flex-shrink:0;min-width:fit-content}.flex-2{min-height:0;flex:2;max-width:100%}.flex-3{min-height:0;flex:3;max-width:100%}.flex-none{flex:none}.justify-flex-start{justify-content:flex-start}.justify-flex-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-space-between{justify-content:space-between}.items-center{align-items:center}.items-stretch{align-items:stretch}.min-width-xxxxs{min-width:60px}.min-width-xxxs{min-width:80px}.min-width-xxs{min-width:100px}.min-width-xs{min-width:120px}.min-width-s{min-width:160px}.min-width-m{min-width:200px}.min-width-l{min-width:240px}.min-width-xl{min-width:280px}.min-width-xxl{min-width:320px}.block{display:block !important;position:relative}.inline{display:inline !important}.block.inline{display:inline-block !important}.relative{position:relative}.fixed{position:fixed;z-index:20}.fixed.top-right{top:0;right:0}.hidden{display:none !important}.overflow-hidden{overflow:hidden}.height-fill{height:100%}.height-auto{height:auto !important}.float{float:left}.float.right{float:right}.sticky-top-m{position:sticky;top:16px}@media screen and (max-width: 360px){.hide-under-xxs{display:none !important}}@media screen and (min-width: 361px){.hide-over-xxs{display:none !important}}@media screen and (max-width: 400px){.hide-under-xs{display:none !important}}@media screen and (min-width: 401px){.hide-over-xs{display:none !important}}@media screen and (max-width: 600px){.hide-under-s{display:none !important}}@media screen and (min-width: 601px){.hide-over-s{display:none !important}}@media screen and (max-width: 880px){.hide-under-m{display:none !important}}@media screen and (min-width: 881px){.hide-over-m{display:none !important}}@media screen and (max-width: 1000px){.hide-under-l{display:none !important}}@media screen and (min-width: 1001px){.hide-over-l{display:none !important}}@media screen and (max-width: 1100px){.hide-under-xl{display:none !important}}@media screen and (min-width: 1101px){.hide-over-xl{display:none !important}}[hidden]{display:none !important}.screen-reader-only{position:absolute;inset-inline-start:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.rounded{border-radius:4px}.dual-column-content{columns:2}@media screen and (max-width: 880px){.dual-column-content{columns:1}}.clearfix::before,.clearfix::after{content:" ";display:table}.clearfix::after{clear:both}.tri-layout-container{display:grid;margin-inline-start:32px;margin-inline-end:32px;grid-template-columns:1fr 4fr 1fr;grid-template-areas:"a b c";grid-column-gap:32px;position:relative}.tri-layout-sides{grid-column-start:a;grid-column-end:c;grid-row:1;min-width:0;z-index:4}.tri-layout-sides-content{display:grid;grid-template-areas:"a b c";grid-template-columns:1fr 4fr 1fr;height:100%}.tri-layout-middle{grid-area:b;padding-top:16px;min-width:0;z-index:5}.tri-layout-right{grid-area:c;min-width:0;position:relative}.tri-layout-left{grid-area:a;min-width:0;position:relative}@media screen and (min-width: 1401px){.tri-layout-left-contents,.tri-layout-right-contents{padding:32px 16px;position:sticky;top:0;max-height:100vh;min-height:50vh;overflow-y:scroll;overflow-x:hidden;height:100%;scrollbar-width:none;-ms-overflow-style:none}.tri-layout-left-contents::-webkit-scrollbar,.tri-layout-right-contents::-webkit-scrollbar{display:none}.tri-layout-middle-contents{max-width:940px;margin:0 auto}}@media screen and (min-width: 1401px)and (max-width: 1700px){.tri-layout-sides-content,.tri-layout-container{grid-template-columns:1fr 972px 1fr}.tri-layout-container{grid-column-gap:12px;margin-inline-start:16px;margin-inline-end:16px}}@media screen and (max-width: 1400px){.tri-layout-container{grid-template-areas:"a b b";grid-template-columns:1fr 3fr;grid-template-rows:min-content min-content 1fr;margin-inline-start:19px;margin-inline-end:19px}.tri-layout-sides{grid-column-start:a;grid-column-end:a}.tri-layout-sides-content{display:block}}@media screen and (min-width: 1001px)and (max-width: 1400px){.tri-layout-sides-content{position:sticky;top:0;max-height:100vh;min-height:50vh;overflow-y:scroll;overflow-x:hidden;height:100%;scrollbar-width:none;-ms-overflow-style:none;padding-inline:16px;margin-inline:-16px}.tri-layout-sides-content::-webkit-scrollbar{display:none}}@media screen and (min-width: 1001px){.tri-layout-mobile-tabs{display:none}.tri-layout-left-contents>*,.tri-layout-right-contents>*{opacity:.6;transition:opacity ease-in-out 120ms}html.dark-mode .tri-layout-left-contents>*,html.dark-mode .tri-layout-right-contents>*{opacity:.75}.tri-layout-left-contents>*:hover,.tri-layout-left-contents>*:focus-within,.tri-layout-right-contents>*:hover,.tri-layout-right-contents>*:focus-within{opacity:1 !important}}@media screen and (min-width: 1001px)and (prefers-contrast: more){.tri-layout-left-contents>*,.tri-layout-right-contents>*{opacity:1 !important}}@media screen and (max-width: 1000px){.tri-layout-container{grid-template-areas:none;grid-template-columns:1fr;grid-column-gap:0;padding-inline-end:6px;padding-inline-start:6px}.tri-layout-container .tri-layout-sides{padding-inline-start:16px;padding-inline-end:16px;grid-column:1/1}.tri-layout-container .tri-layout-left>*,.tri-layout-container .tri-layout-right>*{display:none;pointer-events:none}.tri-layout-container .tri-layout-left,.tri-layout-container .tri-layout-right{padding-top:0 !important}.tri-layout-container .tri-layout-middle{grid-area:none;grid-row:3;grid-column:1/1;z-index:1;overflow:hidden;transition:transform ease-in-out 240ms}.tri-layout-container .tri-layout-left{grid-row:2}.tri-layout-container.show-info{overflow:hidden}.tri-layout-container.show-info .tri-layout-middle{display:none}.tri-layout-container.show-info .tri-layout-right>*,.tri-layout-container.show-info .tri-layout-left>*{display:block;pointer-events:auto}}@media screen and (max-width: 880px){.tri-layout-container{margin-inline-start:0;margin-inline-end:0}}.scroll-away-from-top:before,.scroll-away-from-bottom:after{content:"";display:block;position:absolute;color:#f2f2f2;left:0;top:0;width:100%;height:50px;background:linear-gradient(to bottom, currentColor, transparent);z-index:2}html.dark-mode .scroll-away-from-top:before,html.dark-mode .scroll-away-from-bottom:after{color:#111}.scroll-away-from-bottom:after{top:auto;bottom:0;background:linear-gradient(to top, currentColor, transparent)}.card{background-color:#fff;box-shadow:0 1px 6px -1px rgba(0,0,0,.1);border-radius:3px;break-inside:avoid}html.dark-mode .card{background-color:#222}.card .body,.card p.empty-text{padding-block:16px}.card a,.card p{word-wrap:break-word;word-break:break-word}.card-title{padding:16px 16px 6px;margin:0;font-size:14px;color:#222;fill:#222;font-weight:400}.card-title a{line-height:1}.card-footer-link,button.card-footer-link{display:block;padding:12px 16px;line-height:1;border-top:1px solid;width:100%;text-align:left;border-color:#ddd;border-radius:0 0 3px 3px;font-size:.9em;margin-top:6px}html.dark-mode .card-footer-link,html.dark-mode button.card-footer-link{border-color:#555}.card-footer-link:hover,button.card-footer-link:hover{text-decoration:none;background-color:#f2f2f2}html.dark-mode .card-footer-link:hover,html.dark-mode button.card-footer-link:hover{background-color:#2d2d2d}.card-footer-link:focus,button.card-footer-link:focus{background-color:#eee;outline:1px dotted #666;outline-offset:-2px}html.dark-mode .card-footer-link:focus,html.dark-mode button.card-footer-link:focus{background-color:#222}.card.border-card{border:1px solid;border-color:#ddd}html.dark-mode .card.border-card{border-color:#000}.card.drag-card{border:1px solid #ddd;border-color:#ddd;background-color:#fff;border-radius:4px;display:flex;padding:0 0 0 40px;margin:12px 0;position:relative}html.dark-mode .card.drag-card{border-color:#000}html.dark-mode .card.drag-card{background-color:#333}.card.drag-card .drag-card-action{cursor:pointer}.card.drag-card .handle,.card.drag-card .drag-card-action{display:flex;align-items:center;text-align:center;justify-content:center;width:28px;flex-grow:0;padding:0 6px}.card.drag-card .handle:hover,.card.drag-card .drag-card-action:hover{background-color:#eee}html.dark-mode .card.drag-card .handle:hover,html.dark-mode .card.drag-card .drag-card-action:hover{background-color:#2d2d2d}.card.drag-card .handle .svg-icon,.card.drag-card .drag-card-action .svg-icon{margin-inline-end:0px}.card.drag-card .outline input{margin:12px 0;width:100%}.card.drag-card .outline{position:relative}.card.drag-card .handle{background-color:#eee;left:0;position:absolute;top:0;bottom:0}html.dark-mode .card.drag-card .handle{background-color:#2d2d2d}.card.drag-card>div{padding:0 12px;max-width:80%;flex:1}.grid-card{display:flex;flex-direction:column;border:1px solid #ddd;border-color:#ddd;margin-bottom:24px;border-radius:4px;overflow:hidden;min-width:100px;color:#444;transition:border-color ease-in-out 120ms,box-shadow ease-in-out 120ms}html.dark-mode .grid-card{border-color:#000}.grid-card:hover{color:#444;text-decoration:none;box-shadow:0 1px 6px -1px rgba(0,0,0,.1)}html.dark-mode .grid-card:hover{box-shadow:0 1px 6px -1px rgba(0,0,0,.5)}.grid-card h2{width:100%;font-size:1.5em;margin:0 0 10px}.grid-card p{font-size:.7rem;margin:0;line-height:1.6em}.grid-card .grid-card-content{flex:1;border-top:0;border-bottom-width:2px}.grid-card .grid-card-content,.grid-card .grid-card-footer{padding:24px}.grid-card .grid-card-content+.grid-card-footer{padding-top:0}.book-grid-item .grid-card-footer p.small{font-size:.8em;margin:0}.content-wrap.card{padding:16px 48px;margin-inline-start:auto;margin-inline-end:auto;margin-bottom:24px;overflow:initial;min-height:60vh;border-radius:8px}.content-wrap.card.auto-height{min-height:0}.content-wrap.card.fill-width{width:100%}@media screen and (max-width: 1400px){.content-wrap.card{padding:16px 32px}}@media screen and (max-width: 880px){.content-wrap.card{padding:16px 24px}}@media screen and (max-width: 600px){.content-wrap.card{padding:16px 16px}}.sub-card{box-shadow:0 1px 3px 0 rgba(0,0,0,.1);border:1.5px solid;border-color:#e2e2e2;border-radius:4px}html.dark-mode .sub-card{border-color:#444}.outline-hover{border:1px solid rgba(0,0,0,0) !important}.outline-hover:hover{border:1px solid rgba(0,0,0,.1) !important}.fade-in-when-active{opacity:.6;transition:opacity ease-in-out 120ms}html.dark-mode .fade-in-when-active{opacity:.7}.fade-in-when-active:hover,.fade-in-when-active:focus-within{opacity:1 !important}@media(prefers-contrast: more){.fade-in-when-active{opacity:1 !important}}.tag-item{display:inline-flex;margin-bottom:6px;margin-inline-end:6px;border-radius:4px;border:1px solid;overflow:hidden;font-size:.85em;border-color:#ccc}html.dark-mode .tag-item{border-color:#666}.tag-item a,.tag-item span,.tag-item a:hover,.tag-item a:active{padding:4px 8px;color:rgba(0,0,0,.7);transition:background-color ease-in-out 80ms;text-decoration:none}html.dark-mode .tag-item a,html.dark-mode .tag-item span,html.dark-mode .tag-item a:hover,html.dark-mode .tag-item a:active{color:hsla(0,0%,100%,.8)}.tag-item a:hover{background-color:hsla(0,0%,100%,.7)}html.dark-mode .tag-item a:hover{background-color:hsla(0,0%,100%,.3)}.tag-item svg{fill:rgba(0,0,0,.5)}html.dark-mode .tag-item svg{fill:hsla(0,0%,100%,.5)}.tag-item .tag-value{border-inline-start:1px solid;border-color:#ddd;background-color:hsla(0,0%,100%,.5)}html.dark-mode .tag-item .tag-value{border-color:#666}html.dark-mode .tag-item .tag-value{background-color:hsla(0,0%,100%,.2)}.tag-name.highlight,.tag-value.highlight{font-weight:bold}.tag-list div:last-child .tag-item{margin-bottom:0}.item-list-row .tag-item{margin-bottom:0}.api-method{font-size:.75rem;background-color:#888;padding:6px;line-height:1.3;opacity:.7;vertical-align:top;border-radius:3px;color:#fff;display:inline-block;min-width:60px;text-align:center;font-weight:bold}.api-method[data-method=GET]{background-color:#077b70}.api-method[data-method=POST]{background-color:#cf4d03}.api-method[data-method=PUT]{background-color:#0288d1}.api-method[data-method=DELETE]{background-color:#ab0f0e}.sticky-sidebar{position:sticky;top:16px;max-height:calc(100vh - 16px);overflow-y:auto}button{background-color:rgba(0,0,0,0);border:0;font-size:100%}.button{text-decoration:none;font-size:.85rem;line-height:1.4em;padding:7.8px 16px;margin-top:6px;margin-bottom:6px;display:inline-block;font-weight:400;outline:0;border-radius:4px;cursor:pointer;transition:background-color ease-in-out 120ms,filter ease-in-out 120ms,box-shadow ease-in-out 120ms;box-shadow:none;background-color:var(--color-primary);color:#fff;border:1px solid var(--color-primary);vertical-align:top}.button:hover,.button:focus,.button:active{background-color:var(--color-primary);text-decoration:none;color:#fff}.button:hover{box-shadow:0 0 4px 1px #ccc;filter:brightness(110%)}html.dark-mode .button:hover{box-shadow:0 0 4px 1px rgba(0,0,0,.5)}.button:focus{outline:1px dotted currentColor;outline-offset:-6px;box-shadow:none;filter:brightness(90%)}.button:active{outline:0}.button.outline{background-color:rgba(0,0,0,0);color:#666;fill:currentColor;border:1px solid;border-color:#ccc}html.dark-mode .button.outline{color:#aaa}html.dark-mode .button.outline{border-color:#666}.button.outline:hover,.button.outline:focus,.button.outline:active{color:#444;border:1px solid #ccc;box-shadow:0 1px 4px 0 rgba(0,0,0,.1);background-color:#f2f2f2;background-color:#f8f8f8;filter:none}html.dark-mode .button.outline:hover,html.dark-mode .button.outline:focus,html.dark-mode .button.outline:active{color:#bbb}html.dark-mode .button.outline:hover,html.dark-mode .button.outline:focus,html.dark-mode .button.outline:active{background-color:#444}.button.outline:active{border-color:#bbb;background-color:#ddd;color:#666;box-shadow:inset 0 0 2px rgba(0,0,0,.1)}.button+.button{margin-inline-start:12px}.button.small{font-size:.75rem;padding:7.2px 12px}.text-button{cursor:pointer;background-color:rgba(0,0,0,0);padding:0;margin:0;border:none;user-select:none;font-size:.75rem;line-height:1.4em;color:var(--color-link)}.text-button:active{outline:0}.text-button:hover{text-decoration:none}.text-button:hover,.text-button:focus{color:var(--color-link);fill:var(--color-link)}.text-button.hover-underline:hover{text-decoration:underline}.button.block{width:100%;text-align:start;display:block}.button.icon .svg-icon,.icon-button .svg-icon,.text-button.icon .svg-icon{margin-inline-end:0}.icon-button{text-align:center;border:1px solid rgba(0,0,0,0)}.icon-button:hover{background-color:rgba(0,0,0,.05);border-radius:4px;border-color:#ddd;cursor:pointer}html.dark-mode .icon-button:hover{border-color:#444}.button.svg{display:flex;align-items:center;padding:12px 16px;padding-bottom:10px;width:100%}.button.svg svg{display:inline-block;width:24px;height:24px;bottom:auto;margin-inline-end:16px}.button[disabled]{background-color:#bbb;cursor:default;border-color:#ccc}.button[disabled]:hover{background-color:#bbb;cursor:default;box-shadow:none}table{min-width:100px;max-width:100%}table thead{background-color:#f8f8f8;font-weight:500}html.dark-mode table thead{background-color:#333}table td,table th{min-width:10px;padding:6px 8px;border:1px solid #ddd;overflow:auto;line-height:1.2;word-break:break-word;vertical-align:top}table td p,table th p{margin:0}table.table{width:100%}table.table tr td,table.table tr th{border-bottom:1px solid rgba(0,0,0,.05)}table.table th,table.table td{text-align:start;border:none;padding:12px 12px;vertical-align:middle;margin:0;overflow:visible}table.table th{font-weight:bold}table.table tr:hover{background-color:#f2f2f2}html.dark-mode table.table tr:hover{background-color:#333}table.table .text-right{text-align:end}table.table .text-center{text-align:center}table.table td.actions{overflow:visible}table.table a{display:inline-block}table.table.expand-to-padding{margin-left:-12px;margin-right:-12px;width:calc(100% + 2*12px);max-width:calc(100% + 2*12px)}table.no-style td{border:0;padding:0}table.list-table{margin:0 -6px}table.list-table td{border:0;vertical-align:middle;padding:6px}.input-base,input[type=text],input[type=number],input[type=email],input[type=date],input[type=search],input[type=url],input[type=color],input[type=password],select,textarea,.fake-input{border-radius:3px;border:1px solid #d4d4d4;background-color:#fff;border-color:#d4d4d4;color:#666;display:inline-block;font-size:14px;padding:10.8px;height:40px;width:250px;max-width:100%}html.dark-mode .input-base,html.dark-mode input[type=text],html.dark-mode input[type=number],html.dark-mode input[type=email],html.dark-mode input[type=date],html.dark-mode input[type=search],html.dark-mode input[type=url],html.dark-mode input[type=color],html.dark-mode input[type=password],html.dark-mode select,html.dark-mode textarea,html.dark-mode .fake-input{background-color:#333}html.dark-mode .input-base,html.dark-mode input[type=text],html.dark-mode input[type=number],html.dark-mode input[type=email],html.dark-mode input[type=date],html.dark-mode input[type=search],html.dark-mode input[type=url],html.dark-mode input[type=color],html.dark-mode input[type=password],html.dark-mode select,html.dark-mode textarea,html.dark-mode .fake-input{border-color:#111}html.dark-mode .input-base,html.dark-mode input[type=text],html.dark-mode input[type=number],html.dark-mode input[type=email],html.dark-mode input[type=date],html.dark-mode input[type=search],html.dark-mode input[type=url],html.dark-mode input[type=color],html.dark-mode input[type=password],html.dark-mode select,html.dark-mode textarea,html.dark-mode .fake-input{color:#aaa}.input-base.neg,input.neg[type=text],input.neg[type=number],input.neg[type=email],input.neg[type=date],input.neg[type=search],input.neg[type=url],input.neg[type=color],input.neg[type=password],select.neg,textarea.neg,.neg.fake-input,.input-base.invalid,input.invalid[type=text],input.invalid[type=number],input.invalid[type=email],input.invalid[type=date],input.invalid[type=search],input.invalid[type=url],input.invalid[type=color],input.invalid[type=password],select.invalid,textarea.invalid,.invalid.fake-input{border:1px solid var(--color-negative)}.input-base.pos,input.pos[type=text],input.pos[type=number],input.pos[type=email],input.pos[type=date],input.pos[type=search],input.pos[type=url],input.pos[type=color],input.pos[type=password],select.pos,textarea.pos,.pos.fake-input,.input-base.valid,input.valid[type=text],input.valid[type=number],input.valid[type=email],input.valid[type=date],input.valid[type=search],input.valid[type=url],input.valid[type=color],input.valid[type=password],select.valid,textarea.valid,.valid.fake-input{border:1px solid var(--color-positive)}.input-base.disabled,input.disabled[type=text],input.disabled[type=number],input.disabled[type=email],input.disabled[type=date],input.disabled[type=search],input.disabled[type=url],input.disabled[type=color],input.disabled[type=password],select.disabled,textarea.disabled,.disabled.fake-input,.input-base[disabled],input[disabled][type=text],input[disabled][type=number],input[disabled][type=email],input[disabled][type=date],input[disabled][type=search],input[disabled][type=url],input[disabled][type=color],input[disabled][type=password],select[disabled],textarea[disabled],[disabled].fake-input{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAMUlEQVQIW2NkwAGuXbv2nxGbHEhCS0uLEUMSJgHShCKJLIEiiS4Bl8QmAZbEJQGSBAC62BuJ+tt7zgAAAABJRU5ErkJggg==)}.input-base[readonly],input[readonly][type=text],input[readonly][type=number],input[readonly][type=email],input[readonly][type=date],input[readonly][type=search],input[readonly][type=url],input[readonly][type=color],input[readonly][type=password],select[readonly],textarea[readonly],[readonly].fake-input{background-color:#f8f8f8}.input-base:focus,input[type=text]:focus,input[type=number]:focus,input[type=email]:focus,input[type=date]:focus,input[type=search]:focus,input[type=url]:focus,input[type=color]:focus,input[type=password]:focus,select:focus,textarea:focus,.fake-input:focus{border-color:var(--color-primary);outline:1px solid var(--color-primary)}.input-fill-width{width:100% !important}.fake-input{overflow:auto}#html-editor{display:none}#markdown-editor{position:relative;z-index:5}#markdown-editor #markdown-editor-input{font-style:normal;font-weight:400;padding:6px 16px;color:#444;background-color:#fff;border-radius:0;height:100%;font-size:14px;line-height:1.2;max-height:100%;flex:1;border:0;width:100%;margin:0}html.dark-mode #markdown-editor #markdown-editor-input{color:#aaa}html.dark-mode #markdown-editor #markdown-editor-input{background-color:#222}#markdown-editor #markdown-editor-input:focus{outline:0}#markdown-editor.fullscreen{position:fixed;top:0;left:0;height:100%;z-index:2}.markdown-editor-wrap{border-top:1px solid #ddd;border-bottom:1px solid #ddd;border-color:#ddd;position:relative;flex:1;min-width:0}html.dark-mode .markdown-editor-wrap{border-color:#000}.markdown-editor-wrap+.markdown-editor-wrap{flex-basis:50%;flex-shrink:0;flex-grow:0}.markdown-editor-wrap .cm-editor{flex:1;max-width:100%;border:0;margin:0}.markdown-panel-divider{width:2px;background-color:#ddd;cursor:col-resize}html.dark-mode .markdown-panel-divider{background-color:#000}@media screen and (max-width: 880px){#markdown-editor{flex-direction:column}#markdown-editor .markdown-editor-wrap{width:100%;max-width:100%;flex-grow:1;flex-basis:auto !important;min-height:0}.editor-toolbar-label{float:none !important;border-color:#ddd;display:block}html.dark-mode .editor-toolbar-label{border-color:#555}.markdown-editor-wrap:not(.active) .editor-toolbar+div,.markdown-editor-wrap:not(.active) .editor-toolbar .buttons,.markdown-editor-wrap:not(.active) .markdown-display{display:none}#markdown-editor .markdown-editor-wrap:not(.active){flex-grow:0;flex:none}}.markdown-editor-display{background-color:#fff}.markdown-editor-display body{display:block;background-color:#fff;padding-inline-start:12px;padding-inline-end:12px;max-width:864px}.markdown-editor-display [drawio-diagram]:hover{outline:2px solid var(--color-primary)}html.markdown-editor-display.dark-mode{background-color:#222}html.markdown-editor-display.dark-mode body{background-color:#222}.editor-toolbar{height:32px;width:100%;font-size:11px;line-height:1.6;border-bottom:1px solid #ccc;background-color:#fff;border-color:#ccc;flex:none}html.dark-mode .editor-toolbar{background-color:#333}html.dark-mode .editor-toolbar{border-color:#000}html.dark-mode .editor-toolbar button{color:#aaa}.editor-toolbar .buttons{font-size:14px}.editor-toolbar .buttons .dropdown-menu{padding:0}.editor-toolbar .buttons .toggle-switch{margin:12px 0}.editor-toolbar .buttons button{font-size:.9rem;width:2rem;text-align:center;border-left:1px solid;border-color:#ddd}html.dark-mode .editor-toolbar .buttons button{border-color:#555}.editor-toolbar .buttons button svg{margin-inline-end:0}.editor-toolbar .buttons button:hover{background-color:#ddd}html.dark-mode .editor-toolbar .buttons button:hover{background-color:#222}label{color:#666;display:block;line-height:1.4em;font-size:.94em;font-weight:400;padding-bottom:2px;margin-bottom:.2em}html.dark-mode label{color:#ddd}label.inline{display:inline-block}label.radio,label.checkbox{font-weight:400;user-select:none}label.radio input[type=radio],label.radio input[type=checkbox],label.checkbox input[type=radio],label.checkbox input[type=checkbox]{margin-inline-end:6px}label.inline.checkbox{margin-inline-end:16px}label+p.small{margin-bottom:.8em}table.form-table{max-width:100%}table.form-table td{overflow:hidden;padding:1.5px 0}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url("data:image/svg+xml;utf8,");background-size:10px 12px;background-position:calc(100% - 20px) 64%;background-repeat:no-repeat}html[dir=rtl] select{background-position:20px 70%}input[type=date]{width:190px}input[type=color]{height:60px}input[type=color].small{height:42px;width:60px;padding:2px}.toggle-switch{user-select:none;display:inline-grid;grid-template-columns:28px 1fr;align-items:center;margin:16px 0}.toggle-switch .custom-checkbox{width:16px;height:16px;border-radius:2px;display:inline-block;border:2px solid currentColor;overflow:hidden;fill:currentColor}.toggle-switch .custom-checkbox .svg-icon{width:100%;height:100%;margin:0;bottom:auto;top:-1.5px;left:0;transition:transform ease-in-out 120ms;transform:scale(0);transform-origin:center center}.toggle-switch input[type=checkbox]{display:none}.toggle-switch input[type=checkbox]:checked+.custom-checkbox .svg-icon{transform:scale(1)}.toggle-switch .custom-checkbox:hover{background-color:rgba(0,0,0,.05);opacity:.8}.toggle-switch input[type=checkbox][disabled]~*{opacity:.8;cursor:not-allowed}.toggle-switch input[type=checkbox][disabled]~.custom-checkbox{border-color:#999;color:#999 !important;background:#f2f2f2}.toggle-switch-list .toggle-switch{margin:6px 0}.toggle-switch-list.compact .toggle-switch{margin:1px 0}.form-group{margin-bottom:12px}.setting-list>div{border-bottom:1px solid #ddd;padding:32px 0}.setting-list>div:last-child{border-bottom:none}.setting-list-label{color:#222;color:#222;font-size:1rem}html.dark-mode .setting-list-label{color:#ddd}.setting-list-label+p.small{margin-bottom:0}.setting-list-label+.grid{margin-top:16px}.setting-list .grid input[type=text],.setting-list .grid input[type=email],.setting-list .grid input[type=password],.setting-list .grid select,.stretch-inputs input[type=text],.stretch-inputs input[type=email],.stretch-inputs input[type=password],.stretch-inputs select{width:100%}.simple-code-input{background-color:#f8f8f8;font-family:monospace;font-size:12px;min-height:100px;display:block;width:100%}.form-group div.text-pos,.form-group div.text-neg,.form-group p.text-post,.form-group p.text-neg{padding:6px 0}.form-group.collapsible{padding:0 16px;border:1px solid;border-color:#ddd;border-radius:4px}html.dark-mode .form-group.collapsible{border-color:#000}.form-group.collapsible .collapse-title{margin-inline-start:-16px;margin-inline-end:-16px;padding:12px 16px;display:block;width:calc(100% + 32px);text-align:start}.form-group.collapsible .collapse-title,.form-group.collapsible .collapse-title label{cursor:pointer}.form-group.collapsible .collapse-title label{padding-bottom:0;margin-bottom:0;color:inherit}.form-group.collapsible .collapse-title label:before{display:inline-block;content:"▸";margin-inline-end:16px;transition:all ease-in-out 400ms;transform:rotate(0)}.form-group.collapsible .collapse-content{display:none;padding-bottom:16px}.form-group.collapsible.open .collapse-title label:before{transform:rotate(90deg)}.form-group.ambrosia-container,.form-group.ambrosia-container *{position:absolute !important;height:1px !important;width:1px !important;margin:-1px !important;padding:0 !important;background:rgba(0,0,0,0) !important;color:rgba(0,0,0,0) !important;border:none !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important}.title-input input[type=text]{display:block;width:100%;padding:12px;margin-top:0;font-size:2em;height:auto}.description-input textarea{display:block;width:100%;padding:12px;font-size:14px;color:#666;height:auto}.description-input>.tox-tinymce{border:1px solid #ddd !important;border-color:#ddd !important;border-radius:3px}html.dark-mode .description-input>.tox-tinymce{border-color:#000 !important}.description-input>.tox-tinymce .tox-toolbar__primary{justify-content:end}.search-box{max-width:100%;position:relative}.search-box button[tabindex="-1"]{background-color:rgba(0,0,0,0);border:none;color:#666;padding:0;cursor:pointer;position:absolute;inset-inline-start:8px;top:10px}html.dark-mode .search-box button[tabindex="-1"]{color:#aaa}.search-box input{display:block;padding:9px;padding-inline-start:28px;width:300px;max-width:100%;height:auto}.search-box.flexible input{width:100%}.search-box button.search-box-cancel{left:auto;right:0}.contained-search-box{display:flex;height:38px;z-index:-1}.contained-search-box.floating{box-shadow:0 1px 3px 1px rgba(76,76,76,.26);border-radius:4px;overflow:hidden}html.dark-mode .contained-search-box.floating{border:1px solid #000}.contained-search-box input,.contained-search-box button{height:100%;border-radius:0;border:1px solid #ddd;border-color:#ddd;margin-inline-start:-1px}html.dark-mode .contained-search-box input,html.dark-mode .contained-search-box button{border-color:#000}.contained-search-box input:last-child,.contained-search-box button:last-child{border-inline-end:0}.contained-search-box input{border:0;flex:5;padding:6px 12px}.contained-search-box input:focus,.contained-search-box input:active{outline:1px dotted var(--color-primary);outline-offset:-2px;border:0}.contained-search-box button{border:0;width:48px;border-inline-start:1px solid #ddd;background-color:#fff;background-color:#fff;color:#444}html.dark-mode .contained-search-box button{background-color:#333}html.dark-mode .contained-search-box button{color:#aaa}.contained-search-box button:focus{outline:1px dotted var(--color-primary);outline-offset:-2px}.contained-search-box svg{margin:0}@media screen and (max-width: 600px){.contained-search-box{width:180px}}.outline>input{border:0;border-bottom:2px solid #ddd;border-radius:0}.outline>input:focus,.outline>input:active{border:0;border-bottom:2px solid #aaa;outline:0}.image-picker img{background-color:#bbb;max-width:100%}.custom-file-input{overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;height:1px;border:0;clip:rect(0, 0, 0, 0)}.custom-file-input:focus+label{border-color:var(--color-primary);outline:1px solid var(--color-primary)}.custom-simple-file-input{max-width:100%;border:1px solid;border-color:#ddd;border-radius:4px;padding:12px 16px}html.dark-mode .custom-simple-file-input{border-color:#666}.custom-simple-file-input::file-selector-button{background-color:rgba(0,0,0,0);text-decoration:none;font-size:.8rem;line-height:1.4em;padding:6px 12px;border:1px solid;font-weight:400;outline:0;border-radius:4px;cursor:pointer;margin-right:16px;color:#666;border-color:#ccc}html.dark-mode .custom-simple-file-input::file-selector-button{color:#aaa}html.dark-mode .custom-simple-file-input::file-selector-button{border-color:#666}.custom-simple-file-input::file-selector-button:hover,.custom-simple-file-input::file-selector-button:focus,.custom-simple-file-input::file-selector-button:active{color:#444;border:1px solid #ccc;box-shadow:0 1px 4px 0 rgba(0,0,0,.1);background-color:#f2f2f2;background-color:#f8f8f8;filter:none}html.dark-mode .custom-simple-file-input::file-selector-button:hover,html.dark-mode .custom-simple-file-input::file-selector-button:focus,html.dark-mode .custom-simple-file-input::file-selector-button:active{color:#bbb}html.dark-mode .custom-simple-file-input::file-selector-button:hover,html.dark-mode .custom-simple-file-input::file-selector-button:focus,html.dark-mode .custom-simple-file-input::file-selector-button:active{background-color:#444}.custom-simple-file-input::file-selector-button:active{border-color:#bbb;background-color:#ddd;color:#666;box-shadow:inset 0 0 2px rgba(0,0,0,.1)}input.shortcut-input{width:auto;max-width:120px;height:auto}.anim.fadeIn{opacity:0;animation-name:fadeIn;animation-duration:120ms;animation-timing-function:ease-in-out;animation-fill-mode:forwards}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.search-suggestions-animation{animation-name:searchSuggestions;animation-duration:120ms;animation-fill-mode:forwards;animation-timing-function:cubic-bezier(0.62, 0.28, 0.23, 0.99)}@keyframes searchSuggestions{0%{opacity:.5;transform:scale(0.9)}100%{opacity:1;transform:scale(1)}}@keyframes loadingBob{0%{transform:translate3d(0, 0, 0)}30%{transform:translate3d(0, 0, 0)}50%{transform:translate3d(0, -10px, 0)}70%{transform:translate3d(0, 0, 0)}100%{transform:translate3d(0, 0, 0)}}@keyframes pointer{0%{transform:translate3d(0, 20px, 0) scale3d(0, 0, 0)}100%{transform:translate3d(0, 0, 0) scale3d(1, 1, 1)}}.anim.pointer{transform-origin:50% 100%;animation-name:pointer;animation-duration:180ms;animation-delay:0s;animation-timing-function:cubic-bezier(0.62, 0.28, 0.23, 0.99)}@keyframes highlight{0%{background-color:var(--color-primary-light)}33%{background-color:rgba(0,0,0,0)}66%{background-color:var(--color-primary-light)}100%{background-color:rgba(0,0,0,0)}}.anim-highlight{animation-name:highlight;animation-duration:2s;animation-delay:0s;animation-timing-function:linear}.tox.tox-fullscreen{position:fixed;top:0;height:100%;width:100%;max-width:100%;z-index:100}.tox.tox-tinymce{border-inline:0;border-bottom:0}.page-content.mce-content-body{padding-block-start:1rem;padding-block-end:1rem;outline:0;display:block;max-width:870px}.wysiwyg-input.mce-content-body{padding-block-start:1rem;padding-block-end:1rem;outline:0;display:block}.wysiwyg-input.mce-content-body:before{padding:1rem;top:4px;font-style:italic;color:rgba(34,47,62,.5)}html.dark-mode .wysiwyg-input.mce-content-body:before{color:rgba(155,155,155,.5)}.page-content.mce-content-body doc-root{display:block}.page-content.mce-content-body code-block{display:block}body.page-content.mce-content-body{padding-bottom:5rem}.tox .tox-pop__dialog .tox-toolbar{background:rgba(0,0,0,0) !important}.tox-toolbar__primary{justify-content:center}.page-content.mce-content-body code-block>*{pointer-events:none}.page-content.mce-content-body code-block pre{display:none}.page-content.mce-content-body details summary{pointer-events:none}.page-content.mce-content-body details doc-root{padding:12px;margin-left:-10px;margin-right:-10px;margin-bottom:-10px;margin-top:-10px;overflow:hidden}.page-content.mce-content-body .mce-preview-object.align-right{float:right !important;margin:6px 0 6px 12px}.page-content.mce-content-body .mce-preview-object.align-left{float:left !important;margin:6px 16px 16px 0}.page-content.mce-content-body .mce-preview-object.align-center{display:block;margin-left:auto;margin-right:auto}.page-content.mce-content-body .mce-preview-object iframe,.page-content.mce-content-body .mce-preview-object video{display:block;margin:0 !important;float:none !important}.page-content.mce-content-body td[data-mce-selected]::after,.page-content.mce-content-body th[data-mce-selected]::after{top:1px;left:1px;bottom:1px;right:1px;outline:1px dashed #1a85ff;outline-offset:0}.dark-mode .tox .tox-toolbar__primary,.dark-mode .tox .tox-menu,.dark-mode .tox .tox-dialog__header,.dark-mode .tox .tox-dialog,.dark-mode .tox .tox-dialog__footer,.dark-mode .tox .tox-pop__dialog,.dark-mode .tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#333 !important}.dark-mode .tox .tox-tbtn svg,.dark-mode .tox .tox-tbtn,.dark-mode .tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#dbdbdb;fill:#dbdbdb}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{width:6em !important}.tox-menu .tox-collection__item blockquote::before{content:none}.tox-menu .tox-collection__item blockquote{border-left:4px solid var(--color-primary) !important;padding:4px 6px !important}.tox-menu .tox-collection__item blockquote{border-left:4px solid var(--color-primary) !important;padding:4px 6px !important}.tox-menu .tox-collection__item p[style*=background-color]{padding:4px 6px !important;border-left:3px solid currentColor !important}.tox-menu .tox-collection__item[title^="<"]>div>div{font-family:var(--font-code) !important;border:1px solid #ddd !important;background-color:#eee !important;padding:4px 6px !important}.tox-menu .tox-collection__item-label{line-height:normal !important}.page-content.mce-content-body .task-list-item{margin-inline-start:0;position:relative}.page-content.mce-content-body .task-list-item>input[type=checkbox]{display:none}.page-content.mce-content-body .task-list-item:before{content:"";display:inline-block;border:2px solid #ccc;width:12px;height:12px;border-radius:2px;margin-inline-end:8px;vertical-align:text-top;cursor:pointer;position:absolute;inset-inline-start:-24px;top:4px}.page-content.mce-content-body .task-list-item[checked]:before{background-color:#ccc;background-image:url('data:image/svg+xml;utf8,');background-position:50% 50%;background-size:100% 100%}:root{--editor-color-primary: #206ea7}.editor-container{background-color:#fff;position:relative}html.dark-mode .editor-container{background-color:#222}.editor-container.fullscreen{z-index:500}.editor-toolbar-main{display:flex;flex-wrap:wrap;justify-content:center;border-top:1px solid #ddd;border-bottom:1px solid #ddd;border-color:#ddd}html.dark-mode .editor-toolbar-main{border-color:#000}@media screen and (max-width: 1100px){.editor-toolbar-main{overflow-x:scroll;flex-wrap:nowrap;justify-content:start}}body.editor-is-fullscreen{overflow:hidden}body.editor-is-fullscreen .edit-area{z-index:20}.editor-content-area{min-height:100%;padding-block:1rem}.editor-content-area:focus{outline:0}.editor-content-wrap{position:relative;overflow-y:scroll;padding-inline:12px;flex:1}.comment-editor-container,.basic-editor-container{border-left:1px solid #ddd;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-radius:3px;border-color:#ddd}html.dark-mode .comment-editor-container,html.dark-mode .basic-editor-container{border-color:#000}.comment-editor-container .editor-toolbar-main,.basic-editor-container .editor-toolbar-main{border-radius:3px 3px 0 0;justify-content:end}.basic-editor-container .editor-content-area{padding-bottom:0}.editor-button{font-size:12px;padding:4px;color:#444;color:#444;border-radius:4px;display:flex;align-items:center;justify-content:center;margin:2px}html.dark-mode .editor-button{color:#999}.editor-button:hover{background-color:#eee;background-color:#eee;cursor:pointer;color:#000}html.dark-mode .editor-button:hover{background-color:#333}.editor-button[disabled]{pointer-events:none;cursor:not-allowed;opacity:.6}.editor-button-active,.editor-button-active:hover{background-color:#ceebff;color:#000}html.dark-mode .editor-button-active,html.dark-mode .editor-button-active:hover{background-color:#444}.editor-button-long{display:flex !important;flex-direction:row;align-items:center;justify-content:start;gap:.5rem}.editor-button-text{font-weight:400;color:#000;font-size:14px;flex:1;padding-inline-end:4px}html.dark-mode .editor-button-text{color:#aaa}.editor-button-format-preview{padding:4px 6px;display:block}.editor-button-long .editor-button-icon{width:24px;height:24px}.editor-button-icon svg{width:24px;height:24px;color:inherit;fill:currentColor;display:block}.editor-menu-button-icon{width:24px;height:24px}.editor-menu-button-icon svg{fill:#888}.editor-container[dir=rtl] .editor-menu-button-icon{rotate:180deg}.editor-button-with-menu-container{display:flex;flex-direction:row;gap:0;align-items:stretch;border-radius:4px}.editor-button-with-menu-container .editor-dropdown-menu-container{display:flex}.editor-button-with-menu-container .editor-dropdown-menu-container>.editor-dropdown-menu{top:100%}.editor-button-with-menu-container .editor-dropdown-menu-container>.editor-button{padding-inline:4px;margin-inline-start:-3px}.editor-button-with-menu-container .editor-dropdown-menu-container>.editor-button svg{width:12px;height:12px}.editor-button-with-menu-container:hover{outline:1px solid;outline-color:#ddd;outline-offset:-3px}html.dark-mode .editor-button-with-menu-container:hover{outline-color:#111}.editor-dropdown-menu-container{position:relative}.editor-dropdown-menu{position:absolute;border:1px solid;background-color:#fff;border-color:#fff;box-shadow:0 0 6px 0 rgba(0,0,0,.15);z-index:99;display:flex;flex-direction:row;border-radius:3px}html.dark-mode .editor-dropdown-menu{background-color:#292929}html.dark-mode .editor-dropdown-menu{border-color:#333}html.dark-mode .editor-dropdown-menu{box-shadow:0 1px 4px 0 rgba(0,0,0,.4)}.editor-dropdown-menu-vertical{display:flex;flex-direction:column;align-items:stretch;min-width:160px}.editor-dropdown-menu-vertical .editor-button{border-bottom:0;text-align:start;display:block;width:100%}.editor-dropdown-menu-vertical>.editor-dropdown-menu-container .editor-dropdown-menu{inset-inline-start:100%;top:0}.editor-separator{display:block;height:1px;opacity:.8;background-color:#ddd}html.dark-mode .editor-separator{background-color:#000}.editor-format-menu-toggle{width:130px;height:32px;font-size:13px;overflow:hidden;padding-inline:12px;justify-content:start;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:98% 50%;background-size:28px}.editor-container[dir=rtl] .editor-format-menu-toggle{background-position:2% 50%}.editor-format-menu .editor-dropdown-menu{min-width:300px}.editor-format-menu .editor-dropdown-menu .editor-dropdown-menu{min-width:220px}.editor-format-menu .editor-dropdown-menu .editor-button-icon{display:none}.editor-format-menu .editor-dropdown-menu .editor-dropdown-menu-container>.editor-button{padding:8px 10px}.editor-overflow-container{display:flex;border-inline:1px solid #ddd;padding-inline:4px;border-color:#ddd}html.dark-mode .editor-overflow-container{border-color:#000}.editor-overflow-container:first-child{border-inline-start:none}.editor-overflow-container:last-child{border-inline-end:none}.editor-overflow-container+.editor-overflow-container{border-inline-start:none}.editor-context-toolbar{position:fixed;border:1px solid #ddd;background-color:#fff;border-color:#ddd;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);padding:.2rem;border-radius:4px;display:flex;flex-direction:row}html.dark-mode .editor-context-toolbar{background-color:#222}html.dark-mode .editor-context-toolbar{border-color:#333}html.dark-mode .editor-context-toolbar{box-shadow:0 1px 4px 0 rgba(0,0,0,.4)}.editor-context-toolbar:before{content:"";z-index:-1;display:block;width:8px;height:8px;position:absolute;background-color:#fff;border-top:1px solid #ddd;border-left:1px solid #ddd;border-color:#ddd;transform:rotate(45deg);left:50%;margin-left:-4px;top:-5px}html.dark-mode .editor-context-toolbar:before{background-color:#222}html.dark-mode .editor-context-toolbar:before{border-color:#333}.editor-context-toolbar.is-above:before{top:calc(100% - 5px);transform:rotate(225deg)}.editor-modal-wrapper{position:fixed;display:flex;align-items:center;justify-content:center;z-index:999;background-color:rgba(0,0,0,.5);width:100%;height:100%}.editor-modal{background-color:#fff;border-radius:4px;overflow:hidden;box-shadow:0 0 15px 0 rgba(0,0,0,.3);margin:6px;max-height:100%;overflow-y:auto}html.dark-mode .editor-modal{background-color:#222}.editor-modal-header{display:flex;justify-content:space-between;align-items:stretch;background-color:var(--color-primary);color:#fff}.editor-modal-title{padding:8px 16px}.editor-modal-close{color:#fff;padding:8px 16px;align-items:center;justify-content:center;cursor:pointer}.editor-modal-close:hover{background-color:hsla(0,0%,100%,.1)}.editor-modal-close svg{width:1rem;height:1rem;fill:currentColor;display:block}.editor-modal-body{padding:16px}.editor-color-select-row{display:flex}.editor-color-select-option{width:28px;height:28px;cursor:pointer;display:flex;align-items:center;justify-content:center}.editor-color-select-option:hover{border-radius:3px;box-sizing:border-box;z-index:3;box-shadow:0 0 4px 1px rgba(0,0,0,.25)}.editor-color-select-option[data-color=""] svg{width:20px;height:20px;fill:#888}.editor-table-creator-row{display:flex}.editor-table-creator-cell{border:1px solid;border-color:#ddd;width:15px;height:15px;cursor:pointer}html.dark-mode .editor-table-creator-cell{border-color:#000}.editor-table-creator-cell.active{background-color:var(--editor-color-primary)}.editor-table-creator-display{text-align:center;padding:.2em}.editor-external-content{min-width:500px;min-height:500px}.editor-external-content h4:first-child{margin-top:0}.editor-image-wrap{position:relative;display:inline-flex}.editor-node-resizer{position:absolute;left:0;right:auto;display:inline-block;outline:2px dashed var(--editor-color-primary);direction:ltr;pointer-events:none}.editor-node-resizer-handle{pointer-events:auto;position:absolute;display:block;width:10px;height:10px;border:2px solid var(--editor-color-primary);z-index:3;background-color:#fff;user-select:none}html.dark-mode .editor-node-resizer-handle{background-color:#000}.editor-node-resizer-handle.nw{inset-inline-start:-5px;inset-block-start:-5px;cursor:nw-resize}.editor-node-resizer-handle.ne{inset-inline-end:-5px;inset-block-start:-5px;cursor:ne-resize}.editor-node-resizer-handle.se{inset-inline-end:-5px;inset-block-end:-5px;cursor:se-resize}.editor-node-resizer-handle.sw{inset-inline-start:-5px;inset-block-end:-5px;cursor:sw-resize}.editor-node-resizer-ghost{opacity:.5;display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:2;pointer-events:none;background-color:var(--editor-color-primary)}.editor-node-resizer.active .editor-node-resizer-ghost{display:block}.editor-table-marker{position:fixed;background-color:var(--editor-color-primary);z-index:3;user-select:none;opacity:0}.editor-table-marker:hover,.editor-table-marker.active{opacity:.4}.editor-table-marker-column{width:4px;cursor:col-resize}.editor-table-marker-row{height:4px;cursor:row-resize}.editor-code-block-wrap{user-select:none}.editor-code-block-wrap>*{pointer-events:none}.editor-code-block-wrap.selected .cm-editor{border:1px dashed var(--editor-color-primary)}.editor-diagram.selected{outline:2px dashed var(--editor-color-primary)}.editor-media-wrap{display:inline-block;cursor:not-allowed}.editor-media-wrap iframe,.editor-media-wrap video{pointer-events:none}.editor-media-wrap.align-left{float:left}.editor-media-wrap.align-right{float:right}.editor-media-wrap.align-center{display:block;margin-inline:auto}.editor-content-area .task-list-item{margin-left:0;position:relative}.editor-content-area .task-list-item>input[type=checkbox]{display:none}.editor-content-area .task-list-item:before{content:"";display:inline-block;border:2px solid #ccc;width:12px;height:12px;border-radius:2px;margin-right:8px;vertical-align:text-top;cursor:pointer;position:absolute;left:-24px;top:4px}.editor-content-area .task-list-item[checked]:before{background-color:#ccc;background-image:url('data:image/svg+xml;utf8,');background-position:50% 50%;background-size:100% 100%}.editor-form-field-wrapper{margin-bottom:.5rem}.editor-form-field-input{display:block;width:260px;min-width:100px;max-width:100%;border:1px solid;border-color:#ddd;padding:.5rem;border-radius:4px;color:#444}html.dark-mode .editor-form-field-input{border-color:#000}html.dark-mode .editor-form-field-input{color:#bbb}@media screen and (max-width: 400px){.editor-form-field-input{min-width:160px}}textarea.editor-form-field-input{font-family:var(--font-code);width:350px;height:250px;font-size:12px}.editor-form-field-label{color:#444;font-weight:700;font-size:12px}.editor-form-actions{display:flex;justify-content:end;gap:12px;margin-top:16px}.editor-form-actions>button{display:block;font-size:.85rem;line-height:1.4em;padding:7.8px 16px;font-weight:400;border-radius:4px;cursor:pointer;box-shadow:none}.editor-form-actions>button:focus{outline:1px dotted currentColor;outline-offset:-6px;box-shadow:none;filter:brightness(90%)}.editor-form-action-primary{background-color:var(--color-primary);color:#fff;border:1px solid var(--color-primary)}.editor-form-action-primary:hover{box-shadow:0 0 4px 1px #ccc;filter:brightness(110%)}html.dark-mode .editor-form-action-primary:hover{box-shadow:0 0 4px 1px rgba(0,0,0,.5)}.editor-form-action-secondary{border:1px solid;border-color:#ccc;color:#666}html.dark-mode .editor-form-action-secondary{border-color:#666}html.dark-mode .editor-form-action-secondary{color:#aaa}.editor-form-action-secondary:hover,.editor-form-action-secondary:focus,.editor-form-action-secondary:active{color:#444;border:1px solid #ccc;box-shadow:0 1px 4px 0 rgba(0,0,0,.1);background-color:#f2f2f2;background-color:#f8f8f8;filter:none}html.dark-mode .editor-form-action-secondary:hover,html.dark-mode .editor-form-action-secondary:focus,html.dark-mode .editor-form-action-secondary:active{color:#bbb}html.dark-mode .editor-form-action-secondary:hover,html.dark-mode .editor-form-action-secondary:focus,html.dark-mode .editor-form-action-secondary:active{background-color:#444}.editor-form-action-secondary:active{border-color:#bbb;background-color:#ddd;color:#666;box-shadow:inset 0 0 2px rgba(0,0,0,.1)}.editor-form-tab-container{display:flex;flex-direction:row;gap:2rem}.editor-form-tab-controls{display:flex;flex-direction:column;align-items:stretch;gap:.25rem}@media screen and (max-width: 880px){.editor-form-tab-container{flex-direction:column;gap:.5rem}.editor-form-tab-controls{flex-direction:row}}.editor-form-tab-control{font-weight:bold;font-size:14px;color:#444;border-bottom:2px solid rgba(0,0,0,0);position:relative;cursor:pointer;padding:.25rem .5rem;text-align:start}html.dark-mode .editor-form-tab-control{color:#666}.editor-form-tab-control[aria-selected=true]{border-color:var(--editor-color-primary);color:var(--editor-color-primary) !important}.editor-form-tab-control[aria-selected=true]:after,.editor-form-tab-control:hover:after{background-color:var(--editor-color-primary);opacity:.15;content:"";display:block;position:absolute;left:0;top:0;width:100%;height:100%}.editor-form-tab-contents{width:260px;max-width:100%}.editor-action-input-container{display:flex;flex-direction:row;align-items:end;justify-content:space-between;gap:.1rem}.editor-action-input-container .editor-button{margin-bottom:12px}.editor-action-input-container input{width:220px}.editor-color-field-container{position:relative}.editor-color-field-container input{padding-left:36px}.editor-color-field-container .editor-dropdown-menu-container{position:absolute;bottom:0}textarea.editor-form-field-input[name=source]{width:1000px;height:600px;max-height:60vh;max-width:80vw}.editor-theme-bold{font-weight:bold}.editor-theme-italic{font-style:italic}.editor-theme-strikethrough{text-decoration-line:line-through}.editor-theme-underline{text-decoration-line:underline}.editor-theme-underline-strikethrough{text-decoration:underline line-through}.cm-editor{font-size:12px;border:1px solid #ddd;line-height:1.4;margin-bottom:24px}.page-content .cm-editor,.CodeMirrorContainer .cm-editor{border-radius:4px}.cm-editor .cm-line{line-height:1.6}.cm-editor .cm-line,.cm-editor .cm-gutter{font-family:var(--font-code)}.dark-mode .cm-editor{border-color:#444}.cm-copy-button{position:absolute;display:flex;align-items:center;justify-content:center;top:-1px;inset-inline-end:-1px;background-color:#eee;border:1px solid #ddd;border-start-end-radius:4px;background-color:#eee;border-color:#ddd;color:#444;line-height:0;cursor:pointer;z-index:5;user-select:none;opacity:0;pointer-events:none;width:32px;height:32px;transition:background-color linear 60ms,color linear 60ms}html.dark-mode .cm-copy-button{background-color:#333}html.dark-mode .cm-copy-button{border-color:#444}html.dark-mode .cm-copy-button{color:#888}.cm-copy-button svg{fill:currentColor}.cm-copy-button.success{background:var(--color-positive);color:#fff}.cm-copy-button:focus{outline:0 !important}.cm-editor:hover .cm-copy-button{user-select:all;opacity:.6;pointer-events:all}.notification{position:fixed;top:0;right:0;margin:32px;padding:16px 24px;background-color:#fff;background-color:#fff;border-radius:4px;border-inline-start:6px solid currentColor;box-shadow:0 1px 6px 1px rgba(22,22,22,.2);z-index:999999;cursor:pointer;max-width:360px;transition:transform ease-in-out 280ms;transform:translateX(580px);display:grid;grid-template-columns:42px 1fr 12px;color:#444;font-weight:700}html.dark-mode .notification{background-color:#444}.notification span,.notification svg{vertical-align:middle;justify-self:center;align-self:center}.notification svg{width:2.8rem;height:2.8rem;padding-inline-end:12px;fill:currentColor}.notification .dismiss{margin-top:-8px}.notification .dismiss svg{height:1rem;color:#444}html.dark-mode .notification .dismiss svg{color:#888}.notification span{vertical-align:middle;line-height:1.3}html.dark-mode .notification span{color:#bbb}.notification.pos{color:var(--color-positive)}.notification.neg{color:var(--color-negative)}.notification.warning{color:var(--color-warning)}.notification.showing{transform:translateX(0)}.notification.showing:hover{transform:translate3d(0, -2px, 0)}.chapter-contents-toggle{cursor:pointer;margin:0;transition:all ease-in-out 180ms;user-select:none}.chapter-contents-toggle svg[data-icon=caret-right]{margin-inline-end:0;font-size:1rem;transition:all ease-in-out 180ms;transform:rotate(0deg);transform-origin:50% 50%}.chapter-contents-toggle.open svg[data-icon=caret-right]{transform:rotate(90deg)}.chapter-contents-toggle svg[data-icon=caret-right]+*{margin-inline-start:3px}[overlay],.popup-background{background-color:rgba(0,0,0,.333);position:fixed;z-index:95536;width:100%;height:100%;min-width:100%;min-height:100%;top:0;left:0;right:0;bottom:0;align-items:center;justify-content:center;display:none}html.dark-mode [overlay],html.dark-mode .popup-background{background-color:rgba(0,0,0,.6)}.popup-body-wrap{display:flex}.popup-body{background-color:#fff;max-height:90%;max-width:1200px;width:90%;height:auto;margin:2% auto;border-radius:4px;box-shadow:0 0 15px 0 rgba(0,0,0,.3);overflow:hidden;z-index:999;display:flex;flex-direction:column;position:relative}html.dark-mode .popup-body{background-color:#333}.popup-body.small{margin:2% auto;width:800px;max-width:90%}.popup-body.very-small{margin:2% auto;width:600px;max-width:90%}.popup-body:before{display:flex;align-self:flex-start}.popup-body .popup-content{overflow-y:auto}.popup-body:focus{outline:0}.popup-header button,.popup-footer button{margin:0;border-radius:0;box-shadow:none;color:#fff;padding:6px 16px;cursor:pointer}.popup-header button:not(.popup-header-close){font-size:.8rem}.popup-header button:hover{background-color:hsla(0,0%,100%,.1)}.popup-footer{justify-content:end;background-color:var(--color-primary-light);min-height:41px}.popup-footer button{padding:10px 16px}.popup-header-close{border:0;color:#fff;font-size:16px;cursor:pointer}.popup-header-close svg{margin-right:0}.popup-header,.popup-footer{display:flex;position:relative;height:40px;flex:0}.popup-header .popup-title,.popup-footer .popup-title{color:#fff;margin-inline-end:auto;padding:8px 16px}.popup-header.flex-container-row,.popup-footer.flex-container-row{display:flex !important}body.flexbox-support #entity-selector-wrap .popup-body .form-group{height:444px;min-height:444px}#entity-selector-wrap .popup-body .form-group{margin:0}.popup-body .entity-selector-container{flex:1}.dropzone-overlay{position:absolute;display:flex;justify-content:center;align-items:center;font-size:1.333rem;width:98%;height:98%;left:1%;top:1%;border-radius:4px;border:1px dashed var(--color-primary);font-style:italic;box-sizing:content-box;background-clip:padding-box;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a9a9a9' fill-opacity='0.52' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");background-color:var(--color-primary);color:#fff;opacity:.8;z-index:9;pointer-events:none;animation:dzAnimIn 240ms ease-in-out}.dropzone-landing-area{background-color:var(--color-primary-light);padding:16px 24px;width:100%;border:1px dashed var(--color-primary);color:var(--color-primary);border-radius:4px}@keyframes dzAnimIn{0%{opacity:0;transform:scale(0.7)}60%{transform:scale(1.1)}100%{transform:scale(1);opacity:.8}}@keyframes dzFileItemIn{0%{opacity:.5;transform:translateY(28px)}100%{opacity:1;transform:translateY(0)}}@keyframes dzFileItemOut{0%{opacity:1;transform:translateY(0)}100%{opacity:.5;transform:translateY(28px)}}.dropzone-file-item{width:260px;height:80px;position:relative;display:flex;margin:1rem;flex-direction:row;background:#fff;box-shadow:0 1px 6px 1px rgba(22,22,22,.2);border-radius:4px;overflow:hidden;padding-bottom:3px;animation:dzFileItemIn ease-in-out 240ms;transition:transform ease-in-out 120ms,box-shadow ease-in-out 120ms;cursor:pointer}html.dark-mode .dropzone-file-item{background:#444}.dropzone-file-item:hover{transform:translateY(-3px);box-shadow:0 3px 8px 1px rgba(22,22,22,.2)}.dropzone-file-item.dismiss{animation:dzFileItemOut ease-in-out 240ms}.dropzone-file-item .loading-container{text-align:start !important;margin:0}.dropzone-file-item-image-wrap{width:80px;position:relative;background-color:var(--color-primary-light)}.dropzone-file-item-image-wrap img{object-fit:cover;width:100%;height:100%;opacity:.8}.dropzone-file-item-text-wrap{flex:1;display:block;padding:1rem;overflow:auto}.dropzone-file-item-progress{position:absolute;bottom:0;left:0;font-size:0;height:3px;background-color:var(--color-primary);transition:width ease-in-out 240ms}.dropzone-file-item-label{line-height:1.2;margin-bottom:.2rem}.dropzone-file-item-label,.dropzone-file-item-status{align-items:center;font-size:.8rem;font-weight:700}.dropzone-file-item-status[data-status]{display:flex;font-size:.6rem;font-weight:500;line-height:1.2}.dropzone-file-item-status[data-status=success]{color:var(--color-positive)}.dropzone-file-item-status[data-status=error]{color:var(--color-negative)}.dropzone-file-item-status[data-status]+.dropzone-file-item-label{display:none}.image-manager-body{min-height:70vh}.image-manager-filter-bar{position:sticky;top:0;z-index:5;background-color:hsla(0,0%,100%,.85)}html.dark-mode .image-manager-filter-bar{background-color:rgba(80,80,80,.85)}.image-manager-filter-bar-bg{position:absolute;left:0;top:0;width:100%;height:100%;opacity:.15;z-index:-1}.image-manager-filters{box-shadow:0 1px 3px 1px rgba(76,76,76,.26);border-radius:4px;overflow:hidden;border-bottom:0 !important}html.dark-mode .image-manager-filters{border:1px solid #000 !important}.image-manager-filters button{line-height:0;background-color:#fff}html.dark-mode .image-manager-filters button{background-color:#333}.image-manager-filters svg{margin:0}.image-manager-list{padding:3px;display:grid;grid-template-columns:repeat(auto-fill, minmax(max(140px, 17%), 1fr));gap:3px;z-index:3}.image-manager-list>div{aspect-ratio:1}.image-manager-list .image{display:block;position:relative;border-radius:0;margin:0;width:100%;text-align:start;padding:0;cursor:pointer;aspect-ratio:1;border-color:#ddd;transition:all linear 80ms;overflow:hidden}html.dark-mode .image-manager-list .image{border-color:#000}.image-manager-list .image.selected{background-color:var(--color-primary-light);outline:currentColor 3px solid;border-radius:3px;transform:scale3d(0.95, 0.95, 0.95)}.image-manager-list .image img{width:100%;max-width:100%;display:block;object-fit:cover;height:auto}.image-manager-list .image .image-meta{opacity:0;position:absolute;width:100%;bottom:0;left:0;color:#eee;background-color:rgba(0,0,0,.7);font-size:10px;padding:3px 4px;pointer-events:none;transition:opacity ease-in-out 80ms}.image-manager-list .image .image-meta span{display:block}.image-manager-list .image.selected .image-meta,.image-manager-list .image:hover .image-meta,.image-manager-list .image:focus .image-meta{opacity:1}@media screen and (max-width: 880px){.image-manager-list .image .image-meta{display:none}}.image-manager .load-more{text-align:center;padding:12px 16px;clear:both}.image-manager .load-more .loading-container{margin:0}.image-manager .loading-container{text-align:center}.image-manager-list .image-manager-list-warning{grid-column:1/-1;aspect-ratio:auto}.image-manager-warning{background:#fff;color:var(--color-warning);font-weight:bold;border-inline:3px solid var(--color-warning)}html.dark-mode .image-manager-warning{background:#333}.image-manager-sidebar{width:300px;margin:0 auto;overflow-y:auto;overflow-x:hidden;border-inline-start:1px solid #ddd;border-color:#ddd}html.dark-mode .image-manager-sidebar{border-color:#000}.image-manager-sidebar .inner{min-height:auto;padding:16px}.image-manager-sidebar .image-manager-viewer img{max-width:100%;max-height:180px;display:block;margin:0 auto 16px auto;box-shadow:0 1px 21px 1px rgba(76,76,76,.3)}.image-manager-sidebar .image-manager-viewer{height:196px;display:flex;align-items:center;justify-content:center}.image-manager-sidebar .image-manager-viewer a{display:inline-block}@media screen and (max-width: 880px){.image-manager-sidebar{border-inline-start:0}}.image-manager-content{display:flex;flex-direction:column;flex:1;overflow-y:scroll}.image-manager-content .container{width:100%}.image-manager-content .full-tab{text-align:center}.tab-container.bordered [role=tablist] button[role=tab]{border-inline-end:1px solid #ddd;border-inline-end-color:#ddd}html.dark-mode .tab-container.bordered [role=tablist] button[role=tab]{border-inline-end-color:#000}.tab-container.bordered [role=tablist] button[role=tab]:last-child{border-inline-end:none}.tab-container [role=tablist]{display:flex;align-items:end;justify-items:start;text-align:start;border-bottom:1px solid #ddd;border-color:#ddd;margin-bottom:16px}html.dark-mode .tab-container [role=tablist]{border-color:#444}.tab-container [role=tablist] button[role=tab]{display:inline-block;padding:12px;color:rgba(0,0,0,.5);cursor:pointer;border-bottom:2px solid rgba(0,0,0,0);margin-bottom:-1px}html.dark-mode .tab-container [role=tablist] button[role=tab]{color:hsla(0,0%,100%,.5)}.tab-container [role=tablist] button[role=tab][aria-selected=true]{color:var(--color-link) !important;border-bottom-color:var(--color-link) !important;outline:0 !important}.tab-container [role=tablist] button[role=tab]:hover,.tab-container [role=tablist] button[role=tab]:focus{color:rgba(0,0,0,.8);border-bottom-color:rgba(0,0,0,.2)}html.dark-mode .tab-container [role=tablist] button[role=tab]:hover,html.dark-mode .tab-container [role=tablist] button[role=tab]:focus{color:hsla(0,0%,100%,.8)}html.dark-mode .tab-container [role=tablist] button[role=tab]:hover,html.dark-mode .tab-container [role=tablist] button[role=tab]:focus{border-bottom-color:hsla(0,0%,100%,.2)}.tab-container [role=tablist] button[role=tab]:focus{outline:1px dotted var(--color-primary);outline-offset:-2px}.tab-container [role=tablist].controls-card{margin-bottom:0;border-bottom:0;padding:0 6px}.tab-container [role=tabpanel].no-outline:focus{outline:none}.image-picker .none{display:none}.code-editor .CodeMirror{height:auto;min-height:50vh;border-bottom:0}.code-editor .lang-options{overflow-y:scroll;flex-basis:200px;flex-grow:1}.code-editor .lang-options button{display:block;padding:6px 16px;border-bottom:1px solid;color:#333;border-bottom-color:#eee;cursor:pointer;width:100%;text-align:left;font-family:var(--font-code);font-size:.7rem;padding-left:30px}html.dark-mode .code-editor .lang-options button{color:#aaa}html.dark-mode .code-editor .lang-options button{border-bottom-color:#000}.code-editor .lang-options button:hover,.code-editor .lang-options button.active{background-color:var(--color-primary-light);color:var(--color-primary)}.code-editor button.lang-option-favorite-toggle{position:absolute;top:0;left:0;width:28px;font-size:1rem;border:0;line-height:1;padding:2px;z-index:2;height:100%;text-align:center;color:var(--color-primary)}.code-editor button.lang-option-favorite-toggle svg{margin:0}.code-editor button[data-favourite=true]~.action-favourite,.code-editor button[data-favourite=false]~.action-unfavourite{display:none}.code-editor .action-favourite{opacity:.5}.code-editor button:hover~.action-favourite{opacity:1}.code-editor label{background-color:var(--color-primary-light);width:100%;color:var(--color-primary);padding:3px 12px;margin-bottom:0}.code-editor-language-list{position:relative;width:160px;z-index:2;align-items:stretch}.code-editor-language-list input{border-radius:0;border:0;border-bottom:1px solid #ddd;padding:6px 12px;height:auto}.code-editor-main{flex:1;min-width:0}.code-editor-main .cm-editor{margin-bottom:0;z-index:1;max-width:100%;width:100%}.code-editor-body-wrap{height:80vh}@media screen and (max-width: 600px){.code-editor .lang-options{display:none}.code-editor-body-wrap{flex-direction:column}.code-editor-language-list,.code-editor-language-list input{width:100%}}.comments-container{padding-inline:32px}@media screen and (max-width: 880px){.comments-container{padding-inline:6px}}.comment-box{border-radius:4px;border:1px solid #ddd;border-color:#ddd;background-color:#fff}html.dark-mode .comment-box{border-color:#000}html.dark-mode .comment-box{background-color:#222}.comment-box .content{font-size:.666em;padding:6px 12px}.comment-box .content p,.comment-box .content ul,.comment-box .content ol{font-size:14px;margin:.5em 0}.comment-box .actions{opacity:0;transition:opacity ease-in-out 120ms}.comment-box:hover .actions,.comment-box:focus-within .actions{opacity:1}.comment-box .actions button:focus{outline:1px dotted var(--color-primary)}@media screen and (max-width: 880px){.comment-box .actions{opacity:1}}.comment-box .header{border-bottom:1px solid #ddd;padding:6px 12px;border-color:#ddd}html.dark-mode .comment-box .header{border-color:#000}.comment-box .header a{color:inherit}.comment-box .header .text-muted{color:#999}.comment-box .header .meta a,.comment-box .header .meta span{white-space:nowrap}.comment-box .header .right-meta .text-muted{opacity:.8}.comment-thread-indicator{border-inline-start:3px dotted #ddd;border-color:#ddd;margin-inline-start:6px;width:24px;height:calc(100% - 16px)}html.dark-mode .comment-thread-indicator{border-color:#444}.comment-reference-indicator-wrap a{float:left;margin-top:6px;font-size:12px;display:inline-block;font-weight:bold;position:relative;border-radius:4px;overflow:hidden;padding:2px 6px 2px 0;margin-inline-end:6px;color:var(--color-link)}.comment-reference-indicator-wrap a span{display:none}.comment-reference-indicator-wrap a.outdated span{display:inline}.comment-reference-indicator-wrap a.outdated.missing{color:var(--color-warning);pointer-events:none}.comment-reference-indicator-wrap a svg{width:24px;margin-inline-end:0}.comment-reference-indicator-wrap a:after{background-color:currentColor;content:"";width:100%;height:100%;position:absolute;left:0;top:0;opacity:.15}.comment-reference-indicator-wrap a[href="#"]{color:#444;pointer-events:none}.comment-branch .comment-box{margin-bottom:16px}.comment-branch .comment-branch .comment-branch .comment-branch .comment-thread-indicator{display:none}.comment-reply{display:none;margin:0 !important;margin-bottom:-3px !important}.comment-branch .comment-branch .comment-branch .comment-branch .comment-reply{display:block}.comment-container .empty-state{display:none}.comment-container:not(:has([component=page-comment])) .empty-state{display:block}.comment-container-compact .comment-box{margin-bottom:6px}.comment-container-compact .comment-box .meta{font-size:.8rem}.comment-container-compact .comment-box .header{padding:6px}.comment-container-compact .comment-box .right-meta{display:none}.comment-container-compact .comment-box .content{padding:6px 12px}.comment-container-compact .comment-thread-indicator{width:16px}.comment-container-super-compact .comment-box .meta{font-size:12px}.comment-container-super-compact .comment-box .avatar{width:22px;height:22px;margin-inline-end:2px !important}.comment-container-super-compact .comment-box .content{padding:3px 12px;line-height:1.2}.comment-container-super-compact .comment-box .content p{font-size:12px}.comment-container-super-compact .comment-thread-indicator{width:9px;margin-inline-start:3px}#tag-manager .drag-card{max-width:500px}.template-item{cursor:pointer;position:relative}.template-item:hover,.template-item .template-item-actions button:hover{background-color:#f2f2f2}.template-item .template-item-actions{position:absolute;top:0;inset-inline-end:0;width:50px;height:100%;display:flex;flex-direction:column;border-inline-start:1px solid;border-color:#ddd}html.dark-mode .template-item .template-item-actions{border-color:#000}.template-item .template-item-actions button{cursor:pointer;flex:1;background-color:#fff;border:0;border-top:1px solid;border-color:#ddd}html.dark-mode .template-item .template-item-actions button{background-color:#222}html.dark-mode .template-item .template-item-actions button{border-color:#000}.template-item .template-item-actions button svg{margin:0}.template-item .template-item-actions button:first-child{border-top:0}.dropdown-search{position:relative}.dropdown-search-toggle-breadcrumb{border:1px solid rgba(0,0,0,0);border-radius:4px;line-height:normal;padding:6px;opacity:.6;cursor:pointer}.dropdown-search-toggle-breadcrumb:hover{opacity:1;border-color:#ddd}html.dark-mode .dropdown-search-toggle-breadcrumb:hover{border-color:#444}.dropdown-search-toggle-breadcrumb .svg-icon{margin-inline-end:0}.dropdown-search-toggle-select{display:flex;gap:12px;line-height:normal}.dropdown-search-toggle-select .svg-icon{height:26px;width:26px;margin:0}.dropdown-search-toggle-select .avatar{height:22px;width:22px}.dropdown-search-toggle-select .avatar+span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-search-toggle-select .dropdown-search-toggle-caret{font-size:1.15rem}.dropdown-search-toggle-select-label{min-width:0;white-space:nowrap}.dropdown-search-toggle-select-caret{line-height:0;margin-left:auto;margin-top:-2px;display:flex;align-items:center}.dropdown-search-dropdown{box-shadow:0 1px 3px 1px rgba(76,76,76,.26);overflow:hidden;min-height:100px;width:240px;display:none;position:absolute;z-index:80;right:0;top:0;margin-top:16px}html[dir=rtl] .dropdown-search-dropdown{right:auto;left:-16px}.dropdown-search-dropdown .dropdown-search-search .svg-icon{position:absolute;left:12px;top:11px;fill:#888;pointer-events:none}html[dir=rtl] .dropdown-search-dropdown .dropdown-search-search .svg-icon{right:12px;left:auto}.dropdown-search-dropdown .dropdown-search-list{max-height:400px;overflow-y:scroll;text-align:start}.dropdown-search-dropdown .dropdown-search-item{padding:12px 16px}.dropdown-search-dropdown .dropdown-search-item:hover,.dropdown-search-dropdown .dropdown-search-item:focus{background-color:#f2f2f2;text-decoration:none}.dropdown-search-dropdown input,.dropdown-search-dropdown input:focus{padding-inline-start:32px;border-radius:0;border:0;border-bottom:1px solid #ddd}.dropdown-search-dropdown input:focus{outline:0}@media screen and (max-width: 1000px){.dropdown-search-dropdown{inset-inline:16px auto}.dropdown-search-dropdown .dropdown-search-list{max-height:240px}}.item-list{box-shadow:0 1px 3px 0 rgba(0,0,0,.1)}.item-list-row{border:1.5px solid;border-color:#e2e2e2;border-bottom-width:0}html.dark-mode .item-list-row{border-color:#444}.item-list-row label{padding-bottom:0}.item-list-row:hover{background-color:#f6f6f6}html.dark-mode .item-list-row:hover{background-color:#333}.item-list-row:first-child{border-radius:4px 4px 0 0}.item-list-row:last-child{border-radius:0 0 4px 4px;border-bottom-width:1.5px}.item-list-row:first-child:last-child{border-radius:4px}.item-list-row-toggle-all{visibility:hidden}.item-list-row:hover .item-list-row-toggle-all{visibility:visible}.status-indicator-active,.status-indicator-inactive{width:8px;height:8px;border-radius:50%;display:inline-block}.status-indicator-active{background-color:var(--color-positive)}.status-indicator-inactive{background-color:var(--color-negative)}.shortcut-container{background-color:rgba(0,0,0,.25);pointer-events:none;position:fixed;left:0;top:0;width:100%;height:100%;z-index:99}.shortcut-linkage{position:fixed;box-shadow:0 0 4px 0 #fff;border-radius:3px}.shortcut-hint{position:fixed;padding:3px 3px;font-size:.85rem;font-weight:700;line-height:1;background-color:#eee;border-radius:3px;border:1px solid #b4b4b4;box-shadow:0 1px 1px rgba(0,0,0,.2),0 2px 0 0 hsla(0,0%,100%,.7) inset;color:#333}.back-to-top{background-color:var(--color-primary);position:fixed;bottom:16px;right:24px;padding:5px 7px;cursor:pointer;color:#fff;fill:#fff;width:40px;height:40px;border-radius:40px;transition:all ease-in-out 180ms;opacity:0;z-index:999;overflow:hidden}.back-to-top svg{width:26.6666666667px;height:26.6666666667px;margin-inline-end:4px}.back-to-top:hover{width:136px;opacity:1 !important}.back-to-top .inner{width:136px}.back-to-top span{position:relative;vertical-align:top;line-height:2}.scroll-box{list-style:none;padding:0;margin:0;max-height:280px;overflow-y:scroll;border:1px solid;border-color:#ddd;border-radius:3px;min-height:20px;background-color:#eee}html.dark-mode .scroll-box{border-color:#000}html.dark-mode .scroll-box{background-color:#000}.scroll-box-item{border-bottom:1px solid;border-top:1px solid;border-color:#ddd;margin-top:-1px;background-color:#fff;display:flex;align-items:flex-start;padding:1px}html.dark-mode .scroll-box-item{border-color:#000}html.dark-mode .scroll-box-item{background-color:#222}.scroll-box-item:last-child{border-bottom:0}.scroll-box-item:hover{cursor:pointer;background-color:#f8f8f8}html.dark-mode .scroll-box-item:hover{background-color:#333}.scroll-box-item.items-center{align-items:center}.scroll-box-item .handle{color:#aaa;cursor:grab}.scroll-box-item button{opacity:.6;line-height:1}.scroll-box-item .handle svg{margin:0}.scroll-box-item>*{padding:6px 16px}.scroll-box-item .handle+*{padding-left:0}.scroll-box-item:hover .handle{color:#444}html.dark-mode .scroll-box-item:hover .handle{color:#fff}.scroll-box-item:hover button{opacity:1}.scroll-box-item a:hover{text-decoration:none}input.scroll-box-search,.scroll-box-header-item{font-size:.8rem;border:1px solid;border-color:#ddd;background-color:#fff;margin-bottom:-1px;border-radius:3px 3px 0 0;width:100%;max-width:100%;height:auto;line-height:1.4;color:#666}html.dark-mode input.scroll-box-search,html.dark-mode .scroll-box-header-item{border-color:#000}html.dark-mode input.scroll-box-search,html.dark-mode .scroll-box-header-item{background-color:#222}.scroll-box-search+.scroll-box,.scroll-box-header-item+.scroll-box{border-radius:0 0 3px 3px}.scroll-box.configured-option-list [data-action=add]{display:none}.scroll-box.available-option-list [data-action=remove],.scroll-box.available-option-list [data-action=move_up],.scroll-box.available-option-list [data-action=move_down]{display:none}.scroll-box>li.empty-state{display:none}.scroll-box>li.empty-state:last-child{display:list-item}details.section-expander summary{border-top:1px solid #ddd;border-color:#ddd;font-weight:bold;font-size:12px;color:#888;cursor:pointer;padding-block:6px}html.dark-mode details.section-expander summary{border-color:#000}details.section-expander:open summary{margin-bottom:12px}details.section-expander{border-bottom:1px solid #ddd;border-color:#ddd}html.dark-mode details.section-expander{border-color:#000}header.grid{grid-template-columns:minmax(max-content, 2fr) 1fr minmax(max-content, 2fr)}@media screen and (max-width: 1000px){header.grid{grid-template-columns:1fr;grid-row-gap:0}}header{position:relative;display:block;z-index:11;top:0;color:#fafafa;border-bottom:1px solid #ddd;box-shadow:0 1px 6px -1px rgba(0,0,0,.1);border-bottom-color:#ddd}html.dark-mode header{border-bottom-color:#000}header .header-links{display:flex;align-items:center;justify-content:end}header .links{display:inline-block;vertical-align:top}header .links a{display:inline-block;padding:10px 16px;color:#fff;border-radius:3px}header .links a:hover{text-decoration:none;background-color:hsla(0,0%,100%,.15)}header .dropdown-container{padding-inline-start:16px;padding-inline-end:0}header .avatar,header .user-name{display:inline-block}header .avatar{width:30px;height:30px}header .user-name{vertical-align:top;position:relative;display:inline-flex;align-items:center;cursor:pointer;padding:12px;margin:0 -12px;border-radius:3px;gap:6px;color:#fff}header .user-name>span{padding-inline-start:6px;display:inline-block;line-height:1}header .user-name>svg{font-size:18px;margin-top:-2px;margin-inline-end:0}header .user-name:hover{background-color:hsla(0,0%,100%,.15)}@media screen and (min-width: 1001px)and (max-width: 1100px){header .user-name{padding-inline-start:6px}header .user-name .name{display:none}}.header *,.primary-background *{outline-color:#fff}header .search-box{display:inline-block}header .search-box input{background-color:rgba(0,0,0,.2);border:1px solid hsla(0,0%,100%,.2);border-radius:40px;color:#eee;z-index:2;height:auto;padding:9px;padding-inline-start:40px}header .search-box input:focus{outline:none;border:1px solid hsla(0,0%,100%,.4)}header .search-box input::placeholder{color:#fff;opacity:.6}@media screen and (min-width: 1001px)and (max-width: 1100px){header .search-box{max-width:200px}}header .search-box:focus-within #header-search-box-button{opacity:1}#header-search-box-button{z-index:1;inset-inline-start:16px;top:10px;color:#fff;opacity:.6;color:hsla(0,0%,100%,.8)}html.dark-mode #header-search-box-button{color:#aaa}#header-search-box-button svg{margin-inline-end:0}.global-search-suggestions{display:none;position:absolute;top:-12px;left:0;right:0;z-index:-1;margin-left:-48px;margin-right:-48px;padding-top:56px;border-radius:3px;box-shadow:0 2px 2px 1px rgba(0,0,0,.13);transform-origin:top center;opacity:.5;transform:scale(0.9)}.global-search-suggestions .entity-item-snippet p{display:none}.global-search-suggestions .entity-item-snippet{font-size:.8rem}.global-search-suggestions .entity-list-item-name{font-size:.9rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.global-search-suggestions .global-search-loading{position:absolute;width:100%}header .search-box.search-active:focus-within .global-search-suggestions{display:block}header .search-box.search-active:focus-within input{background-color:#eee;border-color:#ddd}html.dark-mode header .search-box.search-active:focus-within input{background-color:#333}html.dark-mode header .search-box.search-active:focus-within input{border-color:#111}header .search-box.search-active:focus-within #header-search-box-button,header .search-box.search-active:focus-within input{color:#444}html.dark-mode header .search-box.search-active:focus-within #header-search-box-button,html.dark-mode header .search-box.search-active:focus-within input{color:#aaa}.logo{display:inline-flex;padding:6px 12px;margin:6px -12px;gap:12px;align-items:center;border-radius:4px}.logo:hover{color:#fff;text-decoration:none;background-color:hsla(0,0%,100%,.15)}.logo-text{font-size:1.8em;color:#fff;font-weight:400;line-height:1}.logo-image{height:43px}.mobile-menu-toggle{color:#fff;fill:#fff;font-size:2em;border:2px solid hsla(0,0%,100%,.8);border-radius:4px;padding:0 6px;line-height:1;cursor:pointer;user-select:none}.mobile-menu-toggle svg{margin:0;bottom:-2px}@media screen and (max-width: 1000px){header .header-links{background-color:#fff;display:none;z-index:10;inset-inline-end:16px;border-radius:4px;overflow:hidden;position:absolute;box-shadow:0 2px 2px 1px rgba(0,0,0,.13);margin-top:16px;padding:6px 0}html.dark-mode header .header-links{background-color:#333}header .header-links.show{display:block}header .links a,header .dropdown-container ul li a,header .dropdown-container ul li button{text-align:start;display:grid;align-items:center;padding:8px 16px;gap:16px;color:#444;grid-template-columns:16px auto;line-height:1.4;color:#444}html.dark-mode header .links a,html.dark-mode header .dropdown-container ul li a,html.dark-mode header .dropdown-container ul li button{color:#eee}header .links a svg,header .dropdown-container ul li a svg,header .dropdown-container ul li button svg{margin-inline-end:12px;width:16px}header .links a:hover,header .dropdown-container ul li a:hover,header .dropdown-container ul li button:hover{background-color:var(--color-primary-light);color:var(--color-primary);text-decoration:none}header .links a:focus,header .dropdown-container ul li a:focus,header .dropdown-container ul li button:focus{background-color:#eee;outline-color:var(--color-primary);color:var(--color-primary)}html.dark-mode header .links a:focus,html.dark-mode header .dropdown-container ul li a:focus,html.dark-mode header .dropdown-container ul li button:focus{background-color:#333}header .dropdown-container{display:block;padding-inline-start:0}header .links{display:block}header .dropdown-container ul{display:block !important;position:relative;background-color:rgba(0,0,0,0);border:0;padding:0;margin:0;box-shadow:none}}.tri-layout-mobile-tabs{position:sticky;top:0;z-index:5;background-color:#fff;border-bottom:1px solid #ddd;border-bottom-color:#ddd;box-shadow:0 1px 6px -1px rgba(0,0,0,.1)}html.dark-mode .tri-layout-mobile-tabs{border-bottom-color:#333}.tri-layout-mobile-tab{text-align:center;border-bottom:3px solid #bbb;cursor:pointer;margin:0;background-color:#fff;border-bottom-color:#bbb}html.dark-mode .tri-layout-mobile-tab{background-color:#222}html.dark-mode .tri-layout-mobile-tab{border-bottom-color:#333}.tri-layout-mobile-tab:first-child{border-inline-end:1px solid #ddd;border-inline-end-color:#ddd}html.dark-mode .tri-layout-mobile-tab:first-child{border-inline-end-color:#000}.tri-layout-mobile-tab[aria-selected=true]{border-bottom-color:currentColor !important}.breadcrumbs{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;opacity:.7}.breadcrumbs .icon-list-item{width:auto;padding-top:6px;padding-bottom:6px}.breadcrumbs .separator{display:inline-block;fill:#aaa;font-size:1.6em;line-height:.8;margin:-2px 0 0}.breadcrumbs:hover,.breadcrumbs:focus-within{opacity:1}@media(prefers-contrast: more){.breadcrumbs{opacity:1}}@media screen and (max-width: 1000px){.breadcrumbs .icon-list-item{padding:6px}.breadcrumbs .icon-list-item>span+span{display:none}.breadcrumbs .icon-list-item>span:first-child{margin-inline-end:0}}.faded a,.faded button,.faded span,.faded span>div{color:#666;fill:#666}.faded .text-button{opacity:.5;transition:all ease-in-out 120ms}.faded .text-button:hover{opacity:1;text-decoration:none}.faded span.faded-text{display:inline-block;padding:12px}footer{flex-shrink:0;padding:1rem 1rem 2rem 1rem;text-align:center}footer a{margin:0 .5em}body.flexbox footer{display:none}.book-contents .entity-list-item .icon{width:4px;border-radius:1px;justify-self:stretch;align-self:stretch;height:auto;margin-inline-end:6px}.book-contents .entity-list-item .icon:after{opacity:.5}.book-contents .entity-list-item .icon svg{display:none}.book-contents .entity-list-item p{margin-bottom:0}.book-contents .entity-list-item .inner-page{padding-top:0;padding-bottom:0}.entity-list-item+.chapter-expansion{display:flex;padding:0 16px 16px 16px;align-items:center;border:0;width:100%;position:relative}.entity-list-item+.chapter-expansion>.icon{width:4px;height:auto;border-radius:0 0 1px 1px;align-self:stretch;flex-shrink:0}.entity-list-item+.chapter-expansion>.icon:before{position:absolute;top:0;left:0;width:100%;height:1px;background-color:currentColor;content:"";opacity:.5}.entity-list-item+.chapter-expansion>.icon:after{opacity:.5}.entity-list-item+.chapter-expansion .icon svg{display:none}.entity-list-item+.chapter-expansion>.content{flex:1}.entity-list-item+.chapter-expansion .chapter-contents-toggle{border-radius:0 4px 4px 0;padding:6px 19px;width:100%;text-align:start}.entity-list-item+.chapter-expansion .chapter-contents-toggle:hover{background-color:rgba(0,0,0,.06)}.entity-list-item.has-children{padding-bottom:0}.entity-list-item.has-children>.icon{border-radius:4px 4px 0 0}.inset-list{display:none}.inset-list .entity-list-item-name{font-size:1rem}.inset-list .entity-list-item-children{padding-top:0;padding-bottom:0}.sidebar-page-nav{list-style:none;margin-block-start:12px;margin-block-end:16px;margin-inline-start:6px;margin-inline-end:0;position:relative}.sidebar-page-nav:after{content:"";display:block;position:absolute;left:0;background-color:rgba(0,0,0,.2);width:2px;top:5px;bottom:5px;z-index:0}html[dir=rtl] .sidebar-page-nav:after{left:auto;right:0}html.dark-mode .sidebar-page-nav:after{background-color:hsla(0,0%,100%,.2)}.sidebar-page-nav li{margin-bottom:4px;font-size:.95em;position:relative}.sidebar-page-nav .h1{padding-inline-start:16px}.sidebar-page-nav .h2{padding-inline-start:24px}.sidebar-page-nav .h3{padding-inline-start:32px}.sidebar-page-nav .h4{padding-inline-start:40px}.sidebar-page-nav .h5{padding-inline-start:48px}.sidebar-page-nav .h6{padding-inline-start:56px}.sidebar-page-nav .current-heading{font-weight:bold}.sidebar-page-nav li:not(.current-heading) .sidebar-page-nav-bullet{background-color:#bbb !important}html.dark-mode .sidebar-page-nav li:not(.current-heading) .sidebar-page-nav-bullet{background-color:#666 !important}.sidebar-page-nav .sidebar-page-nav-bullet{width:6px;height:6px;position:absolute;left:-2px;top:30%;border-radius:50%;box-shadow:0 0 0 6px #f2f2f2;box-shadow:0 0 0 6px #f2f2f2;z-index:1}html.dark-mode .sidebar-page-nav .sidebar-page-nav-bullet{box-shadow:0 0 0 6px #111}html[dir=rtl] .sidebar-page-nav .sidebar-page-nav-bullet{left:auto;right:-2px}.book-tree .sidebar-page-list{list-style:none;margin-block-start:6px;margin-block-end:0;margin-inline-start:-12px;margin-inline-end:-12px;padding-inline-start:0;padding-inline-end:0}.book-tree .sidebar-page-list ul{list-style:none;padding-inline-start:1rem;padding-inline-end:0}.book-tree .sidebar-page-list .entity-list-item{padding-top:2px;padding-bottom:2px;background-clip:content-box;border-radius:0 3px 3px 0;padding-inline-end:0}.book-tree .sidebar-page-list .entity-list-item .content{width:100%;padding-top:6px;padding-bottom:6px;max-width:calc(100% - 20px)}.book-tree .sidebar-page-list .entity-list-item.selected{background-color:rgba(0,0,0,.06)}html.dark-mode .book-tree .sidebar-page-list .entity-list-item.selected{background-color:hsla(0,0%,100%,.06)}.book-tree .sidebar-page-list .entity-list-item.no-hover{margin-top:-6px;padding-inline-end:0}.book-tree .sidebar-page-list .entity-list-item-name{font-size:1em;margin:0;margin-inline-end:16px}.book-tree .sidebar-page-list .chapter-child-menu{font-size:.8rem;margin-top:-0.2rem;margin-inline-start:-1rem}.book-tree .sidebar-page-list .chapter-contents-toggle{display:block;width:100%;text-align:start;padding:3px 12px 6px 12px;border-radius:0 3px 3px 0;line-height:1;margin-top:-3px;margin-bottom:-3px}.book-tree .sidebar-page-list .chapter-contents-toggle:hover{background-color:rgba(0,0,0,.06)}html.dark-mode .book-tree .sidebar-page-list .chapter-contents-toggle:hover{background-color:hsla(0,0%,100%,.06)}.book-tree .sidebar-page-list .entity-list-item .icon{z-index:2;width:4px;height:auto;align-self:stretch;flex-shrink:0;border-radius:1px;opacity:.8}.book-tree .sidebar-page-list .entity-list-item .icon:after{opacity:1}.book-tree .sidebar-page-list .entity-list-item .icon svg{display:none}.chapter-child-menu ul.sub-menu{display:none;padding-inline-start:0;position:relative;margin-bottom:0}.sortable-page-list,.sortable-page-sublist{list-style:none}.sort-box{margin-bottom:16px;padding:16px 32px;position:relative}.sort-box summary:focus{outline:1px dashed var(--color-primary);outline-offset:5px}.sort-box::before{pointer-events:none;content:"";border-radius:4px;opacity:.5;border:2px solid var(--color-book);display:block;top:0;bottom:0;left:0;right:0;position:absolute}.sort-box-options{display:flex;flex-wrap:wrap;justify-content:space-between}.sort-box-options .button{margin-inline-start:0}.sortable-page-list{margin-inline-start:0;padding:0}.sortable-page-list .entity-list-item>span:first-child{align-self:flex-start}.sortable-page-list .sortable-selected,.sortable-page-list .sortable-selected:hover{outline:1px dotted var(--color-primary);background-color:var(--color-primary-light) !important}.sortable-page-list .entity-list-item>div{display:block;flex:1}.sortable-page-list>ul{margin-inline-start:0}.sortable-page-list .sortable-page-sublist{margin-bottom:16px;margin-top:0;padding-inline-start:16px}.sortable-page-list li{background-color:#fff;border:1px solid;border-color:#ddd;margin-top:-1px;min-height:38px}html.dark-mode .sortable-page-list li{background-color:#222}html.dark-mode .sortable-page-list li{border-color:#666}.sortable-page-list li.text-page,.sortable-page-list li.text-chapter{border-inline-start:2px solid currentColor}.sortable-page-list li:first-child{margin-top:6px}.sortable-page-list li.placeholder{position:relative}.sortable-page-list li.placeholder:before{position:absolute}.sort-box summary{list-style:none;font-size:.9rem;cursor:pointer}.sort-box summary::-webkit-details-marker{display:none}details.sort-box summary .caret-container svg{transition:transform ease-in-out 120ms}details.sort-box[open] summary .caret-container svg{transform:rotate(90deg)}.sort-box-actions .icon-button{opacity:.6}.sort-box .flex-container-row:hover .sort-box-actions .icon-button,.sort-box .flex-container-row:focus-within .sort-box-actions .icon-button{opacity:1}.sort-box-actions .icon-button[disabled]{visibility:hidden}.sort-box-actions .dropdown-menu button[disabled]{display:none}.sort-list-handle{cursor:grab}.activity-list-item{padding:12px 0;display:grid;grid-template-columns:min-content 1fr;grid-column-gap:16px;font-size:.9em}.card .activity-list-item{padding-block:12px}.user-list-item{display:inline-grid;padding:12px;grid-template-columns:min-content 1fr;grid-column-gap:16px;font-size:.9em;align-items:center}.user-list-item>div:first-child{line-height:0}ul.pagination{display:inline-flex;list-style:none;margin:16px 0;padding-inline-start:1px}ul.pagination li:first-child a,ul.pagination li:first-child span{border-radius:3px 0 0 3px}ul.pagination li:last-child a,ul.pagination li:last-child span{border-radius:0 3px 3px 0}ul.pagination a,ul.pagination span{display:block;padding:3px 12px;border:1px solid #ccc;margin-inline-start:-1px;user-select:none;color:#555;border-color:#ccc}html.dark-mode ul.pagination a,html.dark-mode ul.pagination span{color:#eee}html.dark-mode ul.pagination a,html.dark-mode ul.pagination span{border-color:#666}ul.pagination li.disabled{cursor:not-allowed}ul.pagination li.active span{color:#111;background-color:rgba(0,0,0,.05)}html.dark-mode ul.pagination li.active span{color:#eee}html.dark-mode ul.pagination li.active span{background-color:rgba(0,0,0,.5)}.compact ul.pagination{margin:0}.entity-list,.icon-list{margin:0 -16px}.entity-list h4,.icon-list h4{margin:0}.entity-list hr,.icon-list hr{margin:0}.entity-list .text-small.text-muted,.icon-list .text-small.text-muted{color:#aaa;font-size:.75em;margin-top:6px}.entity-list .text-muted p.text-muted,.icon-list .text-muted p.text-muted{margin-top:0}.entity-list .page.draft .text-page,.icon-list .page.draft .text-page{color:var(--color-page-draft);fill:var(--color-page-draft)}.entity-list>.dropdown-container,.icon-list>.dropdown-container{display:block}.icon-list hr{margin:12px 16px;max-width:140px;opacity:.25;height:1.1px}.icon-list hr+hr,.icon-list hr:first-child,.icon-list hr:last-child{display:none}.entity-list-item,.icon-list-item{padding:12px 16px;display:flex;align-items:center;gap:16px;background-color:rgba(0,0,0,0);border:0;width:100%;position:relative;word-break:break-word}.entity-list-item h4 a,.icon-list-item h4 a{color:#666}.entity-list-item>span:first-child,.icon-list-item>span:first-child{flex-basis:1.88em;flex:none}.entity-list-item>span:last-child,.icon-list-item>span:last-child{flex:1;text-align:start}.entity-list-item>.content,.icon-list-item>.content{min-width:0}.entity-list-item:not(.no-hover),.icon-list-item:not(.no-hover){cursor:pointer}.entity-list-item:not(.no-hover):hover,.icon-list-item:not(.no-hover):hover{background-color:rgba(0,0,0,.06);text-decoration:none;border-radius:4px}html.dark-mode .entity-list-item:not(.no-hover):hover,html.dark-mode .icon-list-item:not(.no-hover):hover{background-color:hsla(0,0%,100%,.06)}.entity-list-item.outline-hover:hover,.icon-list-item.outline-hover:hover{background-color:rgba(0,0,0,0)}.entity-list-item:focus,.icon-list-item:focus{background-color:#eee;outline:1px dotted #666;outline-offset:-2px}html.dark-mode .entity-list-item:focus,html.dark-mode .icon-list-item:focus{background-color:#222}.entity-list-item.disabled{pointer-events:none;cursor:not-allowed;opacity:.8;user-select:none;background:var(--bg-disabled)}.entity-list-item-path-sep{display:inline-block;vertical-align:top;position:relative;top:1px}.entity-list-item-path-sep svg{margin-inline-end:0}.split-icon-list-item{display:flex;align-items:center;gap:16px;background-color:rgba(0,0,0,0);border:0;width:100%;position:relative;word-break:break-word;border-radius:4px}.split-icon-list-item>a{padding:12px 16px;display:flex;align-items:center;gap:16px;flex:1}.split-icon-list-item>a:hover{text-decoration:none}.split-icon-list-item .icon{flex-basis:1.88em;flex:none}.split-icon-list-item:hover{background-color:rgba(0,0,0,.06)}html.dark-mode .split-icon-list-item:hover{background-color:hsla(0,0%,100%,.06)}.icon-list-item-dropdown{margin-inline-start:auto;align-self:stretch;display:flex;align-items:stretch;border-inline-start:1px solid rgba(0,0,0,.1);visibility:hidden}.split-icon-list-item:hover .icon-list-item-dropdown,.split-icon-list-item:focus-within .icon-list-item-dropdown{visibility:visible}.icon-list-item-dropdown-toggle{padding:6px;display:flex;align-items:center;cursor:pointer;color:#888}html.dark-mode .icon-list-item-dropdown-toggle{color:#999}.icon-list-item-dropdown-toggle svg{margin:0}.icon-list-item-dropdown-toggle:hover{background-color:rgba(0,0,0,.06)}html.dark-mode .icon-list-item-dropdown-toggle:hover{background-color:hsla(0,0%,100%,.06)}.card .entity-list-item:not(.no-hover,.book-contents .entity-list-item):hover{background-color:#f2f2f2;border-radius:0}html.dark-mode .card .entity-list-item:not(.no-hover,.book-contents .entity-list-item):hover{background-color:#2d2d2d}.card .entity-list-item .entity-list-item:hover{background-color:#eee}.entity-list-item-children{padding:16px 24px}.entity-list-item-children>div{overflow:hidden;padding:0 0 6px 0}.entity-list-item-children .entity-chip{text-overflow:ellipsis;height:2.5em;overflow:hidden;text-align:start;display:block;white-space:nowrap}.entity-list-item-children>.entity-list>.entity-list-item:last-child{margin-bottom:-6px}.entity-list-item-image{align-self:stretch;width:140px;flex:none;background-size:cover;background-position:50% 50%;border-radius:3px;position:relative;margin-inline-end:24px}.entity-list-item-image.entity-list-item-image-wide{width:220px}.entity-list-item-image .svg-icon{color:#fff;font-size:1.66rem;margin-inline-end:0;position:absolute;bottom:6px;left:6px}html.dark-mode .entity-list-item-image .svg-icon{color:hsla(0,0%,100%,.6)}@media screen and (max-width: 880px){.entity-list-item-image{width:80px}}.chapter>.entity-list-item-image{width:60px}.entity-list.compact{font-size:8.4px}.entity-list.compact h4,.entity-list.compact a{line-height:1.2}.entity-list.compact .entity-item-snippet{display:none}.entity-list.compact .entity-list-item p{font-size:11.2px;padding-top:6px}.entity-list.compact .entity-list-item p:empty{padding-top:0}.entity-list.compact p{margin:0}.entity-list.compact>p.empty-text{display:block;font-size:14px}.entity-list.compact hr{margin:0}@media screen and (max-width: 880px){.entity-list.compact h4{font-size:1.666em}}.entity-item-tags{font-size:.75rem;opacity:1}.entity-item-tags .primary-background-light{background:rgba(0,0,0,0)}.entity-item-tags .tag-name{background-color:rgba(0,0,0,.05)}.dropdown-container{display:inline-block;vertical-align:top;position:relative}.dropdown-menu{display:none;position:absolute;z-index:999;top:0;list-style:none;inset-inline-end:0;margin:16px 0;background-color:#fff;box-shadow:0 1px 6px 0 rgba(0,0,0,.18);border-radius:3px;min-width:180px;padding:6px 0;color:#555;fill:currentColor;text-align:start !important;max-height:500px;overflow-y:auto}html.dark-mode .dropdown-menu{background-color:#333}html.dark-mode .dropdown-menu{color:#eee}.dropdown-menu.anchor-left{inset-inline-end:auto;inset-inline-start:0}.dropdown-menu.wide{min-width:220px}.dropdown-menu.xl-limited{width:280px;max-width:100%}.dropdown-menu .text-muted{color:#999;fill:#999}.dropdown-menu li.active a{font-weight:600}.dropdown-menu button{width:100%;text-align:start}.dropdown-menu li.border-bottom{border-bottom:1px solid #ddd}.dropdown-menu li hr{margin:6px 0}.dropdown-menu .icon-item,.dropdown-menu .text-item,.dropdown-menu .label-item{padding:8px 16px;color:#555;fill:currentColor;white-space:nowrap;line-height:1.4;cursor:pointer}html.dark-mode .dropdown-menu .icon-item,html.dark-mode .dropdown-menu .text-item,html.dark-mode .dropdown-menu .label-item{color:#eee}.dropdown-menu .icon-item.break-text,.dropdown-menu .text-item.break-text,.dropdown-menu .label-item.break-text{white-space:normal;word-wrap:break-word;overflow-wrap:break-word}.dropdown-menu .icon-item:hover,.dropdown-menu .icon-item:focus,.dropdown-menu .text-item:hover,.dropdown-menu .text-item:focus,.dropdown-menu .label-item:hover,.dropdown-menu .label-item:focus{text-decoration:none;background-color:var(--color-primary-light);color:var(--color-primary)}.dropdown-menu .icon-item:focus,.dropdown-menu .text-item:focus,.dropdown-menu .label-item:focus{outline:1px solid var(--color-primary);outline-offset:-2px}.dropdown-menu .icon-item svg,.dropdown-menu .text-item svg,.dropdown-menu .label-item svg{margin-inline-end:12px;display:inline-block;width:16px}.dropdown-menu .text-item{display:block}.dropdown-menu .label-item{display:grid;align-items:center;grid-template-columns:auto min-content;gap:16px}.dropdown-menu .label-item>*:nth-child(2){opacity:.7}.dropdown-menu .label-item>*:nth-child(2):hover{opacity:1}.dropdown-menu .icon-item{display:grid;align-items:start;grid-template-columns:16px auto;gap:16px}.dropdown-menu .icon-item svg{margin-inline-end:0;margin-block-start:1px}.tri-layout-right .dropdown-menu,.tri-layout-left .dropdown-menu{inset-inline-end:6px}.featured-image-container{position:relative;overflow:hidden;min-height:140px;background-size:cover;background-position:50% 50%;transition:opacity ease-in-out 240ms}.featured-image-container a{display:block}.featured-image-container img{display:block;width:100%;max-width:100%;height:auto}.featured-image-container-wrap{position:relative}.featured-image-container-wrap .svg-icon{color:#fff;font-size:2rem;margin-inline-end:0;position:absolute;bottom:10px;left:6px}html.dark-mode .featured-image-container-wrap .svg-icon{color:hsla(0,0%,100%,.6)}.grid-card:hover .featured-image-container{opacity:.5}.action-link{background:rgba(0,0,0,0);border:none;color:currentColor;padding:16px 0}.active-link-list a{display:inline-block;padding:12px}.active-link-list a:not(.active){color:#444}html.dark-mode .active-link-list a:not(.active){color:#888}.active-link-list a:hover{background-color:rgba(0,0,0,.05);border-radius:4px;text-decoration:none}html.dark-mode .active-link-list a:hover{background-color:hsla(0,0%,100%,.05)}.active-link-list.in-sidebar a{display:block;margin-bottom:6px}.active-link-list.in-sidebar a.active{border-radius:4px;background-color:rgba(0,0,0,.05)}html.dark-mode .active-link-list.in-sidebar a.active{background-color:hsla(0,0%,100%,.05)}.entity-meta-item{display:flex;line-height:1.2;margin:.6em 0;align-content:start;gap:12px}.entity-meta-item a{line-height:1.2}.entity-meta-item svg{flex-shrink:0;width:1em;margin:0}.page-editor{display:flex;flex-direction:column;align-items:stretch}.page-editor .edit-area{flex:1;flex-direction:column;z-index:10;border-radius:0 0 8px 8px}.page-editor .mce-tinymce{box-shadow:none}.page-editor .mce-top-part::before{box-shadow:none}.page-editor-page-area{width:100%;border-radius:8px;box-shadow:0 1px 6px -1px rgba(0,0,0,.1);min-width:300px;background-color:#fff}html.dark-mode .page-editor-page-area{background-color:#333}.page-edit-toolbar{width:100%;margin:0 auto;display:grid;grid-template-columns:minmax(max-content, 2fr) 1.5fr minmax(max-content, 2fr);align-items:center}@media screen and (min-width: 1401px){.page-editor-wysiwyg2024 .page-edit-toolbar,.page-editor-wysiwyg2024 .page-editor-page-area,.page-editor-wysiwyg .page-edit-toolbar,.page-editor-wysiwyg .page-editor-page-area{max-width:1140px}.page-editor-wysiwyg .floating-toolbox,.page-editor-wysiwyg2024 .floating-toolbox{position:absolute}}@media screen and (max-width: 880px){.page-edit-toolbar{display:flex;flex-direction:row;justify-content:space-between}}.title-input.page-title{font-size:.8em}.title-input.page-title .input{border:0;margin-bottom:-1px}.title-input.page-title input[type=text]{max-width:840px;margin:0 auto;border:none;height:auto;display:block;width:100%;font-size:20px;border-radius:8px}.title-input.page-title input[type=text]:focus{position:relative;outline-offset:-1px;outline:1px dashed var(--color-primary);box-shadow:0 1px 6px -1px rgba(0,0,0,.1);z-index:50}.page-editor-markdown .title-input.page-title input[type=text]{max-width:100%}body.tox-fullscreen .page-editor .edit-area,body.markdown-fullscreen .page-editor .edit-area{z-index:12}body.tox-fullscreen .page-editor,body.tox-fullscreen .flex-fill,body.markdown-fullscreen .page-editor,body.markdown-fullscreen .flex-fill{overflow:visible}@media screen and (max-width: 600px){.page-edit-toolbar{overflow-x:scroll;overflow-y:visible}.page-edit-toolbar{white-space:nowrap}.page-edit-toolbar>div{display:inline-block}}.page-save-mobile-button{position:fixed;z-index:30;border-radius:50%;width:52px;height:52px;font-size:26px;inset-inline-end:6px;bottom:12px;box-shadow:0 2px 2px 1px rgba(0,0,0,.13);background-color:currentColor;text-align:center}.page-save-mobile-button svg{fill:#fff;margin-inline-end:0}.draft-notification{pointer-events:none;transform:scale(0);transition:transform ease-in-out 120ms;transform-origin:50% 50%}.draft-notification.visible{transform:scale(1)}.page-style.editor{padding:0 !important}.pointer-container{position:fixed;display:none;left:0;z-index:10}.pointer{border:1px solid #ccc;border-color:#ccc;border-radius:4px;box-shadow:0 0 12px 1px rgba(0,0,0,.1);background-color:#fff;width:328px}html.dark-mode .pointer{border-color:#000}html.dark-mode .pointer{background-color:#333}.pointer:before{position:absolute;left:50%;bottom:-9px;width:16px;height:16px;margin-inline-start:-8px;content:"";display:block;transform:rotate(45deg);transform-origin:50% 50%;border-right:1px solid #ccc;border-bottom:1px solid #ccc;z-index:56;background-color:#fff;border-color:#ccc}html.dark-mode .pointer:before{background-color:#333}html.dark-mode .pointer:before{border-color:#000}.pointer input,.pointer button,.pointer a{position:relative;height:28px;font-size:12px;vertical-align:top;padding:5px 16px}.pointer input{background-color:#fff;border:1px solid #ddd;border-color:#ddd;color:#666;width:auto;flex:1;z-index:58;padding:5px;border-radius:0}html.dark-mode .pointer input{border-color:#000}.pointer .text-button{color:#444}html.dark-mode .pointer .text-button{color:#aaa}.pointer .input-group .button{line-height:1;margin-inline-start:-1px;margin-block:0;box-shadow:none;border-radius:0}.pointer a.button{margin:0}.pointer .svg-icon{width:1.2em;height:1.2em}.pointer .button{border-color:#ddd}html.dark-mode .pointer .button{border-color:#000}.content-comment-highlight{position:absolute;left:0;top:0;width:0;height:0;user-select:none;pointer-events:none}.content-comment-highlight:after{content:"";position:absolute;left:0;top:0;width:100%;height:100%;background-color:var(--color-primary);opacity:.25}.content-comment-window{font-size:14px;line-height:1.4;position:absolute;top:calc(100% + 3px);left:0;z-index:92;pointer-events:all;min-width:min(340px,80vw);background-color:#fff;box-shadow:0 2px 2px 1px rgba(0,0,0,.13);border-radius:4px;overflow:hidden}html.dark-mode .content-comment-window{background-color:#222}.content-comment-window-actions{background-color:var(--color-primary);color:#fff;display:flex;align-items:center;justify-content:end;gap:6px}.content-comment-window-actions button{color:#fff;font-size:12px;padding:6px;line-height:1;cursor:pointer}.content-comment-window-actions button[data-action=jump]{text-decoration:underline}.content-comment-window-actions svg{fill:currentColor;width:12px}.content-comment-window-content{padding:6px 12px 6px 6px;max-height:200px;overflow-y:scroll}.content-comment-window-content .comment-reference-indicator-wrap{display:none}.content-comment-marker{position:absolute;right:-16px;top:-16px;pointer-events:all;width:min(1.5em,32px);height:min(1.5em,32px);border-radius:min(.75em,32px);display:flex;align-items:center;justify-content:center;background-color:var(--color-primary);box-shadow:0 2px 2px 1px rgba(0,0,0,.13);color:#fff;cursor:pointer;z-index:90;transform:scale(1);transition:transform ease-in-out 120ms}.content-comment-marker svg{fill:#fff;width:80%}.page-content [id^=bkmrk-]:hover .content-comment-marker{transform:scale(1.15)}.floating-toolbox{background-color:#fff;overflow:hidden;align-items:stretch;flex-direction:row;display:flex;max-height:100%;border-radius:8px;box-shadow:0 1px 6px -1px rgba(0,0,0,.1);margin-bottom:auto;margin-inline-start:24px;position:relative}html.dark-mode .floating-toolbox{background-color:#222}.floating-toolbox.open{position:relative;right:0;max-width:480px;margin-bottom:0}.floating-toolbox:not(.open) .toolbox-tab-content{display:none !important}.floating-toolbox .toolbox-toggle svg{transition:transform ease-in-out 180ms}.floating-toolbox .toolbox-toggle{transition:background-color ease-in-out 180ms}.floating-toolbox.open .toolbox-toggle{background-color:rgba(255,0,0,.2)}.floating-toolbox.open .toolbox-toggle svg{transform:rotate(180deg)}.floating-toolbox>div{flex:1;position:relative}.floating-toolbox .tabs{border-inline-end:1px solid #ddd;border-inline-end-color:#ddd;width:40px;flex:0 1 auto;margin-inline-end:-1px}html.dark-mode .floating-toolbox .tabs{border-inline-end-color:#000}.floating-toolbox .tabs-inner{background-color:#fff}html.dark-mode .floating-toolbox .tabs-inner{background-color:#222}.floating-toolbox .tabs svg{padding:0;margin:0}.floating-toolbox .tabs-inner>button{color:rgba(0,0,0,.7);display:block;cursor:pointer;padding:10px 6px;font-size:18px;line-height:1.6}html.dark-mode .floating-toolbox .tabs-inner>button{color:hsla(0,0%,100%,.5)}.floating-toolbox .tabs-inner>button:hover,.floating-toolbox.open .tabs-inner>button.active{color:var(--color-link) !important;position:relative}.floating-toolbox .tabs-inner>button:hover:after,.floating-toolbox.open .tabs-inner>button.active:after{content:"";display:block;position:absolute;left:0;width:100%;top:0;height:100%;background-color:currentColor;opacity:.075}.floating-toolbox.open .tabs-inner>button.active{border-inline-end:1px solid var(--color-link);margin-inline-end:-1px}.floating-toolbox h4{font-size:24px;margin:16px 0 0 0;padding:0 24px 12px 24px}.floating-toolbox .tags input{max-width:100%;width:100%;min-width:50px}.floating-toolbox .tags td,.floating-toolbox .inline-start-table>div>div>div{padding-inline-end:12px;padding-top:12px;position:relative}.floating-toolbox .handle{user-select:none;cursor:move;fill:#999}.floating-toolbox form{display:flex;flex:1;flex-direction:column;overflow-y:scroll}.floating-toolbox table td,.floating-toolbox table th{overflow:visible}@media screen and (max-width: 1400px){.floating-toolbox{margin-inline-start:12px}}@media screen and (max-width: 600px){.page-editor-page-area-wrap{margin:4px !important}.floating-toolbox{margin-inline-start:4px}.floating-toolbox .tabs{width:32px}.floating-toolbox .tabs-inner>button{font-size:12px}.page-edit-toolbar{padding-block:0 !important}.page-editor.toolbox-open .page-editor-page-area{display:none}}.toolbox-tab-content{display:none;overflow-y:auto;padding-bottom:45px}.suggestion-box{top:auto;margin:-4px 0 0;right:auto;left:0;padding:0}.suggestion-box li{display:block;border-bottom:1px solid #ddd}.suggestion-box li:last-child{border-bottom:0}.comments-container h5{color:#888;font-weight:normal;margin-top:.5em}.comment-editor .CodeMirror,.comment-editor .CodeMirror-scroll{min-height:175px}.mce-floatpanel[aria-label="Insert/edit media"] .mce-open{display:none}.entity-list-item>span:first-child,.icon-list-item>span:first-child,.split-icon-list-item>a>.icon,.chapter-expansion>.icon{font-size:.8rem;width:1.88em;height:1.88em;flex-shrink:0;display:flex;align-items:center;justify-content:center;text-align:center;border-radius:1em;position:relative;overflow:hidden}.entity-list-item>span:first-child svg,.icon-list-item>span:first-child svg,.split-icon-list-item>a>.icon svg,.chapter-expansion>.icon svg{margin:0;bottom:0}.entity-list-item>span:first-child:after,.icon-list-item>span:first-child:after,.split-icon-list-item>a>.icon:after,.chapter-expansion>.icon:after{content:"";position:absolute;background-color:currentColor;opacity:.2;left:0;top:0;width:100%;height:100%}.entity-chip{display:inline-block;align-items:center;justify-content:center;text-align:center;font-size:.9em;border-radius:3px;position:relative;overflow:hidden;padding:6px 12px;fill:currentColor;opacity:.85;transition:opacity ease-in-out 120ms}.entity-chip:after{content:"";position:absolute;background-color:currentColor;opacity:.15;left:0;top:0;width:100%;height:100%}.entity-chip:hover{text-decoration:none;opacity:1}@media(prefers-contrast: more){.entity-chip{opacity:1}}.page-content{width:100%;max-width:840px;margin:0 auto;overflow-wrap:break-word;position:relative}.page-content .align-left{text-align:left}.page-content img.align-left,.page-content table.align-left,.page-content iframe.align-left,.page-content video.align-left{float:left !important;margin:6px 16px 16px 0}.page-content .align-right{text-align:right !important}.page-content img.align-right,.page-content table.align-right,.page-content iframe.align-right,.page-content video.align-right{float:right !important;margin:6px 0 6px 12px}.page-content .align-center{text-align:center}.page-content img.align-center,.page-content video.align-center,.page-content iframe.align-center{display:block}.page-content img.align-center,.page-content table.align-center,.page-content iframe.align-center,.page-content video.align-center{margin-left:auto;margin-right:auto}.page-content .align-justify{text-align:justify}.page-content h1,.page-content h2,.page-content h3,.page-content h4,.page-content h5,.page-content h6,.page-content pre{clear:left}.page-content hr{clear:both;margin:16px 0}.page-content table{hyphens:auto;table-layout:fixed;max-width:100%;height:auto !important}.page-content ins,.page-content del{text-decoration:none}.page-content ins{background:#dbffdb}.page-content del{background:#ffecec}.page-content details{border:1px solid;border-color:#ddd;margin-bottom:1em;padding:12px}html.dark-mode .page-content details{border-color:#555}.page-content details>summary{margin-top:-12px;margin-left:-12px;margin-right:-12px;margin-bottom:-12px;font-weight:bold;background-color:#eee;padding:6px 12px}html.dark-mode .page-content details>summary{background-color:#333}.page-content details[open]>summary{margin-bottom:12px;border-bottom:1px solid;border-color:#ddd}html.dark-mode .page-content details[open]>summary{border-color:#555}.page-content details>summary+*{margin-top:.2em}.page-content details:after{content:"";display:block;clear:both}.page-content li>input[type=checkbox]{vertical-align:top;margin-top:.3em}.page-content p:empty{min-height:1.6em}.page-content.page-revision pre code{white-space:pre-wrap}.page-content .cm-editor{margin-bottom:1.375em}.page-content video,.page-content iframe{max-width:100%}.page-content a{text-decoration:underline}body .page-content img,.page-content img:not([data-mce-object]){max-width:100%;height:auto}.callout{border-left:3px solid #bbb;border-inline-start:3px solid #bbb;border-inline-end:none;background-color:#eee;padding:12px;padding-left:32px;padding-inline-start:32px;padding-inline-end:12px;display:block;position:relative;overflow:auto}.callout:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiMwMTUzODAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bTEgMTVoLTJ2LTZoMnY2em0wLThoLTJWN2gydjJ6Ii8+PC9zdmc+");background-repeat:no-repeat;content:"";width:1.2em;height:1.2em;left:8px;inset-inline-start:8px;inset-inline-end:unset;top:50%;margin-top:-9px;display:inline-block;position:absolute;line-height:1;opacity:.8}.callout.success{border-color:#0f7d15;background-color:#eafdeb;color:#063409}html.dark-mode .callout.success{border-color:#4aa850}html.dark-mode .callout.success{background-color:#122913}html.dark-mode .callout.success{color:#4aa850}.callout.success:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiMzNzZjMzkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bS0yIDE1bC01LTUgMS40MS0xLjQxTDEwIDE0LjE3bDcuNTktNy41OUwxOSA4bC05IDl6Ii8+PC9zdmc+")}.callout.danger{border-color:#ab0f0e;background-color:#fcdbdb;color:#4d0706}html.dark-mode .callout.danger{border-color:#e85c5b}html.dark-mode .callout.danger{background-color:#250505}html.dark-mode .callout.danger{color:#e85c5b}.callout.danger:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNiOTE4MTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0xNS43MyAzSDguMjdMMyA4LjI3djcuNDZMOC4yNyAyMWg3LjQ2TDIxIDE1LjczVjguMjdMMTUuNzMgM3pNMTIgMTcuM2MtLjcyIDAtMS4zLS41OC0xLjMtMS4zIDAtLjcyLjU4LTEuMyAxLjMtMS4zLjcyIDAgMS4zLjU4IDEuMyAxLjMgMCAuNzItLjU4IDEuMy0xLjMgMS4zem0xLTQuM2gtMlY3aDJ2NnoiLz4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==")}.callout.info{border-color:#0288d1;background-color:#d3efff;color:#01466c}html.dark-mode .callout.info{border-color:#0288d1}html.dark-mode .callout.info{background-color:#001825}html.dark-mode .callout.info{color:#0288d1}.callout.warning{border-color:#cf4d03;background-color:#fee3d3;color:#6a2802}html.dark-mode .callout.warning{border-color:#de8a5a}html.dark-mode .callout.warning{background-color:#30170a}html.dark-mode .callout.warning{color:#de8a5a}.callout.warning:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNiNjUzMWMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEgMjFoMjJMMTIgMiAxIDIxem0xMi0zaC0ydi0yaDJ2MnptMC00aC0ydi00aDJ2NHoiLz48L3N2Zz4=")}.callout a{color:inherit;text-decoration:underline}@media print{html,body{font-size:12px;background-color:#fff}.page-content{margin:0 auto}.print-hidden{display:none !important}.tri-layout-container{grid-template-columns:1fr;grid-template-areas:"b";margin-inline-start:0;margin-inline-end:0;display:block}.card{box-shadow:none}.content-wrap.card{padding-inline-start:0;padding-inline-end:0}}.dragged{position:absolute;opacity:.5;z-index:2000}body.dragging,body.dragging *{cursor:move !important}.avatar{border-radius:100%;background-color:#eee;width:30px;height:30px}html.dark-mode .avatar{background-color:#000}.avatar.med{width:40px;height:40px}.avatar.large{width:80px;height:80px}.avatar.huge{width:120px;height:120px}.avatar.square{border-radius:3px}html.dark-mode .avatar[src$="user_avatar.png"]{filter:invert(1)}.loading-container{position:relative;display:block;margin:32px auto}.loading-container>div{width:10px;height:10px;border-radius:10px;display:inline-block;vertical-align:top;transform:translate3d(-10px, 0, 0);margin-top:6px;animation-name:loadingBob;animation-duration:1.4s;animation-iteration-count:infinite;animation-timing-function:cubic-bezier(0.62, 0.28, 0.23, 0.99);margin-inline-end:4px;background-color:var(--color-page);animation-delay:-300ms}.loading-container>div:first-child{left:-16px;background-color:var(--color-book);animation-delay:-600ms}.loading-container>div:last-of-type{left:16px;background-color:var(--color-chapter);animation-delay:0ms}.loading-container>span{margin-inline-start:12px;font-style:italic;color:#888;vertical-align:top}.inline.block .loading-container{margin:6px 12px}.skip-to-content-link{position:fixed;top:-52px;left:0;background-color:#fff;z-index:15;border-radius:0 4px 4px 0;display:block;box-shadow:0 0 4px 1px rgba(0,0,0,.5);font-weight:bold}.skip-to-content-link:focus{top:32px;outline-offset:-10px;outline:2px dotted var(--color-link)}.entity-selector{border:1px solid #ddd;border-color:#ddd;border-radius:3px;overflow:hidden;font-size:.8em}html.dark-mode .entity-selector{border-color:#111}.entity-selector input[type=text]{width:100%;display:block;border-radius:0;border:0;border-bottom:1px solid #ddd;font-size:16px;padding:12px 16px}.entity-selector input[type=text]:focus{outline:1px solid var(--color-primary);border-radius:3px 3px 0 0;outline-offset:-1px}.entity-selector .entity-list{overflow-y:scroll;height:400px;background-color:#eee;margin-inline-end:0;margin-inline-start:0}html.dark-mode .entity-selector .entity-list{background-color:#222}.entity-selector .entity-list-item{background-color:#fff}html.dark-mode .entity-selector .entity-list-item{background-color:#222}.entity-selector .entity-list-item p{margin-bottom:0}.entity-selector .entity-list-item:focus{outline:2px dotted var(--color-primary);outline-offset:-4px}.entity-selector .entity-list-item.selected{background-color:rgba(0,0,0,.05)}html.dark-mode .entity-selector .entity-list-item.selected{background-color:hsla(0,0%,100%,.05)}.entity-selector .loading{height:400px;padding-top:24px}.entity-selector.compact{font-size:10px}.entity-selector.compact .entity-item-snippet{display:none}.entity-selector.compact h4{font-size:14px}.entity-selector.small .entity-list-item{padding:6px 16px}.entity-selector.small .entity-list,.entity-selector.small .loading{height:300px}.entity-selector.small input[type=text]{font-size:13px;padding:6px 16px;height:auto}.fullscreen{border:0;position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:150}@media screen and (min-width: 601px)and (max-width: 880px){#home-default>.grid.third{display:block;columns:2;column-gap:24px !important}}.list-sort-container{display:inline-block}.list-sort-container form{display:inline-block}.list-sort-container .list-sort{display:inline-grid;margin-inline-start:12px;grid-template-columns:minmax(120px, max-content) 40px;font-size:.9rem;border:2px solid #ddd;border-color:#ddd;border-radius:4px}html.dark-mode .list-sort-container .list-sort{border-color:#444}.list-sort-container .list-sort-label{font-weight:bold;display:inline-block}.list-sort-container .list-sort-label,.list-sort-container .list-sort-toggle{color:#555}html.dark-mode .list-sort-container .list-sort-label,html.dark-mode .list-sort-container .list-sort-toggle{color:#888}.list-sort-container .list-sort-type{text-align:start}.list-sort-container .list-sort-toggle,.list-sort-container .list-sort-dir{padding:8px 12px;cursor:pointer}.list-sort-container .list-sort-dir{border-inline-start:2px solid #ddd;color:#888;border-color:#ddd}html.dark-mode .list-sort-container .list-sort-dir{border-color:#444}.list-sort-container .list-sort-dir .svg-icon{transition:transform ease-in-out 120ms}.list-sort-container .list-sort-dir:hover .svg-icon{transform:rotate(180deg)}.list-sort-container .list-sort-toggle{display:block;width:100%;text-align:start}.import-item{border-inline-start:2px solid currentColor;padding-inline-start:6px}/*# sourceMappingURL=styles.css.map */
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after{content:"";content:none}q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.dummy-style{color:red}:root{--font-body: -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Roboto, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--font-code: Lucida Console, DejaVu Sans Mono, Ubuntu Mono, Monaco, monospace;--color-primary: #206ea7;--color-primary-light: rgba(32,110,167,0.15);--color-link: #206ea7;--color-page: #206ea7;--color-page-draft: #7e50b1;--color-chapter: #af4d0d;--color-book: #077b70;--color-bookshelf: #a94747;--color-positive: #0f7d15;--color-negative: #ab0f0e;--color-info: #0288D1;--color-warning: #cf4d03;--bg-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='100%25' width='100%25'%3E%3Cdefs%3E%3Cpattern id='doodad' width='19' height='19' viewBox='0 0 40 40' patternUnits='userSpaceOnUse' patternTransform='rotate(143)'%3E%3Crect width='100%25' height='100%25' fill='rgba(42, 67, 101,0)'/%3E%3Cpath d='M-10 30h60v20h-60zM-10-10h60v20h-60' fill='rgba(26, 32, 44,0)'/%3E%3Cpath d='M-10 10h60v20h-60zM-10-30h60v20h-60z' fill='rgba(0, 0, 0,0.05)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23doodad)' height='200%25' width='200%25'/%3E%3C/svg%3E")}:root.dark-mode{--bg-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='100%25' width='100%25'%3E%3Cdefs%3E%3Cpattern id='doodad' width='19' height='19' viewBox='0 0 40 40' patternUnits='userSpaceOnUse' patternTransform='rotate(143)'%3E%3Crect width='100%25' height='100%25' fill='rgba(42, 67, 101,0)'/%3E%3Cpath d='M-10 30h60v20h-60zM-10-10h60v20h-60' fill='rgba(26, 32, 44,0)'/%3E%3Cpath d='M-10 10h60v20h-60zM-10-30h60v20h-60z' fill='rgba(255, 255, 255,0.05)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23doodad)' height='200%25' width='200%25'/%3E%3C/svg%3E");color-scheme:only dark;--color-positive: #4aa850;--color-negative: #e85c5b;--color-warning: #de8a5a}:root:not(.dark-mode){color-scheme:only light}.m-none{margin:0 !important}.mx-none{margin-inline-start:0 !important;margin-inline-end:0 !important}.my-none{margin-top:0 !important;margin-bottom:0 !important}.mt-none{margin-top:0 !important}.mr-none{margin-inline-end:0 !important}.mb-none{margin-bottom:0 !important}.ml-none{margin-inline-start:0 !important}.m-xxs{margin:3px !important}.mx-xxs{margin-inline-start:3px !important;margin-inline-end:3px !important}.my-xxs{margin-top:3px !important;margin-bottom:3px !important}.mt-xxs{margin-top:3px !important}.mr-xxs{margin-inline-end:3px !important}.mb-xxs{margin-bottom:3px !important}.ml-xxs{margin-inline-start:3px !important}.m-xs{margin:6px !important}.mx-xs{margin-inline-start:6px !important;margin-inline-end:6px !important}.my-xs{margin-top:6px !important;margin-bottom:6px !important}.mt-xs{margin-top:6px !important}.mr-xs{margin-inline-end:6px !important}.mb-xs{margin-bottom:6px !important}.ml-xs{margin-inline-start:6px !important}.m-s{margin:12px !important}.mx-s{margin-inline-start:12px !important;margin-inline-end:12px !important}.my-s{margin-top:12px !important;margin-bottom:12px !important}.mt-s{margin-top:12px !important}.mr-s{margin-inline-end:12px !important}.mb-s{margin-bottom:12px !important}.ml-s{margin-inline-start:12px !important}.m-m{margin:16px !important}.mx-m{margin-inline-start:16px !important;margin-inline-end:16px !important}.my-m{margin-top:16px !important;margin-bottom:16px !important}.mt-m{margin-top:16px !important}.mr-m{margin-inline-end:16px !important}.mb-m{margin-bottom:16px !important}.ml-m{margin-inline-start:16px !important}.m-l{margin:24px !important}.mx-l{margin-inline-start:24px !important;margin-inline-end:24px !important}.my-l{margin-top:24px !important;margin-bottom:24px !important}.mt-l{margin-top:24px !important}.mr-l{margin-inline-end:24px !important}.mb-l{margin-bottom:24px !important}.ml-l{margin-inline-start:24px !important}.m-xl{margin:32px !important}.mx-xl{margin-inline-start:32px !important;margin-inline-end:32px !important}.my-xl{margin-top:32px !important;margin-bottom:32px !important}.mt-xl{margin-top:32px !important}.mr-xl{margin-inline-end:32px !important}.mb-xl{margin-bottom:32px !important}.ml-xl{margin-inline-start:32px !important}.m-xxl{margin:48px !important}.mx-xxl{margin-inline-start:48px !important;margin-inline-end:48px !important}.my-xxl{margin-top:48px !important;margin-bottom:48px !important}.mt-xxl{margin-top:48px !important}.mr-xxl{margin-inline-end:48px !important}.mb-xxl{margin-bottom:48px !important}.ml-xxl{margin-inline-start:48px !important}.m-auto{margin:auto !important}.mx-auto{margin-inline-start:auto !important;margin-inline-end:auto !important}.my-auto{margin-top:auto !important;margin-bottom:auto !important}.mt-auto{margin-top:auto !important}.mr-auto{margin-inline-end:auto !important}.mb-auto{margin-bottom:auto !important}.ml-auto{margin-inline-start:auto !important}.p-none{padding:0 !important}.px-none{padding-inline-start:0 !important;padding-inline-end:0 !important}.py-none{padding-top:0 !important;padding-bottom:0 !important}.pt-none{padding-top:0 !important}.pr-none{padding-inline-end:0 !important}.pb-none{padding-bottom:0 !important}.pl-none{padding-inline-start:0 !important}.p-xxs{padding:3px !important}.px-xxs{padding-inline-start:3px !important;padding-inline-end:3px !important}.py-xxs{padding-top:3px !important;padding-bottom:3px !important}.pt-xxs{padding-top:3px !important}.pr-xxs{padding-inline-end:3px !important}.pb-xxs{padding-bottom:3px !important}.pl-xxs{padding-inline-start:3px !important}.p-xs{padding:6px !important}.px-xs{padding-inline-start:6px !important;padding-inline-end:6px !important}.py-xs{padding-top:6px !important;padding-bottom:6px !important}.pt-xs{padding-top:6px !important}.pr-xs{padding-inline-end:6px !important}.pb-xs{padding-bottom:6px !important}.pl-xs{padding-inline-start:6px !important}.p-s{padding:12px !important}.px-s{padding-inline-start:12px !important;padding-inline-end:12px !important}.py-s{padding-top:12px !important;padding-bottom:12px !important}.pt-s{padding-top:12px !important}.pr-s{padding-inline-end:12px !important}.pb-s{padding-bottom:12px !important}.pl-s{padding-inline-start:12px !important}.p-m{padding:16px !important}.px-m{padding-inline-start:16px !important;padding-inline-end:16px !important}.py-m{padding-top:16px !important;padding-bottom:16px !important}.pt-m{padding-top:16px !important}.pr-m{padding-inline-end:16px !important}.pb-m{padding-bottom:16px !important}.pl-m{padding-inline-start:16px !important}.p-l{padding:24px !important}.px-l{padding-inline-start:24px !important;padding-inline-end:24px !important}.py-l{padding-top:24px !important;padding-bottom:24px !important}.pt-l{padding-top:24px !important}.pr-l{padding-inline-end:24px !important}.pb-l{padding-bottom:24px !important}.pl-l{padding-inline-start:24px !important}.p-xl{padding:32px !important}.px-xl{padding-inline-start:32px !important;padding-inline-end:32px !important}.py-xl{padding-top:32px !important;padding-bottom:32px !important}.pt-xl{padding-top:32px !important}.pr-xl{padding-inline-end:32px !important}.pb-xl{padding-bottom:32px !important}.pl-xl{padding-inline-start:32px !important}.p-xxl{padding:48px !important}.px-xxl{padding-inline-start:48px !important;padding-inline-end:48px !important}.py-xxl{padding-top:48px !important;padding-bottom:48px !important}.pt-xxl{padding-top:48px !important}.pr-xxl{padding-inline-end:48px !important}.pb-xxl{padding-bottom:48px !important}.pl-xxl{padding-inline-start:48px !important}.p-auto{padding:auto !important}.px-auto{padding-inline-start:auto !important;padding-inline-end:auto !important}.py-auto{padding-top:auto !important;padding-bottom:auto !important}.pt-auto{padding-top:auto !important}.pr-auto{padding-inline-end:auto !important}.pb-auto{padding-bottom:auto !important}.pl-auto{padding-inline-start:auto !important}.gap-none{gap:0 !important}.gap-x-none{column-gap:0 !important}.gap-y-none{row-gap:0 !important}.gap-xxs{gap:3px !important}.gap-x-xxs{column-gap:3px !important}.gap-y-xxs{row-gap:3px !important}.gap-xs{gap:6px !important}.gap-x-xs{column-gap:6px !important}.gap-y-xs{row-gap:6px !important}.gap-s{gap:12px !important}.gap-x-s{column-gap:12px !important}.gap-y-s{row-gap:12px !important}.gap-m{gap:16px !important}.gap-x-m{column-gap:16px !important}.gap-y-m{row-gap:16px !important}.gap-l{gap:24px !important}.gap-x-l{column-gap:24px !important}.gap-y-l{row-gap:24px !important}.gap-xl{gap:32px !important}.gap-x-xl{column-gap:32px !important}.gap-y-xl{row-gap:32px !important}.gap-xxl{gap:48px !important}.gap-x-xxl{column-gap:48px !important}.gap-y-xxl{row-gap:48px !important}.gap-auto{gap:auto !important}.gap-x-auto{column-gap:auto !important}.gap-y-auto{row-gap:auto !important}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}*{box-sizing:border-box;outline-color:var(--color-primary);outline-width:1px}*:focus{outline-style:dotted}html{height:100%;overflow-y:scroll;background-color:#f2f2f2}html.flexbox{overflow-y:hidden}html.dark-mode{background-color:#111}body{font-size:14px;line-height:1.6;color:#444;-webkit-font-smoothing:antialiased;height:100%;display:flex;flex-direction:column}html.dark-mode body{color:#aaa}body,button,input,select,label,textarea{font-family:var(--font-body)}pre,#markdown-editor-input,.text-mono,.code-base,span.code,code{font-family:var(--font-code)}h1{font-size:3.425em;line-height:1.22222222em;margin-top:.48888889em;margin-bottom:.48888889em}h2{font-size:2.8275em;line-height:1.294117647em;margin-top:.8627451em;margin-bottom:.43137255em}h3{font-size:2.333em;line-height:1.221428572em;margin-top:.78571429em;margin-bottom:.43137255em}h4{font-size:1.666em;line-height:1.375em;margin-top:.78571429em;margin-bottom:.43137255em}h1,h2,h3,h4,h5,h6{font-weight:400;position:relative;display:block;font-family:var(--font-heading, var(--font-body));color:#222}html.dark-mode h1,html.dark-mode h2,html.dark-mode h3,html.dark-mode h4,html.dark-mode h5,html.dark-mode h6{color:#bbb}h5{font-size:1.4em}h5,h6{line-height:1.2em;margin-top:.78571429em;margin-bottom:.66em}@media screen and (max-width: 600px){h1{font-size:2.8275em}h2{font-size:2.333em}h3{font-size:1.666em}h4{font-size:1.333em}h5{font-size:1.161616em}}.list-heading{font-size:2rem}h2.list-heading{font-size:1.333rem}a{color:var(--color-link);fill:currentColor;cursor:pointer;text-decoration:none;transition:filter ease-in-out 80ms;line-height:1.6}a:hover{text-decoration:underline}a.icon{display:inline-block}a svg{position:relative;display:inline-block}a:focus img:only-child{outline:2px dashed var(--color-link);outline-offset:2px}a.no-link-style{color:inherit}a.no-link-style:hover{text-decoration:none}.blended-links a{color:inherit}.blended-links a svg{fill:currentColor}p,ul,ol,pre,table,blockquote{margin-top:.3em;margin-bottom:1.375em}hr{border:0;height:1px;background:#eaeaea;margin-bottom:24px}html.dark-mode hr{background:#555}hr.faded{background-image:linear-gradient(to right, #FFF, #e3e0e0 20%, #e3e0e0 80%, #FFF)}hr.darker{background:#ddd}html.dark-mode hr.darker{background:#666}hr.margin-top,hr.even{margin-top:24px}strong,b,.bold,.strong{font-weight:bold}strong>strong,strong>b,strong>.bold,strong>.strong,b>strong,b>b,b>.bold,b>.strong,.bold>strong,.bold>b,.bold>.bold,.bold>.strong,.strong>strong,.strong>b,.strong>.bold,.strong>.strong{font-weight:bolder}em,i,.italic{font-style:italic}small,p.small,span.small,.text-small{font-size:.75rem}sup,.superscript{vertical-align:super;font-size:.8em}sub,.subscript{vertical-align:sub;font-size:.8em}pre{font-size:12px;border:1px solid #ddd;background-color:#fff;border-color:#ddd;border-radius:4px;padding-inline-start:26px;position:relative;padding-top:3px;padding-bottom:3px}html.dark-mode pre{background-color:#2b2b2b}html.dark-mode pre{border-color:#111}pre:before{content:"";display:block;position:absolute;top:0;width:22.4px;inset-inline-start:0;height:100%;background-color:#f5f5f5;border-inline-end:1px solid #ddd}html.dark-mode pre:before{background-color:#313335}html.dark-mode pre:before{border-inline-end:none}@media print{pre{padding-left:12px}pre:before{display:none}}blockquote{display:block;position:relative;border-left:4px solid rgba(0,0,0,0);border-left-color:var(--color-primary);background-color:#f8f8f8;padding:12px 16px 12px 32px;overflow:auto}html.dark-mode blockquote{background-color:#333}blockquote:before{content:"“";font-size:2em;font-weight:bold;position:absolute;top:12px;left:12px;color:#777}.text-mono{font-family:var(--font-code)}.text-uppercase{text-transform:uppercase}.text-capitals{text-transform:capitalize}.code-base,span.code,code{font-size:.84em;border:1px solid #ddd;border-radius:3px;background-color:#f8f8f8;border-color:#ddd}html.dark-mode .code-base,html.dark-mode span.code,html.dark-mode code{background-color:#2b2b2b}html.dark-mode .code-base,html.dark-mode span.code,html.dark-mode code{border-color:#444}code{display:inline;padding:1px 3px;white-space:pre-wrap;line-height:1.2em}span.code{padding:1px 6px}pre code{background-color:rgba(0,0,0,0);border:0;font-size:1em;display:block;line-height:1.6}span.highlight{font-weight:bold;padding:2px 4px}ul,ol{padding-left:32px;padding-right:32px;display:flow-root}ul p,ol p{margin:0}ul{list-style:disc}ul ul{list-style:circle}ul label{margin:0}ol{list-style:decimal}li>ol,li>ul{margin-top:0;margin-bottom:0;margin-block-end:0;margin-block-start:0;padding-block-end:0;padding-block-start:0;padding-left:19.2px;padding-right:19.2px}li.checkbox-item,li.task-list-item{display:list-item;list-style:none;margin-left:-19.2px;margin-inline-start:-19.2px;margin-inline-end:0}li.checkbox-item input[type=checkbox],li.task-list-item input[type=checkbox]{margin-right:6px;margin-inline-end:6px;margin-inline-start:0}li.checkbox-item li.checkbox-item,li.checkbox-item li.task-list-item,li.task-list-item li.checkbox-item,li.task-list-item li.task-list-item{margin-left:6px;margin-inline-start:6px;margin-inline-end:0}.underlined{text-decoration:underline}.text-center{text-align:center}.text-left{text-align:start}.text-right{text-align:end}@media screen and (min-width: 361px){.text-xxs-center{text-align:center}.text-xxs-left{text-align:start}.text-xxs-right{text-align:end}}@media screen and (min-width: 401px){.text-xs-center{text-align:center}.text-xs-left{text-align:start}.text-xs-right{text-align:end}}@media screen and (min-width: 601px){.text-s-center{text-align:center}.text-s-left{text-align:start}.text-s-right{text-align:end}}@media screen and (min-width: 881px){.text-m-center{text-align:center}.text-m-left{text-align:start}.text-m-right{text-align:end}}@media screen and (min-width: 1001px){.text-l-center{text-align:center}.text-l-left{text-align:start}.text-l-right{text-align:end}}@media screen and (min-width: 1101px){.text-xl-center{text-align:center}.text-xl-left{text-align:start}.text-xl-right{text-align:end}}.text-bigger{font-size:1.1em}.text-large{font-size:1.6666em}.no-color{color:inherit}.break-text{white-space:normal;word-wrap:break-word;overflow-wrap:break-word}.text-limit-lines-1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-limit-lines-2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.header-group{margin:16px 0}.header-group h1,.header-group h2,.header-group h3,.header-group h4,.header-group h5,.header-group h6{margin:0}span.sep{color:#bbb;padding:0 6px}.list>*{display:block}.svg-icon{width:1em;height:1em;display:inline-block;position:relative;bottom:-0.105em;margin-inline-end:6px;pointer-events:none;fill:currentColor}.primary-background{background-color:var(--color-primary) !important}.primary-background-light{background-color:var(--color-primary-light)}html.dark-mode .primary-background-light{background:#000}html.dark-mode .primary-background-light .text-link{color:#aaa !important}.link-background{background-color:var(--color-link) !important}.text-pos,.text-pos:hover,.text-pos-hover:hover{color:var(--color-positive) !important;fill:var(--color-positive) !important}.text-warn,.text-warn:hover,.text-warn-hover:hover{color:var(--color-warning) !important;fill:var(--color-warning) !important}.text-neg,.text-neg:hover,.text-neg-hover:hover{color:var(--color-negative) !important;fill:var(--color-negative) !important}.text-primary,.text-primary:hover,.text-primary-hover:hover{color:var(--color-primary) !important;fill:var(--color-primary) !important}.text-link,.text-link:hover,.text-link-hover:hover{color:var(--color-link) !important;fill:var(--color-link) !important}.text-muted{color:#575757 !important;fill:currentColor !important}html.dark-mode .text-muted{color:#888 !important}.text-dark{color:#222 !important;fill:currentColor !important}html.dark-mode .text-dark{color:#ccc !important}.text-white{color:#fff;fill:currentColor !important}.text-bookshelf,.text-bookshelf:hover{color:var(--color-bookshelf);fill:var(--color-bookshelf)}.text-book,.text-book:hover{color:var(--color-book);fill:var(--color-book)}.text-page,.text-page:hover{color:var(--color-page);fill:var(--color-page)}.text-page.draft,.text-page.draft:hover{color:var(--color-page-draft);fill:var(--color-page-draft)}.text-chapter,.text-chapter:hover{color:var(--color-chapter);fill:var(--color-chapter)}.bg-white{background-color:#fff}.bg-book{background-color:var(--color-book)}.bg-chapter{background-color:var(--color-chapter)}.bg-bookshelf{background-color:var(--color-bookshelf)}.container{max-width:1400px;margin-inline-start:auto;margin-inline-end:auto;padding-inline-start:16px;padding-inline-end:16px}.container.medium{max-width:1100px}.container.small{max-width:840px}.container.very-small{max-width:480px}.grid{display:grid;grid-column-gap:24px;grid-row-gap:24px}.grid>*{min-width:0}.grid.half{grid-template-columns:1fr 1fr}.grid.third{grid-template-columns:1fr 1fr 1fr}.grid.left-focus{grid-template-columns:2fr 1fr}.grid.right-focus{grid-template-columns:1fr 3fr}.grid.gap-y-xs{grid-row-gap:6px}.grid.gap-xl{grid-column-gap:32px;grid-row-gap:32px}.grid.gap-xxl{grid-column-gap:48px;grid-row-gap:48px}.grid.v-center{align-items:center}.grid.v-end{align-items:end}.grid.no-gap{grid-row-gap:0;grid-column-gap:0}.grid.no-row-gap{grid-row-gap:0}@media screen and (max-width: 880px){.grid.third:not(.no-break){grid-template-columns:1fr 1fr}.grid.half:not(.no-break),.grid.left-focus:not(.no-break),.grid.right-focus:not(.no-break){grid-template-columns:1fr}.grid.half.collapse-xs{grid-template-columns:1fr 1fr}.grid.gap-xl{grid-column-gap:16px;grid-row-gap:16px}.grid.right-focus.reverse-collapse>*:nth-child(2){order:0}.grid.right-focus.reverse-collapse>*:nth-child(1){order:1}}@media screen and (max-width: 600px){.grid.third:not(.no-break){grid-template-columns:1fr}}@media screen and (max-width: 400px){.grid.half.collapse-xs{grid-template-columns:1fr}}#content{flex:1 0 auto}body.flexbox{display:flex;flex-direction:column;align-items:stretch;height:100%;min-height:100%;max-height:100%;overflow:hidden}body.flexbox #content{flex:1;display:flex;min-height:0}.flex-fill{display:flex;align-items:stretch;min-height:0;max-width:100%;position:relative}.flex-container-row{display:flex;flex-direction:row}.flex-container-row.v-center{align-items:center}.flex-container-column{display:flex;flex-direction:column}.flex-container-row.inline,.flex-container-column.inline{display:inline-flex !important}.flex-container-column.wrap,.flex-container-row.wrap{flex-wrap:wrap}.flex{min-height:0;flex:1;max-width:100%}.flex.fit-content{flex-basis:auto;flex-grow:0}.flex.fill-area{flex-grow:1;flex-shrink:0;min-width:fit-content}.flex-2{min-height:0;flex:2;max-width:100%}.flex-3{min-height:0;flex:3;max-width:100%}.flex-none{flex:none}.justify-flex-start{justify-content:flex-start}.justify-flex-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-space-between{justify-content:space-between}.items-center{align-items:center}.items-stretch{align-items:stretch}.min-width-xxxxs{min-width:60px}.min-width-xxxs{min-width:80px}.min-width-xxs{min-width:100px}.min-width-xs{min-width:120px}.min-width-s{min-width:160px}.min-width-m{min-width:200px}.min-width-l{min-width:240px}.min-width-xl{min-width:280px}.min-width-xxl{min-width:320px}.block{display:block !important;position:relative}.inline{display:inline !important}.block.inline{display:inline-block !important}.relative{position:relative}.fixed{position:fixed;z-index:20}.fixed.top-right{top:0;right:0}.hidden{display:none !important}.overflow-hidden{overflow:hidden}.height-fill{height:100%}.height-auto{height:auto !important}.float{float:left}.float.right{float:right}.sticky-top-m{position:sticky;top:16px}@media screen and (max-width: 360px){.hide-under-xxs{display:none !important}}@media screen and (min-width: 361px){.hide-over-xxs{display:none !important}}@media screen and (max-width: 400px){.hide-under-xs{display:none !important}}@media screen and (min-width: 401px){.hide-over-xs{display:none !important}}@media screen and (max-width: 600px){.hide-under-s{display:none !important}}@media screen and (min-width: 601px){.hide-over-s{display:none !important}}@media screen and (max-width: 880px){.hide-under-m{display:none !important}}@media screen and (min-width: 881px){.hide-over-m{display:none !important}}@media screen and (max-width: 1000px){.hide-under-l{display:none !important}}@media screen and (min-width: 1001px){.hide-over-l{display:none !important}}@media screen and (max-width: 1100px){.hide-under-xl{display:none !important}}@media screen and (min-width: 1101px){.hide-over-xl{display:none !important}}[hidden]{display:none !important}.screen-reader-only{position:absolute;inset-inline-start:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.rounded{border-radius:4px}.dual-column-content{columns:2}@media screen and (max-width: 880px){.dual-column-content{columns:1}}.clearfix::before,.clearfix::after{content:" ";display:table}.clearfix::after{clear:both}.tri-layout-container{display:grid;margin-inline-start:32px;margin-inline-end:32px;grid-template-columns:1fr 4fr 1fr;grid-template-areas:"a b c";grid-column-gap:32px;position:relative}.tri-layout-sides{grid-column-start:a;grid-column-end:c;grid-row:1;min-width:0;z-index:4}.tri-layout-sides-content{display:grid;grid-template-areas:"a b c";grid-template-columns:1fr 4fr 1fr;height:100%}.tri-layout-middle{grid-area:b;padding-top:16px;min-width:0;z-index:5}.tri-layout-right{grid-area:c;min-width:0;position:relative}.tri-layout-left{grid-area:a;min-width:0;position:relative}@media screen and (min-width: 1401px){.tri-layout-left-contents,.tri-layout-right-contents{padding:32px 16px;position:sticky;top:0;max-height:100vh;min-height:50vh;overflow-y:scroll;overflow-x:hidden;height:100%;scrollbar-width:none;-ms-overflow-style:none}.tri-layout-left-contents::-webkit-scrollbar,.tri-layout-right-contents::-webkit-scrollbar{display:none}.tri-layout-middle-contents{max-width:940px;margin:0 auto}}@media screen and (min-width: 1401px)and (max-width: 1700px){.tri-layout-sides-content,.tri-layout-container{grid-template-columns:1fr 972px 1fr}.tri-layout-container{grid-column-gap:12px;margin-inline-start:16px;margin-inline-end:16px}}@media screen and (max-width: 1400px){.tri-layout-container{grid-template-areas:"a b b";grid-template-columns:1fr 3fr;grid-template-rows:min-content min-content 1fr;margin-inline-start:19px;margin-inline-end:19px}.tri-layout-sides{grid-column-start:a;grid-column-end:a}.tri-layout-sides-content{display:block}}@media screen and (min-width: 1001px)and (max-width: 1400px){.tri-layout-sides-content{position:sticky;top:0;max-height:100vh;min-height:50vh;overflow-y:scroll;overflow-x:hidden;height:100%;scrollbar-width:none;-ms-overflow-style:none;padding-inline:16px;margin-inline:-16px}.tri-layout-sides-content::-webkit-scrollbar{display:none}}@media screen and (min-width: 1001px){.tri-layout-mobile-tabs{display:none}.tri-layout-left-contents>*,.tri-layout-right-contents>*{opacity:.6;transition:opacity ease-in-out 120ms}html.dark-mode .tri-layout-left-contents>*,html.dark-mode .tri-layout-right-contents>*{opacity:.75}.tri-layout-left-contents>*:hover,.tri-layout-left-contents>*:focus-within,.tri-layout-right-contents>*:hover,.tri-layout-right-contents>*:focus-within{opacity:1 !important}}@media screen and (min-width: 1001px)and (prefers-contrast: more){.tri-layout-left-contents>*,.tri-layout-right-contents>*{opacity:1 !important}}@media screen and (max-width: 1000px){.tri-layout-container{grid-template-areas:none;grid-template-columns:1fr;grid-column-gap:0;padding-inline-end:6px;padding-inline-start:6px}.tri-layout-container .tri-layout-sides{padding-inline-start:16px;padding-inline-end:16px;grid-column:1/1}.tri-layout-container .tri-layout-left>*,.tri-layout-container .tri-layout-right>*{display:none;pointer-events:none}.tri-layout-container .tri-layout-left,.tri-layout-container .tri-layout-right{padding-top:0 !important}.tri-layout-container .tri-layout-middle{grid-area:none;grid-row:3;grid-column:1/1;z-index:1;overflow:hidden;transition:transform ease-in-out 240ms}.tri-layout-container .tri-layout-left{grid-row:2}.tri-layout-container.show-info{overflow:hidden}.tri-layout-container.show-info .tri-layout-middle{display:none}.tri-layout-container.show-info .tri-layout-right>*,.tri-layout-container.show-info .tri-layout-left>*{display:block;pointer-events:auto}}@media screen and (max-width: 880px){.tri-layout-container{margin-inline-start:0;margin-inline-end:0}}.scroll-away-from-top:before,.scroll-away-from-bottom:after{content:"";display:block;position:absolute;color:#f2f2f2;left:0;top:0;width:100%;height:50px;background:linear-gradient(to bottom, currentColor, transparent);z-index:2}html.dark-mode .scroll-away-from-top:before,html.dark-mode .scroll-away-from-bottom:after{color:#111}.scroll-away-from-bottom:after{top:auto;bottom:0;background:linear-gradient(to top, currentColor, transparent)}.card{background-color:#fff;box-shadow:0 1px 6px -1px rgba(0,0,0,.1);border-radius:3px;break-inside:avoid}html.dark-mode .card{background-color:#222}.card .body,.card p.empty-text{padding-block:16px}.card a,.card p{word-wrap:break-word;word-break:break-word}.card-title{padding:16px 16px 6px;margin:0;font-size:14px;color:#222;fill:#222;font-weight:400}.card-title a{line-height:1}.card-footer-link,button.card-footer-link{display:block;padding:12px 16px;line-height:1;border-top:1px solid;width:100%;text-align:left;border-color:#ddd;border-radius:0 0 3px 3px;font-size:.9em;margin-top:6px}html.dark-mode .card-footer-link,html.dark-mode button.card-footer-link{border-color:#555}.card-footer-link:hover,button.card-footer-link:hover{text-decoration:none;background-color:#f2f2f2}html.dark-mode .card-footer-link:hover,html.dark-mode button.card-footer-link:hover{background-color:#2d2d2d}.card-footer-link:focus,button.card-footer-link:focus{background-color:#eee;outline:1px dotted #666;outline-offset:-2px}html.dark-mode .card-footer-link:focus,html.dark-mode button.card-footer-link:focus{background-color:#222}.card.border-card{border:1px solid;border-color:#ddd}html.dark-mode .card.border-card{border-color:#000}.card.drag-card{border:1px solid #ddd;border-color:#ddd;background-color:#fff;border-radius:4px;display:flex;padding:0 0 0 40px;margin:12px 0;position:relative}html.dark-mode .card.drag-card{border-color:#000}html.dark-mode .card.drag-card{background-color:#333}.card.drag-card .drag-card-action{cursor:pointer}.card.drag-card .handle,.card.drag-card .drag-card-action{display:flex;align-items:center;text-align:center;justify-content:center;width:28px;flex-grow:0;padding:0 6px}.card.drag-card .handle:hover,.card.drag-card .drag-card-action:hover{background-color:#eee}html.dark-mode .card.drag-card .handle:hover,html.dark-mode .card.drag-card .drag-card-action:hover{background-color:#2d2d2d}.card.drag-card .handle .svg-icon,.card.drag-card .drag-card-action .svg-icon{margin-inline-end:0px}.card.drag-card .outline input{margin:12px 0;width:100%}.card.drag-card .outline{position:relative}.card.drag-card .handle{background-color:#eee;left:0;position:absolute;top:0;bottom:0}html.dark-mode .card.drag-card .handle{background-color:#2d2d2d}.card.drag-card>div{padding:0 12px;max-width:80%;flex:1}.grid-card{display:flex;flex-direction:column;border:1px solid #ddd;border-color:#ddd;margin-bottom:24px;border-radius:4px;overflow:hidden;min-width:100px;color:#444;transition:border-color ease-in-out 120ms,box-shadow ease-in-out 120ms}html.dark-mode .grid-card{border-color:#000}.grid-card:hover{color:#444;text-decoration:none;box-shadow:0 1px 6px -1px rgba(0,0,0,.1)}html.dark-mode .grid-card:hover{box-shadow:0 1px 6px -1px rgba(0,0,0,.5)}.grid-card h2{width:100%;font-size:1.5em;margin:0 0 10px}.grid-card p{font-size:.7rem;margin:0;line-height:1.6em}.grid-card .grid-card-content{flex:1;border-top:0;border-bottom-width:2px}.grid-card .grid-card-content,.grid-card .grid-card-footer{padding:24px}.grid-card .grid-card-content+.grid-card-footer{padding-top:0}.book-grid-item .grid-card-footer p.small{font-size:.8em;margin:0}.content-wrap.card{padding:16px 48px;margin-inline-start:auto;margin-inline-end:auto;margin-bottom:24px;overflow:initial;min-height:60vh;border-radius:8px}.content-wrap.card.auto-height{min-height:0}.content-wrap.card.fill-width{width:100%}@media screen and (max-width: 1400px){.content-wrap.card{padding:16px 32px}}@media screen and (max-width: 880px){.content-wrap.card{padding:16px 24px}}@media screen and (max-width: 600px){.content-wrap.card{padding:16px 16px}}.sub-card{box-shadow:0 1px 3px 0 rgba(0,0,0,.1);border:1.5px solid;border-color:#e2e2e2;border-radius:4px}html.dark-mode .sub-card{border-color:#444}.outline-hover{border:1px solid rgba(0,0,0,0) !important}.outline-hover:hover{border:1px solid rgba(0,0,0,.1) !important}.fade-in-when-active{opacity:.6;transition:opacity ease-in-out 120ms}html.dark-mode .fade-in-when-active{opacity:.7}.fade-in-when-active:hover,.fade-in-when-active:focus-within{opacity:1 !important}@media(prefers-contrast: more){.fade-in-when-active{opacity:1 !important}}.tag-item{display:inline-flex;margin-bottom:6px;margin-inline-end:6px;border-radius:4px;border:1px solid;overflow:hidden;font-size:.85em;border-color:#ccc}html.dark-mode .tag-item{border-color:#666}.tag-item a,.tag-item span,.tag-item a:hover,.tag-item a:active{padding:4px 8px;color:rgba(0,0,0,.7);transition:background-color ease-in-out 80ms;text-decoration:none}html.dark-mode .tag-item a,html.dark-mode .tag-item span,html.dark-mode .tag-item a:hover,html.dark-mode .tag-item a:active{color:hsla(0,0%,100%,.8)}.tag-item a:hover{background-color:hsla(0,0%,100%,.7)}html.dark-mode .tag-item a:hover{background-color:hsla(0,0%,100%,.3)}.tag-item svg{fill:rgba(0,0,0,.5)}html.dark-mode .tag-item svg{fill:hsla(0,0%,100%,.5)}.tag-item .tag-value{border-inline-start:1px solid;border-color:#ddd;background-color:hsla(0,0%,100%,.5)}html.dark-mode .tag-item .tag-value{border-color:#666}html.dark-mode .tag-item .tag-value{background-color:hsla(0,0%,100%,.2)}.tag-name.highlight,.tag-value.highlight{font-weight:bold}.tag-list div:last-child .tag-item{margin-bottom:0}.item-list-row .tag-item{margin-bottom:0}.api-method{font-size:.75rem;background-color:#888;padding:6px;line-height:1.3;opacity:.7;vertical-align:top;border-radius:3px;color:#fff;display:inline-block;min-width:60px;text-align:center;font-weight:bold}.api-method[data-method=GET]{background-color:#077b70}.api-method[data-method=POST]{background-color:#cf4d03}.api-method[data-method=PUT]{background-color:#0288d1}.api-method[data-method=DELETE]{background-color:#ab0f0e}.sticky-sidebar{position:sticky;top:16px;max-height:calc(100vh - 16px);overflow-y:auto}button{background-color:rgba(0,0,0,0);border:0;font-size:100%}.button{text-decoration:none;font-size:.85rem;line-height:1.4em;padding:7.8px 16px;margin-top:6px;margin-bottom:6px;display:inline-block;font-weight:400;outline:0;border-radius:4px;cursor:pointer;transition:background-color ease-in-out 120ms,filter ease-in-out 120ms,box-shadow ease-in-out 120ms;box-shadow:none;background-color:var(--color-primary);color:#fff;border:1px solid var(--color-primary);vertical-align:top}.button:hover,.button:focus,.button:active{background-color:var(--color-primary);text-decoration:none;color:#fff}.button:hover{box-shadow:0 0 4px 1px #ccc;filter:brightness(110%)}html.dark-mode .button:hover{box-shadow:0 0 4px 1px rgba(0,0,0,.5)}.button:focus{outline:1px dotted currentColor;outline-offset:-6px;box-shadow:none;filter:brightness(90%)}.button:active{outline:0}.button.outline{background-color:rgba(0,0,0,0);color:#666;fill:currentColor;border:1px solid;border-color:#ccc}html.dark-mode .button.outline{color:#aaa}html.dark-mode .button.outline{border-color:#666}.button.outline:hover,.button.outline:focus,.button.outline:active{color:#444;border:1px solid #ccc;box-shadow:0 1px 4px 0 rgba(0,0,0,.1);background-color:#f2f2f2;background-color:#f8f8f8;filter:none}html.dark-mode .button.outline:hover,html.dark-mode .button.outline:focus,html.dark-mode .button.outline:active{color:#bbb}html.dark-mode .button.outline:hover,html.dark-mode .button.outline:focus,html.dark-mode .button.outline:active{background-color:#444}.button.outline:active{border-color:#bbb;background-color:#ddd;color:#666;box-shadow:inset 0 0 2px rgba(0,0,0,.1)}.button+.button{margin-inline-start:12px}.button.small{font-size:.75rem;padding:7.2px 12px}.text-button{cursor:pointer;background-color:rgba(0,0,0,0);padding:0;margin:0;border:none;user-select:none;font-size:.75rem;line-height:1.4em;color:var(--color-link)}.text-button:active{outline:0}.text-button:hover{text-decoration:none}.text-button:hover,.text-button:focus{color:var(--color-link);fill:var(--color-link)}.text-button.hover-underline:hover{text-decoration:underline}.button.block{width:100%;text-align:start;display:block}.button.icon .svg-icon,.icon-button .svg-icon,.text-button.icon .svg-icon{margin-inline-end:0}.icon-button{text-align:center;border:1px solid rgba(0,0,0,0)}.icon-button:hover{background-color:rgba(0,0,0,.05);border-radius:4px;border-color:#ddd;cursor:pointer}html.dark-mode .icon-button:hover{border-color:#444}.button.svg{display:flex;align-items:center;padding:12px 16px;padding-bottom:10px;width:100%}.button.svg svg{display:inline-block;width:24px;height:24px;bottom:auto;margin-inline-end:16px}.button[disabled]{background-color:#bbb;cursor:default;border-color:#ccc}.button[disabled]:hover{background-color:#bbb;cursor:default;box-shadow:none}table{min-width:100px;max-width:100%}table thead{background-color:#f8f8f8;font-weight:500}html.dark-mode table thead{background-color:#333}table td,table th{min-width:10px;padding:6px 8px;border:1px solid #ddd;overflow:auto;line-height:1.2;word-break:break-word;vertical-align:top}table td p,table th p{margin:0}table.table{width:100%}table.table tr td,table.table tr th{border-bottom:1px solid rgba(0,0,0,.05)}table.table th,table.table td{text-align:start;border:none;padding:12px 12px;vertical-align:middle;margin:0;overflow:visible}table.table th{font-weight:bold}table.table tr:hover{background-color:#f2f2f2}html.dark-mode table.table tr:hover{background-color:#333}table.table .text-right{text-align:end}table.table .text-center{text-align:center}table.table td.actions{overflow:visible}table.table a{display:inline-block}table.table.expand-to-padding{margin-left:-12px;margin-right:-12px;width:calc(100% + 2*12px);max-width:calc(100% + 2*12px)}table.no-style td{border:0;padding:0}table.list-table{margin:0 -6px}table.list-table td{border:0;vertical-align:middle;padding:6px}.input-base,input[type=text],input[type=number],input[type=email],input[type=date],input[type=search],input[type=url],input[type=color],input[type=password],select,textarea,.fake-input{border-radius:3px;border:1px solid #d4d4d4;background-color:#fff;border-color:#d4d4d4;color:#666;display:inline-block;font-size:14px;padding:10.8px;height:40px;width:250px;max-width:100%}html.dark-mode .input-base,html.dark-mode input[type=text],html.dark-mode input[type=number],html.dark-mode input[type=email],html.dark-mode input[type=date],html.dark-mode input[type=search],html.dark-mode input[type=url],html.dark-mode input[type=color],html.dark-mode input[type=password],html.dark-mode select,html.dark-mode textarea,html.dark-mode .fake-input{background-color:#333}html.dark-mode .input-base,html.dark-mode input[type=text],html.dark-mode input[type=number],html.dark-mode input[type=email],html.dark-mode input[type=date],html.dark-mode input[type=search],html.dark-mode input[type=url],html.dark-mode input[type=color],html.dark-mode input[type=password],html.dark-mode select,html.dark-mode textarea,html.dark-mode .fake-input{border-color:#111}html.dark-mode .input-base,html.dark-mode input[type=text],html.dark-mode input[type=number],html.dark-mode input[type=email],html.dark-mode input[type=date],html.dark-mode input[type=search],html.dark-mode input[type=url],html.dark-mode input[type=color],html.dark-mode input[type=password],html.dark-mode select,html.dark-mode textarea,html.dark-mode .fake-input{color:#aaa}.input-base.neg,input.neg[type=text],input.neg[type=number],input.neg[type=email],input.neg[type=date],input.neg[type=search],input.neg[type=url],input.neg[type=color],input.neg[type=password],select.neg,textarea.neg,.neg.fake-input,.input-base.invalid,input.invalid[type=text],input.invalid[type=number],input.invalid[type=email],input.invalid[type=date],input.invalid[type=search],input.invalid[type=url],input.invalid[type=color],input.invalid[type=password],select.invalid,textarea.invalid,.invalid.fake-input{border:1px solid var(--color-negative)}.input-base.pos,input.pos[type=text],input.pos[type=number],input.pos[type=email],input.pos[type=date],input.pos[type=search],input.pos[type=url],input.pos[type=color],input.pos[type=password],select.pos,textarea.pos,.pos.fake-input,.input-base.valid,input.valid[type=text],input.valid[type=number],input.valid[type=email],input.valid[type=date],input.valid[type=search],input.valid[type=url],input.valid[type=color],input.valid[type=password],select.valid,textarea.valid,.valid.fake-input{border:1px solid var(--color-positive)}.input-base.disabled,input.disabled[type=text],input.disabled[type=number],input.disabled[type=email],input.disabled[type=date],input.disabled[type=search],input.disabled[type=url],input.disabled[type=color],input.disabled[type=password],select.disabled,textarea.disabled,.disabled.fake-input,.input-base[disabled],input[disabled][type=text],input[disabled][type=number],input[disabled][type=email],input[disabled][type=date],input[disabled][type=search],input[disabled][type=url],input[disabled][type=color],input[disabled][type=password],select[disabled],textarea[disabled],[disabled].fake-input{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAMUlEQVQIW2NkwAGuXbv2nxGbHEhCS0uLEUMSJgHShCKJLIEiiS4Bl8QmAZbEJQGSBAC62BuJ+tt7zgAAAABJRU5ErkJggg==)}.input-base[readonly],input[readonly][type=text],input[readonly][type=number],input[readonly][type=email],input[readonly][type=date],input[readonly][type=search],input[readonly][type=url],input[readonly][type=color],input[readonly][type=password],select[readonly],textarea[readonly],[readonly].fake-input{background-color:#f8f8f8}.input-base:focus,input[type=text]:focus,input[type=number]:focus,input[type=email]:focus,input[type=date]:focus,input[type=search]:focus,input[type=url]:focus,input[type=color]:focus,input[type=password]:focus,select:focus,textarea:focus,.fake-input:focus{border-color:var(--color-primary);outline:1px solid var(--color-primary)}.input-fill-width{width:100% !important}.fake-input{overflow:auto}#html-editor{display:none}#markdown-editor{position:relative;z-index:5}#markdown-editor #markdown-editor-input{font-style:normal;font-weight:400;padding:6px 16px;color:#444;background-color:#fff;border-radius:0;height:100%;font-size:14px;line-height:1.2;max-height:100%;flex:1;border:0;width:100%;margin:0}html.dark-mode #markdown-editor #markdown-editor-input{color:#aaa}html.dark-mode #markdown-editor #markdown-editor-input{background-color:#222}#markdown-editor #markdown-editor-input:focus{outline:0}#markdown-editor.fullscreen{position:fixed;top:0;left:0;height:100%;z-index:2}.markdown-editor-wrap{border-top:1px solid #ddd;border-bottom:1px solid #ddd;border-color:#ddd;position:relative;flex:1;min-width:0}html.dark-mode .markdown-editor-wrap{border-color:#000}.markdown-editor-wrap+.markdown-editor-wrap{flex-basis:50%;flex-shrink:0;flex-grow:0}.markdown-editor-wrap .cm-editor{flex:1;max-width:100%;border:0;margin:0}.markdown-panel-divider{width:2px;background-color:#ddd;cursor:col-resize}html.dark-mode .markdown-panel-divider{background-color:#000}@media screen and (max-width: 880px){#markdown-editor{flex-direction:column}#markdown-editor .markdown-editor-wrap{width:100%;max-width:100%;flex-grow:1;flex-basis:auto !important;min-height:0}.editor-toolbar-label{float:none !important;border-color:#ddd;display:block}html.dark-mode .editor-toolbar-label{border-color:#555}.markdown-editor-wrap:not(.active) .editor-toolbar+div,.markdown-editor-wrap:not(.active) .editor-toolbar .buttons,.markdown-editor-wrap:not(.active) .markdown-display{display:none}#markdown-editor .markdown-editor-wrap:not(.active){flex-grow:0;flex:none}}.markdown-editor-display{background-color:#fff}.markdown-editor-display body{display:block;background-color:#fff;padding-inline-start:12px;padding-inline-end:12px;max-width:864px}.markdown-editor-display [drawio-diagram]:hover{outline:2px solid var(--color-primary)}html.markdown-editor-display.dark-mode{background-color:#222}html.markdown-editor-display.dark-mode body{background-color:#222}.editor-toolbar{height:32px;width:100%;font-size:11px;line-height:1.6;border-bottom:1px solid #ccc;background-color:#fff;border-color:#ccc;flex:none}html.dark-mode .editor-toolbar{background-color:#333}html.dark-mode .editor-toolbar{border-color:#000}html.dark-mode .editor-toolbar button{color:#aaa}.editor-toolbar .buttons{font-size:14px}.editor-toolbar .buttons .dropdown-menu{padding:0}.editor-toolbar .buttons .toggle-switch{margin:12px 0}.editor-toolbar .buttons button{font-size:.9rem;width:2rem;text-align:center;border-left:1px solid;border-color:#ddd}html.dark-mode .editor-toolbar .buttons button{border-color:#555}.editor-toolbar .buttons button svg{margin-inline-end:0}.editor-toolbar .buttons button:hover{background-color:#ddd}html.dark-mode .editor-toolbar .buttons button:hover{background-color:#222}label{color:#666;display:block;line-height:1.4em;font-size:.94em;font-weight:400;padding-bottom:2px;margin-bottom:.2em}html.dark-mode label{color:#ddd}label.inline{display:inline-block}label.radio,label.checkbox{font-weight:400;user-select:none}label.radio input[type=radio],label.radio input[type=checkbox],label.checkbox input[type=radio],label.checkbox input[type=checkbox]{margin-inline-end:6px}label.inline.checkbox{margin-inline-end:16px}label+p.small{margin-bottom:.8em}table.form-table{max-width:100%}table.form-table td{overflow:hidden;padding:1.5px 0}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url("data:image/svg+xml;utf8,");background-size:10px 12px;background-position:calc(100% - 20px) 64%;background-repeat:no-repeat}html[dir=rtl] select{background-position:20px 70%}input[type=date]{width:190px}input[type=color]{height:60px}input[type=color].small{height:42px;width:60px;padding:2px}.toggle-switch{user-select:none;display:inline-grid;grid-template-columns:28px 1fr;align-items:center;margin:16px 0}.toggle-switch .custom-checkbox{width:16px;height:16px;border-radius:2px;display:inline-block;border:2px solid currentColor;overflow:hidden;fill:currentColor}.toggle-switch .custom-checkbox .svg-icon{width:100%;height:100%;margin:0;bottom:auto;top:-1.5px;left:0;transition:transform ease-in-out 120ms;transform:scale(0);transform-origin:center center}.toggle-switch input[type=checkbox]{display:none}.toggle-switch input[type=checkbox]:checked+.custom-checkbox .svg-icon{transform:scale(1)}.toggle-switch .custom-checkbox:hover{background-color:rgba(0,0,0,.05);opacity:.8}.toggle-switch input[type=checkbox][disabled]~*{opacity:.8;cursor:not-allowed}.toggle-switch input[type=checkbox][disabled]~.custom-checkbox{border-color:#999;color:#999 !important;background:#f2f2f2}.toggle-switch-list .toggle-switch{margin:6px 0}.toggle-switch-list.compact .toggle-switch{margin:1px 0}.form-group{margin-bottom:12px}.setting-list>div{border-bottom:1px solid #ddd;padding:32px 0}.setting-list>div:last-child{border-bottom:none}.setting-list-label{color:#222;color:#222;font-size:1rem}html.dark-mode .setting-list-label{color:#ddd}.setting-list-label+p.small{margin-bottom:0}.setting-list-label+.grid{margin-top:16px}.setting-list .grid input[type=text],.setting-list .grid input[type=email],.setting-list .grid input[type=password],.setting-list .grid select,.stretch-inputs input[type=text],.stretch-inputs input[type=email],.stretch-inputs input[type=password],.stretch-inputs select{width:100%}.simple-code-input{background-color:#f8f8f8;font-family:monospace;font-size:12px;min-height:100px;display:block;width:100%}.form-group div.text-pos,.form-group div.text-neg,.form-group p.text-post,.form-group p.text-neg{padding:6px 0}.form-group.collapsible{padding:0 16px;border:1px solid;border-color:#ddd;border-radius:4px}html.dark-mode .form-group.collapsible{border-color:#000}.form-group.collapsible .collapse-title{margin-inline-start:-16px;margin-inline-end:-16px;padding:12px 16px;display:block;width:calc(100% + 32px);text-align:start}.form-group.collapsible .collapse-title,.form-group.collapsible .collapse-title label{cursor:pointer}.form-group.collapsible .collapse-title label{padding-bottom:0;margin-bottom:0;color:inherit}.form-group.collapsible .collapse-title label:before{display:inline-block;content:"▸";margin-inline-end:16px;transition:all ease-in-out 400ms;transform:rotate(0)}.form-group.collapsible .collapse-content{display:none;padding-bottom:16px}.form-group.collapsible.open .collapse-title label:before{transform:rotate(90deg)}.form-group.ambrosia-container,.form-group.ambrosia-container *{position:absolute !important;height:1px !important;width:1px !important;margin:-1px !important;padding:0 !important;background:rgba(0,0,0,0) !important;color:rgba(0,0,0,0) !important;border:none !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important}.title-input input[type=text]{display:block;width:100%;padding:12px;margin-top:0;font-size:2em;height:auto}.description-input textarea{display:block;width:100%;padding:12px;font-size:14px;color:#666;height:auto}.description-input>.tox-tinymce{border:1px solid #ddd !important;border-color:#ddd !important;border-radius:3px}html.dark-mode .description-input>.tox-tinymce{border-color:#000 !important}.description-input>.tox-tinymce .tox-toolbar__primary{justify-content:end}.search-box{max-width:100%;position:relative}.search-box button[tabindex="-1"]{background-color:rgba(0,0,0,0);border:none;color:#666;padding:0;cursor:pointer;position:absolute;inset-inline-start:8px;top:10px}html.dark-mode .search-box button[tabindex="-1"]{color:#aaa}.search-box input{display:block;padding:9px;padding-inline-start:28px;width:300px;max-width:100%;height:auto}.search-box.flexible input{width:100%}.search-box button.search-box-cancel{left:auto;right:0}.contained-search-box{display:flex;height:38px;z-index:-1}.contained-search-box.floating{box-shadow:0 1px 3px 1px rgba(76,76,76,.26);border-radius:4px;overflow:hidden}html.dark-mode .contained-search-box.floating{border:1px solid #000}.contained-search-box input,.contained-search-box button{height:100%;border-radius:0;border:1px solid #ddd;border-color:#ddd;margin-inline-start:-1px}html.dark-mode .contained-search-box input,html.dark-mode .contained-search-box button{border-color:#000}.contained-search-box input:last-child,.contained-search-box button:last-child{border-inline-end:0}.contained-search-box input{border:0;flex:5;padding:6px 12px}.contained-search-box input:focus,.contained-search-box input:active{outline:1px dotted var(--color-primary);outline-offset:-2px;border:0}.contained-search-box button{border:0;width:48px;border-inline-start:1px solid #ddd;background-color:#fff;background-color:#fff;color:#444}html.dark-mode .contained-search-box button{background-color:#333}html.dark-mode .contained-search-box button{color:#aaa}.contained-search-box button:focus{outline:1px dotted var(--color-primary);outline-offset:-2px}.contained-search-box svg{margin:0}@media screen and (max-width: 600px){.contained-search-box{width:180px}}.outline>input{border:0;border-bottom:2px solid #ddd;border-radius:0}.outline>input:focus,.outline>input:active{border:0;border-bottom:2px solid #aaa;outline:0}.image-picker img{background-color:#bbb;max-width:100%}.custom-file-input{overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;height:1px;border:0;clip:rect(0, 0, 0, 0)}.custom-file-input:focus+label{border-color:var(--color-primary);outline:1px solid var(--color-primary)}.custom-simple-file-input{max-width:100%;border:1px solid;border-color:#ddd;border-radius:4px;padding:12px 16px}html.dark-mode .custom-simple-file-input{border-color:#666}.custom-simple-file-input::file-selector-button{background-color:rgba(0,0,0,0);text-decoration:none;font-size:.8rem;line-height:1.4em;padding:6px 12px;border:1px solid;font-weight:400;outline:0;border-radius:4px;cursor:pointer;margin-right:16px;color:#666;border-color:#ccc}html.dark-mode .custom-simple-file-input::file-selector-button{color:#aaa}html.dark-mode .custom-simple-file-input::file-selector-button{border-color:#666}.custom-simple-file-input::file-selector-button:hover,.custom-simple-file-input::file-selector-button:focus,.custom-simple-file-input::file-selector-button:active{color:#444;border:1px solid #ccc;box-shadow:0 1px 4px 0 rgba(0,0,0,.1);background-color:#f2f2f2;background-color:#f8f8f8;filter:none}html.dark-mode .custom-simple-file-input::file-selector-button:hover,html.dark-mode .custom-simple-file-input::file-selector-button:focus,html.dark-mode .custom-simple-file-input::file-selector-button:active{color:#bbb}html.dark-mode .custom-simple-file-input::file-selector-button:hover,html.dark-mode .custom-simple-file-input::file-selector-button:focus,html.dark-mode .custom-simple-file-input::file-selector-button:active{background-color:#444}.custom-simple-file-input::file-selector-button:active{border-color:#bbb;background-color:#ddd;color:#666;box-shadow:inset 0 0 2px rgba(0,0,0,.1)}input.shortcut-input{width:auto;max-width:120px;height:auto}.anim.fadeIn{opacity:0;animation-name:fadeIn;animation-duration:120ms;animation-timing-function:ease-in-out;animation-fill-mode:forwards}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.search-suggestions-animation{animation-name:searchSuggestions;animation-duration:120ms;animation-fill-mode:forwards;animation-timing-function:cubic-bezier(0.62, 0.28, 0.23, 0.99)}@keyframes searchSuggestions{0%{opacity:.5;transform:scale(0.9)}100%{opacity:1;transform:scale(1)}}@keyframes loadingBob{0%{transform:translate3d(0, 0, 0)}30%{transform:translate3d(0, 0, 0)}50%{transform:translate3d(0, -10px, 0)}70%{transform:translate3d(0, 0, 0)}100%{transform:translate3d(0, 0, 0)}}@keyframes pointer{0%{transform:translate3d(0, 20px, 0) scale3d(0, 0, 0)}100%{transform:translate3d(0, 0, 0) scale3d(1, 1, 1)}}.anim.pointer{transform-origin:50% 100%;animation-name:pointer;animation-duration:180ms;animation-delay:0s;animation-timing-function:cubic-bezier(0.62, 0.28, 0.23, 0.99)}@keyframes highlight{0%{background-color:var(--color-primary-light)}33%{background-color:rgba(0,0,0,0)}66%{background-color:var(--color-primary-light)}100%{background-color:rgba(0,0,0,0)}}.anim-highlight{animation-name:highlight;animation-duration:2s;animation-delay:0s;animation-timing-function:linear}.tox.tox-fullscreen{position:fixed;top:0;height:100%;width:100%;max-width:100%;z-index:100}.tox.tox-tinymce{border-inline:0;border-bottom:0}.page-content.mce-content-body{padding-block-start:1rem;padding-block-end:1rem;outline:0;display:block;max-width:870px}.wysiwyg-input.mce-content-body{padding-block-start:1rem;padding-block-end:1rem;outline:0;display:block}.wysiwyg-input.mce-content-body:before{padding:1rem;top:4px;font-style:italic;color:rgba(34,47,62,.5)}html.dark-mode .wysiwyg-input.mce-content-body:before{color:rgba(155,155,155,.5)}.page-content.mce-content-body doc-root{display:block}.page-content.mce-content-body code-block{display:block}body.page-content.mce-content-body{padding-bottom:5rem}.tox .tox-pop__dialog .tox-toolbar{background:rgba(0,0,0,0) !important}.tox-toolbar__primary{justify-content:center}.page-content.mce-content-body code-block>*{pointer-events:none}.page-content.mce-content-body code-block pre{display:none}.page-content.mce-content-body details summary{pointer-events:none}.page-content.mce-content-body details doc-root{padding:12px;margin-left:-10px;margin-right:-10px;margin-bottom:-10px;margin-top:-10px;overflow:hidden}.page-content.mce-content-body .mce-preview-object.align-right{float:right !important;margin:6px 0 6px 12px}.page-content.mce-content-body .mce-preview-object.align-left{float:left !important;margin:6px 16px 16px 0}.page-content.mce-content-body .mce-preview-object.align-center{display:block;margin-left:auto;margin-right:auto}.page-content.mce-content-body .mce-preview-object iframe,.page-content.mce-content-body .mce-preview-object video{display:block;margin:0 !important;float:none !important}.page-content.mce-content-body td[data-mce-selected]::after,.page-content.mce-content-body th[data-mce-selected]::after{top:1px;left:1px;bottom:1px;right:1px;outline:1px dashed #1a85ff;outline-offset:0}.dark-mode .tox .tox-toolbar__primary,.dark-mode .tox .tox-menu,.dark-mode .tox .tox-dialog__header,.dark-mode .tox .tox-dialog,.dark-mode .tox .tox-dialog__footer,.dark-mode .tox .tox-pop__dialog,.dark-mode .tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#333 !important}.dark-mode .tox .tox-tbtn svg,.dark-mode .tox .tox-tbtn,.dark-mode .tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#dbdbdb;fill:#dbdbdb}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{width:6em !important}.tox-menu .tox-collection__item blockquote::before{content:none}.tox-menu .tox-collection__item blockquote{border-left:4px solid var(--color-primary) !important;padding:4px 6px !important}.tox-menu .tox-collection__item blockquote{border-left:4px solid var(--color-primary) !important;padding:4px 6px !important}.tox-menu .tox-collection__item p[style*=background-color]{padding:4px 6px !important;border-left:3px solid currentColor !important}.tox-menu .tox-collection__item[title^="<"]>div>div{font-family:var(--font-code) !important;border:1px solid #ddd !important;background-color:#eee !important;padding:4px 6px !important}.tox-menu .tox-collection__item-label{line-height:normal !important}.page-content.mce-content-body .task-list-item{margin-inline-start:0;position:relative}.page-content.mce-content-body .task-list-item>input[type=checkbox]{display:none}.page-content.mce-content-body .task-list-item:before{content:"";display:inline-block;border:2px solid #ccc;width:12px;height:12px;border-radius:2px;margin-inline-end:8px;vertical-align:text-top;cursor:pointer;position:absolute;inset-inline-start:-24px;top:4px}.page-content.mce-content-body .task-list-item[checked]:before{background-color:#ccc;background-image:url('data:image/svg+xml;utf8,');background-position:50% 50%;background-size:100% 100%}:root{--editor-color-primary: #206ea7}.editor-container{background-color:#fff;position:relative}html.dark-mode .editor-container{background-color:#222}.editor-container.fullscreen{z-index:500}.editor-toolbar-main{display:flex;flex-wrap:wrap;justify-content:center;border-top:1px solid #ddd;border-bottom:1px solid #ddd;border-color:#ddd}html.dark-mode .editor-toolbar-main{border-color:#000}@media screen and (max-width: 1100px){.editor-toolbar-main{overflow-x:scroll;flex-wrap:nowrap;justify-content:start}}body.editor-is-fullscreen{overflow:hidden}body.editor-is-fullscreen .edit-area{z-index:20}.editor-content-area{min-height:100%;padding-block:1rem}.editor-content-area:focus{outline:0}.editor-content-wrap{position:relative;overflow-y:scroll;padding-inline:12px;flex:1}.comment-editor-container,.basic-editor-container{border-left:1px solid #ddd;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-radius:3px;border-color:#ddd}html.dark-mode .comment-editor-container,html.dark-mode .basic-editor-container{border-color:#000}.comment-editor-container .editor-toolbar-main,.basic-editor-container .editor-toolbar-main{border-radius:3px 3px 0 0;justify-content:end}.basic-editor-container .editor-content-area{padding-bottom:0}.editor-button{font-size:12px;padding:4px;color:#444;color:#444;border-radius:4px;display:flex;align-items:center;justify-content:center;margin:2px}html.dark-mode .editor-button{color:#999}.editor-button:hover{background-color:#eee;background-color:#eee;cursor:pointer;color:#000}html.dark-mode .editor-button:hover{background-color:#333}.editor-button[disabled]{pointer-events:none;cursor:not-allowed;opacity:.6}.editor-button-active,.editor-button-active:hover{background-color:#ceebff;color:#000}html.dark-mode .editor-button-active,html.dark-mode .editor-button-active:hover{background-color:#444}.editor-button-long{display:flex !important;flex-direction:row;align-items:center;justify-content:start;gap:.5rem}.editor-button-text{font-weight:400;color:#000;font-size:14px;flex:1;padding-inline-end:4px}html.dark-mode .editor-button-text{color:#aaa}.editor-button-format-preview{padding:4px 6px;display:block}.editor-button-long .editor-button-icon{width:24px;height:24px}.editor-button-icon svg{width:24px;height:24px;color:inherit;fill:currentColor;display:block}.editor-menu-button-icon{width:24px;height:24px}.editor-menu-button-icon svg{fill:#888}.editor-container[dir=rtl] .editor-menu-button-icon{rotate:180deg}.editor-button-with-menu-container{display:flex;flex-direction:row;gap:0;align-items:stretch;border-radius:4px}.editor-button-with-menu-container .editor-dropdown-menu-container{display:flex}.editor-button-with-menu-container .editor-dropdown-menu-container>.editor-dropdown-menu{top:100%}.editor-button-with-menu-container .editor-dropdown-menu-container>.editor-button{padding-inline:4px;margin-inline-start:-3px}.editor-button-with-menu-container .editor-dropdown-menu-container>.editor-button svg{width:12px;height:12px}.editor-button-with-menu-container:hover{outline:1px solid;outline-color:#ddd;outline-offset:-3px}html.dark-mode .editor-button-with-menu-container:hover{outline-color:#111}.editor-dropdown-menu-container{position:relative}.editor-dropdown-menu{position:absolute;border:1px solid;background-color:#fff;border-color:#fff;box-shadow:0 0 6px 0 rgba(0,0,0,.15);z-index:99;display:flex;flex-direction:row;border-radius:3px}html.dark-mode .editor-dropdown-menu{background-color:#292929}html.dark-mode .editor-dropdown-menu{border-color:#333}html.dark-mode .editor-dropdown-menu{box-shadow:0 1px 4px 0 rgba(0,0,0,.4)}.editor-dropdown-menu-vertical{display:flex;flex-direction:column;align-items:stretch;min-width:160px}.editor-dropdown-menu-vertical .editor-button{border-bottom:0;text-align:start;display:block;width:100%}.editor-dropdown-menu-vertical>.editor-dropdown-menu-container .editor-dropdown-menu{inset-inline-start:100%;top:0}.editor-separator{display:block;height:1px;opacity:.8;background-color:#ddd}html.dark-mode .editor-separator{background-color:#000}.editor-format-menu-toggle{width:130px;height:32px;font-size:13px;overflow:hidden;padding-inline:12px;justify-content:start;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:98% 50%;background-size:28px}.editor-container[dir=rtl] .editor-format-menu-toggle{background-position:2% 50%}.editor-format-menu .editor-dropdown-menu{min-width:300px}.editor-format-menu .editor-dropdown-menu .editor-dropdown-menu{min-width:220px}.editor-format-menu .editor-dropdown-menu .editor-button-icon{display:none}.editor-format-menu .editor-dropdown-menu .editor-dropdown-menu-container>.editor-button{padding:8px 10px}.editor-overflow-container{display:flex;border-inline:1px solid #ddd;padding-inline:4px;border-color:#ddd}html.dark-mode .editor-overflow-container{border-color:#000}.editor-overflow-container:first-child{border-inline-start:none}.editor-overflow-container:last-child{border-inline-end:none}.editor-overflow-container+.editor-overflow-container{border-inline-start:none}.editor-context-toolbar{position:fixed;border:1px solid #ddd;background-color:#fff;border-color:#ddd;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);padding:.2rem;border-radius:4px;display:flex;flex-direction:row}html.dark-mode .editor-context-toolbar{background-color:#222}html.dark-mode .editor-context-toolbar{border-color:#333}html.dark-mode .editor-context-toolbar{box-shadow:0 1px 4px 0 rgba(0,0,0,.4)}.editor-context-toolbar:before{content:"";z-index:-1;display:block;width:8px;height:8px;position:absolute;background-color:#fff;border-top:1px solid #ddd;border-left:1px solid #ddd;border-color:#ddd;transform:rotate(45deg);left:50%;margin-left:-4px;top:-5px}html.dark-mode .editor-context-toolbar:before{background-color:#222}html.dark-mode .editor-context-toolbar:before{border-color:#333}.editor-context-toolbar.is-above:before{top:calc(100% - 5px);transform:rotate(225deg)}.editor-modal-wrapper{position:fixed;display:flex;align-items:center;justify-content:center;z-index:999;background-color:rgba(0,0,0,.5);width:100%;height:100%}.editor-modal{background-color:#fff;border-radius:4px;overflow:hidden;box-shadow:0 0 15px 0 rgba(0,0,0,.3);margin:6px;max-height:100%;overflow-y:auto}html.dark-mode .editor-modal{background-color:#222}.editor-modal-header{display:flex;justify-content:space-between;align-items:stretch;background-color:var(--color-primary);color:#fff}.editor-modal-title{padding:8px 16px}.editor-modal-close{color:#fff;padding:8px 16px;align-items:center;justify-content:center;cursor:pointer}.editor-modal-close:hover{background-color:hsla(0,0%,100%,.1)}.editor-modal-close svg{width:1rem;height:1rem;fill:currentColor;display:block}.editor-modal-body{padding:16px}.editor-color-select-row{display:flex}.editor-color-select-option{width:28px;height:28px;cursor:pointer;display:flex;align-items:center;justify-content:center}.editor-color-select-option:hover{border-radius:3px;box-sizing:border-box;z-index:3;box-shadow:0 0 4px 1px rgba(0,0,0,.25)}.editor-color-select-option[data-color=""] svg{width:20px;height:20px;fill:#888}.editor-table-creator-row{display:flex}.editor-table-creator-cell{border:1px solid;border-color:#ddd;width:15px;height:15px;cursor:pointer}html.dark-mode .editor-table-creator-cell{border-color:#000}.editor-table-creator-cell.active{background-color:var(--editor-color-primary)}.editor-table-creator-display{text-align:center;padding:.2em}.editor-external-content{min-width:500px;min-height:500px}.editor-external-content h4:first-child{margin-top:0}.editor-image-wrap{position:relative;display:inline-flex}.editor-node-resizer{position:absolute;left:0;right:auto;display:inline-block;outline:2px dashed var(--editor-color-primary);direction:ltr;pointer-events:none}.editor-node-resizer-handle{pointer-events:auto;position:absolute;display:block;width:10px;height:10px;border:2px solid var(--editor-color-primary);z-index:3;background-color:#fff;user-select:none}html.dark-mode .editor-node-resizer-handle{background-color:#000}.editor-node-resizer-handle.nw{inset-inline-start:-5px;inset-block-start:-5px;cursor:nw-resize}.editor-node-resizer-handle.ne{inset-inline-end:-5px;inset-block-start:-5px;cursor:ne-resize}.editor-node-resizer-handle.se{inset-inline-end:-5px;inset-block-end:-5px;cursor:se-resize}.editor-node-resizer-handle.sw{inset-inline-start:-5px;inset-block-end:-5px;cursor:sw-resize}.editor-node-resizer-ghost{opacity:.5;display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:2;pointer-events:none;background-color:var(--editor-color-primary)}.editor-node-resizer.active .editor-node-resizer-ghost{display:block}.editor-content-area details[contenteditable=false],.editor-content-area summary[contenteditable=false]{user-select:none}.editor-content-area details[contenteditable=false]>details *{pointer-events:none}.editor-content-area details summary{caret-color:rgba(0,0,0,0)}.editor-content-area details.selected{outline:1px dashed var(--editor-color-primary);outline-offset:1px}.editor-table-marker{position:fixed;background-color:var(--editor-color-primary);z-index:3;user-select:none;opacity:0}.editor-table-marker:hover,.editor-table-marker.active{opacity:.4}.editor-table-marker-column{width:4px;cursor:col-resize}.editor-table-marker-row{height:4px;cursor:row-resize}.editor-code-block-wrap{user-select:none}.editor-code-block-wrap>*{pointer-events:none}.editor-code-block-wrap.selected .cm-editor{border:1px dashed var(--editor-color-primary)}.editor-diagram.selected{outline:2px dashed var(--editor-color-primary)}.editor-media-wrap{display:inline-block;cursor:not-allowed}.editor-media-wrap iframe,.editor-media-wrap video{pointer-events:none}.editor-media-wrap.align-left{float:left}.editor-media-wrap.align-right{float:right}.editor-media-wrap.align-center{display:block;margin-inline:auto}.editor-content-area .task-list-item{margin-left:0;position:relative}.editor-content-area .task-list-item>input[type=checkbox]{display:none}.editor-content-area .task-list-item:before{content:"";display:inline-block;border:2px solid #ccc;width:12px;height:12px;border-radius:2px;margin-right:8px;vertical-align:text-top;cursor:pointer;position:absolute;left:-24px;top:4px}.editor-content-area .task-list-item[checked]:before{background-color:#ccc;background-image:url('data:image/svg+xml;utf8,');background-position:50% 50%;background-size:100% 100%}.editor-form-field-wrapper{margin-bottom:.5rem}.editor-form-field-input{display:block;width:260px;min-width:100px;max-width:100%;border:1px solid;border-color:#ddd;padding:.5rem;border-radius:4px;color:#444}html.dark-mode .editor-form-field-input{border-color:#000}html.dark-mode .editor-form-field-input{color:#bbb}@media screen and (max-width: 400px){.editor-form-field-input{min-width:160px}}textarea.editor-form-field-input{font-family:var(--font-code);width:350px;height:250px;font-size:12px}.editor-form-field-label{color:#444;font-weight:700;font-size:12px}.editor-form-actions{display:flex;justify-content:end;gap:12px;margin-top:16px}.editor-form-actions>button{display:block;font-size:.85rem;line-height:1.4em;padding:7.8px 16px;font-weight:400;border-radius:4px;cursor:pointer;box-shadow:none}.editor-form-actions>button:focus{outline:1px dotted currentColor;outline-offset:-6px;box-shadow:none;filter:brightness(90%)}.editor-form-action-primary{background-color:var(--color-primary);color:#fff;border:1px solid var(--color-primary)}.editor-form-action-primary:hover{box-shadow:0 0 4px 1px #ccc;filter:brightness(110%)}html.dark-mode .editor-form-action-primary:hover{box-shadow:0 0 4px 1px rgba(0,0,0,.5)}.editor-form-action-secondary{border:1px solid;border-color:#ccc;color:#666}html.dark-mode .editor-form-action-secondary{border-color:#666}html.dark-mode .editor-form-action-secondary{color:#aaa}.editor-form-action-secondary:hover,.editor-form-action-secondary:focus,.editor-form-action-secondary:active{color:#444;border:1px solid #ccc;box-shadow:0 1px 4px 0 rgba(0,0,0,.1);background-color:#f2f2f2;background-color:#f8f8f8;filter:none}html.dark-mode .editor-form-action-secondary:hover,html.dark-mode .editor-form-action-secondary:focus,html.dark-mode .editor-form-action-secondary:active{color:#bbb}html.dark-mode .editor-form-action-secondary:hover,html.dark-mode .editor-form-action-secondary:focus,html.dark-mode .editor-form-action-secondary:active{background-color:#444}.editor-form-action-secondary:active{border-color:#bbb;background-color:#ddd;color:#666;box-shadow:inset 0 0 2px rgba(0,0,0,.1)}.editor-form-tab-container{display:flex;flex-direction:row;gap:2rem}.editor-form-tab-controls{display:flex;flex-direction:column;align-items:stretch;gap:.25rem}@media screen and (max-width: 880px){.editor-form-tab-container{flex-direction:column;gap:.5rem}.editor-form-tab-controls{flex-direction:row}}.editor-form-tab-control{font-weight:bold;font-size:14px;color:#444;border-bottom:2px solid rgba(0,0,0,0);position:relative;cursor:pointer;padding:.25rem .5rem;text-align:start}html.dark-mode .editor-form-tab-control{color:#666}.editor-form-tab-control[aria-selected=true]{border-color:var(--editor-color-primary);color:var(--editor-color-primary) !important}.editor-form-tab-control[aria-selected=true]:after,.editor-form-tab-control:hover:after{background-color:var(--editor-color-primary);opacity:.15;content:"";display:block;position:absolute;left:0;top:0;width:100%;height:100%}.editor-form-tab-contents{width:260px;max-width:100%}.editor-action-input-container{display:flex;flex-direction:row;align-items:end;justify-content:space-between;gap:.1rem}.editor-action-input-container .editor-button{margin-bottom:12px}.editor-action-input-container input{width:220px}.editor-color-field-container{position:relative}.editor-color-field-container input{padding-left:36px}.editor-color-field-container .editor-dropdown-menu-container{position:absolute;bottom:0}textarea.editor-form-field-input[name=source]{width:1000px;height:600px;max-height:60vh;max-width:80vw}.editor-theme-bold{font-weight:bold}.editor-theme-italic{font-style:italic}.editor-theme-strikethrough{text-decoration-line:line-through}.editor-theme-underline{text-decoration-line:underline}.editor-theme-underline-strikethrough{text-decoration:underline line-through}.cm-editor{font-size:12px;border:1px solid #ddd;line-height:1.4;margin-bottom:24px}.page-content .cm-editor,.CodeMirrorContainer .cm-editor{border-radius:4px}.cm-editor .cm-line{line-height:1.6}.cm-editor .cm-line,.cm-editor .cm-gutter{font-family:var(--font-code)}.dark-mode .cm-editor{border-color:#444}.cm-copy-button{position:absolute;display:flex;align-items:center;justify-content:center;top:-1px;inset-inline-end:-1px;background-color:#eee;border:1px solid #ddd;border-start-end-radius:4px;background-color:#eee;border-color:#ddd;color:#444;line-height:0;cursor:pointer;z-index:5;user-select:none;opacity:0;pointer-events:none;width:32px;height:32px;transition:background-color linear 60ms,color linear 60ms}html.dark-mode .cm-copy-button{background-color:#333}html.dark-mode .cm-copy-button{border-color:#444}html.dark-mode .cm-copy-button{color:#888}.cm-copy-button svg{fill:currentColor}.cm-copy-button.success{background:var(--color-positive);color:#fff}.cm-copy-button:focus{outline:0 !important}.cm-editor:hover .cm-copy-button{user-select:all;opacity:.6;pointer-events:all}.notification{position:fixed;top:0;right:0;margin:32px;padding:16px 24px;background-color:#fff;background-color:#fff;border-radius:4px;border-inline-start:6px solid currentColor;box-shadow:0 1px 6px 1px rgba(22,22,22,.2);z-index:999999;cursor:pointer;max-width:360px;transition:transform ease-in-out 280ms;transform:translateX(580px);display:grid;grid-template-columns:42px 1fr 12px;color:#444;font-weight:700}html.dark-mode .notification{background-color:#444}.notification span,.notification svg{vertical-align:middle;justify-self:center;align-self:center}.notification svg{width:2.8rem;height:2.8rem;padding-inline-end:12px;fill:currentColor}.notification .dismiss{margin-top:-8px}.notification .dismiss svg{height:1rem;color:#444}html.dark-mode .notification .dismiss svg{color:#888}.notification span{vertical-align:middle;line-height:1.3}html.dark-mode .notification span{color:#bbb}.notification.pos{color:var(--color-positive)}.notification.neg{color:var(--color-negative)}.notification.warning{color:var(--color-warning)}.notification.showing{transform:translateX(0)}.notification.showing:hover{transform:translate3d(0, -2px, 0)}.chapter-contents-toggle{cursor:pointer;margin:0;transition:all ease-in-out 180ms;user-select:none}.chapter-contents-toggle svg[data-icon=caret-right]{margin-inline-end:0;font-size:1rem;transition:all ease-in-out 180ms;transform:rotate(0deg);transform-origin:50% 50%}.chapter-contents-toggle.open svg[data-icon=caret-right]{transform:rotate(90deg)}.chapter-contents-toggle svg[data-icon=caret-right]+*{margin-inline-start:3px}[overlay],.popup-background{background-color:rgba(0,0,0,.333);position:fixed;z-index:95536;width:100%;height:100%;min-width:100%;min-height:100%;top:0;left:0;right:0;bottom:0;align-items:center;justify-content:center;display:none}html.dark-mode [overlay],html.dark-mode .popup-background{background-color:rgba(0,0,0,.6)}.popup-body-wrap{display:flex}.popup-body{background-color:#fff;max-height:90%;max-width:1200px;width:90%;height:auto;margin:2% auto;border-radius:4px;box-shadow:0 0 15px 0 rgba(0,0,0,.3);overflow:hidden;z-index:999;display:flex;flex-direction:column;position:relative}html.dark-mode .popup-body{background-color:#333}.popup-body.small{margin:2% auto;width:800px;max-width:90%}.popup-body.very-small{margin:2% auto;width:600px;max-width:90%}.popup-body:before{display:flex;align-self:flex-start}.popup-body .popup-content{overflow-y:auto}.popup-body:focus{outline:0}.popup-header button,.popup-footer button{margin:0;border-radius:0;box-shadow:none;color:#fff;padding:6px 16px;cursor:pointer}.popup-header button:not(.popup-header-close){font-size:.8rem}.popup-header button:hover{background-color:hsla(0,0%,100%,.1)}.popup-footer{justify-content:end;background-color:var(--color-primary-light);min-height:41px}.popup-footer button{padding:10px 16px}.popup-header-close{border:0;color:#fff;font-size:16px;cursor:pointer}.popup-header-close svg{margin-right:0}.popup-header,.popup-footer{display:flex;position:relative;height:40px;flex:0}.popup-header .popup-title,.popup-footer .popup-title{color:#fff;margin-inline-end:auto;padding:8px 16px}.popup-header.flex-container-row,.popup-footer.flex-container-row{display:flex !important}body.flexbox-support #entity-selector-wrap .popup-body .form-group{height:444px;min-height:444px}#entity-selector-wrap .popup-body .form-group{margin:0}.popup-body .entity-selector-container{flex:1}.dropzone-overlay{position:absolute;display:flex;justify-content:center;align-items:center;font-size:1.333rem;width:98%;height:98%;left:1%;top:1%;border-radius:4px;border:1px dashed var(--color-primary);font-style:italic;box-sizing:content-box;background-clip:padding-box;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a9a9a9' fill-opacity='0.52' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");background-color:var(--color-primary);color:#fff;opacity:.8;z-index:9;pointer-events:none;animation:dzAnimIn 240ms ease-in-out}.dropzone-landing-area{background-color:var(--color-primary-light);padding:16px 24px;width:100%;border:1px dashed var(--color-primary);color:var(--color-primary);border-radius:4px}@keyframes dzAnimIn{0%{opacity:0;transform:scale(0.7)}60%{transform:scale(1.1)}100%{transform:scale(1);opacity:.8}}@keyframes dzFileItemIn{0%{opacity:.5;transform:translateY(28px)}100%{opacity:1;transform:translateY(0)}}@keyframes dzFileItemOut{0%{opacity:1;transform:translateY(0)}100%{opacity:.5;transform:translateY(28px)}}.dropzone-file-item{width:260px;height:80px;position:relative;display:flex;margin:1rem;flex-direction:row;background:#fff;box-shadow:0 1px 6px 1px rgba(22,22,22,.2);border-radius:4px;overflow:hidden;padding-bottom:3px;animation:dzFileItemIn ease-in-out 240ms;transition:transform ease-in-out 120ms,box-shadow ease-in-out 120ms;cursor:pointer}html.dark-mode .dropzone-file-item{background:#444}.dropzone-file-item:hover{transform:translateY(-3px);box-shadow:0 3px 8px 1px rgba(22,22,22,.2)}.dropzone-file-item.dismiss{animation:dzFileItemOut ease-in-out 240ms}.dropzone-file-item .loading-container{text-align:start !important;margin:0}.dropzone-file-item-image-wrap{width:80px;position:relative;background-color:var(--color-primary-light)}.dropzone-file-item-image-wrap img{object-fit:cover;width:100%;height:100%;opacity:.8}.dropzone-file-item-text-wrap{flex:1;display:block;padding:1rem;overflow:auto}.dropzone-file-item-progress{position:absolute;bottom:0;left:0;font-size:0;height:3px;background-color:var(--color-primary);transition:width ease-in-out 240ms}.dropzone-file-item-label{line-height:1.2;margin-bottom:.2rem}.dropzone-file-item-label,.dropzone-file-item-status{align-items:center;font-size:.8rem;font-weight:700}.dropzone-file-item-status[data-status]{display:flex;font-size:.6rem;font-weight:500;line-height:1.2}.dropzone-file-item-status[data-status=success]{color:var(--color-positive)}.dropzone-file-item-status[data-status=error]{color:var(--color-negative)}.dropzone-file-item-status[data-status]+.dropzone-file-item-label{display:none}.image-manager-body{min-height:70vh}.image-manager-filter-bar{position:sticky;top:0;z-index:5;background-color:hsla(0,0%,100%,.85)}html.dark-mode .image-manager-filter-bar{background-color:rgba(80,80,80,.85)}.image-manager-filter-bar-bg{position:absolute;left:0;top:0;width:100%;height:100%;opacity:.15;z-index:-1}.image-manager-filters{box-shadow:0 1px 3px 1px rgba(76,76,76,.26);border-radius:4px;overflow:hidden;border-bottom:0 !important}html.dark-mode .image-manager-filters{border:1px solid #000 !important}.image-manager-filters button{line-height:0;background-color:#fff}html.dark-mode .image-manager-filters button{background-color:#333}.image-manager-filters svg{margin:0}.image-manager-list{padding:3px;display:grid;grid-template-columns:repeat(auto-fill, minmax(max(140px, 17%), 1fr));gap:3px;z-index:3}.image-manager-list>div{aspect-ratio:1}.image-manager-list .image{display:block;position:relative;border-radius:0;margin:0;width:100%;text-align:start;padding:0;cursor:pointer;aspect-ratio:1;border-color:#ddd;transition:all linear 80ms;overflow:hidden}html.dark-mode .image-manager-list .image{border-color:#000}.image-manager-list .image.selected{background-color:var(--color-primary-light);outline:currentColor 3px solid;border-radius:3px;transform:scale3d(0.95, 0.95, 0.95)}.image-manager-list .image img{width:100%;max-width:100%;display:block;object-fit:cover;height:auto}.image-manager-list .image .image-meta{opacity:0;position:absolute;width:100%;bottom:0;left:0;color:#eee;background-color:rgba(0,0,0,.7);font-size:10px;padding:3px 4px;pointer-events:none;transition:opacity ease-in-out 80ms}.image-manager-list .image .image-meta span{display:block}.image-manager-list .image.selected .image-meta,.image-manager-list .image:hover .image-meta,.image-manager-list .image:focus .image-meta{opacity:1}@media screen and (max-width: 880px){.image-manager-list .image .image-meta{display:none}}.image-manager .load-more{text-align:center;padding:12px 16px;clear:both}.image-manager .load-more .loading-container{margin:0}.image-manager .loading-container{text-align:center}.image-manager-list .image-manager-list-warning{grid-column:1/-1;aspect-ratio:auto}.image-manager-warning{background:#fff;color:var(--color-warning);font-weight:bold;border-inline:3px solid var(--color-warning)}html.dark-mode .image-manager-warning{background:#333}.image-manager-sidebar{width:300px;margin:0 auto;overflow-y:auto;overflow-x:hidden;border-inline-start:1px solid #ddd;border-color:#ddd}html.dark-mode .image-manager-sidebar{border-color:#000}.image-manager-sidebar .inner{min-height:auto;padding:16px}.image-manager-sidebar .image-manager-viewer img{max-width:100%;max-height:180px;display:block;margin:0 auto 16px auto;box-shadow:0 1px 21px 1px rgba(76,76,76,.3)}.image-manager-sidebar .image-manager-viewer{height:196px;display:flex;align-items:center;justify-content:center}.image-manager-sidebar .image-manager-viewer a{display:inline-block}@media screen and (max-width: 880px){.image-manager-sidebar{border-inline-start:0}}.image-manager-content{display:flex;flex-direction:column;flex:1;overflow-y:scroll}.image-manager-content .container{width:100%}.image-manager-content .full-tab{text-align:center}.tab-container.bordered [role=tablist] button[role=tab]{border-inline-end:1px solid #ddd;border-inline-end-color:#ddd}html.dark-mode .tab-container.bordered [role=tablist] button[role=tab]{border-inline-end-color:#000}.tab-container.bordered [role=tablist] button[role=tab]:last-child{border-inline-end:none}.tab-container [role=tablist]{display:flex;align-items:end;justify-items:start;text-align:start;border-bottom:1px solid #ddd;border-color:#ddd;margin-bottom:16px}html.dark-mode .tab-container [role=tablist]{border-color:#444}.tab-container [role=tablist] button[role=tab]{display:inline-block;padding:12px;color:rgba(0,0,0,.5);cursor:pointer;border-bottom:2px solid rgba(0,0,0,0);margin-bottom:-1px}html.dark-mode .tab-container [role=tablist] button[role=tab]{color:hsla(0,0%,100%,.5)}.tab-container [role=tablist] button[role=tab][aria-selected=true]{color:var(--color-link) !important;border-bottom-color:var(--color-link) !important;outline:0 !important}.tab-container [role=tablist] button[role=tab]:hover,.tab-container [role=tablist] button[role=tab]:focus{color:rgba(0,0,0,.8);border-bottom-color:rgba(0,0,0,.2)}html.dark-mode .tab-container [role=tablist] button[role=tab]:hover,html.dark-mode .tab-container [role=tablist] button[role=tab]:focus{color:hsla(0,0%,100%,.8)}html.dark-mode .tab-container [role=tablist] button[role=tab]:hover,html.dark-mode .tab-container [role=tablist] button[role=tab]:focus{border-bottom-color:hsla(0,0%,100%,.2)}.tab-container [role=tablist] button[role=tab]:focus{outline:1px dotted var(--color-primary);outline-offset:-2px}.tab-container [role=tablist].controls-card{margin-bottom:0;border-bottom:0;padding:0 6px}.tab-container [role=tabpanel].no-outline:focus{outline:none}.image-picker .none{display:none}.code-editor .CodeMirror{height:auto;min-height:50vh;border-bottom:0}.code-editor .lang-options{overflow-y:scroll;flex-basis:200px;flex-grow:1}.code-editor .lang-options button{display:block;padding:6px 16px;border-bottom:1px solid;color:#333;border-bottom-color:#eee;cursor:pointer;width:100%;text-align:left;font-family:var(--font-code);font-size:.7rem;padding-left:30px}html.dark-mode .code-editor .lang-options button{color:#aaa}html.dark-mode .code-editor .lang-options button{border-bottom-color:#000}.code-editor .lang-options button:hover,.code-editor .lang-options button.active{background-color:var(--color-primary-light);color:var(--color-primary)}.code-editor button.lang-option-favorite-toggle{position:absolute;top:0;left:0;width:28px;font-size:1rem;border:0;line-height:1;padding:2px;z-index:2;height:100%;text-align:center;color:var(--color-primary)}.code-editor button.lang-option-favorite-toggle svg{margin:0}.code-editor button[data-favourite=true]~.action-favourite,.code-editor button[data-favourite=false]~.action-unfavourite{display:none}.code-editor .action-favourite{opacity:.5}.code-editor button:hover~.action-favourite{opacity:1}.code-editor label{background-color:var(--color-primary-light);width:100%;color:var(--color-primary);padding:3px 12px;margin-bottom:0}.code-editor-language-list{position:relative;width:160px;z-index:2;align-items:stretch}.code-editor-language-list input{border-radius:0;border:0;border-bottom:1px solid #ddd;padding:6px 12px;height:auto}.code-editor-main{flex:1;min-width:0}.code-editor-main .cm-editor{margin-bottom:0;z-index:1;max-width:100%;width:100%}.code-editor-body-wrap{height:80vh}@media screen and (max-width: 600px){.code-editor .lang-options{display:none}.code-editor-body-wrap{flex-direction:column}.code-editor-language-list,.code-editor-language-list input{width:100%}}.comments-container{padding-inline:32px}@media screen and (max-width: 880px){.comments-container{padding-inline:6px}}.comment-box{border-radius:4px;border:1px solid #ddd;border-color:#ddd;background-color:#fff}html.dark-mode .comment-box{border-color:#000}html.dark-mode .comment-box{background-color:#222}.comment-box .content{font-size:.666em;padding:6px 12px}.comment-box .content p,.comment-box .content ul,.comment-box .content ol{font-size:14px;margin:.5em 0}.comment-box .actions{opacity:0;transition:opacity ease-in-out 120ms}.comment-box:hover .actions,.comment-box:focus-within .actions{opacity:1}.comment-box .actions button:focus{outline:1px dotted var(--color-primary)}@media screen and (max-width: 880px){.comment-box .actions{opacity:1}}.comment-box .header{border-bottom:1px solid #ddd;padding:6px 12px;border-color:#ddd}html.dark-mode .comment-box .header{border-color:#000}.comment-box .header a{color:inherit}.comment-box .header .text-muted{color:#999}.comment-box .header .meta a,.comment-box .header .meta span{white-space:nowrap}.comment-box .header .right-meta .text-muted{opacity:.8}.comment-thread-indicator{border-inline-start:3px dotted #ddd;border-color:#ddd;margin-inline-start:6px;width:24px;height:calc(100% - 16px)}html.dark-mode .comment-thread-indicator{border-color:#444}.comment-reference-indicator-wrap a{float:left;margin-top:6px;font-size:12px;display:inline-block;font-weight:bold;position:relative;border-radius:4px;overflow:hidden;padding:2px 6px 2px 0;margin-inline-end:6px;color:var(--color-link)}.comment-reference-indicator-wrap a span{display:none}.comment-reference-indicator-wrap a.outdated span{display:inline}.comment-reference-indicator-wrap a.outdated.missing{color:var(--color-warning);pointer-events:none}.comment-reference-indicator-wrap a svg{width:24px;margin-inline-end:0}.comment-reference-indicator-wrap a:after{background-color:currentColor;content:"";width:100%;height:100%;position:absolute;left:0;top:0;opacity:.15}.comment-reference-indicator-wrap a[href="#"]{color:#444;pointer-events:none}.comment-branch .comment-box{margin-bottom:16px}.comment-branch .comment-branch .comment-branch .comment-branch .comment-thread-indicator{display:none}.comment-reply{display:none;margin:0 !important;margin-bottom:-3px !important}.comment-branch .comment-branch .comment-branch .comment-branch .comment-reply{display:block}.comment-container .empty-state{display:none}.comment-container:not(:has([component=page-comment])) .empty-state{display:block}.comment-container-compact .comment-box{margin-bottom:6px}.comment-container-compact .comment-box .meta{font-size:.8rem}.comment-container-compact .comment-box .header{padding:6px}.comment-container-compact .comment-box .right-meta{display:none}.comment-container-compact .comment-box .content{padding:6px 12px}.comment-container-compact .comment-thread-indicator{width:16px}.comment-container-super-compact .comment-box .meta{font-size:12px}.comment-container-super-compact .comment-box .avatar{width:22px;height:22px;margin-inline-end:2px !important}.comment-container-super-compact .comment-box .content{padding:3px 12px;line-height:1.2}.comment-container-super-compact .comment-box .content p{font-size:12px}.comment-container-super-compact .comment-thread-indicator{width:9px;margin-inline-start:3px}#tag-manager .drag-card{max-width:500px}.template-item{cursor:pointer;position:relative}.template-item:hover,.template-item .template-item-actions button:hover{background-color:#f2f2f2}.template-item .template-item-actions{position:absolute;top:0;inset-inline-end:0;width:50px;height:100%;display:flex;flex-direction:column;border-inline-start:1px solid;border-color:#ddd}html.dark-mode .template-item .template-item-actions{border-color:#000}.template-item .template-item-actions button{cursor:pointer;flex:1;background-color:#fff;border:0;border-top:1px solid;border-color:#ddd}html.dark-mode .template-item .template-item-actions button{background-color:#222}html.dark-mode .template-item .template-item-actions button{border-color:#000}.template-item .template-item-actions button svg{margin:0}.template-item .template-item-actions button:first-child{border-top:0}.dropdown-search{position:relative}.dropdown-search-toggle-breadcrumb{border:1px solid rgba(0,0,0,0);border-radius:4px;line-height:normal;padding:6px;opacity:.6;cursor:pointer}.dropdown-search-toggle-breadcrumb:hover{opacity:1;border-color:#ddd}html.dark-mode .dropdown-search-toggle-breadcrumb:hover{border-color:#444}.dropdown-search-toggle-breadcrumb .svg-icon{margin-inline-end:0}.dropdown-search-toggle-select{display:flex;gap:12px;line-height:normal}.dropdown-search-toggle-select .svg-icon{height:26px;width:26px;margin:0}.dropdown-search-toggle-select .avatar{height:22px;width:22px}.dropdown-search-toggle-select .avatar+span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-search-toggle-select .dropdown-search-toggle-caret{font-size:1.15rem}.dropdown-search-toggle-select-label{min-width:0;white-space:nowrap}.dropdown-search-toggle-select-caret{line-height:0;margin-left:auto;margin-top:-2px;display:flex;align-items:center}.dropdown-search-dropdown{box-shadow:0 1px 3px 1px rgba(76,76,76,.26);overflow:hidden;min-height:100px;width:240px;display:none;position:absolute;z-index:80;right:0;top:0;margin-top:16px}html[dir=rtl] .dropdown-search-dropdown{right:auto;left:-16px}.dropdown-search-dropdown .dropdown-search-search .svg-icon{position:absolute;left:12px;top:11px;fill:#888;pointer-events:none}html[dir=rtl] .dropdown-search-dropdown .dropdown-search-search .svg-icon{right:12px;left:auto}.dropdown-search-dropdown .dropdown-search-list{max-height:400px;overflow-y:scroll;text-align:start}.dropdown-search-dropdown .dropdown-search-item{padding:12px 16px}.dropdown-search-dropdown .dropdown-search-item:hover,.dropdown-search-dropdown .dropdown-search-item:focus{background-color:#f2f2f2;text-decoration:none}.dropdown-search-dropdown input,.dropdown-search-dropdown input:focus{padding-inline-start:32px;border-radius:0;border:0;border-bottom:1px solid #ddd}.dropdown-search-dropdown input:focus{outline:0}@media screen and (max-width: 1000px){.dropdown-search-dropdown{inset-inline:16px auto}.dropdown-search-dropdown .dropdown-search-list{max-height:240px}}.item-list{box-shadow:0 1px 3px 0 rgba(0,0,0,.1)}.item-list-row{border:1.5px solid;border-color:#e2e2e2;border-bottom-width:0}html.dark-mode .item-list-row{border-color:#444}.item-list-row label{padding-bottom:0}.item-list-row:hover{background-color:#f6f6f6}html.dark-mode .item-list-row:hover{background-color:#333}.item-list-row:first-child{border-radius:4px 4px 0 0}.item-list-row:last-child{border-radius:0 0 4px 4px;border-bottom-width:1.5px}.item-list-row:first-child:last-child{border-radius:4px}.item-list-row-toggle-all{visibility:hidden}.item-list-row:hover .item-list-row-toggle-all{visibility:visible}.status-indicator-active,.status-indicator-inactive{width:8px;height:8px;border-radius:50%;display:inline-block}.status-indicator-active{background-color:var(--color-positive)}.status-indicator-inactive{background-color:var(--color-negative)}.shortcut-container{background-color:rgba(0,0,0,.25);pointer-events:none;position:fixed;left:0;top:0;width:100%;height:100%;z-index:99}.shortcut-linkage{position:fixed;box-shadow:0 0 4px 0 #fff;border-radius:3px}.shortcut-hint{position:fixed;padding:3px 3px;font-size:.85rem;font-weight:700;line-height:1;background-color:#eee;border-radius:3px;border:1px solid #b4b4b4;box-shadow:0 1px 1px rgba(0,0,0,.2),0 2px 0 0 hsla(0,0%,100%,.7) inset;color:#333}.back-to-top{background-color:var(--color-primary);position:fixed;bottom:16px;right:24px;padding:5px 7px;cursor:pointer;color:#fff;fill:#fff;width:40px;height:40px;border-radius:40px;transition:all ease-in-out 180ms;opacity:0;z-index:999;overflow:hidden}.back-to-top svg{width:26.6666666667px;height:26.6666666667px;margin-inline-end:4px}.back-to-top:hover{width:136px;opacity:1 !important}.back-to-top .inner{width:136px}.back-to-top span{position:relative;vertical-align:top;line-height:2}.scroll-box{list-style:none;padding:0;margin:0;max-height:280px;overflow-y:scroll;border:1px solid;border-color:#ddd;border-radius:3px;min-height:20px;background-color:#eee}html.dark-mode .scroll-box{border-color:#000}html.dark-mode .scroll-box{background-color:#000}.scroll-box-item{border-bottom:1px solid;border-top:1px solid;border-color:#ddd;margin-top:-1px;background-color:#fff;display:flex;align-items:flex-start;padding:1px}html.dark-mode .scroll-box-item{border-color:#000}html.dark-mode .scroll-box-item{background-color:#222}.scroll-box-item:last-child{border-bottom:0}.scroll-box-item:hover{cursor:pointer;background-color:#f8f8f8}html.dark-mode .scroll-box-item:hover{background-color:#333}.scroll-box-item.items-center{align-items:center}.scroll-box-item .handle{color:#aaa;cursor:grab}.scroll-box-item button{opacity:.6;line-height:1}.scroll-box-item .handle svg{margin:0}.scroll-box-item>*{padding:6px 16px}.scroll-box-item .handle+*{padding-left:0}.scroll-box-item:hover .handle{color:#444}html.dark-mode .scroll-box-item:hover .handle{color:#fff}.scroll-box-item:hover button{opacity:1}.scroll-box-item a:hover{text-decoration:none}input.scroll-box-search,.scroll-box-header-item{font-size:.8rem;border:1px solid;border-color:#ddd;background-color:#fff;margin-bottom:-1px;border-radius:3px 3px 0 0;width:100%;max-width:100%;height:auto;line-height:1.4;color:#666}html.dark-mode input.scroll-box-search,html.dark-mode .scroll-box-header-item{border-color:#000}html.dark-mode input.scroll-box-search,html.dark-mode .scroll-box-header-item{background-color:#222}.scroll-box-search+.scroll-box,.scroll-box-header-item+.scroll-box{border-radius:0 0 3px 3px}.scroll-box.configured-option-list [data-action=add]{display:none}.scroll-box.available-option-list [data-action=remove],.scroll-box.available-option-list [data-action=move_up],.scroll-box.available-option-list [data-action=move_down]{display:none}.scroll-box>li.empty-state{display:none}.scroll-box>li.empty-state:last-child{display:list-item}details.section-expander summary{border-top:1px solid #ddd;border-color:#ddd;font-weight:bold;font-size:12px;color:#888;cursor:pointer;padding-block:6px}html.dark-mode details.section-expander summary{border-color:#000}details.section-expander:open summary{margin-bottom:12px}details.section-expander{border-bottom:1px solid #ddd;border-color:#ddd}html.dark-mode details.section-expander{border-color:#000}header.grid{grid-template-columns:minmax(max-content, 2fr) 1fr minmax(max-content, 2fr)}@media screen and (max-width: 1000px){header.grid{grid-template-columns:1fr;grid-row-gap:0}}header{position:relative;display:block;z-index:11;top:0;color:#fafafa;border-bottom:1px solid #ddd;box-shadow:0 1px 6px -1px rgba(0,0,0,.1);border-bottom-color:#ddd}html.dark-mode header{border-bottom-color:#000}header .header-links{display:flex;align-items:center;justify-content:end}header .links{display:inline-block;vertical-align:top}header .links a{display:inline-block;padding:10px 16px;color:#fff;border-radius:3px}header .links a:hover{text-decoration:none;background-color:hsla(0,0%,100%,.15)}header .dropdown-container{padding-inline-start:16px;padding-inline-end:0}header .avatar,header .user-name{display:inline-block}header .avatar{width:30px;height:30px}header .user-name{vertical-align:top;position:relative;display:inline-flex;align-items:center;cursor:pointer;padding:12px;margin:0 -12px;border-radius:3px;gap:6px;color:#fff}header .user-name>span{padding-inline-start:6px;display:inline-block;line-height:1}header .user-name>svg{font-size:18px;margin-top:-2px;margin-inline-end:0}header .user-name:hover{background-color:hsla(0,0%,100%,.15)}@media screen and (min-width: 1001px)and (max-width: 1100px){header .user-name{padding-inline-start:6px}header .user-name .name{display:none}}.header *,.primary-background *{outline-color:#fff}header .search-box{display:inline-block}header .search-box input{background-color:rgba(0,0,0,.2);border:1px solid hsla(0,0%,100%,.2);border-radius:40px;color:#eee;z-index:2;height:auto;padding:9px;padding-inline-start:40px}header .search-box input:focus{outline:none;border:1px solid hsla(0,0%,100%,.4)}header .search-box input::placeholder{color:#fff;opacity:.6}@media screen and (min-width: 1001px)and (max-width: 1100px){header .search-box{max-width:200px}}header .search-box:focus-within #header-search-box-button{opacity:1}#header-search-box-button{z-index:1;inset-inline-start:16px;top:10px;color:#fff;opacity:.6;color:hsla(0,0%,100%,.8)}html.dark-mode #header-search-box-button{color:#aaa}#header-search-box-button svg{margin-inline-end:0}.global-search-suggestions{display:none;position:absolute;top:-12px;left:0;right:0;z-index:-1;margin-left:-48px;margin-right:-48px;padding-top:56px;border-radius:3px;box-shadow:0 2px 2px 1px rgba(0,0,0,.13);transform-origin:top center;opacity:.5;transform:scale(0.9)}.global-search-suggestions .entity-item-snippet p{display:none}.global-search-suggestions .entity-item-snippet{font-size:.8rem}.global-search-suggestions .entity-list-item-name{font-size:.9rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.global-search-suggestions .global-search-loading{position:absolute;width:100%}header .search-box.search-active:focus-within .global-search-suggestions{display:block}header .search-box.search-active:focus-within input{background-color:#eee;border-color:#ddd}html.dark-mode header .search-box.search-active:focus-within input{background-color:#333}html.dark-mode header .search-box.search-active:focus-within input{border-color:#111}header .search-box.search-active:focus-within #header-search-box-button,header .search-box.search-active:focus-within input{color:#444}html.dark-mode header .search-box.search-active:focus-within #header-search-box-button,html.dark-mode header .search-box.search-active:focus-within input{color:#aaa}.logo{display:inline-flex;padding:6px 12px;margin:6px -12px;gap:12px;align-items:center;border-radius:4px}.logo:hover{color:#fff;text-decoration:none;background-color:hsla(0,0%,100%,.15)}.logo-text{font-size:1.8em;color:#fff;font-weight:400;line-height:1}.logo-image{height:43px}.mobile-menu-toggle{color:#fff;fill:#fff;font-size:2em;border:2px solid hsla(0,0%,100%,.8);border-radius:4px;padding:0 6px;line-height:1;cursor:pointer;user-select:none}.mobile-menu-toggle svg{margin:0;bottom:-2px}@media screen and (max-width: 1000px){header .header-links{background-color:#fff;display:none;z-index:10;inset-inline-end:16px;border-radius:4px;overflow:hidden;position:absolute;box-shadow:0 2px 2px 1px rgba(0,0,0,.13);margin-top:16px;padding:6px 0}html.dark-mode header .header-links{background-color:#333}header .header-links.show{display:block}header .links a,header .dropdown-container ul li a,header .dropdown-container ul li button{text-align:start;display:grid;align-items:center;padding:8px 16px;gap:16px;color:#444;grid-template-columns:16px auto;line-height:1.4;color:#444}html.dark-mode header .links a,html.dark-mode header .dropdown-container ul li a,html.dark-mode header .dropdown-container ul li button{color:#eee}header .links a svg,header .dropdown-container ul li a svg,header .dropdown-container ul li button svg{margin-inline-end:12px;width:16px}header .links a:hover,header .dropdown-container ul li a:hover,header .dropdown-container ul li button:hover{background-color:var(--color-primary-light);color:var(--color-primary);text-decoration:none}header .links a:focus,header .dropdown-container ul li a:focus,header .dropdown-container ul li button:focus{background-color:#eee;outline-color:var(--color-primary);color:var(--color-primary)}html.dark-mode header .links a:focus,html.dark-mode header .dropdown-container ul li a:focus,html.dark-mode header .dropdown-container ul li button:focus{background-color:#333}header .dropdown-container{display:block;padding-inline-start:0}header .links{display:block}header .dropdown-container ul{display:block !important;position:relative;background-color:rgba(0,0,0,0);border:0;padding:0;margin:0;box-shadow:none}}.tri-layout-mobile-tabs{position:sticky;top:0;z-index:5;background-color:#fff;border-bottom:1px solid #ddd;border-bottom-color:#ddd;box-shadow:0 1px 6px -1px rgba(0,0,0,.1)}html.dark-mode .tri-layout-mobile-tabs{border-bottom-color:#333}.tri-layout-mobile-tab{text-align:center;border-bottom:3px solid #bbb;cursor:pointer;margin:0;background-color:#fff;border-bottom-color:#bbb}html.dark-mode .tri-layout-mobile-tab{background-color:#222}html.dark-mode .tri-layout-mobile-tab{border-bottom-color:#333}.tri-layout-mobile-tab:first-child{border-inline-end:1px solid #ddd;border-inline-end-color:#ddd}html.dark-mode .tri-layout-mobile-tab:first-child{border-inline-end-color:#000}.tri-layout-mobile-tab[aria-selected=true]{border-bottom-color:currentColor !important}.breadcrumbs{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;opacity:.7}.breadcrumbs .icon-list-item{width:auto;padding-top:6px;padding-bottom:6px}.breadcrumbs .separator{display:inline-block;fill:#aaa;font-size:1.6em;line-height:.8;margin:-2px 0 0}.breadcrumbs:hover,.breadcrumbs:focus-within{opacity:1}@media(prefers-contrast: more){.breadcrumbs{opacity:1}}@media screen and (max-width: 1000px){.breadcrumbs .icon-list-item{padding:6px}.breadcrumbs .icon-list-item>span+span{display:none}.breadcrumbs .icon-list-item>span:first-child{margin-inline-end:0}}.faded a,.faded button,.faded span,.faded span>div{color:#666;fill:#666}.faded .text-button{opacity:.5;transition:all ease-in-out 120ms}.faded .text-button:hover{opacity:1;text-decoration:none}.faded span.faded-text{display:inline-block;padding:12px}footer{flex-shrink:0;padding:1rem 1rem 2rem 1rem;text-align:center}footer a{margin:0 .5em}body.flexbox footer{display:none}.book-contents .entity-list-item .icon{width:4px;border-radius:1px;justify-self:stretch;align-self:stretch;height:auto;margin-inline-end:6px}.book-contents .entity-list-item .icon:after{opacity:.5}.book-contents .entity-list-item .icon svg{display:none}.book-contents .entity-list-item p{margin-bottom:0}.book-contents .entity-list-item .inner-page{padding-top:0;padding-bottom:0}.entity-list-item+.chapter-expansion{display:flex;padding:0 16px 16px 16px;align-items:center;border:0;width:100%;position:relative}.entity-list-item+.chapter-expansion>.icon{width:4px;height:auto;border-radius:0 0 1px 1px;align-self:stretch;flex-shrink:0}.entity-list-item+.chapter-expansion>.icon:before{position:absolute;top:0;left:0;width:100%;height:1px;background-color:currentColor;content:"";opacity:.5}.entity-list-item+.chapter-expansion>.icon:after{opacity:.5}.entity-list-item+.chapter-expansion .icon svg{display:none}.entity-list-item+.chapter-expansion>.content{flex:1}.entity-list-item+.chapter-expansion .chapter-contents-toggle{border-radius:0 4px 4px 0;padding:6px 19px;width:100%;text-align:start}.entity-list-item+.chapter-expansion .chapter-contents-toggle:hover{background-color:rgba(0,0,0,.06)}.entity-list-item.has-children{padding-bottom:0}.entity-list-item.has-children>.icon{border-radius:4px 4px 0 0}.inset-list{display:none}.inset-list .entity-list-item-name{font-size:1rem}.inset-list .entity-list-item-children{padding-top:0;padding-bottom:0}.sidebar-page-nav{list-style:none;margin-block-start:12px;margin-block-end:16px;margin-inline-start:6px;margin-inline-end:0;position:relative}.sidebar-page-nav:after{content:"";display:block;position:absolute;left:0;background-color:rgba(0,0,0,.2);width:2px;top:5px;bottom:5px;z-index:0}html[dir=rtl] .sidebar-page-nav:after{left:auto;right:0}html.dark-mode .sidebar-page-nav:after{background-color:hsla(0,0%,100%,.2)}.sidebar-page-nav li{margin-bottom:4px;font-size:.95em;position:relative}.sidebar-page-nav .h1{padding-inline-start:16px}.sidebar-page-nav .h2{padding-inline-start:24px}.sidebar-page-nav .h3{padding-inline-start:32px}.sidebar-page-nav .h4{padding-inline-start:40px}.sidebar-page-nav .h5{padding-inline-start:48px}.sidebar-page-nav .h6{padding-inline-start:56px}.sidebar-page-nav .current-heading{font-weight:bold}.sidebar-page-nav li:not(.current-heading) .sidebar-page-nav-bullet{background-color:#bbb !important}html.dark-mode .sidebar-page-nav li:not(.current-heading) .sidebar-page-nav-bullet{background-color:#666 !important}.sidebar-page-nav .sidebar-page-nav-bullet{width:6px;height:6px;position:absolute;left:-2px;top:30%;border-radius:50%;box-shadow:0 0 0 6px #f2f2f2;box-shadow:0 0 0 6px #f2f2f2;z-index:1}html.dark-mode .sidebar-page-nav .sidebar-page-nav-bullet{box-shadow:0 0 0 6px #111}html[dir=rtl] .sidebar-page-nav .sidebar-page-nav-bullet{left:auto;right:-2px}.book-tree .sidebar-page-list{list-style:none;margin-block-start:6px;margin-block-end:0;margin-inline-start:-12px;margin-inline-end:-12px;padding-inline-start:0;padding-inline-end:0}.book-tree .sidebar-page-list ul{list-style:none;padding-inline-start:1rem;padding-inline-end:0}.book-tree .sidebar-page-list .entity-list-item{padding-top:2px;padding-bottom:2px;background-clip:content-box;border-radius:0 3px 3px 0;padding-inline-end:0}.book-tree .sidebar-page-list .entity-list-item .content{width:100%;padding-top:6px;padding-bottom:6px;max-width:calc(100% - 20px)}.book-tree .sidebar-page-list .entity-list-item.selected{background-color:rgba(0,0,0,.06)}html.dark-mode .book-tree .sidebar-page-list .entity-list-item.selected{background-color:hsla(0,0%,100%,.06)}.book-tree .sidebar-page-list .entity-list-item.no-hover{margin-top:-6px;padding-inline-end:0}.book-tree .sidebar-page-list .entity-list-item-name{font-size:1em;margin:0;margin-inline-end:16px}.book-tree .sidebar-page-list .chapter-child-menu{font-size:.8rem;margin-top:-0.2rem;margin-inline-start:-1rem}.book-tree .sidebar-page-list .chapter-contents-toggle{display:block;width:100%;text-align:start;padding:3px 12px 6px 12px;border-radius:0 3px 3px 0;line-height:1;margin-top:-3px;margin-bottom:-3px}.book-tree .sidebar-page-list .chapter-contents-toggle:hover{background-color:rgba(0,0,0,.06)}html.dark-mode .book-tree .sidebar-page-list .chapter-contents-toggle:hover{background-color:hsla(0,0%,100%,.06)}.book-tree .sidebar-page-list .entity-list-item .icon{z-index:2;width:4px;height:auto;align-self:stretch;flex-shrink:0;border-radius:1px;opacity:.8}.book-tree .sidebar-page-list .entity-list-item .icon:after{opacity:1}.book-tree .sidebar-page-list .entity-list-item .icon svg{display:none}.chapter-child-menu ul.sub-menu{display:none;padding-inline-start:0;position:relative;margin-bottom:0}.sortable-page-list,.sortable-page-sublist{list-style:none}.sort-box{margin-bottom:16px;padding:16px 32px;position:relative}.sort-box summary:focus{outline:1px dashed var(--color-primary);outline-offset:5px}.sort-box::before{pointer-events:none;content:"";border-radius:4px;opacity:.5;border:2px solid var(--color-book);display:block;top:0;bottom:0;left:0;right:0;position:absolute}.sort-box-options{display:flex;flex-wrap:wrap;justify-content:space-between}.sort-box-options .button{margin-inline-start:0}.sortable-page-list{margin-inline-start:0;padding:0}.sortable-page-list .entity-list-item>span:first-child{align-self:flex-start}.sortable-page-list .sortable-selected,.sortable-page-list .sortable-selected:hover{outline:1px dotted var(--color-primary);background-color:var(--color-primary-light) !important}.sortable-page-list .entity-list-item>div{display:block;flex:1}.sortable-page-list>ul{margin-inline-start:0}.sortable-page-list .sortable-page-sublist{margin-bottom:16px;margin-top:0;padding-inline-start:16px}.sortable-page-list li{background-color:#fff;border:1px solid;border-color:#ddd;margin-top:-1px;min-height:38px}html.dark-mode .sortable-page-list li{background-color:#222}html.dark-mode .sortable-page-list li{border-color:#666}.sortable-page-list li.text-page,.sortable-page-list li.text-chapter{border-inline-start:2px solid currentColor}.sortable-page-list li:first-child{margin-top:6px}.sortable-page-list li.placeholder{position:relative}.sortable-page-list li.placeholder:before{position:absolute}.sort-box summary{list-style:none;font-size:.9rem;cursor:pointer}.sort-box summary::-webkit-details-marker{display:none}details.sort-box summary .caret-container svg{transition:transform ease-in-out 120ms}details.sort-box[open] summary .caret-container svg{transform:rotate(90deg)}.sort-box-actions .icon-button{opacity:.6}.sort-box .flex-container-row:hover .sort-box-actions .icon-button,.sort-box .flex-container-row:focus-within .sort-box-actions .icon-button{opacity:1}.sort-box-actions .icon-button[disabled]{visibility:hidden}.sort-box-actions .dropdown-menu button[disabled]{display:none}.sort-list-handle{cursor:grab}.activity-list-item{padding:12px 0;display:grid;grid-template-columns:min-content 1fr;grid-column-gap:16px;font-size:.9em}.card .activity-list-item{padding-block:12px}.user-list-item{display:inline-grid;padding:12px;grid-template-columns:min-content 1fr;grid-column-gap:16px;font-size:.9em;align-items:center}.user-list-item>div:first-child{line-height:0}ul.pagination{display:inline-flex;list-style:none;margin:16px 0;padding-inline-start:1px}ul.pagination li:first-child a,ul.pagination li:first-child span{border-radius:3px 0 0 3px}ul.pagination li:last-child a,ul.pagination li:last-child span{border-radius:0 3px 3px 0}ul.pagination a,ul.pagination span{display:block;padding:3px 12px;border:1px solid #ccc;margin-inline-start:-1px;user-select:none;color:#555;border-color:#ccc}html.dark-mode ul.pagination a,html.dark-mode ul.pagination span{color:#eee}html.dark-mode ul.pagination a,html.dark-mode ul.pagination span{border-color:#666}ul.pagination li.disabled{cursor:not-allowed}ul.pagination li.active span{color:#111;background-color:rgba(0,0,0,.05)}html.dark-mode ul.pagination li.active span{color:#eee}html.dark-mode ul.pagination li.active span{background-color:rgba(0,0,0,.5)}.compact ul.pagination{margin:0}.entity-list,.icon-list{margin:0 -16px}.entity-list h4,.icon-list h4{margin:0}.entity-list hr,.icon-list hr{margin:0}.entity-list .text-small.text-muted,.icon-list .text-small.text-muted{color:#aaa;font-size:.75em;margin-top:6px}.entity-list .text-muted p.text-muted,.icon-list .text-muted p.text-muted{margin-top:0}.entity-list .page.draft .text-page,.icon-list .page.draft .text-page{color:var(--color-page-draft);fill:var(--color-page-draft)}.entity-list>.dropdown-container,.icon-list>.dropdown-container{display:block}.icon-list hr{margin:12px 16px;max-width:140px;opacity:.25;height:1.1px}.icon-list hr+hr,.icon-list hr:first-child,.icon-list hr:last-child{display:none}.entity-list-item,.icon-list-item{padding:12px 16px;display:flex;align-items:center;gap:16px;background-color:rgba(0,0,0,0);border:0;width:100%;position:relative;word-break:break-word}.entity-list-item h4 a,.icon-list-item h4 a{color:#666}.entity-list-item>span:first-child,.icon-list-item>span:first-child{flex-basis:1.88em;flex:none}.entity-list-item>span:last-child,.icon-list-item>span:last-child{flex:1;text-align:start}.entity-list-item>.content,.icon-list-item>.content{min-width:0}.entity-list-item:not(.no-hover),.icon-list-item:not(.no-hover){cursor:pointer}.entity-list-item:not(.no-hover):hover,.icon-list-item:not(.no-hover):hover{background-color:rgba(0,0,0,.06);text-decoration:none;border-radius:4px}html.dark-mode .entity-list-item:not(.no-hover):hover,html.dark-mode .icon-list-item:not(.no-hover):hover{background-color:hsla(0,0%,100%,.06)}.entity-list-item.outline-hover:hover,.icon-list-item.outline-hover:hover{background-color:rgba(0,0,0,0)}.entity-list-item:focus,.icon-list-item:focus{background-color:#eee;outline:1px dotted #666;outline-offset:-2px}html.dark-mode .entity-list-item:focus,html.dark-mode .icon-list-item:focus{background-color:#222}.entity-list-item.disabled{pointer-events:none;cursor:not-allowed;opacity:.8;user-select:none;background:var(--bg-disabled)}.entity-list-item-path-sep{display:inline-block;vertical-align:top;position:relative;top:1px}.entity-list-item-path-sep svg{margin-inline-end:0}.split-icon-list-item{display:flex;align-items:center;gap:16px;background-color:rgba(0,0,0,0);border:0;width:100%;position:relative;word-break:break-word;border-radius:4px}.split-icon-list-item>a{padding:12px 16px;display:flex;align-items:center;gap:16px;flex:1}.split-icon-list-item>a:hover{text-decoration:none}.split-icon-list-item .icon{flex-basis:1.88em;flex:none}.split-icon-list-item:hover{background-color:rgba(0,0,0,.06)}html.dark-mode .split-icon-list-item:hover{background-color:hsla(0,0%,100%,.06)}.icon-list-item-dropdown{margin-inline-start:auto;align-self:stretch;display:flex;align-items:stretch;border-inline-start:1px solid rgba(0,0,0,.1);visibility:hidden}.split-icon-list-item:hover .icon-list-item-dropdown,.split-icon-list-item:focus-within .icon-list-item-dropdown{visibility:visible}.icon-list-item-dropdown-toggle{padding:6px;display:flex;align-items:center;cursor:pointer;color:#888}html.dark-mode .icon-list-item-dropdown-toggle{color:#999}.icon-list-item-dropdown-toggle svg{margin:0}.icon-list-item-dropdown-toggle:hover{background-color:rgba(0,0,0,.06)}html.dark-mode .icon-list-item-dropdown-toggle:hover{background-color:hsla(0,0%,100%,.06)}.card .entity-list-item:not(.no-hover,.book-contents .entity-list-item):hover{background-color:#f2f2f2;border-radius:0}html.dark-mode .card .entity-list-item:not(.no-hover,.book-contents .entity-list-item):hover{background-color:#2d2d2d}.card .entity-list-item .entity-list-item:hover{background-color:#eee}.entity-list-item-children{padding:16px 24px}.entity-list-item-children>div{overflow:hidden;padding:0 0 6px 0}.entity-list-item-children .entity-chip{text-overflow:ellipsis;height:2.5em;overflow:hidden;text-align:start;display:block;white-space:nowrap}.entity-list-item-children>.entity-list>.entity-list-item:last-child{margin-bottom:-6px}.entity-list-item-image{align-self:stretch;width:140px;flex:none;background-size:cover;background-position:50% 50%;border-radius:3px;position:relative;margin-inline-end:24px}.entity-list-item-image.entity-list-item-image-wide{width:220px}.entity-list-item-image .svg-icon{color:#fff;font-size:1.66rem;margin-inline-end:0;position:absolute;bottom:6px;left:6px}html.dark-mode .entity-list-item-image .svg-icon{color:hsla(0,0%,100%,.6)}@media screen and (max-width: 880px){.entity-list-item-image{width:80px}}.chapter>.entity-list-item-image{width:60px}.entity-list.compact{font-size:8.4px}.entity-list.compact h4,.entity-list.compact a{line-height:1.2}.entity-list.compact .entity-item-snippet{display:none}.entity-list.compact .entity-list-item p{font-size:11.2px;padding-top:6px}.entity-list.compact .entity-list-item p:empty{padding-top:0}.entity-list.compact p{margin:0}.entity-list.compact>p.empty-text{display:block;font-size:14px}.entity-list.compact hr{margin:0}@media screen and (max-width: 880px){.entity-list.compact h4{font-size:1.666em}}.entity-item-tags{font-size:.75rem;opacity:1}.entity-item-tags .primary-background-light{background:rgba(0,0,0,0)}.entity-item-tags .tag-name{background-color:rgba(0,0,0,.05)}.dropdown-container{display:inline-block;vertical-align:top;position:relative}.dropdown-menu{display:none;position:absolute;z-index:999;top:0;list-style:none;inset-inline-end:0;margin:16px 0;background-color:#fff;box-shadow:0 1px 6px 0 rgba(0,0,0,.18);border-radius:3px;min-width:180px;padding:6px 0;color:#555;fill:currentColor;text-align:start !important;max-height:500px;overflow-y:auto}html.dark-mode .dropdown-menu{background-color:#333}html.dark-mode .dropdown-menu{color:#eee}.dropdown-menu.anchor-left{inset-inline-end:auto;inset-inline-start:0}.dropdown-menu.wide{min-width:220px}.dropdown-menu.xl-limited{width:280px;max-width:100%}.dropdown-menu .text-muted{color:#999;fill:#999}.dropdown-menu li.active a{font-weight:600}.dropdown-menu button{width:100%;text-align:start}.dropdown-menu li.border-bottom{border-bottom:1px solid #ddd}.dropdown-menu li hr{margin:6px 0}.dropdown-menu .icon-item,.dropdown-menu .text-item,.dropdown-menu .label-item{padding:8px 16px;color:#555;fill:currentColor;white-space:nowrap;line-height:1.4;cursor:pointer}html.dark-mode .dropdown-menu .icon-item,html.dark-mode .dropdown-menu .text-item,html.dark-mode .dropdown-menu .label-item{color:#eee}.dropdown-menu .icon-item.break-text,.dropdown-menu .text-item.break-text,.dropdown-menu .label-item.break-text{white-space:normal;word-wrap:break-word;overflow-wrap:break-word}.dropdown-menu .icon-item:hover,.dropdown-menu .icon-item:focus,.dropdown-menu .text-item:hover,.dropdown-menu .text-item:focus,.dropdown-menu .label-item:hover,.dropdown-menu .label-item:focus{text-decoration:none;background-color:var(--color-primary-light);color:var(--color-primary)}.dropdown-menu .icon-item:focus,.dropdown-menu .text-item:focus,.dropdown-menu .label-item:focus{outline:1px solid var(--color-primary);outline-offset:-2px}.dropdown-menu .icon-item svg,.dropdown-menu .text-item svg,.dropdown-menu .label-item svg{margin-inline-end:12px;display:inline-block;width:16px}.dropdown-menu .text-item{display:block}.dropdown-menu .label-item{display:grid;align-items:center;grid-template-columns:auto min-content;gap:16px}.dropdown-menu .label-item>*:nth-child(2){opacity:.7}.dropdown-menu .label-item>*:nth-child(2):hover{opacity:1}.dropdown-menu .icon-item{display:grid;align-items:start;grid-template-columns:16px auto;gap:16px}.dropdown-menu .icon-item svg{margin-inline-end:0;margin-block-start:1px}.tri-layout-right .dropdown-menu,.tri-layout-left .dropdown-menu{inset-inline-end:6px}.featured-image-container{position:relative;overflow:hidden;min-height:140px;background-size:cover;background-position:50% 50%;transition:opacity ease-in-out 240ms}.featured-image-container a{display:block}.featured-image-container img{display:block;width:100%;max-width:100%;height:auto}.featured-image-container-wrap{position:relative}.featured-image-container-wrap .svg-icon{color:#fff;font-size:2rem;margin-inline-end:0;position:absolute;bottom:10px;left:6px}html.dark-mode .featured-image-container-wrap .svg-icon{color:hsla(0,0%,100%,.6)}.grid-card:hover .featured-image-container{opacity:.5}.action-link{background:rgba(0,0,0,0);border:none;color:currentColor;padding:16px 0}.active-link-list a{display:inline-block;padding:12px}.active-link-list a:not(.active){color:#444}html.dark-mode .active-link-list a:not(.active){color:#888}.active-link-list a:hover{background-color:rgba(0,0,0,.05);border-radius:4px;text-decoration:none}html.dark-mode .active-link-list a:hover{background-color:hsla(0,0%,100%,.05)}.active-link-list.in-sidebar a{display:block;margin-bottom:6px}.active-link-list.in-sidebar a.active{border-radius:4px;background-color:rgba(0,0,0,.05)}html.dark-mode .active-link-list.in-sidebar a.active{background-color:hsla(0,0%,100%,.05)}.entity-meta-item{display:flex;line-height:1.2;margin:.6em 0;align-content:start;gap:12px}.entity-meta-item a{line-height:1.2}.entity-meta-item svg{flex-shrink:0;width:1em;margin:0}.page-editor{display:flex;flex-direction:column;align-items:stretch}.page-editor .edit-area{flex:1;flex-direction:column;z-index:10;border-radius:0 0 8px 8px}.page-editor .mce-tinymce{box-shadow:none}.page-editor .mce-top-part::before{box-shadow:none}.page-editor-page-area{width:100%;border-radius:8px;box-shadow:0 1px 6px -1px rgba(0,0,0,.1);min-width:300px;background-color:#fff}html.dark-mode .page-editor-page-area{background-color:#333}.page-edit-toolbar{width:100%;margin:0 auto;display:grid;grid-template-columns:minmax(max-content, 2fr) 1.5fr minmax(max-content, 2fr);align-items:center}@media screen and (min-width: 1401px){.page-editor-wysiwyg2024 .page-edit-toolbar,.page-editor-wysiwyg2024 .page-editor-page-area,.page-editor-wysiwyg .page-edit-toolbar,.page-editor-wysiwyg .page-editor-page-area{max-width:1140px}.page-editor-wysiwyg .floating-toolbox,.page-editor-wysiwyg2024 .floating-toolbox{position:absolute}}@media screen and (max-width: 880px){.page-edit-toolbar{display:flex;flex-direction:row;justify-content:space-between}}.title-input.page-title{font-size:.8em}.title-input.page-title .input{border:0;margin-bottom:-1px}.title-input.page-title input[type=text]{max-width:840px;margin:0 auto;border:none;height:auto;display:block;width:100%;font-size:20px;border-radius:8px}.title-input.page-title input[type=text]:focus{position:relative;outline-offset:-1px;outline:1px dashed var(--color-primary);box-shadow:0 1px 6px -1px rgba(0,0,0,.1);z-index:50}.page-editor-markdown .title-input.page-title input[type=text]{max-width:100%}body.tox-fullscreen .page-editor .edit-area,body.markdown-fullscreen .page-editor .edit-area{z-index:12}body.tox-fullscreen .page-editor,body.tox-fullscreen .flex-fill,body.markdown-fullscreen .page-editor,body.markdown-fullscreen .flex-fill{overflow:visible}@media screen and (max-width: 600px){.page-edit-toolbar{overflow-x:scroll;overflow-y:visible}.page-edit-toolbar{white-space:nowrap}.page-edit-toolbar>div{display:inline-block}}.page-save-mobile-button{position:fixed;z-index:30;border-radius:50%;width:52px;height:52px;font-size:26px;inset-inline-end:6px;bottom:12px;box-shadow:0 2px 2px 1px rgba(0,0,0,.13);background-color:currentColor;text-align:center}.page-save-mobile-button svg{fill:#fff;margin-inline-end:0}.draft-notification{pointer-events:none;transform:scale(0);transition:transform ease-in-out 120ms;transform-origin:50% 50%}.draft-notification.visible{transform:scale(1)}.page-style.editor{padding:0 !important}.pointer-container{position:fixed;display:none;left:0;z-index:10}.pointer{border:1px solid #ccc;border-color:#ccc;border-radius:4px;box-shadow:0 0 12px 1px rgba(0,0,0,.1);background-color:#fff;width:328px}html.dark-mode .pointer{border-color:#000}html.dark-mode .pointer{background-color:#333}.pointer:before{position:absolute;left:50%;bottom:-9px;width:16px;height:16px;margin-inline-start:-8px;content:"";display:block;transform:rotate(45deg);transform-origin:50% 50%;border-right:1px solid #ccc;border-bottom:1px solid #ccc;z-index:56;background-color:#fff;border-color:#ccc}html.dark-mode .pointer:before{background-color:#333}html.dark-mode .pointer:before{border-color:#000}.pointer input,.pointer button,.pointer a{position:relative;height:28px;font-size:12px;vertical-align:top;padding:5px 16px}.pointer input{background-color:#fff;border:1px solid #ddd;border-color:#ddd;color:#666;width:auto;flex:1;z-index:58;padding:5px;border-radius:0}html.dark-mode .pointer input{border-color:#000}.pointer .text-button{color:#444}html.dark-mode .pointer .text-button{color:#aaa}.pointer .input-group .button{line-height:1;margin-inline-start:-1px;margin-block:0;box-shadow:none;border-radius:0}.pointer a.button{margin:0}.pointer .svg-icon{width:1.2em;height:1.2em}.pointer .button{border-color:#ddd}html.dark-mode .pointer .button{border-color:#000}.content-comment-highlight{position:absolute;left:0;top:0;width:0;height:0;user-select:none;pointer-events:none}.content-comment-highlight:after{content:"";position:absolute;left:0;top:0;width:100%;height:100%;background-color:var(--color-primary);opacity:.25}.content-comment-window{font-size:14px;line-height:1.4;position:absolute;top:calc(100% + 3px);left:0;z-index:92;pointer-events:all;min-width:min(340px,80vw);background-color:#fff;box-shadow:0 2px 2px 1px rgba(0,0,0,.13);border-radius:4px;overflow:hidden}html.dark-mode .content-comment-window{background-color:#222}.content-comment-window-actions{background-color:var(--color-primary);color:#fff;display:flex;align-items:center;justify-content:end;gap:6px}.content-comment-window-actions button{color:#fff;font-size:12px;padding:6px;line-height:1;cursor:pointer}.content-comment-window-actions button[data-action=jump]{text-decoration:underline}.content-comment-window-actions svg{fill:currentColor;width:12px}.content-comment-window-content{padding:6px 12px 6px 6px;max-height:200px;overflow-y:scroll}.content-comment-window-content .comment-reference-indicator-wrap{display:none}.content-comment-marker{position:absolute;right:-16px;top:-16px;pointer-events:all;width:min(1.5em,32px);height:min(1.5em,32px);border-radius:min(.75em,32px);display:flex;align-items:center;justify-content:center;background-color:var(--color-primary);box-shadow:0 2px 2px 1px rgba(0,0,0,.13);color:#fff;cursor:pointer;z-index:90;transform:scale(1);transition:transform ease-in-out 120ms}.content-comment-marker svg{fill:#fff;width:80%}.page-content [id^=bkmrk-]:hover .content-comment-marker{transform:scale(1.15)}.floating-toolbox{background-color:#fff;overflow:hidden;align-items:stretch;flex-direction:row;display:flex;max-height:100%;border-radius:8px;box-shadow:0 1px 6px -1px rgba(0,0,0,.1);margin-bottom:auto;margin-inline-start:24px;position:relative}html.dark-mode .floating-toolbox{background-color:#222}.floating-toolbox.open{position:relative;right:0;max-width:480px;margin-bottom:0}.floating-toolbox:not(.open) .toolbox-tab-content{display:none !important}.floating-toolbox .toolbox-toggle svg{transition:transform ease-in-out 180ms}.floating-toolbox .toolbox-toggle{transition:background-color ease-in-out 180ms}.floating-toolbox.open .toolbox-toggle{background-color:rgba(255,0,0,.2)}.floating-toolbox.open .toolbox-toggle svg{transform:rotate(180deg)}.floating-toolbox>div{flex:1;position:relative}.floating-toolbox .tabs{border-inline-end:1px solid #ddd;border-inline-end-color:#ddd;width:40px;flex:0 1 auto;margin-inline-end:-1px}html.dark-mode .floating-toolbox .tabs{border-inline-end-color:#000}.floating-toolbox .tabs-inner{background-color:#fff}html.dark-mode .floating-toolbox .tabs-inner{background-color:#222}.floating-toolbox .tabs svg{padding:0;margin:0}.floating-toolbox .tabs-inner>button{color:rgba(0,0,0,.7);display:block;cursor:pointer;padding:10px 6px;font-size:18px;line-height:1.6}html.dark-mode .floating-toolbox .tabs-inner>button{color:hsla(0,0%,100%,.5)}.floating-toolbox .tabs-inner>button:hover,.floating-toolbox.open .tabs-inner>button.active{color:var(--color-link) !important;position:relative}.floating-toolbox .tabs-inner>button:hover:after,.floating-toolbox.open .tabs-inner>button.active:after{content:"";display:block;position:absolute;left:0;width:100%;top:0;height:100%;background-color:currentColor;opacity:.075}.floating-toolbox.open .tabs-inner>button.active{border-inline-end:1px solid var(--color-link);margin-inline-end:-1px}.floating-toolbox h4{font-size:24px;margin:16px 0 0 0;padding:0 24px 12px 24px}.floating-toolbox .tags input{max-width:100%;width:100%;min-width:50px}.floating-toolbox .tags td,.floating-toolbox .inline-start-table>div>div>div{padding-inline-end:12px;padding-top:12px;position:relative}.floating-toolbox .handle{user-select:none;cursor:move;fill:#999}.floating-toolbox form{display:flex;flex:1;flex-direction:column;overflow-y:scroll}.floating-toolbox table td,.floating-toolbox table th{overflow:visible}@media screen and (max-width: 1400px){.floating-toolbox{margin-inline-start:12px}}@media screen and (max-width: 600px){.page-editor-page-area-wrap{margin:4px !important}.floating-toolbox{margin-inline-start:4px}.floating-toolbox .tabs{width:32px}.floating-toolbox .tabs-inner>button{font-size:12px}.page-edit-toolbar{padding-block:0 !important}.page-editor.toolbox-open .page-editor-page-area{display:none}}.toolbox-tab-content{display:none;overflow-y:auto;padding-bottom:45px}.suggestion-box{top:auto;margin:-4px 0 0;right:auto;left:0;padding:0}.suggestion-box li{display:block;border-bottom:1px solid #ddd}.suggestion-box li:last-child{border-bottom:0}.comments-container h5{color:#888;font-weight:normal;margin-top:.5em}.comment-editor .CodeMirror,.comment-editor .CodeMirror-scroll{min-height:175px}.mce-floatpanel[aria-label="Insert/edit media"] .mce-open{display:none}.entity-list-item>span:first-child,.icon-list-item>span:first-child,.split-icon-list-item>a>.icon,.chapter-expansion>.icon{font-size:.8rem;width:1.88em;height:1.88em;flex-shrink:0;display:flex;align-items:center;justify-content:center;text-align:center;border-radius:1em;position:relative;overflow:hidden}.entity-list-item>span:first-child svg,.icon-list-item>span:first-child svg,.split-icon-list-item>a>.icon svg,.chapter-expansion>.icon svg{margin:0;bottom:0}.entity-list-item>span:first-child:after,.icon-list-item>span:first-child:after,.split-icon-list-item>a>.icon:after,.chapter-expansion>.icon:after{content:"";position:absolute;background-color:currentColor;opacity:.2;left:0;top:0;width:100%;height:100%}.entity-chip{display:inline-block;align-items:center;justify-content:center;text-align:center;font-size:.9em;border-radius:3px;position:relative;overflow:hidden;padding:6px 12px;fill:currentColor;opacity:.85;transition:opacity ease-in-out 120ms}.entity-chip:after{content:"";position:absolute;background-color:currentColor;opacity:.15;left:0;top:0;width:100%;height:100%}.entity-chip:hover{text-decoration:none;opacity:1}@media(prefers-contrast: more){.entity-chip{opacity:1}}.page-content{width:100%;max-width:840px;margin:0 auto;overflow-wrap:break-word;position:relative}.page-content .align-left{text-align:left}.page-content img.align-left,.page-content table.align-left,.page-content iframe.align-left,.page-content video.align-left{float:left !important;margin:6px 16px 16px 0}.page-content .align-right{text-align:right !important}.page-content img.align-right,.page-content table.align-right,.page-content iframe.align-right,.page-content video.align-right{float:right !important;margin:6px 0 6px 12px}.page-content .align-center{text-align:center}.page-content img.align-center,.page-content video.align-center,.page-content iframe.align-center{display:block}.page-content img.align-center,.page-content table.align-center,.page-content iframe.align-center,.page-content video.align-center{margin-left:auto;margin-right:auto}.page-content .align-justify{text-align:justify}.page-content h1,.page-content h2,.page-content h3,.page-content h4,.page-content h5,.page-content h6,.page-content pre{clear:left}.page-content hr{clear:both;margin:16px 0}.page-content table{hyphens:auto;table-layout:fixed;max-width:100%;height:auto !important}.page-content ins,.page-content del{text-decoration:none}.page-content ins{background:#dbffdb}.page-content del{background:#ffecec}.page-content details{border:1px solid;border-color:#ddd;margin-bottom:1em;padding:12px}html.dark-mode .page-content details{border-color:#555}.page-content details>summary{margin-top:-12px;margin-left:-12px;margin-right:-12px;margin-bottom:-12px;font-weight:bold;background-color:#eee;padding:6px 12px}html.dark-mode .page-content details>summary{background-color:#333}.page-content details[open]>summary{margin-bottom:12px;border-bottom:1px solid;border-color:#ddd}html.dark-mode .page-content details[open]>summary{border-color:#555}.page-content details>summary+*{margin-top:.2em}.page-content details:after{content:"";display:block;clear:both}.page-content li>input[type=checkbox]{vertical-align:top;margin-top:.3em}.page-content p:empty{min-height:1.6em}.page-content.page-revision pre code{white-space:pre-wrap}.page-content .cm-editor{margin-bottom:1.375em}.page-content video,.page-content iframe{max-width:100%}.page-content a{text-decoration:underline}body .page-content img,.page-content img:not([data-mce-object]){max-width:100%;height:auto}.callout{border-left:3px solid #bbb;border-inline-start:3px solid #bbb;border-inline-end:none;background-color:#eee;padding:12px;padding-left:32px;padding-inline-start:32px;padding-inline-end:12px;display:block;position:relative;overflow:auto}.callout:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiMwMTUzODAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bTEgMTVoLTJ2LTZoMnY2em0wLThoLTJWN2gydjJ6Ii8+PC9zdmc+");background-repeat:no-repeat;content:"";width:1.2em;height:1.2em;left:8px;inset-inline-start:8px;inset-inline-end:unset;top:50%;margin-top:-9px;display:inline-block;position:absolute;line-height:1;opacity:.8}.callout.success{border-color:#0f7d15;background-color:#eafdeb;color:#063409}html.dark-mode .callout.success{border-color:#4aa850}html.dark-mode .callout.success{background-color:#122913}html.dark-mode .callout.success{color:#4aa850}.callout.success:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiMzNzZjMzkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bS0yIDE1bC01LTUgMS40MS0xLjQxTDEwIDE0LjE3bDcuNTktNy41OUwxOSA4bC05IDl6Ii8+PC9zdmc+")}.callout.danger{border-color:#ab0f0e;background-color:#fcdbdb;color:#4d0706}html.dark-mode .callout.danger{border-color:#e85c5b}html.dark-mode .callout.danger{background-color:#250505}html.dark-mode .callout.danger{color:#e85c5b}.callout.danger:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNiOTE4MTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0xNS43MyAzSDguMjdMMyA4LjI3djcuNDZMOC4yNyAyMWg3LjQ2TDIxIDE1LjczVjguMjdMMTUuNzMgM3pNMTIgMTcuM2MtLjcyIDAtMS4zLS41OC0xLjMtMS4zIDAtLjcyLjU4LTEuMyAxLjMtMS4zLjcyIDAgMS4zLjU4IDEuMyAxLjMgMCAuNzItLjU4IDEuMy0xLjMgMS4zem0xLTQuM2gtMlY3aDJ2NnoiLz4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==")}.callout.info{border-color:#0288d1;background-color:#d3efff;color:#01466c}html.dark-mode .callout.info{border-color:#0288d1}html.dark-mode .callout.info{background-color:#001825}html.dark-mode .callout.info{color:#0288d1}.callout.warning{border-color:#cf4d03;background-color:#fee3d3;color:#6a2802}html.dark-mode .callout.warning{border-color:#de8a5a}html.dark-mode .callout.warning{background-color:#30170a}html.dark-mode .callout.warning{color:#de8a5a}.callout.warning:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNiNjUzMWMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEgMjFoMjJMMTIgMiAxIDIxem0xMi0zaC0ydi0yaDJ2MnptMC00aC0ydi00aDJ2NHoiLz48L3N2Zz4=")}.callout a{color:inherit;text-decoration:underline}@media print{html,body{font-size:12px;background-color:#fff}.page-content{margin:0 auto}.print-hidden{display:none !important}.tri-layout-container{grid-template-columns:1fr;grid-template-areas:"b";margin-inline-start:0;margin-inline-end:0;display:block}.card{box-shadow:none}.content-wrap.card{padding-inline-start:0;padding-inline-end:0}}.dragged{position:absolute;opacity:.5;z-index:2000}body.dragging,body.dragging *{cursor:move !important}.avatar{border-radius:100%;background-color:#eee;width:30px;height:30px}html.dark-mode .avatar{background-color:#000}.avatar.med{width:40px;height:40px}.avatar.large{width:80px;height:80px}.avatar.huge{width:120px;height:120px}.avatar.square{border-radius:3px}html.dark-mode .avatar[src$="user_avatar.png"]{filter:invert(1)}.loading-container{position:relative;display:block;margin:32px auto}.loading-container>div{width:10px;height:10px;border-radius:10px;display:inline-block;vertical-align:top;transform:translate3d(-10px, 0, 0);margin-top:6px;animation-name:loadingBob;animation-duration:1.4s;animation-iteration-count:infinite;animation-timing-function:cubic-bezier(0.62, 0.28, 0.23, 0.99);margin-inline-end:4px;background-color:var(--color-page);animation-delay:-300ms}.loading-container>div:first-child{left:-16px;background-color:var(--color-book);animation-delay:-600ms}.loading-container>div:last-of-type{left:16px;background-color:var(--color-chapter);animation-delay:0ms}.loading-container>span{margin-inline-start:12px;font-style:italic;color:#888;vertical-align:top}.inline.block .loading-container{margin:6px 12px}.skip-to-content-link{position:fixed;top:-52px;left:0;background-color:#fff;z-index:15;border-radius:0 4px 4px 0;display:block;box-shadow:0 0 4px 1px rgba(0,0,0,.5);font-weight:bold}.skip-to-content-link:focus{top:32px;outline-offset:-10px;outline:2px dotted var(--color-link)}.entity-selector{border:1px solid #ddd;border-color:#ddd;border-radius:3px;overflow:hidden;font-size:.8em}html.dark-mode .entity-selector{border-color:#111}.entity-selector input[type=text]{width:100%;display:block;border-radius:0;border:0;border-bottom:1px solid #ddd;font-size:16px;padding:12px 16px}.entity-selector input[type=text]:focus{outline:1px solid var(--color-primary);border-radius:3px 3px 0 0;outline-offset:-1px}.entity-selector .entity-list{overflow-y:scroll;height:400px;background-color:#eee;margin-inline-end:0;margin-inline-start:0}html.dark-mode .entity-selector .entity-list{background-color:#222}.entity-selector .entity-list-item{background-color:#fff}html.dark-mode .entity-selector .entity-list-item{background-color:#222}.entity-selector .entity-list-item p{margin-bottom:0}.entity-selector .entity-list-item:focus{outline:2px dotted var(--color-primary);outline-offset:-4px}.entity-selector .entity-list-item.selected{background-color:rgba(0,0,0,.05)}html.dark-mode .entity-selector .entity-list-item.selected{background-color:hsla(0,0%,100%,.05)}.entity-selector .loading{height:400px;padding-top:24px}.entity-selector.compact{font-size:10px}.entity-selector.compact .entity-item-snippet{display:none}.entity-selector.compact h4{font-size:14px}.entity-selector.small .entity-list-item{padding:6px 16px}.entity-selector.small .entity-list,.entity-selector.small .loading{height:300px}.entity-selector.small input[type=text]{font-size:13px;padding:6px 16px;height:auto}.fullscreen{border:0;position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:150}@media screen and (min-width: 601px)and (max-width: 880px){#home-default>.grid.third{display:block;columns:2;column-gap:24px !important}}.list-sort-container{display:inline-block}.list-sort-container form{display:inline-block}.list-sort-container .list-sort{display:inline-grid;margin-inline-start:12px;grid-template-columns:minmax(120px, max-content) 40px;font-size:.9rem;border:2px solid #ddd;border-color:#ddd;border-radius:4px}html.dark-mode .list-sort-container .list-sort{border-color:#444}.list-sort-container .list-sort-label{font-weight:bold;display:inline-block}.list-sort-container .list-sort-label,.list-sort-container .list-sort-toggle{color:#555}html.dark-mode .list-sort-container .list-sort-label,html.dark-mode .list-sort-container .list-sort-toggle{color:#888}.list-sort-container .list-sort-type{text-align:start}.list-sort-container .list-sort-toggle,.list-sort-container .list-sort-dir{padding:8px 12px;cursor:pointer}.list-sort-container .list-sort-dir{border-inline-start:2px solid #ddd;color:#888;border-color:#ddd}html.dark-mode .list-sort-container .list-sort-dir{border-color:#444}.list-sort-container .list-sort-dir .svg-icon{transition:transform ease-in-out 120ms}.list-sort-container .list-sort-dir:hover .svg-icon{transform:rotate(180deg)}.list-sort-container .list-sort-toggle{display:block;width:100%;text-align:start}.import-item{border-inline-start:2px solid currentColor;padding-inline-start:6px}/*# sourceMappingURL=styles.css.map */
diff --git a/public/dist/wysiwyg.js b/public/dist/wysiwyg.js
index 60a700dce..3e00cb49d 100644
--- a/public/dist/wysiwyg.js
+++ b/public/dist/wysiwyg.js
@@ -1,20 +1,20 @@
// See the "/licenses" URI for full package license details
-var yh=Object.defineProperty;var Sh=(o,t,e)=>t in o?yh(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var p=(o,t,e)=>Sh(o,typeof t!="symbol"?t+"":t,e);function P(o){return __DEV__?{type:o}:{}}var De=P("SELECTION_CHANGE_COMMAND"),rr=P("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Ht=P("CLICK_COMMAND"),Je=P("DELETE_CHARACTER_COMMAND"),Kt=P("INSERT_LINE_BREAK_COMMAND"),Ut=P("INSERT_PARAGRAPH_COMMAND"),ct=P("CONTROLLED_TEXT_INSERTION_COMMAND"),ao=P("PASTE_COMMAND"),hn=P("REMOVE_TEXT_COMMAND"),St=P("DELETE_WORD_COMMAND"),ut=P("DELETE_LINE_COMMAND"),xe=P("FORMAT_TEXT_COMMAND"),co=P("UNDO_COMMAND"),uo=P("REDO_COMMAND"),Hs=P("KEYDOWN_COMMAND"),Ao=P("KEY_ARROW_RIGHT_COMMAND"),Ks=P("MOVE_TO_END"),Ro=P("KEY_ARROW_LEFT_COMMAND"),Us=P("MOVE_TO_START"),zt=P("KEY_ARROW_UP_COMMAND"),Wt=P("KEY_ARROW_DOWN_COMMAND"),Ke=P("KEY_ENTER_COMMAND"),ir=P("KEY_SPACE_COMMAND"),qt=P("KEY_BACKSPACE_COMMAND"),ko=P("KEY_ESCAPE_COMMAND"),Yt=P("KEY_DELETE_COMMAND"),Io=P("KEY_TAB_COMMAND"),zs=P("INSERT_TAB_COMMAND"),Lh=P("INDENT_CONTENT_COMMAND"),Mh=P("OUTDENT_CONTENT_COMMAND"),$o=P("DROP_COMMAND"),sr=P("DRAGSTART_COMMAND"),lr=P("DRAGOVER_COMMAND"),Ws=P("DRAGEND_COMMAND"),fo=P("COPY_COMMAND"),mo=P("CUT_COMMAND"),Nn=P("SELECT_ALL_COMMAND"),qs=P("CLEAR_EDITOR_COMMAND"),Ys=P("CLEAR_HISTORY_COMMAND"),po=P("CAN_REDO_COMMAND"),go=P("CAN_UNDO_COMMAND"),ar=P("FOCUS_COMMAND"),Zs=P("BLUR_COMMAND"),Vs=P("KEY_MODIFIER_COMMAND");var me=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var wh=me&&"documentMode"in document?document.documentMode:null,Ue=me&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ze=me&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ho=me&&"InputEvent"in window&&!wh?"getTargetRanges"in new window.InputEvent("input"):!1,Zt=me&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Lt=me&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Sd=me&&/Android/.test(navigator.userAgent),Xs=me&&/^(?=.*Chrome).*/i.test(navigator.userAgent),js=me&&Sd&&Xs,Vt=me&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Xs;var No=1,We=3,Mt=0,Gs=1,Xt=2,Ld=0,ri=1,ii=2,dr=1,cr=2,xn=4,En=8,ur=16,fr=32,mr=64,pr=128,Js=dr|cr|xn|En|ur|fr|mr|pr,si=1,Tn=2;var Md="\xA0",vh="\u200B",Cn=Zt||Lt||Vt?Md:vh,Qe=`
+var Mh=Object.defineProperty;var wh=(o,t,e)=>t in o?Mh(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var p=(o,t,e)=>wh(o,typeof t!="symbol"?t+"":t,e);function P(o){return __DEV__?{type:o}:{}}var be=P("SELECTION_CHANGE_COMMAND"),rr=P("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Ht=P("CLICK_COMMAND"),Je=P("DELETE_CHARACTER_COMMAND"),Kt=P("INSERT_LINE_BREAK_COMMAND"),Ut=P("INSERT_PARAGRAPH_COMMAND"),ct=P("CONTROLLED_TEXT_INSERTION_COMMAND"),ao=P("PASTE_COMMAND"),hn=P("REMOVE_TEXT_COMMAND"),St=P("DELETE_WORD_COMMAND"),ut=P("DELETE_LINE_COMMAND"),Ee=P("FORMAT_TEXT_COMMAND"),co=P("UNDO_COMMAND"),uo=P("REDO_COMMAND"),Ks=P("KEYDOWN_COMMAND"),Ro=P("KEY_ARROW_RIGHT_COMMAND"),Us=P("MOVE_TO_END"),ko=P("KEY_ARROW_LEFT_COMMAND"),zs=P("MOVE_TO_START"),zt=P("KEY_ARROW_UP_COMMAND"),Wt=P("KEY_ARROW_DOWN_COMMAND"),Ue=P("KEY_ENTER_COMMAND"),ir=P("KEY_SPACE_COMMAND"),qt=P("KEY_BACKSPACE_COMMAND"),Io=P("KEY_ESCAPE_COMMAND"),Yt=P("KEY_DELETE_COMMAND"),$o=P("KEY_TAB_COMMAND"),Ws=P("INSERT_TAB_COMMAND"),vh=P("INDENT_CONTENT_COMMAND"),Dh=P("OUTDENT_CONTENT_COMMAND"),Po=P("DROP_COMMAND"),sr=P("DRAGSTART_COMMAND"),lr=P("DRAGOVER_COMMAND"),qs=P("DRAGEND_COMMAND"),fo=P("COPY_COMMAND"),mo=P("CUT_COMMAND"),Nn=P("SELECT_ALL_COMMAND"),Ys=P("CLEAR_EDITOR_COMMAND"),Zs=P("CLEAR_HISTORY_COMMAND"),po=P("CAN_REDO_COMMAND"),go=P("CAN_UNDO_COMMAND"),ar=P("FOCUS_COMMAND"),Vs=P("BLUR_COMMAND"),Xs=P("KEY_MODIFIER_COMMAND");var pe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var Oh=pe&&"documentMode"in document?document.documentMode:null,ze=pe&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),We=pe&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ho=pe&&"InputEvent"in window&&!Oh?"getTargetRanges"in new window.InputEvent("input"):!1,Zt=pe&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Lt=pe&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Md=pe&&/Android/.test(navigator.userAgent),js=pe&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Gs=pe&&Md&&js,Vt=pe&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!js;var No=1,qe=3,Mt=0,Js=1,Xt=2,wd=0,ri=1,ii=2,dr=1,cr=2,xn=4,En=8,ur=16,fr=32,mr=64,pr=128,Qs=dr|cr|xn|En|ur|fr|mr|pr,si=1,Tn=2;var vd="\xA0",Ah="\u200B",Cn=Zt||Lt||Vt?vd:Ah,Qe=`
-`,wd=ze?Md:Cn,vd="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",Dd="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",Dh=new RegExp("^[^"+Dd+"]*["+vd+"]"),Oh=new RegExp("^[^"+vd+"]*["+Dd+"]"),Oe={bold:dr,code:ur,highlight:pr,italic:cr,strikethrough:xn,subscript:fr,superscript:mr,underline:En},Od={directionless:si,unmergeable:Tn},Ad={normal:Ld,segmented:ii,token:ri},Rd={[Ld]:"normal",[ii]:"segmented",[ri]:"token"};function E(o,t,...e){if(!o){for(let n of e)t=(t||"").replace("%s",n);throw new Error(t)}}function wt(...o){let t=[];for(let e of o)if(e&&typeof e=="string")for(let[n]of e.matchAll(/\S+/g))t.push(n);return t}var Ah=100,el=!1,tl=0;function kd(){return el}function Rh(o){tl=o.timeStamp}function kh(o){tl===0&&bn(o).addEventListener("textInput",Rh,!0)}function Qs(o,t,e){return t.__lexicalLineBreak===o||o[`__lexicalKey_${e._key}`]!==void 0}function Ih(o){return o.getEditorState().read(()=>{let t=C();return t!==null?t.clone():null})}function $h(o,t,e){let n=ye(e._window),r=null,i=null;n!==null&&n.anchorNode===o&&(r=n.anchorOffset,i=n.focusOffset);let s=o.nodeValue;s!==null&&gr(t,s,r,i,!1)}function Ph(o,t,e){return t.nodeType===We&&e.isAttached()}function Id(o,t,e){el=!0;let n=performance.now()-tl>Ah;try{Ee(o,()=>{let r=C()||Ih(o),i=new Map,s=o.getRootElement(),l=o._editorState,a=o._blockCursorElement,d=!1,u="";for(let c=0;c0){let v=0;for(let M=0;M0)for(let[c,f]of i)if(T(f)){let g=f.getChildrenKeys(),h=c.firstChild;for(let N=0;N0){for(let c=0;c{Id(o,t,e)})}function $d(o,t){let e=o.__mode,n=o.__format,r=o.__style,i=t.__mode,s=t.__format,l=t.__style;return(e===null||e===i)&&(n===null||n===s)&&(r===null||r===l)}function Pd(o,t){let e=o.mergeWithSibling(t),n=J()._normalizedNodes;return n.add(o.__key),n.add(t.__key),e}function rl(o){let t=o;if(t.__text===""&&t.isSimpleText()&&!t.isUnmergeable()){t.remove();return}let e;for(;(e=t.getPreviousSibling())!==null&&L(e)&&e.isSimpleText()&&!e.isUnmergeable();)if(e.__text==="")e.remove();else if($d(e,t)){t=Pd(e,t);break}else break;let n;for(;(n=t.getNextSibling())!==null&&L(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else if($d(t,n)){t=Pd(t,n);break}else break}function Po(o){return Bd(o.anchor),Bd(o.focus),o}function Bd(o){for(;o.type==="element";){let t=o.getNode(),e=o.offset,n,r;if(e===t.getChildrenSize()?(n=t.getChildAtIndex(e-1),r=!0):(n=t.getChildAtIndex(e),r=!1),L(n)){o.set(n.__key,r?n.getTextContentSize():0,"text");break}else if(!T(n))break;o.set(n.__key,r?n.getChildrenSize():0,"element")}}var Bh=1;function Fh(){return""+Bh++}function Kd(o,t){let e=o._nodes.get(t);return e===void 0&&E(!1,"registeredNode: Type %s not found",t),e}var nC=Array.isArray,Ud=typeof queueMicrotask=="function"?queueMicrotask:o=>{Promise.resolve().then(o)};function zd(o){return F(ee(o))}function Ln(o){let t=document.activeElement;if(t===null)return!1;let e=t.nodeName;return F(ee(o))&&(e==="INPUT"||e==="TEXTAREA"||t.contentEditable==="true"&&Bo(t)==null)}function jt(o,t,e){let n=o.getRootElement();try{return n!==null&&n.contains(t)&&n.contains(e)&&t!==null&&!Ln(t)&&ci(t)===o}catch{return!1}}function Mn(o){return o instanceof eo}function ci(o){let t=o;for(;t!=null;){let e=Bo(t);if(Mn(e))return e;t=gi(t)}return null}function Bo(o){return o?o.__lexicalEditor:null}function qe(o){return o.isToken()||o.isSegmented()}function Hh(o){return o.nodeType===We}function wn(o){let t=o;for(;t!=null;){if(Hh(t))return t;t=t.firstChild}return null}function Nr(o,t,e){let n=Oe[t];if(e!==null&&(o&n)===(e&n))return o;let r=o^n;return t==="subscript"?r&=~Oe.superscript:t==="superscript"&&(r&=~Oe.subscript),r}function xr(o){return L(o)||Ae(o)||F(o)}function Wd(o,t){if(t!=null){__DEV__&&Kh(o,t),o.__key=t;return}ce(),pl();let e=J(),n=tt(),r=Fh();n._nodeMap.set(r,o),T(o)?e._dirtyElements.set(r,!0):e._dirtyLeaves.add(r),e._cloneNotNeeded.add(r),e._dirtyType=Gs,o.__key=r}function Kh(o,t){let e=vc();if(!e)return;let n=e._nodeMap.get(t);n&&n.constructor!==o.constructor&&(o.constructor.name!==n.constructor.name?E(!1,"Lexical node with constructor %s attempted to re-use key from node in active editor state with constructor %s. Keys must not be re-used when the type is changed.",o.constructor.name,n.constructor.name):E(!1,"Lexical node with constructor %s attempted to re-use key from node in active editor state with different constructor with the same name (possibly due to invalid Hot Module Replacement). Keys must not be re-used when the type is changed.",o.constructor.name))}function Uh(o,t,e){let n=o;for(;n!==null;){if(e.has(n))return;let r=t.get(n);if(r===void 0)break;e.set(n,!1),n=r.__parent}}function Gt(o){let t=o.getParent();if(t!==null){let e=o.getWritable(),n=t.getWritable(),r=o.getPreviousSibling(),i=o.getNextSibling();if(r===null)if(i!==null){let s=i.getWritable();n.__first=i.__key,s.__prev=null}else n.__first=null;else{let s=r.getWritable();if(i!==null){let l=i.getWritable();l.__prev=s.__key,s.__next=l.__key}else s.__next=null;e.__prev=null}if(i===null)if(r!==null){let s=r.getWritable();n.__last=r.__key,s.__next=null}else n.__last=null;else{let s=i.getWritable();if(r!==null){let l=r.getWritable();l.__next=s.__key,s.__prev=l.__key}else s.__prev=null;e.__next=null}n.__size--,e.__parent=null}}function hr(o){pl();let t=o.getLatest(),e=t.__parent,n=tt(),r=J(),i=n._nodeMap,s=r._dirtyElements;e!==null&&Uh(e,i,s);let l=t.__key;r._dirtyType=Gs,T(o)?s.set(l,!0):r._dirtyLeaves.add(l)}function qd(o){let t=o.getPreviousSibling(),e=o.getNextSibling();t!==null&&hr(t),e!==null&&hr(e)}function le(o){ce();let t=J(),e=t._compositionKey;if(o!==e){if(t._compositionKey=o,e!==null){let n=Q(e);n!==null&&n.getWritable()}if(o!==null){let n=Q(o);n!==null&&n.getWritable()}}}function et(){return ft()?null:J()._compositionKey}function Q(o,t){let n=(t||tt())._nodeMap.get(o);return n===void 0?null:n}function ol(o,t){let e=J(),n=o[`__lexicalKey_${e._key}`];return n!==void 0?Q(n,t):null}function ee(o,t){let e=o;for(;e!=null;){let n=ol(e,t);if(n!==null)return n;e=gi(e)}return null}function ui(o){let t=o._decorators,e=Object.assign({},t);return o._pendingDecorators=e,e}function sl(o){return o.read(()=>H().getTextContent())}function Yd(o,t){Ee(o,()=>{let e=tt();if(e.isEmpty())return;if(t==="root"){H().markDirty();return}let n=e._nodeMap;for(let[,r]of n)r.markDirty()},o._pendingEditorState===null?{tag:"history-merge"}:void 0)}function H(){return nl(tt())}function nl(o){return o._nodeMap.get("root")}function Y(o){ce();let t=tt();o!==null&&(__DEV__&&Object.isFrozen(o)&&E(!1,"$setSelection called on frozen selection object. Ensure selection is cloned before passing in."),o.dirty=!0,o.setCachedNodes(null)),t._selection=o}function Zd(){ce();let o=J();li(o)}function Fo(o){let t=J(),e=zh(o,t);if(e===null){let n=t.getRootElement();return o===n?Q("root"):null}return Q(e)}function ll(o,t){return t?o.getTextContentSize():0}function zh(o,t){let e=o;for(;e!=null;){let n=e[`__lexicalKey_${t._key}`];if(n!==void 0)return n;e=gi(e)}return null}function fi(o){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(o)}function Er(o){let t=[],e=o;for(;e!==null;)t.push(e),e=e._parentEditor;return t}function al(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function dl(o){return o.nodeType===We?o.nodeValue:null}function mi(o,t,e){let n=ye(t._window);if(n===null)return;let r=n.anchorNode,{anchorOffset:i,focusOffset:s}=n;if(r!==null){let l=dl(r),a=ee(r);if(l!==null&&L(a)){if(l===Cn&&e){let d=e.length;l=e,i=d,s=d}l!==null&&gr(a,l,i,s,o)}}}function gr(o,t,e,n,r){let i=o;if(i.isAttached()&&(r||!i.isDirty())){let s=i.isComposing(),l=t;(s||r)&&t[t.length-1]===Cn&&(l=t.slice(0,-1));let a=i.getTextContent();if(r||l!==a){if(l===""){if(le(null),!Zt&&!Lt&&!Vt){let h=J();setTimeout(()=>{h.update(()=>{i.isAttached()&&i.remove()})},20)}else i.remove();return}let d=i.getParent(),u=Ye(),m=i.getTextContentSize(),c=et(),f=i.getKey();if(i.isToken()||c!==null&&f===c&&!s||_(u)&&(d!==null&&!d.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===o.__key&&u.anchor.offset===0&&!i.canInsertTextBefore()&&!s||u.focus.key===o.__key&&u.focus.offset===m&&!i.canInsertTextAfter()&&!s)){i.markDirty();return}let g=C();if(!_(g)||e===null||n===null){i.setTextContent(l);return}if(g.setTextNodeRange(i,e,i,n),i.isSegmented()){let h=i.getTextContent(),N=q(h);i.replace(N),i=N}i.setTextContent(l)}}}function Wh(o){let t=o.getPreviousSibling();return(L(t)||T(t)&&t.isInline())&&!t.canInsertTextAfter()}function Vd(o,t){if(t.isSegmented())return!0;if(!o.isCollapsed())return!1;let e=o.anchor.offset,n=t.getParentOrThrow(),r=t.isToken();return e===0?!t.canInsertTextBefore()||!n.canInsertTextBefore()&&!t.isComposing()||r||Wh(t):e===t.getTextContentSize()?!t.canInsertTextAfter()||!n.canInsertTextAfter()&&!t.isComposing()||r:!1}function Xd(o,t,e,n){return o==="Tab"&&!t&&!e&&!n}function jd(o,t,e,n){return o.toLowerCase()==="b"&&!t&&Tr(e,n)}function Gd(o,t,e,n){return o.toLowerCase()==="i"&&!t&&Tr(e,n)}function Jd(o,t,e,n){return o.toLowerCase()==="u"&&!t&&Tr(e,n)}function Qd(o,t){return bc(o)&&!t}function ec(o,t){return bc(o)&&t}function tc(o,t){return Ue&&t&&o.toLowerCase()==="o"}function oc(o,t,e){return _n(o)&&(Ue?t:e)}function nc(o,t,e){return yn(o)&&(Ue?t:e)}function rc(o,t){return Ue&&t&&_n(o)}function ic(o,t){return Ue&&t&&yn(o)}function sc(o,t,e,n){return Ue?t||e?!1:_n(o)||o.toLowerCase()==="h"&&n:n||t||e?!1:_n(o)}function lc(o,t,e,n,r){return Ue?e||n||r?!1:yn(o)||o.toLowerCase()==="d"&&t:t||n||r?!1:yn(o)}function ac(o,t,e,n){return o.toLowerCase()==="z"&&!t&&Tr(e,n)}function dc(o,t,e,n){return Ue?o.toLowerCase()==="z"&&e&&t:o.toLowerCase()==="y"&&n||o.toLowerCase()==="z"&&n&&t}function cc(o,t,e,n){return t?!1:o.toLowerCase()==="c"?Ue?e:n:!1}function uc(o,t,e,n){return t?!1:o.toLowerCase()==="x"?Ue?e:n:!1}function fc(o){return o==="ArrowLeft"}function mc(o){return o==="ArrowRight"}function qh(o){return o==="ArrowUp"}function Yh(o){return o==="ArrowDown"}function pc(o,t,e,n){return fc(o)&&!t&&!n&&!e}function gc(o,t,e,n,r){return fc(o)&&!n&&!e&&(t||r)}function hc(o,t,e,n){return mc(o)&&!t&&!n&&!e}function Nc(o,t,e,n,r){return mc(o)&&!n&&!e&&(t||r)}function xc(o,t,e){return qh(o)&&!t&&!e}function Ec(o,t,e){return Yh(o)&&!t&&!e}function Tc(o,t,e,n){return o||t||e||n}function Cc(o){return o===" "}function Tr(o,t){return Ue?o:t}function bc(o){return o==="Enter"}function _n(o){return o==="Backspace"}function _c(o){return o==="Escape"}function yn(o){return o==="Delete"}function cl(o,t,e){return o.toLowerCase()==="a"&&Tr(t,e)}function ul(){let o=H(),t=o.select(0,o.getChildrenSize());Y(Po(t))}function xo(o,t){o.__lexicalClassNameCache===void 0&&(o.__lexicalClassNameCache={});let e=o.__lexicalClassNameCache,n=e[t];if(n!==void 0)return n;let r=o[t];if(typeof r=="string"){let i=wt(r);return e[t]=i,i}return r}function pi(o,t,e,n,r){if(e.size===0)return;let i=n.__type,s=n.__key,l=t.get(i);l===void 0&&E(!1,"Type %s not in registeredNodes",i);let a=l.klass,d=o.get(a);d===void 0&&(d=new Map,o.set(a,d));let u=d.get(s),m=u==="destroyed"&&r==="created";(u===void 0||m)&&d.set(s,m?"updated":r)}function Fd(o,t,e){let n=o.getParent(),r=e,i=o;return n!==null&&(t&&e===0?(r=i.getIndexWithinParent(),i=n):!t&&e===i.getChildrenSize()&&(r=i.getIndexWithinParent()+1,i=n)),i.getChildAtIndex(t?r-1:r)}function Jt(o,t){let e=o.offset;if(o.type==="element"){let n=o.getNode();return Fd(n,t,e)}else{let n=o.getNode();if(t&&e===0||!t&&e===n.getTextContentSize()){let r=t?n.getPreviousSibling():n.getNextSibling();return r===null?Fd(n.getParentOrThrow(),t,n.getIndexWithinParent()+(t?0:1)):r}}return null}function di(o){let t=bn(o).event,e=t&&t.inputType;return e==="insertFromPaste"||e==="insertFromPasteAsQuotation"}function O(o,t,e){return gl(o,t,e)}function Cr(o){return!ne(o)&&!o.isLastChild()&&!o.isInline()}function vn(o,t){let e=o._keyToDOMMap.get(t);return e===void 0&&E(!1,"Reconciliation: could not find DOM element for node key %s",t),e}function gi(o){let t=o.assignedSlot||o.parentElement;return t!==null&&t.nodeType===11?t.host:t}function yc(o,t,e){let n=e.ownerDocument,r=n.defaultView;if(r===null)return;let{top:i,bottom:s}=t,l=0,a=0,d=e;for(;d!==null;){let u=d===n.body;if(u)l=0,a=bn(o).innerHeight;else{let c=d.getBoundingClientRect();l=c.top,a=c.bottom}let m=0;if(ia&&(m=s-a),m!==0)if(u)r.scrollBy(0,m);else{let c=d.scrollTop;d.scrollTop+=m;let f=d.scrollTop-c;i-=f,s-=f}if(u)break;d=gi(d)}}function Sc(o){let t=C();if(!_(t)||!T(o))return t;let{anchor:e,focus:n}=t,r=e.getNode(),i=n.getNode();return Sn(r,o)&&e.set(o.__key,0,"element"),Sn(i,o)&&n.set(o.__key,0,"element"),t}function Sn(o,t){let e=o.getParent();for(;e!==null;){if(e.is(t))return!0;e=e.getParent()}return!1}function Lc(o){let t=o.ownerDocument;return t&&t.defaultView||null}function bn(o){let t=o._window;return t===null&&E(!1,"window object not found"),t}function fl(o){let t=o.getParentOrThrow();for(;t!==null;){if(pe(t))return t;t=t.getParentOrThrow()}return t}var rC=Symbol.for("@lexical/ShadowRootNodeBrand");function pe(o){return ne(o)||T(o)&&o.isShadowRoot()}function re(o){let t=J(),e=o.constructor.getType(),n=t._nodes.get(e);n===void 0&&E(!1,'$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');let r=n.replace;if(r!==null){let i=r(o);return i instanceof o.constructor||E(!1,"$initializeNode failed. Ensure replacement node is a subclass of the original node."),i}return o}function hi(o,t){let e=o.getParent();ne(e)&&!T(t)&&!F(t)&&E(!1,"Only element or decorator nodes can be inserted in to the root node")}function Zh(o){let t=o.theme,e=document.createElement("div");e.contentEditable="false",e.setAttribute("data-lexical-cursor","true");let n=t.blockCursor;if(n!==void 0){if(typeof n=="string"){let r=wt(n);n=t.blockCursor=r}n!==void 0&&e.classList.add(...n)}return e}function il(o){return(F(o)||T(o)&&!o.canBeEmpty())&&!o.isInline()}function br(o,t,e){e.style.removeProperty("caret-color"),t._blockCursorElement=null;let n=o.parentElement;n!==null&&n.removeChild(o)}function Mc(o,t,e){let n=o._blockCursorElement;if(_(e)&&e.isCollapsed()&&e.anchor.type==="element"&&t.contains(document.activeElement)){let r=e.anchor,i=r.getNode(),s=r.offset,l=i.getChildrenSize(),a=!1,d=null;if(s===l){let u=i.getChildAtIndex(s-1);il(u)&&(a=!0)}else{let u=i.getChildAtIndex(s);if(il(u)){let m=u.getPreviousSibling();(m===null||il(m))&&(a=!0,d=o.getElementByKey(u.__key))}}if(a){let u=o.getElementByKey(i.__key);n===null&&(o._blockCursorElement=n=Zh(o._config)),t.style.caretColor="transparent",d===null?u.appendChild(n):u.insertBefore(n,d);return}}n!==null&&br(n,o,t)}function ye(o){return me?(o||window).getSelection():null}function Ni(o){return ge(o)&&o.tagName==="A"}function ge(o){return o.nodeType===1}function Ho(o){let t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return o.nodeName.match(t)!==null}function Eo(o){let t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return o.nodeName.match(t)!==null}function Ko(o){if(ne(o)||F(o)&&!o.isInline())return!0;if(!T(o)||pe(o))return!1;let t=o.getFirstChild(),e=t===null||Ae(t)||L(t)||t.isInline();return!o.isInline()&&o.canBeEmpty()!==!1&&e}function xi(o,t){let e=o;for(;e!==null&&e.getParent()!==null&&!t(e);)e=e.getParentOrThrow();return t(e)?e:null}function ml(){return J()}var Hd=new WeakMap,Vh=new Map;function wc(o){if(!o._readOnly&&o.isEmpty())return Vh;E(o._readOnly,"getCachedTypeToNodeMap called with a writable EditorState");let t=Hd.get(o);if(!t){t=new Map,Hd.set(o,t);for(let[e,n]of o._nodeMap){let r=n.__type,i=t.get(r);i||(i=new Map,t.set(r,i)),i.set(e,n)}}return t}function Qt(o){let t=o.constructor,e=t.clone(o);return e.afterCloneFrom(o),__DEV__&&(E(e.__key===o.__key,"$cloneWithProperties: %s.clone(node) (with type '%s') did not return a node with the same key, make sure to specify node.__key as the last argument to the constructor",t.name,t.getType()),E(e.__parent===o.__parent&&e.__next===o.__next&&e.__prev===o.__prev,"$cloneWithProperties: %s.clone(node) (with type '%s') overrided afterCloneFrom but did not call super.afterCloneFrom(prevNode)",t.name,t.getType())),e}function Dc(o,t){let e=o._decorators,r=o._pendingDecorators||e,i=t._nodeMap,s;for(s in r)i.has(s)||(r===e&&(r=ui(o)),delete r[s])}function Oc(o,t,e,n,r,i){let s=o.getFirstChild();for(;s!==null;){let l=s.__key;s.__parent===t&&(T(s)&&Oc(s,l,e,n,r,i),e.has(l)||i.delete(l),r.push(l)),s=s.getNextSibling()}}function Ac(o,t,e,n){let r=o._nodeMap,i=t._nodeMap,s=[];for(let[l]of n){let a=i.get(l);a!==void 0&&(a.isAttached()||(T(a)&&Oc(a,l,r,i,s,n),r.has(l)||n.delete(l),s.push(l)))}for(let l of s)i.delete(l);for(let l of e){let a=i.get(l);a!==void 0&&!a.isAttached()&&(r.has(l)||e.delete(l),i.delete(l))}}var ue="",To=null,mt="",to="",Dn,Se,yr,kc=!1,Ti=!1,Ci,Nl,xl,Uo,pt,El,Sr;function bi(o,t){let e=Uo.get(o);if(t!==null){let n=bl(o);n.parentNode===t&&t.removeChild(n)}if(pt.has(o)||Se._keyToDOMMap.delete(o),T(e)){let n=Ei(e,Uo);Tl(n,0,n.length-1,null)}e!==void 0&&pi(Sr,yr,Ci,e,"destroyed")}function Tl(o,t,e,n){let r=t;for(;r<=e;++r){let i=o[r];i!==void 0&&bi(i,n)}}function _i(o,t,e){let n=pt.get(o);n===void 0&&E(!1,"createNode: node does not exist in nodeMap");let r=n.createDOM(Dn,Se);if(tN(o,r,Se),L(n)?r.setAttribute("data-lexical-text","true"):F(n)&&r.setAttribute("data-lexical-decorator","true"),T(n)){let i=n.__size;if(i!==0){let s=i-1,l=Ei(n,pt);Cl(l,n,0,s,r,null)}n.isInline()||Ic(null,n,r),Cr(n)&&(ue+=Qe,to+=Qe)}else{let i=n.getTextContent();if(F(n)){let s=n.decorate(Se,Dn);s!==null&&$c(o,s),r.contentEditable="false"}ue+=i,to+=i}if(t!==null&&!n?.insertDOMIntoParent(r,t))if(e!=null)t.insertBefore(r,e);else{let s=t.__lexicalLineBreak;s!=null?t.insertBefore(r,s):t.appendChild(r)}return __DEV__&&Object.freeze(n),pi(Sr,yr,Ci,n,"created"),r}function Cl(o,t,e,n,r,i){let s=ue;ue="";let l=e;for(;l<=n;++l){_i(o[l],r,i);let a=pt.get(o[l]);a!==null&&L(a)&&(To===null&&(To=a.getFormat()),mt===""&&(mt=a.getStyle()))}Cr(t)&&(ue+=Qe),r.__lexicalTextContent=ue,ue=s+ue}function Rc(o,t){let e=t.get(o);return Ae(e)||F(e)&&e.isInline()}function Ic(o,t,e){let n=o!==null&&(o.__size===0||Rc(o.__last,Uo)),r=t.__size===0||Rc(t.__last,pt);if(n){if(!r){let i=e.__lexicalLineBreak;if(i!=null)try{e.removeChild(i)}catch(s){if(typeof s=="object"&&s!=null){let l=`${s.toString()} Parent: ${e.tagName}, child: ${i.tagName}.`;throw new Error(l)}else throw s}e.__lexicalLineBreak=null}}else if(r){let i=document.createElement("br");e.__lexicalLineBreak=i,e.appendChild(i)}}function Xh(o){Ze(o)&&To!=null&&!Ti&&o.setTextStyle(mt)}function jh(o){Ze(o)&&mt!==""&&mt!==o.__textStyle&&!Ti&&o.setTextStyle(mt)}function Gh(o,t,e){To=null,mt="",Jh(o,t,e),Xh(t),jh(t)}function Ei(o,t){let e=[],n=o.__first;for(;n!==null;){let r=t.get(n);r===void 0&&E(!1,"createChildrenArray: node does not exist in nodeMap"),e.push(n),n=r.__next}return e}function Jh(o,t,e){let n=ue,r=o.__size,i=t.__size;if(ue="",r===1&&i===1){let s=o.__first,l=t.__first;if(s===l)_r(s,e);else{let d=bl(s),u=_i(l,null,null);try{e.replaceChild(u,d)}catch(m){if(typeof m=="object"&&m!=null){let c=`${m.toString()} Parent: ${e.tagName}, new child: {tag: ${u.tagName} key: ${l}}, old child: {tag: ${d.tagName}, key: ${s}}.`;throw new Error(c)}else throw m}bi(s,null)}let a=pt.get(l);L(a)&&(To===null&&(To=a.getFormat()),mt===""&&(mt=a.getStyle()))}else{let s=Ei(o,Uo),l=Ei(t,pt);if(r===0)i!==0&&Cl(l,t,0,i-1,e,null);else if(i===0){if(r!==0){let d=e.__lexicalLineBreak==null;Tl(s,0,r-1,d?null:e),d&&(e.textContent="")}}else eN(t,s,l,r,i,e)}Cr(t)&&(ue+=Qe),e.__lexicalTextContent=ue,ue=n+ue}function _r(o,t){let e=Uo.get(o),n=pt.get(o);(e===void 0||n===void 0)&&E(!1,"reconcileNode: prevNode or nextNode does not exist in nodeMap");let r=kc||xl.has(o)||Nl.has(o),i=vn(Se,o);if(e===n&&!r){if(T(e)){let s=i.__lexicalTextContent;s!==void 0&&(ue+=s,to+=s)}else{let s=e.getTextContent();to+=s,ue+=s}return i}if(e!==n&&r&&pi(Sr,yr,Ci,n,"updated"),n.updateDOM(e,i,Dn)){let s=_i(o,null,null);return t===null&&E(!1,"reconcileNode: parentDOM is null"),t.replaceChild(s,i),bi(o,null),s}if(T(e)&&T(n))r&&(Gh(e,n,i),!ne(n)&&!n.isInline()&&Ic(e,n,i)),Cr(n)&&(ue+=Qe,to+=Qe);else{let s=n.getTextContent();if(F(n)){let l=n.decorate(Se,Dn);l!==null&&$c(o,l)}ue+=s,to+=s}if(!Ti&&ne(n)&&n.__cachedText!==to){let s=n.getWritable();s.__cachedText=to,n=s}return __DEV__&&Object.freeze(n),i}function $c(o,t){let e=Se._pendingDecorators,n=Se._decorators;if(e===null){if(n[o]===t)return;e=ui(Se)}e[o]=t}function Qh(o){return o.firstChild}function hl(o){let t=o.nextSibling;return t!==null&&t===Se._blockCursorElement&&(t=t.nextSibling),t}function eN(o,t,e,n,r,i){let s=n-1,l=r-1,a,d,u=Qh(i),m=0,c=0;for(;m<=s&&c<=l;){let h=t[m],N=e[c];if(h===N)u=hl(_r(N,i)),m++,c++;else{a===void 0&&(a=new Set(t)),d===void 0&&(d=new Set(e));let x=d.has(h),S=a.has(N);if(!x)u=hl(bl(h)),bi(h,i),m++;else if(!S)_i(N,i,u),c++;else{let v=vn(Se,N);v===u?u=hl(_r(N,i)):(u!=null?i.insertBefore(v,u):i.appendChild(v),_r(N,i)),m++,c++}}let b=pt.get(N);b!==null&&L(b)&&(To===null&&(To=b.getFormat()),mt===""&&(mt=b.getStyle()))}let f=m>s,g=c>l;if(f&&!g){let h=e[l+1],N=h===void 0?null:Se.getElementByKey(h);Cl(e,o,c,l,i,N)}else g&&!f&&Tl(t,m,s,i)}function Pc(o,t,e,n,r,i){ue="",to="",kc=n===Xt,Se=e,Dn=e._config,yr=e._nodes,Ci=Se._listeners.mutation,Nl=r,xl=i,Uo=o._nodeMap,pt=t._nodeMap,Ti=t._readOnly,El=new Map(e._keyToDOMMap);let s=new Map;return Sr=s,_r("root",null),Se=void 0,yr=void 0,Nl=void 0,xl=void 0,Uo=void 0,pt=void 0,Dn=void 0,El=void 0,Sr=void 0,s}function tN(o,t,e){let n=e._keyToDOMMap;t["__lexicalKey_"+e._key]=o,n.set(o,t)}function bl(o){let t=El.get(o);return t===void 0&&E(!1,"Reconciliation: could not find DOM element for node key %s",o),t}var oo=Object.freeze({}),Ml=30,_l=[["keydown",cN],["pointerdown",nN],["compositionstart",aN],["compositionend",dN],["input",lN],["click",oN],["cut",oo],["copy",oo],["dragstart",oo],["dragover",oo],["dragend",oo],["paste",oo],["focus",oo],["blur",oo],["drop",oo]];ho&&_l.push(["beforeinput",(o,t)=>sN(o,t)]);var wr=0,Uc=null,zc=0,On=null,yi=new WeakMap,yl=!1,Sl=!1,Mr=!1,Lr=!1,Wc=[0,"",0,"root",0];function qc(o,t,e,n,r){let i=o.anchor,s=o.focus,l=i.getNode(),a=J(),d=ye(a._window),u=d!==null?d.anchorNode:null,m=i.key,c=a.getElementByKey(m),f=e.length;return m!==s.key||!L(l)||(!r&&(!ho||zc1||(r||!ho)&&c!==null&&!l.isComposing()&&u!==wn(c)||d!==null&&t!==null&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||l.getFormat()!==o.format||l.getStyle()!==o.style||Vd(o,l)}function Bc(o,t){return o!==null&&o.nodeValue!==null&&o.nodeType===We&&t!==0&&t!==o.nodeValue.length}function Fc(o,t,e){let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=o;yl&&(yl=!1,Bc(n,r)&&Bc(i,s))||Ee(t,()=>{if(!e){Y(null);return}if(!jt(t,n,i))return;let l=C();if(_(l)){let a=l.anchor,d=a.getNode();if(l.isCollapsed()){o.type==="Range"&&o.anchorNode===o.focusNode&&(l.dirty=!0);let u=bn(t).event,m=u?u.timeStamp:performance.now(),[c,f,g,h,N]=Wc,b=H(),x=t.isComposing()===!1&&b.getTextContent()==="";if(m{let e=C(),n=ye(t._window),r=Ye();if(n){if(_(e)){let i=e.anchor,s=i.getNode();if(i.type==="element"&&i.offset===0&&e.isCollapsed()&&!ne(s)&&H().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&r!==null&&e.is(r))n.removeAllRanges(),e.dirty=!0;else if(o.detail===3&&!e.isCollapsed()){let a=e.focus.getNode();s!==a&&(T(s)?s.select(0):s.getParentOrThrow().select(0))}}else if(o.pointerType==="touch"){let i=n.anchorNode;if(i!==null){let s=i.nodeType;if(s===No||s===We){let l=vr(r,n,t,o);Y(l)}}}}O(t,Ht,o)})}function nN(o,t){let e=o.target,n=o.pointerType;e instanceof Node&&n!=="touch"&&Ee(t,()=>{zd(e)||(Sl=!0)})}function Yc(o){if(!o.getTargetRanges)return null;let t=o.getTargetRanges();return t.length===0?null:t[0]}function rN(o,t){return o!==t||T(o)||T(t)||!o.isToken()||!t.isToken()}function iN(o){return Uc==="MediaLast"&&o{let r=C();if(e==="deleteContentBackward"){if(r===null){let u=Ye();if(!_(u))return;Y(u.clone())}if(_(r)){let u=r.anchor.key===r.focus.key;if(iN(o.timeStamp)&&t.isComposing()&&u){if(le(null),wr=0,setTimeout(()=>{Ee(t,()=>{le(null)})},Ml),_(r)){let m=r.anchor.getNode();m.markDirty(),E(L(m),"Anchor node must be a TextNode"),r.style=m.getStyle()}}else{le(null),o.preventDefault();let m=r.anchor.getNode().getTextContent(),c=r.anchor.offset===0&&r.focus.offset===m.length;js&&u&&!c||O(t,Je,!0)}return}}if(!_(r))return;let i=o.data;On!==null&&mi(!1,t,On),(!r.dirty||On!==null)&&r.isCollapsed()&&!ne(r.anchor.getNode())&&n!==null&&r.applyDOMRange(n),On=null;let s=r.anchor,l=r.focus,a=s.getNode(),d=l.getNode();if(e==="insertText"||e==="insertTranspose"){if(i===`
-`)o.preventDefault(),O(t,Kt,!1);else if(i===Qe)o.preventDefault(),O(t,Ut,void 0);else if(i==null&&o.dataTransfer){let u=o.dataTransfer.getData("text/plain");o.preventDefault(),r.insertRawText(u)}else i!=null&&qc(r,n,i,o.timeStamp,!0)?(o.preventDefault(),O(t,ct,i)):On=i;zc=o.timeStamp;return}switch(o.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{O(t,ct,o);break}case"insertFromComposition":{le(null),O(t,ct,o);break}case"insertLineBreak":{le(null),O(t,Kt,!1);break}case"insertParagraph":{le(null),Mr&&!Lt?(Mr=!1,O(t,Kt,!1)):O(t,Ut,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{O(t,ao,o);break}case"deleteByComposition":{rN(a,d)&&O(t,hn,o);break}case"deleteByDrag":case"deleteByCut":{O(t,hn,o);break}case"deleteContent":{O(t,Je,!1);break}case"deleteWordBackward":{O(t,St,!0);break}case"deleteWordForward":{O(t,St,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{O(t,ut,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{O(t,ut,!1);break}case"formatStrikeThrough":{O(t,xe,"strikethrough");break}case"formatBold":{O(t,xe,"bold");break}case"formatItalic":{O(t,xe,"italic");break}case"formatUnderline":{O(t,xe,"underline");break}case"historyUndo":{O(t,co,void 0);break}case"historyRedo":{O(t,uo,void 0);break}default:}})}function lN(o,t){o.stopPropagation(),Ee(t,()=>{let e=C(),n=o.data,r=Yc(o);if(n!=null&&_(e)&&qc(e,r,n,o.timeStamp,!1)){Lr&&(Ll(t,n),Lr=!1);let s=e.anchor.getNode(),l=ye(t._window);if(l===null)return;let a=e.isBackward(),d=a?e.anchor.offset:e.focus.offset,u=a?e.focus.offset:e.anchor.offset;(!ho||e.isCollapsed()||!L(s)||l.anchorNode===null||s.getTextContent().slice(0,d)+n+s.getTextContent().slice(d+u)!==dl(l.anchorNode))&&O(t,ct,n);let m=n.length;ze&&m>1&&o.inputType==="insertCompositionText"&&!t.isComposing()&&(e.anchor.offset-=m),!Zt&&!Lt&&!Vt&&t.isComposing()&&(wr=0,le(null))}else mi(!1,t,n!==null?n:void 0),Lr&&(Ll(t,n||void 0),Lr=!1);Zd()}),On=null}function aN(o,t){Ee(t,()=>{let e=C();if(_(e)&&!t.isComposing()){let n=e.anchor,r=e.anchor.getNode();le(n.key),(o.timeStamp{Ll(t,o.data)})}function cN(o,t){if(wr=o.timeStamp,Uc=o.key,t.isComposing())return;let{key:e,shiftKey:n,ctrlKey:r,metaKey:i,altKey:s}=o;if(!O(t,Hs,o)&&e!=null){if(hc(e,r,s,i))O(t,Ao,o);else if(Nc(e,r,n,s,i))O(t,Ks,o);else if(pc(e,r,s,i))O(t,Ro,o);else if(gc(e,r,n,s,i))O(t,Us,o);else if(xc(e,r,i))O(t,zt,o);else if(Ec(e,r,i))O(t,Wt,o);else if(ec(e,n))Mr=!0,O(t,Ke,o);else if(Cc(e))O(t,ir,o);else if(tc(e,r))o.preventDefault(),Mr=!0,O(t,Kt,!0);else if(Qd(e,n))Mr=!1,O(t,Ke,o);else if(sc(e,s,i,r))_n(e)?O(t,qt,o):(o.preventDefault(),O(t,Je,!0));else if(_c(e))O(t,ko,o);else if(lc(e,r,n,s,i))yn(e)?O(t,Yt,o):(o.preventDefault(),O(t,Je,!1));else if(oc(e,s,r))o.preventDefault(),O(t,St,!0);else if(nc(e,s,r))o.preventDefault(),O(t,St,!1);else if(rc(e,i))o.preventDefault(),O(t,ut,!0);else if(ic(e,i))o.preventDefault(),O(t,ut,!1);else if(jd(e,s,i,r))o.preventDefault(),O(t,xe,"bold");else if(Jd(e,s,i,r))o.preventDefault(),O(t,xe,"underline");else if(Gd(e,s,i,r))o.preventDefault(),O(t,xe,"italic");else if(Xd(e,s,r,i))O(t,Io,o);else if(ac(e,n,i,r))o.preventDefault(),O(t,co,void 0);else if(dc(e,n,i,r))o.preventDefault(),O(t,uo,void 0);else{let l=t._editorState._selection;Le(l)?cc(e,n,i,r)?(o.preventDefault(),O(t,fo,o)):uc(e,n,i,r)?(o.preventDefault(),O(t,mo,o)):cl(e,i,r)&&(o.preventDefault(),O(t,Nn,o)):!ze&&cl(e,i,r)&&(o.preventDefault(),O(t,Nn,o))}Tc(r,n,s,i)&&O(t,Vs,o)}}function Zc(o){let t=o.__lexicalEventHandles;return t===void 0&&(t=[],o.__lexicalEventHandles=t),t}var An=new Map;function Vc(o){let t=o.target,e=t==null?null:t.nodeType===9?t.defaultView:t.ownerDocument.defaultView,n=ye(e);if(n===null)return;let r=ci(n.anchorNode);if(r===null)return;Sl&&(Sl=!1,Ee(r,()=>{let u=Ye(),m=n.anchorNode;if(m===null)return;let c=m.nodeType;if(c!==No&&c!==We)return;let f=vr(u,n,r,o);Y(f)}));let i=Er(r),s=i[i.length-1],l=s._key,a=An.get(l),d=a||s;d!==r&&Fc(n,d,!1),Fc(n,r,!0),r!==s?An.set(l,r):a&&An.delete(l)}function Hc(o){o._lexicalHandled=!0}function Kc(o){return o._lexicalHandled===!0}function Xc(o,t){let e=o.ownerDocument,n=yi.get(e);(n===void 0||n<1)&&e.addEventListener("selectionchange",Vc),yi.set(e,(n||0)+1),o.__lexicalEditor=t;let r=Zc(o);for(let i=0;i<_l.length;i++){let[s,l]=_l[i],a=typeof l=="function"?d=>{Kc(d)||(Hc(d),(t.isEditable()||s==="click")&&l(d,t))}:d=>{if(Kc(d))return;Hc(d);let u=t.isEditable();switch(s){case"cut":return u&&O(t,mo,d);case"copy":return O(t,fo,d);case"paste":return u&&O(t,ao,d);case"dragstart":return u&&O(t,sr,d);case"dragover":return u&&O(t,lr,d);case"dragend":return u&&O(t,Ws,d);case"focus":return u&&O(t,ar,d);case"blur":return u&&O(t,Zs,d);case"drop":return u&&O(t,$o,d)}};o.addEventListener(s,a),r.push(()=>{o.removeEventListener(s,a)})}}function jc(o){let t=o.ownerDocument,e=yi.get(t);E(e!==void 0,"Root element not registered");let n=e-1;E(n>=0,"Root element count less than 0"),yi.set(t,n),n===0&&t.removeEventListener("selectionchange",Vc);let r=Bo(o);Mn(r)?(uN(r),o.__lexicalEditor=null):r&&E(!1,"Attempted to remove event handlers from a node that does not belong to this build of Lexical");let i=Zc(o);for(let s=0;si.__key===this.__key);if(L(this))return n;if(_(e)&&e.anchor.type==="element"&&e.focus.type==="element"){if(e.isCollapsed())return!1;let i=this.getParent();if(F(this)&&this.isInline()&&i){let s=e.isBackward()?e.focus:e.anchor,l=s.getNode();if(s.offset===l.getChildrenSize()&&l.is(i)&&l.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let t=this.getParent();if(t===null)return-1;let e=t.getFirstChild(),n=0;for(;e!==null;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){let t=this.getLatest().__parent;return t===null?null:Q(t)}getParentOrThrow(){let t=this.getParent();return t===null&&E(!1,"Expected node %s to have a parent.",this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){let e=t.getParent();if(pe(e))return E(T(t)||t===this&&F(t),"Children of root nodes must be elements or decorators"),t;t=e}return null}getTopLevelElementOrThrow(){let t=this.getTopLevelElement();return t===null&&E(!1,"Expected node %s to have a top parent element.",this.__key),t}getParents(){let t=[],e=this.getParent();for(;e!==null;)t.push(e),e=e.getParent();return t}getParentKeys(){let t=[],e=this.getParent();for(;e!==null;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:Q(e)}getPreviousSiblings(){let t=[],e=this.getParent();if(e===null)return t;let n=e.getFirstChild();for(;n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){let e=this.getLatest().__next;return e===null?null:Q(e)}getNextSiblings(){let t=[],e=this.getNextSibling();for(;e!==null;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){let e=this.getParents(),n=t.getParents();T(this)&&e.unshift(this),T(t)&&n.unshift(t);let r=e.length,i=n.length;if(r===0||i===0||e[r-1]!==n[i-1])return null;let s=new Set(n);for(let l=0;l{l.append(h)})),_(n)){Y(n);let h=n.anchor,N=n.focus;h.key===i&&vl(h,l),N.key===i&&vl(N,l)}return et()===i&&le(s),l}insertAfter(t,e=!0){ce(),hi(this,t);let n=this.getWritable(),r=t.getWritable(),i=r.getParent(),s=C(),l=!1,a=!1;if(i!==null){let f=t.getIndexWithinParent();if(Gt(r),_(s)){let g=i.__key,h=s.anchor,N=s.focus;l=h.type==="element"&&h.key===g&&h.offset===f+1,a=N.type==="element"&&N.key===g&&N.offset===f+1}}let d=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),m=r.__key,c=n.__next;if(d===null)u.__last=m;else{let f=d.getWritable();f.__prev=m}if(u.__size++,n.__next=m,r.__next=c,r.__prev=n.__key,r.__parent=n.__parent,e&&_(s)){let f=this.getIndexWithinParent();Rn(s,u,f+1);let g=u.__key;l&&s.anchor.set(g,f+2,"element"),a&&s.focus.set(g,f+2,"element")}return t}insertBefore(t,e=!0){ce(),hi(this,t);let n=this.getWritable(),r=t.getWritable(),i=r.__key;Gt(r);let s=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=n.__prev,d=this.getIndexWithinParent();if(s===null)l.__first=i;else{let m=s.getWritable();m.__next=i}l.__size++,n.__prev=i,r.__prev=a,r.__next=n.__key,r.__parent=n.__parent;let u=C();if(e&&_(u)){let m=this.getParentOrThrow();Rn(u,m,d)}return t}isParentRequired(){return!1}createParentElementNode(){return I()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){ce();let n=this.getPreviousSibling(),r=this.getParentOrThrow();if(n===null)return r.select(0,0);if(T(n))return n.select();if(!L(n)){let i=n.getIndexWithinParent()+1;return r.select(i,i)}return n.select(t,e)}selectNext(t,e){ce();let n=this.getNextSibling(),r=this.getParentOrThrow();if(n===null)return r.select();if(T(n))return n.select(0,0);if(!L(n)){let i=n.getIndexWithinParent();return r.select(i,i)}return n.select(t,e)}markDirty(){this.getWritable()}insertDOMIntoParent(t,e){return!1}};p(gt,"importDOM");function fN(o,t){let e=J()._nodes.get(o);e===void 0&&E(!1,"Create node: Attempted to create node %s that was not configured to be used on the editor.",t.name);let n=e.klass;n!==t&&E(!1,"Create node: Type %s in node %s does not match registered node %s with the same type",o,t.name,n.name)}function Qc(o,t,e){let n=e||t.getParentOrThrow().getLastChild(),r=t,i=[t];for(;r!==n;)r.getNextSibling()||E(!1,"insertRangeAfter: lastToInsert must be a later sibling of firstToInsert"),r=r.getNextSibling(),i.push(r);let s=o;for(let l of i)s=s.insertAfter(l)}var zo=class o extends gt{static getType(){return"linebreak"}static clone(t){return new o(t.__key)}constructor(t){super(t)}getTextContent(){return`
-`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>pN(t)||gN(t)?null:{conversion:mN,priority:0}}}static importJSON(t){return ht()}exportJSON(){return{type:"linebreak",version:1}}};function mN(o){return{node:ht()}}function ht(){return re(new zo)}function Ae(o){return o instanceof zo}function pN(o){let t=o.parentElement;if(t!==null&&Eo(t)){let e=t.firstChild;if(e===o||e.nextSibling===o&&Si(e)){let n=t.lastChild;if(n===o||n.previousSibling===o&&Si(n))return!0}}return!1}function gN(o){let t=o.parentElement;if(t!==null&&Eo(t)){let e=t.firstChild;if(e===o||e.nextSibling===o&&Si(e))return!1;let n=t.lastChild;if(n===o||n.previousSibling===o&&Si(n))return!0}return!1}function Si(o){return o.nodeType===We&&/^( |\t|\r?\n)+$/.test(o.textContent||"")}function Dl(o,t){return t&ur?"code":t&pr?"mark":t&fr?"sub":t&mr?"sup":null}function Ol(o,t){return t&dr?"strong":t&cr?"em":"span"}function nu(o,t,e,n,r){let i=n.classList,s=xo(r,"base");s!==void 0&&i.add(...s),s=xo(r,"underlineStrikethrough");let l=!1,a=t&En&&t&xn,d=e&En&&e&xn;s!==void 0&&(d?(l=!0,a||i.add(...s)):a&&i.remove(...s));for(let u in Oe){let c=Oe[u];if(s=xo(r,u),s!==void 0)if(e&c){if(l&&(u==="underline"||u==="strikethrough")){t&c&&i.remove(...s);continue}((t&c)===0||a&&u==="underline"||u==="strikethrough")&&i.add(...s)}else t&c&&i.remove(...s)}}function hN(o,t){let e=o.length,n=t.length,r=0,i=0;for(;r({conversion:CN,priority:0}),b:()=>({conversion:xN,priority:0}),code:()=>({conversion:Co,priority:0}),em:()=>({conversion:Co,priority:0}),i:()=>({conversion:Co,priority:0}),s:()=>({conversion:Co,priority:0}),span:()=>({conversion:NN,priority:0}),strong:()=>({conversion:Co,priority:0}),sub:()=>({conversion:Co,priority:0}),sup:()=>({conversion:Co,priority:0}),u:()=>({conversion:Co,priority:0})}}static importJSON(e){let n=q(e.text);return n.setFormat(e.format),n.setDetail(e.detail),n.setMode(e.mode),n.setStyle(e.style),n}exportDOM(e){let{element:n}=super.exportDOM(e),r=(n?.nodeName||"").toLowerCase();E(n!==null&&ge(n),"Expected TextNode createDOM to always return a HTMLElement");let i=this.getTextContent();/^\s|\s$/.test(i)&&(n.style.whiteSpace="pre-wrap");for(let s of Array.from(n.classList.values()))s.startsWith("editor-theme-")&&n.classList.remove(s);return n.classList.length===0&&n.removeAttribute("class"),n.nodeName==="SPAN"&&!n.getAttribute("style")&&(n=document.createTextNode(i)),this.hasFormat("bold")&&r!=="strong"&&(n=Li(n,"strong")),this.hasFormat("italic")&&(n=Li(n,"em")),this.hasFormat("strikethrough")&&(n=Li(n,"s")),this.hasFormat("underline")&&(n=Li(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,n){}setFormat(e){let n=this.getWritable();return n.__format=typeof e=="string"?Oe[e]:e,n}setDetail(e){let n=this.getWritable();return n.__detail=typeof e=="string"?Od[e]:e,n}setStyle(e){let n=this.getWritable();return n.__style=e,n}toggleFormat(e){let n=this.getFormat(),r=Nr(n,e,null);return this.setFormat(r)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=si,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=Tn,e}setMode(e){let n=Ad[e];if(this.__mode===n)return this;let r=this.getWritable();return r.__mode=n,r}setTextContent(e){if(this.__text===e)return this;let n=this.getWritable();return n.__text=e,n}select(e,n){ce();let r=e,i=n,s=C(),l=this.getTextContent(),a=this.__key;if(typeof l=="string"){let d=l.length;r===void 0&&(r=d),i===void 0&&(i=d)}else r=0,i=0;if(_(s)){let d=et();(d===s.anchor.key||d===s.focus.key)&&le(a),s.setTextNodeRange(this,r,this,i)}else return Mi(a,r,a,i,"text","text");return s}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,r,i){let s=this.getWritable(),l=s.__text,a=r.length,d=e;d<0&&(d=a+d,d<0&&(d=0));let u=C();if(i&&_(u)){let c=e+a;u.setTextNodeRange(s,c,s,c)}let m=l.slice(0,d)+r+l.slice(d+n);return s.__text=m,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){ce();let n=this.getLatest(),r=n.getTextContent(),i=n.__key,s=et(),l=new Set(e),a=[],d=r.length,u="";for(let R=0;RM&&se.offset<=j&&(se.key=k,se.offset-=M,S.dirty=!0),Fe.key===i&&Fe.type==="text"&&Fe.offset>M&&Fe.offset<=j&&(Fe.key=k,Fe.offset-=M,S.dirty=!0)}s===i&&le(k),M=j,v.push(B)}if(f!==null){qd(this);let R=f.getWritable(),A=this.getIndexWithinParent();x?(R.splice(A,0,v),this.remove()):R.splice(A,1,v),_(S)&&Rn(S,f,A,m-1)}return v}mergeWithSibling(e){let n=e===this.getPreviousSibling();!n&&e!==this.getNextSibling()&&E(!1,"mergeWithSibling: sibling must be a previous or next sibling");let r=this.__key,i=e.__key,s=this.__text,l=s.length;et()===i&&le(r);let d=C();if(_(d)){let f=d.anchor,g=d.focus;f!==null&&f.key===i&&(Al(f,n,r,e,l),d.dirty=!0),g!==null&&g.key===i&&(Al(g,n,r,e,l),d.dirty=!0)}let u=e.__text,m=n?u+s:s+u;this.setTextContent(m);let c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}};function NN(o){let e=o.style;return{forChild:Rl(e),node:null}}function xN(o){let t=o,e=t.style.fontWeight==="normal";return{forChild:Rl(t.style,e?void 0:"bold"),node:null}}var tu=new WeakMap;function EN(o){return o.nodeName==="PRE"||o.nodeType===No&&o.style!==void 0&&o.style.whiteSpace!==void 0&&o.style.whiteSpace.startsWith("pre")}function TN(o){let t,e=o.parentNode,n=[o];for(;e!==null&&(t=tu.get(e))===void 0&&!EN(e);)n.push(e),e=e.parentNode;let r=t===void 0?e:t;for(let i=0;i{let t=C();return t!==null?t.clone():null})}function Fh(o,t,e){let n=Le(e._window),r=null,i=null;n!==null&&n.anchorNode===o&&(r=n.anchorOffset,i=n.focusOffset);let s=o.nodeValue;s!==null&&gr(t,s,r,i,!1)}function Hh(o,t,e){return t.nodeType===qe&&e.isAttached()}function Pd(o,t,e){tl=!0;let n=performance.now()-ol>Ih;try{Te(o,()=>{let r=C()||Bh(o),i=new Map,s=o.getRootElement(),l=o._editorState,a=o._blockCursorElement,d=!1,u="";for(let c=0;c0){let v=0;for(let M=0;M0)for(let[c,f]of i)if(E(f)){let g=f.getChildrenKeys(),h=c.firstChild;for(let N=0;N0){for(let c=0;c{Pd(o,t,e)})}function Bd(o,t){let e=o.__mode,n=o.__format,r=o.__style,i=t.__mode,s=t.__format,l=t.__style;return(e===null||e===i)&&(n===null||n===s)&&(r===null||r===l)}function Fd(o,t){let e=o.mergeWithSibling(t),n=Q()._normalizedNodes;return n.add(o.__key),n.add(t.__key),e}function il(o){let t=o;if(t.__text===""&&t.isSimpleText()&&!t.isUnmergeable()){t.remove();return}let e;for(;(e=t.getPreviousSibling())!==null&&L(e)&&e.isSimpleText()&&!e.isUnmergeable();)if(e.__text==="")e.remove();else if(Bd(e,t)){t=Fd(e,t);break}else break;let n;for(;(n=t.getNextSibling())!==null&&L(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else if(Bd(t,n)){t=Fd(t,n);break}else break}function Bo(o){return Hd(o.anchor),Hd(o.focus),o}function Hd(o){for(;o.type==="element";){let t=o.getNode(),e=o.offset,n,r;if(e===t.getChildrenSize()?(n=t.getChildAtIndex(e-1),r=!0):(n=t.getChildAtIndex(e),r=!1),L(n)){o.set(n.__key,r?n.getTextContentSize():0,"text");break}else if(!E(n))break;o.set(n.__key,r?n.getChildrenSize():0,"element")}}var Kh=1;function Uh(){return""+Kh++}function zd(o,t){let e=o._nodes.get(t);return e===void 0&&T(!1,"registeredNode: Type %s not found",t),e}var dC=Array.isArray,Wd=typeof queueMicrotask=="function"?queueMicrotask:o=>{Promise.resolve().then(o)};function qd(o){return F(G(o))}function Ln(o){let t=document.activeElement;if(t===null)return!1;let e=t.nodeName;return F(G(o))&&(e==="INPUT"||e==="TEXTAREA"||t.contentEditable==="true"&&Fo(t)==null)}function jt(o,t,e){let n=o.getRootElement();try{return n!==null&&n.contains(t)&&n.contains(e)&&t!==null&&!Ln(t)&&ci(t)===o}catch{return!1}}function Mn(o){return o instanceof eo}function ci(o){let t=o;for(;t!=null;){let e=Fo(t);if(Mn(e))return e;t=gi(t)}return null}function Fo(o){return o?o.__lexicalEditor:null}function Ye(o){return o.isToken()||o.isSegmented()}function zh(o){return o.nodeType===qe}function wn(o){let t=o;for(;t!=null;){if(zh(t))return t;t=t.firstChild}return null}function Nr(o,t,e){let n=Re[t];if(e!==null&&(o&n)===(e&n))return o;let r=o^n;return t==="subscript"?r&=~Re.superscript:t==="superscript"&&(r&=~Re.subscript),r}function xr(o){return L(o)||ke(o)||F(o)}function Yd(o,t){if(t!=null){__DEV__&&Wh(o,t),o.__key=t;return}ue(),gl();let e=Q(),n=tt(),r=Uh();n._nodeMap.set(r,o),E(o)?e._dirtyElements.set(r,!0):e._dirtyLeaves.add(r),e._cloneNotNeeded.add(r),e._dirtyType=Js,o.__key=r}function Wh(o,t){let e=Oc();if(!e)return;let n=e._nodeMap.get(t);n&&n.constructor!==o.constructor&&(o.constructor.name!==n.constructor.name?T(!1,"Lexical node with constructor %s attempted to re-use key from node in active editor state with constructor %s. Keys must not be re-used when the type is changed.",o.constructor.name,n.constructor.name):T(!1,"Lexical node with constructor %s attempted to re-use key from node in active editor state with different constructor with the same name (possibly due to invalid Hot Module Replacement). Keys must not be re-used when the type is changed.",o.constructor.name))}function qh(o,t,e){let n=o;for(;n!==null;){if(e.has(n))return;let r=t.get(n);if(r===void 0)break;e.set(n,!1),n=r.__parent}}function Gt(o){let t=o.getParent();if(t!==null){let e=o.getWritable(),n=t.getWritable(),r=o.getPreviousSibling(),i=o.getNextSibling();if(r===null)if(i!==null){let s=i.getWritable();n.__first=i.__key,s.__prev=null}else n.__first=null;else{let s=r.getWritable();if(i!==null){let l=i.getWritable();l.__prev=s.__key,s.__next=l.__key}else s.__next=null;e.__prev=null}if(i===null)if(r!==null){let s=r.getWritable();n.__last=r.__key,s.__next=null}else n.__last=null;else{let s=i.getWritable();if(r!==null){let l=r.getWritable();l.__next=s.__key,s.__prev=l.__key}else s.__prev=null;e.__next=null}n.__size--,e.__parent=null}}function hr(o){gl();let t=o.getLatest(),e=t.__parent,n=tt(),r=Q(),i=n._nodeMap,s=r._dirtyElements;e!==null&&qh(e,i,s);let l=t.__key;r._dirtyType=Js,E(o)?s.set(l,!0):r._dirtyLeaves.add(l)}function Zd(o){let t=o.getPreviousSibling(),e=o.getNextSibling();t!==null&&hr(t),e!==null&&hr(e)}function le(o){ue();let t=Q(),e=t._compositionKey;if(o!==e){if(t._compositionKey=o,e!==null){let n=ee(e);n!==null&&n.getWritable()}if(o!==null){let n=ee(o);n!==null&&n.getWritable()}}}function et(){return ft()?null:Q()._compositionKey}function ee(o,t){let n=(t||tt())._nodeMap.get(o);return n===void 0?null:n}function nl(o,t){let e=Q(),n=o[`__lexicalKey_${e._key}`];return n!==void 0?ee(n,t):null}function G(o,t){let e=o;for(;e!=null;){let n=nl(e,t);if(n!==null)return n;e=gi(e)}return null}function ui(o){let t=o._decorators,e=Object.assign({},t);return o._pendingDecorators=e,e}function ll(o){return o.read(()=>H().getTextContent())}function Vd(o,t){Te(o,()=>{let e=tt();if(e.isEmpty())return;if(t==="root"){H().markDirty();return}let n=e._nodeMap;for(let[,r]of n)r.markDirty()},o._pendingEditorState===null?{tag:"history-merge"}:void 0)}function H(){return rl(tt())}function rl(o){return o._nodeMap.get("root")}function Y(o){ue();let t=tt();o!==null&&(__DEV__&&Object.isFrozen(o)&&T(!1,"$setSelection called on frozen selection object. Ensure selection is cloned before passing in."),o.dirty=!0,o.setCachedNodes(null)),t._selection=o}function Xd(){ue();let o=Q();li(o)}function Ho(o){let t=Q(),e=Yh(o,t);if(e===null){let n=t.getRootElement();return o===n?ee("root"):null}return ee(e)}function al(o,t){return t?o.getTextContentSize():0}function Yh(o,t){let e=o;for(;e!=null;){let n=e[`__lexicalKey_${t._key}`];if(n!==void 0)return n;e=gi(e)}return null}function fi(o){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(o)}function Er(o){let t=[],e=o;for(;e!==null;)t.push(e),e=e._parentEditor;return t}function dl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function cl(o){return o.nodeType===qe?o.nodeValue:null}function mi(o,t,e){let n=Le(t._window);if(n===null)return;let r=n.anchorNode,{anchorOffset:i,focusOffset:s}=n;if(r!==null){let l=cl(r),a=G(r);if(l!==null&&L(a)){if(l===Cn&&e){let d=e.length;l=e,i=d,s=d}l!==null&&gr(a,l,i,s,o)}}}function gr(o,t,e,n,r){let i=o;if(i.isAttached()&&(r||!i.isDirty())){let s=i.isComposing(),l=t;(s||r)&&t[t.length-1]===Cn&&(l=t.slice(0,-1));let a=i.getTextContent();if(r||l!==a){if(l===""){if(le(null),!Zt&&!Lt&&!Vt){let h=Q();setTimeout(()=>{h.update(()=>{i.isAttached()&&i.remove()})},20)}else i.remove();return}let d=i.getParent(),u=Ze(),m=i.getTextContentSize(),c=et(),f=i.getKey();if(i.isToken()||c!==null&&f===c&&!s||_(u)&&(d!==null&&!d.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===o.__key&&u.anchor.offset===0&&!i.canInsertTextBefore()&&!s||u.focus.key===o.__key&&u.focus.offset===m&&!i.canInsertTextAfter()&&!s)){i.markDirty();return}let g=C();if(!_(g)||e===null||n===null){i.setTextContent(l);return}if(g.setTextNodeRange(i,e,i,n),i.isSegmented()){let h=i.getTextContent(),N=q(h);i.replace(N),i=N}i.setTextContent(l)}}}function Zh(o){let t=o.getPreviousSibling();return(L(t)||E(t)&&t.isInline())&&!t.canInsertTextAfter()}function jd(o,t){if(t.isSegmented())return!0;if(!o.isCollapsed())return!1;let e=o.anchor.offset,n=t.getParentOrThrow(),r=t.isToken();return e===0?!t.canInsertTextBefore()||!n.canInsertTextBefore()&&!t.isComposing()||r||Zh(t):e===t.getTextContentSize()?!t.canInsertTextAfter()||!n.canInsertTextAfter()&&!t.isComposing()||r:!1}function Gd(o,t,e,n){return o==="Tab"&&!t&&!e&&!n}function Jd(o,t,e,n){return o.toLowerCase()==="b"&&!t&&Tr(e,n)}function Qd(o,t,e,n){return o.toLowerCase()==="i"&&!t&&Tr(e,n)}function ec(o,t,e,n){return o.toLowerCase()==="u"&&!t&&Tr(e,n)}function tc(o,t){return yc(o)&&!t}function oc(o,t){return yc(o)&&t}function nc(o,t){return ze&&t&&o.toLowerCase()==="o"}function rc(o,t,e){return _n(o)&&(ze?t:e)}function ic(o,t,e){return yn(o)&&(ze?t:e)}function sc(o,t){return ze&&t&&_n(o)}function lc(o,t){return ze&&t&&yn(o)}function ac(o,t,e,n){return ze?t||e?!1:_n(o)||o.toLowerCase()==="h"&&n:n||t||e?!1:_n(o)}function dc(o,t,e,n,r){return ze?e||n||r?!1:yn(o)||o.toLowerCase()==="d"&&t:t||n||r?!1:yn(o)}function cc(o,t,e,n){return o.toLowerCase()==="z"&&!t&&Tr(e,n)}function uc(o,t,e,n){return ze?o.toLowerCase()==="z"&&e&&t:o.toLowerCase()==="y"&&n||o.toLowerCase()==="z"&&n&&t}function fc(o,t,e,n){return t?!1:o.toLowerCase()==="c"?ze?e:n:!1}function mc(o,t,e,n){return t?!1:o.toLowerCase()==="x"?ze?e:n:!1}function pc(o){return o==="ArrowLeft"}function gc(o){return o==="ArrowRight"}function Vh(o){return o==="ArrowUp"}function Xh(o){return o==="ArrowDown"}function hc(o,t,e,n){return pc(o)&&!t&&!n&&!e}function Nc(o,t,e,n,r){return pc(o)&&!n&&!e&&(t||r)}function xc(o,t,e,n){return gc(o)&&!t&&!n&&!e}function Ec(o,t,e,n,r){return gc(o)&&!n&&!e&&(t||r)}function Tc(o,t,e){return Vh(o)&&!t&&!e}function Cc(o,t,e){return Xh(o)&&!t&&!e}function bc(o,t,e,n){return o||t||e||n}function _c(o){return o===" "}function Tr(o,t){return ze?o:t}function yc(o){return o==="Enter"}function _n(o){return o==="Backspace"}function Sc(o){return o==="Escape"}function yn(o){return o==="Delete"}function ul(o,t,e){return o.toLowerCase()==="a"&&Tr(t,e)}function fl(){let o=H(),t=o.select(0,o.getChildrenSize());Y(Bo(t))}function xo(o,t){o.__lexicalClassNameCache===void 0&&(o.__lexicalClassNameCache={});let e=o.__lexicalClassNameCache,n=e[t];if(n!==void 0)return n;let r=o[t];if(typeof r=="string"){let i=wt(r);return e[t]=i,i}return r}function pi(o,t,e,n,r){if(e.size===0)return;let i=n.__type,s=n.__key,l=t.get(i);l===void 0&&T(!1,"Type %s not in registeredNodes",i);let a=l.klass,d=o.get(a);d===void 0&&(d=new Map,o.set(a,d));let u=d.get(s),m=u==="destroyed"&&r==="created";(u===void 0||m)&&d.set(s,m?"updated":r)}function Kd(o,t,e){let n=o.getParent(),r=e,i=o;return n!==null&&(t&&e===0?(r=i.getIndexWithinParent(),i=n):!t&&e===i.getChildrenSize()&&(r=i.getIndexWithinParent()+1,i=n)),i.getChildAtIndex(t?r-1:r)}function Jt(o,t){let e=o.offset;if(o.type==="element"){let n=o.getNode();return Kd(n,t,e)}else{let n=o.getNode();if(t&&e===0||!t&&e===n.getTextContentSize()){let r=t?n.getPreviousSibling():n.getNextSibling();return r===null?Kd(n.getParentOrThrow(),t,n.getIndexWithinParent()+(t?0:1)):r}}return null}function di(o){let t=bn(o).event,e=t&&t.inputType;return e==="insertFromPaste"||e==="insertFromPasteAsQuotation"}function O(o,t,e){return hl(o,t,e)}function Cr(o){return!ne(o)&&!o.isLastChild()&&!o.isInline()}function vn(o,t){let e=o._keyToDOMMap.get(t);return e===void 0&&T(!1,"Reconciliation: could not find DOM element for node key %s",t),e}function gi(o){let t=o.assignedSlot||o.parentElement;return t!==null&&t.nodeType===11?t.host:t}function Lc(o,t,e){let n=e.ownerDocument,r=n.defaultView;if(r===null)return;let{top:i,bottom:s}=t,l=0,a=0,d=e;for(;d!==null;){let u=d===n.body;if(u)l=0,a=bn(o).innerHeight;else{let c=d.getBoundingClientRect();l=c.top,a=c.bottom}let m=0;if(ia&&(m=s-a),m!==0)if(u)r.scrollBy(0,m);else{let c=d.scrollTop;d.scrollTop+=m;let f=d.scrollTop-c;i-=f,s-=f}if(u)break;d=gi(d)}}function Mc(o){let t=C();if(!_(t)||!E(o))return t;let{anchor:e,focus:n}=t,r=e.getNode(),i=n.getNode();return Sn(r,o)&&e.set(o.__key,0,"element"),Sn(i,o)&&n.set(o.__key,0,"element"),t}function Sn(o,t){let e=o.getParent();for(;e!==null;){if(e.is(t))return!0;e=e.getParent()}return!1}function wc(o){let t=o.ownerDocument;return t&&t.defaultView||null}function bn(o){let t=o._window;return t===null&&T(!1,"window object not found"),t}function ml(o){let t=o.getParentOrThrow();for(;t!==null;){if(ge(t))return t;t=t.getParentOrThrow()}return t}var cC=Symbol.for("@lexical/ShadowRootNodeBrand");function ge(o){return ne(o)||E(o)&&o.isShadowRoot()}function re(o){let t=Q(),e=o.constructor.getType(),n=t._nodes.get(e);n===void 0&&T(!1,'$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');let r=n.replace;if(r!==null){let i=r(o);return i instanceof o.constructor||T(!1,"$initializeNode failed. Ensure replacement node is a subclass of the original node."),i}return o}function hi(o,t){let e=o.getParent();ne(e)&&!E(t)&&!F(t)&&T(!1,"Only element or decorator nodes can be inserted in to the root node")}function jh(o){let t=o.theme,e=document.createElement("div");e.contentEditable="false",e.setAttribute("data-lexical-cursor","true");let n=t.blockCursor;if(n!==void 0){if(typeof n=="string"){let r=wt(n);n=t.blockCursor=r}n!==void 0&&e.classList.add(...n)}return e}function sl(o){return(F(o)||E(o)&&!o.canBeEmpty())&&!o.isInline()}function br(o,t,e){e.style.removeProperty("caret-color"),t._blockCursorElement=null;let n=o.parentElement;n!==null&&n.removeChild(o)}function vc(o,t,e){let n=o._blockCursorElement;if(_(e)&&e.isCollapsed()&&e.anchor.type==="element"&&t.contains(document.activeElement)){let r=e.anchor,i=r.getNode(),s=r.offset,l=i.getChildrenSize(),a=!1,d=null;if(s===l){let u=i.getChildAtIndex(s-1);sl(u)&&(a=!0)}else{let u=i.getChildAtIndex(s);if(sl(u)){let m=u.getPreviousSibling();(m===null||sl(m))&&(a=!0,d=o.getElementByKey(u.__key))}}if(a){let u=o.getElementByKey(i.__key);n===null&&(o._blockCursorElement=n=jh(o._config)),t.style.caretColor="transparent",d===null?u.appendChild(n):u.insertBefore(n,d);return}}n!==null&&br(n,o,t)}function Le(o){return pe?(o||window).getSelection():null}function Ni(o){return he(o)&&o.tagName==="A"}function he(o){return o.nodeType===1}function Ko(o){let t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return o.nodeName.match(t)!==null}function Eo(o){let t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return o.nodeName.match(t)!==null}function Uo(o){if(ne(o)||F(o)&&!o.isInline())return!0;if(!E(o)||ge(o))return!1;let t=o.getFirstChild(),e=t===null||ke(t)||L(t)||t.isInline();return!o.isInline()&&o.canBeEmpty()!==!1&&e}function xi(o,t){let e=o;for(;e!==null&&e.getParent()!==null&&!t(e);)e=e.getParentOrThrow();return t(e)?e:null}function pl(){return Q()}var Ud=new WeakMap,Gh=new Map;function Dc(o){if(!o._readOnly&&o.isEmpty())return Gh;T(o._readOnly,"getCachedTypeToNodeMap called with a writable EditorState");let t=Ud.get(o);if(!t){t=new Map,Ud.set(o,t);for(let[e,n]of o._nodeMap){let r=n.__type,i=t.get(r);i||(i=new Map,t.set(r,i)),i.set(e,n)}}return t}function Qt(o){let t=o.constructor,e=t.clone(o);return e.afterCloneFrom(o),__DEV__&&(T(e.__key===o.__key,"$cloneWithProperties: %s.clone(node) (with type '%s') did not return a node with the same key, make sure to specify node.__key as the last argument to the constructor",t.name,t.getType()),T(e.__parent===o.__parent&&e.__next===o.__next&&e.__prev===o.__prev,"$cloneWithProperties: %s.clone(node) (with type '%s') overrided afterCloneFrom but did not call super.afterCloneFrom(prevNode)",t.name,t.getType())),e}function Ac(o,t){let e=o._decorators,r=o._pendingDecorators||e,i=t._nodeMap,s;for(s in r)i.has(s)||(r===e&&(r=ui(o)),delete r[s])}function Rc(o,t,e,n,r,i){let s=o.getFirstChild();for(;s!==null;){let l=s.__key;s.__parent===t&&(E(s)&&Rc(s,l,e,n,r,i),e.has(l)||i.delete(l),r.push(l)),s=s.getNextSibling()}}function kc(o,t,e,n){let r=o._nodeMap,i=t._nodeMap,s=[];for(let[l]of n){let a=i.get(l);a!==void 0&&(a.isAttached()||(E(a)&&Rc(a,l,r,i,s,n),r.has(l)||n.delete(l),s.push(l)))}for(let l of s)i.delete(l);for(let l of e){let a=i.get(l);a!==void 0&&!a.isAttached()&&(r.has(l)||e.delete(l),i.delete(l))}}var fe="",To=null,mt="",to="",Dn,Me,yr,$c=!1,Ti=!1,Ci,xl,El,zo,pt,Tl,Sr;function bi(o,t){let e=zo.get(o);if(t!==null){let n=_l(o);n.parentNode===t&&t.removeChild(n)}if(pt.has(o)||Me._keyToDOMMap.delete(o),E(e)){let n=Ei(e,zo);Cl(n,0,n.length-1,null)}e!==void 0&&pi(Sr,yr,Ci,e,"destroyed")}function Cl(o,t,e,n){let r=t;for(;r<=e;++r){let i=o[r];i!==void 0&&bi(i,n)}}function _i(o,t,e){let n=pt.get(o);n===void 0&&T(!1,"createNode: node does not exist in nodeMap");let r=n.createDOM(Dn,Me);if(rN(o,r,Me),L(n)?r.setAttribute("data-lexical-text","true"):F(n)&&r.setAttribute("data-lexical-decorator","true"),E(n)){let i=n.__size;if(i!==0){let s=i-1,l=Ei(n,pt);bl(l,n,0,s,r,null)}n.isInline()||Pc(null,n,r),Cr(n)&&(fe+=Qe,to+=Qe)}else{let i=n.getTextContent();if(F(n)){let s=n.decorate(Me,Dn);s!==null&&Bc(o,s),r.contentEditable="false"}fe+=i,to+=i}if(t!==null&&!n?.insertDOMIntoParent(r,t))if(e!=null)t.insertBefore(r,e);else{let s=t.__lexicalLineBreak;s!=null?t.insertBefore(r,s):t.appendChild(r)}return __DEV__&&Object.freeze(n),pi(Sr,yr,Ci,n,"created"),r}function bl(o,t,e,n,r,i){let s=fe;fe="";let l=e;for(;l<=n;++l){_i(o[l],r,i);let a=pt.get(o[l]);a!==null&&L(a)&&(To===null&&(To=a.getFormat()),mt===""&&(mt=a.getStyle()))}Cr(t)&&(fe+=Qe),r.__lexicalTextContent=fe,fe=s+fe}function Ic(o,t){let e=t.get(o);return ke(e)||F(e)&&e.isInline()}function Pc(o,t,e){let n=o!==null&&(o.__size===0||Ic(o.__last,zo)),r=t.__size===0||Ic(t.__last,pt);if(n){if(!r){let i=e.__lexicalLineBreak;if(i!=null)try{e.removeChild(i)}catch(s){if(typeof s=="object"&&s!=null){let l=`${s.toString()} Parent: ${e.tagName}, child: ${i.tagName}.`;throw new Error(l)}else throw s}e.__lexicalLineBreak=null}}else if(r){let i=document.createElement("br");e.__lexicalLineBreak=i,e.appendChild(i)}}function Jh(o){Ve(o)&&To!=null&&!Ti&&o.setTextStyle(mt)}function Qh(o){Ve(o)&&mt!==""&&mt!==o.__textStyle&&!Ti&&o.setTextStyle(mt)}function eN(o,t,e){To=null,mt="",tN(o,t,e),Jh(t),Qh(t)}function Ei(o,t){let e=[],n=o.__first;for(;n!==null;){let r=t.get(n);r===void 0&&T(!1,"createChildrenArray: node does not exist in nodeMap"),e.push(n),n=r.__next}return e}function tN(o,t,e){let n=fe,r=o.__size,i=t.__size;if(fe="",r===1&&i===1){let s=o.__first,l=t.__first;if(s===l)_r(s,e);else{let d=_l(s),u=_i(l,null,null);try{e.replaceChild(u,d)}catch(m){if(typeof m=="object"&&m!=null){let c=`${m.toString()} Parent: ${e.tagName}, new child: {tag: ${u.tagName} key: ${l}}, old child: {tag: ${d.tagName}, key: ${s}}.`;throw new Error(c)}else throw m}bi(s,null)}let a=pt.get(l);L(a)&&(To===null&&(To=a.getFormat()),mt===""&&(mt=a.getStyle()))}else{let s=Ei(o,zo),l=Ei(t,pt);if(r===0)i!==0&&bl(l,t,0,i-1,e,null);else if(i===0){if(r!==0){let d=e.__lexicalLineBreak==null;Cl(s,0,r-1,d?null:e),d&&(e.textContent="")}}else nN(t,s,l,r,i,e)}Cr(t)&&(fe+=Qe),e.__lexicalTextContent=fe,fe=n+fe}function _r(o,t){let e=zo.get(o),n=pt.get(o);(e===void 0||n===void 0)&&T(!1,"reconcileNode: prevNode or nextNode does not exist in nodeMap");let r=$c||El.has(o)||xl.has(o),i=vn(Me,o);if(e===n&&!r){if(E(e)){let s=i.__lexicalTextContent;s!==void 0&&(fe+=s,to+=s)}else{let s=e.getTextContent();to+=s,fe+=s}return i}if(e!==n&&r&&pi(Sr,yr,Ci,n,"updated"),n.updateDOM(e,i,Dn)){let s=_i(o,null,null);return t===null&&T(!1,"reconcileNode: parentDOM is null"),t.replaceChild(s,i),bi(o,null),s}if(E(e)&&E(n))r&&(eN(e,n,i),!ne(n)&&!n.isInline()&&Pc(e,n,i)),Cr(n)&&(fe+=Qe,to+=Qe);else{let s=n.getTextContent();if(F(n)){let l=n.decorate(Me,Dn);l!==null&&Bc(o,l)}fe+=s,to+=s}if(!Ti&&ne(n)&&n.__cachedText!==to){let s=n.getWritable();s.__cachedText=to,n=s}return __DEV__&&Object.freeze(n),i}function Bc(o,t){let e=Me._pendingDecorators,n=Me._decorators;if(e===null){if(n[o]===t)return;e=ui(Me)}e[o]=t}function oN(o){return o.firstChild}function Nl(o){let t=o.nextSibling;return t!==null&&t===Me._blockCursorElement&&(t=t.nextSibling),t}function nN(o,t,e,n,r,i){let s=n-1,l=r-1,a,d,u=oN(i),m=0,c=0;for(;m<=s&&c<=l;){let h=t[m],N=e[c];if(h===N)u=Nl(_r(N,i)),m++,c++;else{a===void 0&&(a=new Set(t)),d===void 0&&(d=new Set(e));let x=d.has(h),S=a.has(N);if(!x)u=Nl(_l(h)),bi(h,i),m++;else if(!S)_i(N,i,u),c++;else{let v=vn(Me,N);v===u?u=Nl(_r(N,i)):(u!=null?i.insertBefore(v,u):i.appendChild(v),_r(N,i)),m++,c++}}let b=pt.get(N);b!==null&&L(b)&&(To===null&&(To=b.getFormat()),mt===""&&(mt=b.getStyle()))}let f=m>s,g=c>l;if(f&&!g){let h=e[l+1],N=h===void 0?null:Me.getElementByKey(h);bl(e,o,c,l,i,N)}else g&&!f&&Cl(t,m,s,i)}function Fc(o,t,e,n,r,i){fe="",to="",$c=n===Xt,Me=e,Dn=e._config,yr=e._nodes,Ci=Me._listeners.mutation,xl=r,El=i,zo=o._nodeMap,pt=t._nodeMap,Ti=t._readOnly,Tl=new Map(e._keyToDOMMap);let s=new Map;return Sr=s,_r("root",null),Me=void 0,yr=void 0,xl=void 0,El=void 0,zo=void 0,pt=void 0,Dn=void 0,Tl=void 0,Sr=void 0,s}function rN(o,t,e){let n=e._keyToDOMMap;t["__lexicalKey_"+e._key]=o,n.set(o,t)}function _l(o){let t=Tl.get(o);return t===void 0&&T(!1,"Reconciliation: could not find DOM element for node key %s",o),t}var oo=Object.freeze({}),wl=30,yl=[["keydown",mN],["pointerdown",sN],["compositionstart",uN],["compositionend",fN],["input",cN],["click",iN],["cut",oo],["copy",oo],["dragstart",oo],["dragover",oo],["dragend",oo],["paste",oo],["focus",oo],["blur",oo],["drop",oo]];ho&&yl.push(["beforeinput",(o,t)=>dN(o,t)]);var wr=0,Wc=null,qc=0,On=null,yi=new WeakMap,Sl=!1,Ll=!1,Mr=!1,Lr=!1,Yc=[0,"",0,"root",0];function Zc(o,t,e,n,r){let i=o.anchor,s=o.focus,l=i.getNode(),a=Q(),d=Le(a._window),u=d!==null?d.anchorNode:null,m=i.key,c=a.getElementByKey(m),f=e.length;return m!==s.key||!L(l)||(!r&&(!ho||qc1||(r||!ho)&&c!==null&&!l.isComposing()&&u!==wn(c)||d!==null&&t!==null&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||l.getFormat()!==o.format||l.getStyle()!==o.style||jd(o,l)}function Hc(o,t){return o!==null&&o.nodeValue!==null&&o.nodeType===qe&&t!==0&&t!==o.nodeValue.length}function Kc(o,t,e){let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=o;Sl&&(Sl=!1,Hc(n,r)&&Hc(i,s))||Te(t,()=>{if(!e){Y(null);return}if(!jt(t,n,i))return;let l=C();if(_(l)){let a=l.anchor,d=a.getNode();if(l.isCollapsed()){o.type==="Range"&&o.anchorNode===o.focusNode&&(l.dirty=!0);let u=bn(t).event,m=u?u.timeStamp:performance.now(),[c,f,g,h,N]=Yc,b=H(),x=t.isComposing()===!1&&b.getTextContent()==="";if(m{let e=C(),n=Le(t._window),r=Ze();if(n){if(_(e)){let i=e.anchor,s=i.getNode();if(i.type==="element"&&i.offset===0&&e.isCollapsed()&&!ne(s)&&H().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&r!==null&&e.is(r))n.removeAllRanges(),e.dirty=!0;else if(o.detail===3&&!e.isCollapsed()){let a=e.focus.getNode();s!==a&&(E(s)?s.select(0):s.getParentOrThrow().select(0))}}else if(o.pointerType==="touch"){let i=n.anchorNode;if(i!==null){let s=i.nodeType;if(s===No||s===qe){let l=vr(r,n,t,o);Y(l)}}}}O(t,Ht,o)})}function sN(o,t){let e=o.target,n=o.pointerType;e instanceof Node&&n!=="touch"&&Te(t,()=>{qd(e)||(Ll=!0)})}function Vc(o){if(!o.getTargetRanges)return null;let t=o.getTargetRanges();return t.length===0?null:t[0]}function lN(o,t){return o!==t||E(o)||E(t)||!o.isToken()||!t.isToken()}function aN(o){return Wc==="MediaLast"&&o{let r=C();if(e==="deleteContentBackward"){if(r===null){let u=Ze();if(!_(u))return;Y(u.clone())}if(_(r)){let u=r.anchor.key===r.focus.key;if(aN(o.timeStamp)&&t.isComposing()&&u){if(le(null),wr=0,setTimeout(()=>{Te(t,()=>{le(null)})},wl),_(r)){let m=r.anchor.getNode();m.markDirty(),T(L(m),"Anchor node must be a TextNode"),r.style=m.getStyle()}}else{le(null),o.preventDefault();let m=r.anchor.getNode().getTextContent(),c=r.anchor.offset===0&&r.focus.offset===m.length;Gs&&u&&!c||O(t,Je,!0)}return}}if(!_(r))return;let i=o.data;On!==null&&mi(!1,t,On),(!r.dirty||On!==null)&&r.isCollapsed()&&!ne(r.anchor.getNode())&&n!==null&&r.applyDOMRange(n),On=null;let s=r.anchor,l=r.focus,a=s.getNode(),d=l.getNode();if(e==="insertText"||e==="insertTranspose"){if(i===`
+`)o.preventDefault(),O(t,Kt,!1);else if(i===Qe)o.preventDefault(),O(t,Ut,void 0);else if(i==null&&o.dataTransfer){let u=o.dataTransfer.getData("text/plain");o.preventDefault(),r.insertRawText(u)}else i!=null&&Zc(r,n,i,o.timeStamp,!0)?(o.preventDefault(),O(t,ct,i)):On=i;qc=o.timeStamp;return}switch(o.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{O(t,ct,o);break}case"insertFromComposition":{le(null),O(t,ct,o);break}case"insertLineBreak":{le(null),O(t,Kt,!1);break}case"insertParagraph":{le(null),Mr&&!Lt?(Mr=!1,O(t,Kt,!1)):O(t,Ut,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{O(t,ao,o);break}case"deleteByComposition":{lN(a,d)&&O(t,hn,o);break}case"deleteByDrag":case"deleteByCut":{O(t,hn,o);break}case"deleteContent":{O(t,Je,!1);break}case"deleteWordBackward":{O(t,St,!0);break}case"deleteWordForward":{O(t,St,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{O(t,ut,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{O(t,ut,!1);break}case"formatStrikeThrough":{O(t,Ee,"strikethrough");break}case"formatBold":{O(t,Ee,"bold");break}case"formatItalic":{O(t,Ee,"italic");break}case"formatUnderline":{O(t,Ee,"underline");break}case"historyUndo":{O(t,co,void 0);break}case"historyRedo":{O(t,uo,void 0);break}default:}})}function cN(o,t){o.stopPropagation(),Te(t,()=>{let e=C(),n=o.data,r=Vc(o);if(n!=null&&_(e)&&Zc(e,r,n,o.timeStamp,!1)){Lr&&(Ml(t,n),Lr=!1);let s=e.anchor.getNode(),l=Le(t._window);if(l===null)return;let a=e.isBackward(),d=a?e.anchor.offset:e.focus.offset,u=a?e.focus.offset:e.anchor.offset;(!ho||e.isCollapsed()||!L(s)||l.anchorNode===null||s.getTextContent().slice(0,d)+n+s.getTextContent().slice(d+u)!==cl(l.anchorNode))&&O(t,ct,n);let m=n.length;We&&m>1&&o.inputType==="insertCompositionText"&&!t.isComposing()&&(e.anchor.offset-=m),!Zt&&!Lt&&!Vt&&t.isComposing()&&(wr=0,le(null))}else mi(!1,t,n!==null?n:void 0),Lr&&(Ml(t,n||void 0),Lr=!1);Xd()}),On=null}function uN(o,t){Te(t,()=>{let e=C();if(_(e)&&!t.isComposing()){let n=e.anchor,r=e.anchor.getNode();le(n.key),(o.timeStamp{Ml(t,o.data)})}function mN(o,t){if(wr=o.timeStamp,Wc=o.key,t.isComposing())return;let{key:e,shiftKey:n,ctrlKey:r,metaKey:i,altKey:s}=o;if(!O(t,Ks,o)&&e!=null){if(xc(e,r,s,i))O(t,Ro,o);else if(Ec(e,r,n,s,i))O(t,Us,o);else if(hc(e,r,s,i))O(t,ko,o);else if(Nc(e,r,n,s,i))O(t,zs,o);else if(Tc(e,r,i))O(t,zt,o);else if(Cc(e,r,i))O(t,Wt,o);else if(oc(e,n))Mr=!0,O(t,Ue,o);else if(_c(e))O(t,ir,o);else if(nc(e,r))o.preventDefault(),Mr=!0,O(t,Kt,!0);else if(tc(e,n))Mr=!1,O(t,Ue,o);else if(ac(e,s,i,r))_n(e)?O(t,qt,o):(o.preventDefault(),O(t,Je,!0));else if(Sc(e))O(t,Io,o);else if(dc(e,r,n,s,i))yn(e)?O(t,Yt,o):(o.preventDefault(),O(t,Je,!1));else if(rc(e,s,r))o.preventDefault(),O(t,St,!0);else if(ic(e,s,r))o.preventDefault(),O(t,St,!1);else if(sc(e,i))o.preventDefault(),O(t,ut,!0);else if(lc(e,i))o.preventDefault(),O(t,ut,!1);else if(Jd(e,s,i,r))o.preventDefault(),O(t,Ee,"bold");else if(ec(e,s,i,r))o.preventDefault(),O(t,Ee,"underline");else if(Qd(e,s,i,r))o.preventDefault(),O(t,Ee,"italic");else if(Gd(e,s,r,i))O(t,$o,o);else if(cc(e,n,i,r))o.preventDefault(),O(t,co,void 0);else if(uc(e,n,i,r))o.preventDefault(),O(t,uo,void 0);else{let l=t._editorState._selection;we(l)?fc(e,n,i,r)?(o.preventDefault(),O(t,fo,o)):mc(e,n,i,r)?(o.preventDefault(),O(t,mo,o)):ul(e,i,r)&&(o.preventDefault(),O(t,Nn,o)):!We&&ul(e,i,r)&&(o.preventDefault(),O(t,Nn,o))}bc(r,n,s,i)&&O(t,Xs,o)}}function Xc(o){let t=o.__lexicalEventHandles;return t===void 0&&(t=[],o.__lexicalEventHandles=t),t}var An=new Map;function jc(o){let t=o.target,e=t==null?null:t.nodeType===9?t.defaultView:t.ownerDocument.defaultView,n=Le(e);if(n===null)return;let r=ci(n.anchorNode);if(r===null)return;Ll&&(Ll=!1,Te(r,()=>{let u=Ze(),m=n.anchorNode;if(m===null)return;let c=m.nodeType;if(c!==No&&c!==qe)return;let f=vr(u,n,r,o);Y(f)}));let i=Er(r),s=i[i.length-1],l=s._key,a=An.get(l),d=a||s;d!==r&&Kc(n,d,!1),Kc(n,r,!0),r!==s?An.set(l,r):a&&An.delete(l)}function Uc(o){o._lexicalHandled=!0}function zc(o){return o._lexicalHandled===!0}function Gc(o,t){let e=o.ownerDocument,n=yi.get(e);(n===void 0||n<1)&&e.addEventListener("selectionchange",jc),yi.set(e,(n||0)+1),o.__lexicalEditor=t;let r=Xc(o);for(let i=0;i{zc(d)||(Uc(d),(t.isEditable()||s==="click")&&l(d,t))}:d=>{if(zc(d))return;Uc(d);let u=t.isEditable();switch(s){case"cut":return u&&O(t,mo,d);case"copy":return O(t,fo,d);case"paste":return u&&O(t,ao,d);case"dragstart":return u&&O(t,sr,d);case"dragover":return u&&O(t,lr,d);case"dragend":return u&&O(t,qs,d);case"focus":return u&&O(t,ar,d);case"blur":return u&&O(t,Vs,d);case"drop":return u&&O(t,Po,d)}};o.addEventListener(s,a),r.push(()=>{o.removeEventListener(s,a)})}}function Jc(o){let t=o.ownerDocument,e=yi.get(t);T(e!==void 0,"Root element not registered");let n=e-1;T(n>=0,"Root element count less than 0"),yi.set(t,n),n===0&&t.removeEventListener("selectionchange",jc);let r=Fo(o);Mn(r)?(pN(r),o.__lexicalEditor=null):r&&T(!1,"Attempted to remove event handlers from a node that does not belong to this build of Lexical");let i=Xc(o);for(let s=0;si.__key===this.__key);if(L(this))return n;if(_(e)&&e.anchor.type==="element"&&e.focus.type==="element"){if(e.isCollapsed())return!1;let i=this.getParent();if(F(this)&&this.isInline()&&i){let s=e.isBackward()?e.focus:e.anchor,l=s.getNode();if(s.offset===l.getChildrenSize()&&l.is(i)&&l.getLastChildOrThrow().is(this))return!1}}return n}shouldSelectDirectly(){return!1}getKey(){return this.__key}getIndexWithinParent(){let t=this.getParent();if(t===null)return-1;let e=t.getFirstChild(),n=0;for(;e!==null;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){let t=this.getLatest().__parent;return t===null?null:ee(t)}getParentOrThrow(){let t=this.getParent();return t===null&&T(!1,"Expected node %s to have a parent.",this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){let e=t.getParent();if(ge(e))return T(E(t)||t===this&&F(t),"Children of root nodes must be elements or decorators"),t;t=e}return null}getTopLevelElementOrThrow(){let t=this.getTopLevelElement();return t===null&&T(!1,"Expected node %s to have a top parent element.",this.__key),t}getParents(){let t=[],e=this.getParent();for(;e!==null;)t.push(e),e=e.getParent();return t}getParentKeys(){let t=[],e=this.getParent();for(;e!==null;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:ee(e)}getPreviousSiblings(){let t=[],e=this.getParent();if(e===null)return t;let n=e.getFirstChild();for(;n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){let e=this.getLatest().__next;return e===null?null:ee(e)}getNextSiblings(){let t=[],e=this.getNextSibling();for(;e!==null;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){let e=this.getParents(),n=t.getParents();E(this)&&e.unshift(this),E(t)&&n.unshift(t);let r=e.length,i=n.length;if(r===0||i===0||e[r-1]!==n[i-1])return null;let s=new Set(n);for(let l=0;l{l.append(h)})),_(n)){Y(n);let h=n.anchor,N=n.focus;h.key===i&&Dl(h,l),N.key===i&&Dl(N,l)}return et()===i&&le(s),l}insertAfter(t,e=!0){ue(),hi(this,t);let n=this.getWritable(),r=t.getWritable(),i=r.getParent(),s=C(),l=!1,a=!1;if(i!==null){let f=t.getIndexWithinParent();if(Gt(r),_(s)){let g=i.__key,h=s.anchor,N=s.focus;l=h.type==="element"&&h.key===g&&h.offset===f+1,a=N.type==="element"&&N.key===g&&N.offset===f+1}}let d=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),m=r.__key,c=n.__next;if(d===null)u.__last=m;else{let f=d.getWritable();f.__prev=m}if(u.__size++,n.__next=m,r.__next=c,r.__prev=n.__key,r.__parent=n.__parent,e&&_(s)){let f=this.getIndexWithinParent();Rn(s,u,f+1);let g=u.__key;l&&s.anchor.set(g,f+2,"element"),a&&s.focus.set(g,f+2,"element")}return t}insertBefore(t,e=!0){ue(),hi(this,t);let n=this.getWritable(),r=t.getWritable(),i=r.__key;Gt(r);let s=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=n.__prev,d=this.getIndexWithinParent();if(s===null)l.__first=i;else{let m=s.getWritable();m.__next=i}l.__size++,n.__prev=i,r.__prev=a,r.__next=n.__key,r.__parent=n.__parent;let u=C();if(e&&_(u)){let m=this.getParentOrThrow();Rn(u,m,d)}return t}isParentRequired(){return!1}createParentElementNode(){return I()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){ue();let n=this.getPreviousSibling(),r=this.getParentOrThrow();if(n===null)return r.select(0,0);if(E(n))return n.select();if(!L(n)){let i=n.getIndexWithinParent()+1;return r.select(i,i)}return n.select(t,e)}selectNext(t,e){ue();let n=this.getNextSibling(),r=this.getParentOrThrow();if(n===null)return r.select();if(E(n))return n.select(0,0);if(!L(n)){let i=n.getIndexWithinParent();return r.select(i,i)}return n.select(t,e)}markDirty(){this.getWritable()}insertDOMIntoParent(t,e){return!1}};p(gt,"importDOM");function gN(o,t){let e=Q()._nodes.get(o);e===void 0&&T(!1,"Create node: Attempted to create node %s that was not configured to be used on the editor.",t.name);let n=e.klass;n!==t&&T(!1,"Create node: Type %s in node %s does not match registered node %s with the same type",o,t.name,n.name)}function tu(o,t,e){let n=e||t.getParentOrThrow().getLastChild(),r=t,i=[t];for(;r!==n;)r.getNextSibling()||T(!1,"insertRangeAfter: lastToInsert must be a later sibling of firstToInsert"),r=r.getNextSibling(),i.push(r);let s=o;for(let l of i)s=s.insertAfter(l)}var Wo=class o extends gt{static getType(){return"linebreak"}static clone(t){return new o(t.__key)}constructor(t){super(t)}getTextContent(){return`
+`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>NN(t)||xN(t)?null:{conversion:hN,priority:0}}}static importJSON(t){return ht()}exportJSON(){return{type:"linebreak",version:1}}};function hN(o){return{node:ht()}}function ht(){return re(new Wo)}function ke(o){return o instanceof Wo}function NN(o){let t=o.parentElement;if(t!==null&&Eo(t)){let e=t.firstChild;if(e===o||e.nextSibling===o&&Si(e)){let n=t.lastChild;if(n===o||n.previousSibling===o&&Si(n))return!0}}return!1}function xN(o){let t=o.parentElement;if(t!==null&&Eo(t)){let e=t.firstChild;if(e===o||e.nextSibling===o&&Si(e))return!1;let n=t.lastChild;if(n===o||n.previousSibling===o&&Si(n))return!0}return!1}function Si(o){return o.nodeType===qe&&/^( |\t|\r?\n)+$/.test(o.textContent||"")}function Ol(o,t){return t&ur?"code":t&pr?"mark":t&fr?"sub":t&mr?"sup":null}function Al(o,t){return t&dr?"strong":t&cr?"em":"span"}function iu(o,t,e,n,r){let i=n.classList,s=xo(r,"base");s!==void 0&&i.add(...s),s=xo(r,"underlineStrikethrough");let l=!1,a=t&En&&t&xn,d=e&En&&e&xn;s!==void 0&&(d?(l=!0,a||i.add(...s)):a&&i.remove(...s));for(let u in Re){let c=Re[u];if(s=xo(r,u),s!==void 0)if(e&c){if(l&&(u==="underline"||u==="strikethrough")){t&c&&i.remove(...s);continue}((t&c)===0||a&&u==="underline"||u==="strikethrough")&&i.add(...s)}else t&c&&i.remove(...s)}}function EN(o,t){let e=o.length,n=t.length,r=0,i=0;for(;r({conversion:yN,priority:0}),b:()=>({conversion:CN,priority:0}),code:()=>({conversion:Co,priority:0}),em:()=>({conversion:Co,priority:0}),i:()=>({conversion:Co,priority:0}),s:()=>({conversion:Co,priority:0}),span:()=>({conversion:TN,priority:0}),strong:()=>({conversion:Co,priority:0}),sub:()=>({conversion:Co,priority:0}),sup:()=>({conversion:Co,priority:0}),u:()=>({conversion:Co,priority:0})}}static importJSON(e){let n=q(e.text);return n.setFormat(e.format),n.setDetail(e.detail),n.setMode(e.mode),n.setStyle(e.style),n}exportDOM(e){let{element:n}=super.exportDOM(e),r=(n?.nodeName||"").toLowerCase();T(n!==null&&he(n),"Expected TextNode createDOM to always return a HTMLElement");let i=this.getTextContent();/^\s|\s$/.test(i)&&(n.style.whiteSpace="pre-wrap");for(let s of Array.from(n.classList.values()))s.startsWith("editor-theme-")&&n.classList.remove(s);return n.classList.length===0&&n.removeAttribute("class"),n.nodeName==="SPAN"&&!n.getAttribute("style")&&(n=document.createTextNode(i)),this.hasFormat("bold")&&r!=="strong"&&(n=Li(n,"strong")),this.hasFormat("italic")&&(n=Li(n,"em")),this.hasFormat("strikethrough")&&(n=Li(n,"s")),this.hasFormat("underline")&&(n=Li(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,n){}setFormat(e){let n=this.getWritable();return n.__format=typeof e=="string"?Re[e]:e,n}setDetail(e){let n=this.getWritable();return n.__detail=typeof e=="string"?Rd[e]:e,n}setStyle(e){let n=this.getWritable();return n.__style=e,n}toggleFormat(e){let n=this.getFormat(),r=Nr(n,e,null);return this.setFormat(r)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=si,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=Tn,e}setMode(e){let n=kd[e];if(this.__mode===n)return this;let r=this.getWritable();return r.__mode=n,r}setTextContent(e){if(this.__text===e)return this;let n=this.getWritable();return n.__text=e,n}select(e,n){ue();let r=e,i=n,s=C(),l=this.getTextContent(),a=this.__key;if(typeof l=="string"){let d=l.length;r===void 0&&(r=d),i===void 0&&(i=d)}else r=0,i=0;if(_(s)){let d=et();(d===s.anchor.key||d===s.focus.key)&&le(a),s.setTextNodeRange(this,r,this,i)}else return Mi(a,r,a,i,"text","text");return s}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,n,r,i){let s=this.getWritable(),l=s.__text,a=r.length,d=e;d<0&&(d=a+d,d<0&&(d=0));let u=C();if(i&&_(u)){let c=e+a;u.setTextNodeRange(s,c,s,c)}let m=l.slice(0,d)+r+l.slice(d+n);return s.__text=m,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){ue();let n=this.getLatest(),r=n.getTextContent(),i=n.__key,s=et(),l=new Set(e),a=[],d=r.length,u="";for(let R=0;RM&&se.offset<=j&&(se.key=k,se.offset-=M,S.dirty=!0),He.key===i&&He.type==="text"&&He.offset>M&&He.offset<=j&&(He.key=k,He.offset-=M,S.dirty=!0)}s===i&&le(k),M=j,v.push(B)}if(f!==null){Zd(this);let R=f.getWritable(),A=this.getIndexWithinParent();x?(R.splice(A,0,v),this.remove()):R.splice(A,1,v),_(S)&&Rn(S,f,A,m-1)}return v}mergeWithSibling(e){let n=e===this.getPreviousSibling();!n&&e!==this.getNextSibling()&&T(!1,"mergeWithSibling: sibling must be a previous or next sibling");let r=this.__key,i=e.__key,s=this.__text,l=s.length;et()===i&&le(r);let d=C();if(_(d)){let f=d.anchor,g=d.focus;f!==null&&f.key===i&&(Rl(f,n,r,e,l),d.dirty=!0),g!==null&&g.key===i&&(Rl(g,n,r,e,l),d.dirty=!0)}let u=e.__text,m=n?u+s:s+u;this.setTextContent(m);let c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}};function TN(o){let e=o.style;return{forChild:kl(e),node:null}}function CN(o){let t=o,e=t.style.fontWeight==="normal";return{forChild:kl(t.style,e?void 0:"bold"),node:null}}var nu=new WeakMap;function bN(o){return o.nodeName==="PRE"||o.nodeType===No&&o.style!==void 0&&o.style.whiteSpace!==void 0&&o.style.whiteSpace.startsWith("pre")}function _N(o){let t,e=o.parentNode,n=[o];for(;e!==null&&(t=nu.get(e))===void 0&&!bN(e);)n.push(e),e=e.parentNode;let r=t===void 0?e:t;for(let i=0;i0){/[ \t\n]$/.test(s)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=ou(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:q(n)}}function ou(o,t){let e=o;for(;;){let n;for(;(n=t?e.nextSibling:e.previousSibling)===null;){let i=e.parentElement;if(i===null)return null;e=i}if(e=n,e.nodeType===No){let i=e.style.display;if(i===""&&!Ho(e)||i!==""&&!i.startsWith("inline"))return null}let r=e;for(;(r=t?e.firstChild:e.lastChild)!==null;)e=r;if(e.nodeType===We)return e;if(e.nodeName==="BR")return null}}var bN={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Co(o){let t=bN[o.nodeName.toLowerCase()];return t==="code"&&o.closest("pre")?{node:null}:t===void 0?{node:null}:{forChild:Rl(o.style,t),node:null}}function q(o=""){return re(new nt(o))}function L(o){return o instanceof nt}function Rl(o,t){let e=o.fontWeight,n=o.textDecoration.split(" "),r=e==="700"||e==="bold",i=n.includes("line-through"),s=o.fontStyle==="italic",l=n.includes("underline"),a=o.verticalAlign,d=o.color,u=o.backgroundColor;return m=>{if(!L(m))return m;r&&!m.hasFormat("bold")&&m.toggleFormat("bold"),i&&!m.hasFormat("strikethrough")&&m.toggleFormat("strikethrough"),s&&!m.hasFormat("italic")&&m.toggleFormat("italic"),l&&!m.hasFormat("underline")&&m.toggleFormat("underline"),a==="sub"&&!m.hasFormat("subscript")&&m.toggleFormat("subscript"),a==="super"&&!m.hasFormat("superscript")&&m.toggleFormat("superscript");let c=m.getStyle();return d&&(c+=`color: ${d};`),u&&u!=="transparent"&&(c+=`background-color: ${u};`),c&&m.setStyle(c),t&&!m.hasFormat(t)&&m.toggleFormat(t),m}}var Wo=class o extends nt{static getType(){return"tab"}static clone(t){return new o(t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text}constructor(t){super(" ",t),this.__detail=Tn}static importDOM(){return null}static importJSON(t){let e=vt();return e.setFormat(t.format),e.setStyle(t.style),e}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(t){E(!1,"TabNode does not support setTextContent")}setDetail(t){E(!1,"TabNode does not support setDetail")}setMode(t){E(!1,"TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function vt(){return re(new Wo)}function kl(o){return o instanceof Wo}function Dt(...o){return()=>{for(let t=o.length-1;t>=0;t--)o[t]();o.length=0}}var In=new Map;function Il(o){let t={},e=o.split(";");for(let n of e)if(n!==""){let[r,i]=n.split(/:([^]+)/);r&&i&&(t[r.trim()]=i.trim())}return t}function $n(o){let t=In.get(o);return t===void 0&&(t=Il(o),In.set(o,t)),__DEV__&&Object.freeze(t),t}function iu(o){let t="";for(let e in o)e&&(t+=`${e}: ${o[e]};`);return t}function Dr(o,t){let e=o.getStartEndPoints();if(t.isSelected(o)&&!t.isSegmented()&&!t.isToken()&&e!==null){let[n,r]=e,i=o.isBackward(),s=n.getNode(),l=r.getNode(),a=t.is(s),d=t.is(l);if(a||d){let[u,m]=Or(o),c=s.is(l),f=t.is(i?l:s),g=t.is(i?s:l),h=0,N;if(c)h=u>m?m:u,N=u>m?u:m;else if(f)h=i?m:u,N=void 0;else if(g){let b=i?u:m;h=0,N=b}return t.__text=t.__text.slice(h,N),t}}return t}function $l(o){let t=o.getStyle(),e=Il(t);In.set(t,e)}function Pn(o,t){let e=$n("getStyle"in o?o.getStyle():o.style),n=Object.entries(t).reduce((i,[s,l])=>(typeof l=="function"?i[s]=l(e[s],o):l===null?delete i[s]:i[s]=l,i),{...e}),r=iu(n);o.setStyle(r),In.set(r,n)}function Pl(o,t){let e=o.getNodes(),n=e.length,r=o.getStartEndPoints();if(r===null)return;let[i,s]=r,l=n-1,a=e[0],d=e[l];if(o.isCollapsed()&&_(o)){Pn(o,t);return}let m=a.getTextContent().length,c=s.offset,f=i.offset,g=i.isBefore(s),h=g?f:c,N=g?c:f,b=g?i.type:s.type,x=g?s.type:i.type,S=g?s.key:i.key;if(L(a)&&h===m){let v=a.getNextSibling();L(v)&&(f=0,h=0,a=v)}if(e.length===1){if(L(a)&&a.canHaveFormat()){if(h=b==="element"?0:f>c?c:f,N=x==="element"?m:f>c?f:c,h===N)return;if(qe(a)||h===0&&N===m)Pn(a,t),a.select(h,N);else{let v=a.splitText(h,N),M=h===0?v[0]:v[1];Pn(M,t),M.select(0,N-h)}}}else{if(L(a)&&h0&&o.classList.add(...e)}function Oi(o,...t){let e=wt(...t);e.length>0&&o.classList.remove(...e)}function cu(o,t){let e=o;for(;e!=null;){if(e instanceof t)return e;e=e.getParent()}return null}function uu(o){let t=U(o,e=>T(e)&&!e.isInline());return T(t)||E(!1,"Expected node %s to have closest block element node.",o.__key),t}var U=(o,t)=>{let e=o;for(;e!==H()&&e!=null;){if(t(e))return e;e=e.getParent()}return null};function Nt(o,t){return o!==null?Object.getPrototypeOf(o).constructor.name===t.name:!1}function Ai(o,t){let e=t.body?t.body.childNodes:[],n=[],r=[];for(let i=0;i"u"||typeof window>"u"&&typeof global.window>"u")throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let e=document.createElement("div"),r=H().getChildren();for(let s=0;s{let g=new bo;return e.push(g),g}):c=fu(o,c,I)),l==null?c.length>0?s=s.concat(c):Eo(o)&&DN(o)&&(s=s.concat(ht())):T(l)&&l.append(...c),s}function fu(o,t,e){let n=[],r=[];for(let i=0;i{if(L(t)){let e=I();return e.append(t),e}return t})}function _o(o,t){let e=hu(t),n=Ai(o,e);return ON(n)}function Ot(o,t){for(let e of o.getParents())if(t(e))return e;return null}function Hl(o,t){t||(t=H());let e=[];for(let n of t.getChildren())o(n)&&e.push(n),T(n)&&e.push(...Hl(o,n));return e}function Eu(o,t,e){let n=H().getChildren();for(let r of n){let i=o.getElementByKey(r.__key);if(!i)continue;let s=i.getBoundingClientRect();if(e<=s.bottom)return r}return null}function Zo(o){let t=e=>(T(e)||F(e))&&!e.isInline()&&!ne(e);return t(o)?o:U(o,t)}function Tu(o){let t=[],e=i=>{for(let s of i.getChildren())t.push(s.getKey()),T(s)&&e(s)},n=H();e(n);let r=Array.from(o);return r.sort((i,s)=>{let l=t.indexOf(i.getKey()),a=t.indexOf(s.getKey());return l-a}),r}function Ar(o,t){let e=Zo(o)||o,n=t?e.getNextSibling():e.getPreviousSibling();return n||(n=I(),t?e.insertAfter(n):e.insertBefore(n)),t?n.selectStart():n.selectEnd()}function Rr(o){return"__alignment"in o}function Cu(o){return"__inset"in o}var bu=new WeakMap;function ae(o){return bu.get(o)||null}function _u(o,t){bu.set(o,t)}function de(o,t){return Z(o,t)!==null}function Z(o,t){if(!o)return null;for(let e of o.getNodes()){if(t(e))return e;let n=Ot(e,t);if(n)return n}return null}function yu(o){return Z(o,L)}function Su(o,t){if(!o)return!1;let e=o.getNodes();for(let n of e)if(L(n)&&n.hasFormat(t))return!0;return!!(e.length===1&&Ze(e[0])&&e[0].hasTextFormat(t))}function Fn(o,t){let e=C(),n=e?uu(e.getNodes()[0]):null;e&&o(n)?wi(e,I):wi(e,t)}function Vo(o,t=!0){Kl([o],t)}function Kl(o,t=!0){let e=C()?.getNodes()||[],n=e.length>0?Zo(e[0]):null;if(n)if(t)for(let r=o.length-1;r>=0;r--)n.insertAfter(o[r]);else for(let r of o)n.insertBefore(r);else H().append(...o)}function rt(o){let t=jo();t.add(o.getKey()),Y(t)}function Lu(o){for(let t of o){if(L(t))return t;if(T(t)){let e=t.getChildren(),n=Lu(e);if(n!==null)return n}}return null}function Mu(o){let t=[...o].reverse();for(let e of t){if(L(e))return e;if(T(e)){let n=[...e.getChildren()].reverse(),r=Mu(n);if(r!==null)return r}}return null}function wu(o){if(o.length===0)return;let t=Xo(),e=Lu(o),n=Mu(o);e&&n&&(t.setTextNodeRange(e,0,n,n.getTextContentSize()||0),Y(t))}function vu(o){let t=ae(o);t&&window.requestAnimationFrame(()=>{o.update(()=>{Y(t.clone())})})}function ki(o,t){if(!o)return!1;let e=t.getKey();for(let n of o.getNodes())if(n.getKey()===e)return!0;return!1}function kr(o,t){let e=[...o?.getNodes()||[],...At(o)];for(let n of e)if(Rr(n)&&n.getAlignment()===t)return!0;return!1}function Ul(o,t){let e=[...o?.getNodes()||[],...At(o)];for(let n of e)if(qo(n)&&n.getDirection()===t)return!0;return!1}function At(o){if(!o)return[];let t=new Map;for(let e of o.getNodes()){let n=Zo(e);T(n)&&t.set(n.getKey(),n)}return Array.from(t.values())}var ql=class{constructor(t,e,n){p(this,"key");p(this,"offset");p(this,"type");p(this,"_selection");this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){let e=this.getNode(),n=t.getNode(),r=this.offset,i=t.offset;if(T(e)){let s=e.getDescendantByIndex(r);e=s??e}if(T(n)){let s=n.getDescendantByIndex(i);n=s??n}return e===n?ri&&(n=i)}else if(!T(t)){let i=t.getNextSibling();if(L(i))e=i.__key,n=0,r="text";else{let s=t.getParent();s&&(e=s.__key,n=t.getIndexWithinParent()+1)}}o.set(e,n,r)}function vl(o,t){if(T(t)){let e=t.getLastDescendant();T(e)||L(e)?zl(o,e):zl(o,t)}else zl(o,t)}function AN(o,t,e,n){let r=o.getNode(),i=r.getChildAtIndex(o.offset),s=q(),l=ne(r)?I().append(s):s;s.setFormat(e),s.setStyle(n),i===null?r.append(l):i.insertBefore(l),o.is(t)&&t.set(s.__key,0,"text"),o.set(s.__key,0,"text")}function yo(o,t,e,n){o.key=t,o.offset=e,o.type=n}var Ii=class o{constructor(t){p(this,"_nodes");p(this,"_cachedNodes");p(this,"dirty");this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Le(t))return!1;let e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(r=>n.has(r))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new o(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){let e=this.getNodes(),n=e.length,r=e[n-1],i;if(L(r))i=r.select();else{let s=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(s,s)}i.insertNodes(t);for(let s=0;s0?m=[]:m=[l]:m=l.getNodesBetween(a),ft()||(this._cachedNodes=m),m}setTextNodeRange(t,e,n,r){yo(this.anchor,t.__key,e,"text"),yo(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let t=this.getNodes();if(t.length===0)return"";let e=t[0],n=t[t.length-1],r=this.anchor,i=this.focus,s=r.isBefore(i),[l,a]=Or(this),d="",u=!0;for(let m=0;m0){/[ \t\n]$/.test(s)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=ru(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:q(n)}}function ru(o,t){let e=o;for(;;){let n;for(;(n=t?e.nextSibling:e.previousSibling)===null;){let i=e.parentElement;if(i===null)return null;e=i}if(e=n,e.nodeType===No){let i=e.style.display;if(i===""&&!Ko(e)||i!==""&&!i.startsWith("inline"))return null}let r=e;for(;(r=t?e.firstChild:e.lastChild)!==null;)e=r;if(e.nodeType===qe)return e;if(e.nodeName==="BR")return null}}var SN={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Co(o){let t=SN[o.nodeName.toLowerCase()];return t==="code"&&o.closest("pre")?{node:null}:t===void 0?{node:null}:{forChild:kl(o.style,t),node:null}}function q(o=""){return re(new nt(o))}function L(o){return o instanceof nt}function kl(o,t){let e=o.fontWeight,n=o.textDecoration.split(" "),r=e==="700"||e==="bold",i=n.includes("line-through"),s=o.fontStyle==="italic",l=n.includes("underline"),a=o.verticalAlign,d=o.color,u=o.backgroundColor;return m=>{if(!L(m))return m;r&&!m.hasFormat("bold")&&m.toggleFormat("bold"),i&&!m.hasFormat("strikethrough")&&m.toggleFormat("strikethrough"),s&&!m.hasFormat("italic")&&m.toggleFormat("italic"),l&&!m.hasFormat("underline")&&m.toggleFormat("underline"),a==="sub"&&!m.hasFormat("subscript")&&m.toggleFormat("subscript"),a==="super"&&!m.hasFormat("superscript")&&m.toggleFormat("superscript");let c=m.getStyle();return d&&(c+=`color: ${d};`),u&&u!=="transparent"&&(c+=`background-color: ${u};`),c&&m.setStyle(c),t&&!m.hasFormat(t)&&m.toggleFormat(t),m}}var qo=class o extends nt{static getType(){return"tab"}static clone(t){return new o(t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text}constructor(t){super(" ",t),this.__detail=Tn}static importDOM(){return null}static importJSON(t){let e=vt();return e.setFormat(t.format),e.setStyle(t.style),e}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(t){T(!1,"TabNode does not support setTextContent")}setDetail(t){T(!1,"TabNode does not support setDetail")}setMode(t){T(!1,"TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function vt(){return re(new qo)}function Il(o){return o instanceof qo}function Dt(...o){return()=>{for(let t=o.length-1;t>=0;t--)o[t]();o.length=0}}var In=new Map;function $l(o){let t={},e=o.split(";");for(let n of e)if(n!==""){let[r,i]=n.split(/:([^]+)/);r&&i&&(t[r.trim()]=i.trim())}return t}function $n(o){let t=In.get(o);return t===void 0&&(t=$l(o),In.set(o,t)),__DEV__&&Object.freeze(t),t}function lu(o){let t="";for(let e in o)e&&(t+=`${e}: ${o[e]};`);return t}function Dr(o,t){let e=o.getStartEndPoints();if(t.isSelected(o)&&!t.isSegmented()&&!t.isToken()&&e!==null){let[n,r]=e,i=o.isBackward(),s=n.getNode(),l=r.getNode(),a=t.is(s),d=t.is(l);if(a||d){let[u,m]=Or(o),c=s.is(l),f=t.is(i?l:s),g=t.is(i?s:l),h=0,N;if(c)h=u>m?m:u,N=u>m?u:m;else if(f)h=i?m:u,N=void 0;else if(g){let b=i?u:m;h=0,N=b}return t.__text=t.__text.slice(h,N),t}}return t}function Pl(o){let t=o.getStyle(),e=$l(t);In.set(t,e)}function Pn(o,t){let e=$n("getStyle"in o?o.getStyle():o.style),n=Object.entries(t).reduce((i,[s,l])=>(typeof l=="function"?i[s]=l(e[s],o):l===null?delete i[s]:i[s]=l,i),{...e}),r=lu(n);o.setStyle(r),In.set(r,n)}function Bl(o,t){let e=o.getNodes(),n=e.length,r=o.getStartEndPoints();if(r===null)return;let[i,s]=r,l=n-1,a=e[0],d=e[l];if(o.isCollapsed()&&_(o)){Pn(o,t);return}let m=a.getTextContent().length,c=s.offset,f=i.offset,g=i.isBefore(s),h=g?f:c,N=g?c:f,b=g?i.type:s.type,x=g?s.type:i.type,S=g?s.key:i.key;if(L(a)&&h===m){let v=a.getNextSibling();L(v)&&(f=0,h=0,a=v)}if(e.length===1){if(L(a)&&a.canHaveFormat()){if(h=b==="element"?0:f>c?c:f,N=x==="element"?m:f>c?f:c,h===N)return;if(Ye(a)||h===0&&N===m)Pn(a,t),a.select(h,N);else{let v=a.splitText(h,N),M=h===0?v[0]:v[1];Pn(M,t),M.select(0,N-h)}}}else{if(L(a)&&h0&&o.classList.add(...e)}function Oi(o,...t){let e=wt(...t);e.length>0&&o.classList.remove(...e)}function fu(o,t){let e=o;for(;e!=null;){if(e instanceof t)return e;e=e.getParent()}return null}function mu(o){let t=U(o,e=>E(e)&&!e.isInline());return E(t)||T(!1,"Expected node %s to have closest block element node.",o.__key),t}var U=(o,t)=>{let e=o;for(;e!==H()&&e!=null;){if(t(e))return e;e=e.getParent()}return null};function Nt(o,t){return o!==null?Object.getPrototypeOf(o).constructor.name===t.name:!1}function Ai(o,t){let e=t.body?t.body.childNodes:[],n=[],r=[];for(let i=0;i"u"||typeof window>"u"&&typeof global.window>"u")throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let e=document.createElement("div"),r=H().getChildren();for(let s=0;s{let g=new bo;return e.push(g),g}):c=pu(o,c,I)),l==null?c.length>0?s=s.concat(c):Eo(o)&&RN(o)&&(s=s.concat(ht())):E(l)&&l.append(...c),s}function pu(o,t,e){let n=[],r=[];for(let i=0;i{if(L(t)){let e=I();return e.append(t),e}return t})}function _o(o,t){let e=xu(t),n=Ai(o,e);return kN(n)}function Ot(o,t){for(let e of o.getParents())if(t(e))return e;return null}function Kl(o,t){t||(t=H());let e=[];for(let n of t.getChildren())o(n)&&e.push(n),E(n)&&e.push(...Kl(o,n));return e}function Cu(o,t,e){let n=H().getChildren();for(let r of n){let i=o.getElementByKey(r.__key);if(!i)continue;let s=i.getBoundingClientRect();if(e<=s.bottom)return r}return null}function yo(o){let t=e=>(E(e)||F(e))&&!e.isInline()&&!ne(e);return t(o)?o:U(o,t)}function bu(o){let t=[],e=i=>{for(let s of i.getChildren())t.push(s.getKey()),E(s)&&e(s)},n=H();e(n);let r=Array.from(o);return r.sort((i,s)=>{let l=t.indexOf(i.getKey()),a=t.indexOf(s.getKey());return l-a}),r}function Ar(o,t){let e=yo(o)||o,n=t?e.getNextSibling():e.getPreviousSibling();return n||(n=I(),t?e.insertAfter(n):e.insertBefore(n)),t?n.selectStart():n.selectEnd()}function Rr(o){return"__alignment"in o}function _u(o){return"__inset"in o}var yu=new WeakMap;function ae(o){return yu.get(o)||null}function Su(o,t){yu.set(o,t)}function de(o,t){return Z(o,t)!==null}function Z(o,t){if(!o)return null;for(let e of o.getNodes()){if(t(e))return e;let n=Ot(e,t);if(n)return n}return null}function Lu(o){return Z(o,L)}function Mu(o,t){if(!o)return!1;let e=o.getNodes();for(let n of e)if(L(n)&&n.hasFormat(t))return!0;return!!(e.length===1&&Ve(e[0])&&e[0].hasTextFormat(t))}function Fn(o,t){let e=C(),n=e?mu(e.getNodes()[0]):null;e&&o(n)?wi(e,I):wi(e,t)}function Vo(o,t=!0){Ul([o],t)}function Ul(o,t=!0){let e=C()?.getNodes()||[],n=e.length>0?yo(e[0]):null;if(n)if(t)for(let r=o.length-1;r>=0;r--)n.insertAfter(o[r]);else for(let r of o)n.insertBefore(r);else H().append(...o)}function rt(o){let t=jo();t.add(o.getKey()),Y(t)}function wu(o){for(let t of o){if(L(t))return t;if(E(t)){let e=t.getChildren(),n=wu(e);if(n!==null)return n}}return null}function vu(o){let t=[...o].reverse();for(let e of t){if(L(e))return e;if(E(e)){let n=[...e.getChildren()].reverse(),r=vu(n);if(r!==null)return r}}return null}function Du(o){if(o.length===0)return;let t=Xo(),e=wu(o),n=vu(o);e&&n&&(t.setTextNodeRange(e,0,n,n.getTextContentSize()||0),Y(t))}function Ou(o){let t=ae(o);t&&window.requestAnimationFrame(()=>{o.update(()=>{Y(t.clone())})})}function ki(o,t){if(!o)return!1;let e=t.getKey();for(let n of o.getNodes())if(n.getKey()===e)return!0;return!1}function kr(o,t){let e=[...o?.getNodes()||[],...At(o)];for(let n of e)if(Rr(n)&&n.getAlignment()===t)return!0;return!1}function zl(o,t){let e=[...o?.getNodes()||[],...At(o)];for(let n of e)if(Yo(n)&&n.getDirection()===t)return!0;return!1}function At(o){if(!o)return[];let t=new Map;for(let e of o.getNodes()){let n=yo(e);E(n)&&t.set(n.getKey(),n)}return Array.from(t.values())}var Yl=class{constructor(t,e,n){p(this,"key");p(this,"offset");p(this,"type");p(this,"_selection");this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){let e=this.getNode(),n=t.getNode(),r=this.offset,i=t.offset;if(E(e)){let s=e.getDescendantByIndex(r);e=s??e}if(E(n)){let s=n.getDescendantByIndex(i);n=s??n}return e===n?ri&&(n=i)}else if(!E(t)){let i=t.getNextSibling();if(L(i))e=i.__key,n=0,r="text";else{let s=t.getParent();s&&(e=s.__key,n=t.getIndexWithinParent()+1)}}o.set(e,n,r)}function Dl(o,t){if(E(t)){let e=t.getLastDescendant();E(e)||L(e)?Wl(o,e):Wl(o,t)}else Wl(o,t)}function IN(o,t,e,n){let r=o.getNode(),i=r.getChildAtIndex(o.offset),s=q(),l=ne(r)?I().append(s):s;s.setFormat(e),s.setStyle(n),i===null?r.append(l):i.insertBefore(l),o.is(t)&&t.set(s.__key,0,"text"),o.set(s.__key,0,"text")}function So(o,t,e,n){o.key=t,o.offset=e,o.type=n}var Ii=class o{constructor(t){p(this,"_nodes");p(this,"_cachedNodes");p(this,"dirty");this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!we(t))return!1;let e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(r=>n.has(r))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new o(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){let e=this.getNodes(),n=e.length,r=e[n-1],i;if(L(r))i=r.select();else{let s=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(s,s)}i.insertNodes(t);for(let s=0;s0&&!l.shouldSelectDirectly()?m=[]:m=[l]:m=l.getNodesBetween(a),ft()||(this._cachedNodes=m),m}setTextNodeRange(t,e,n,r){So(this.anchor,t.__key,e,"text"),So(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let t=this.getNodes();if(t.length===0)return"";let e=t[0],n=t[t.length-1],r=this.anchor,i=this.focus,s=r.isBefore(i),[l,a]=Or(this),d="",u=!0;for(let m=0;m=0;k--){let j=R[k];if(j.is(c)||T(j)&&j.isParentOf(c))break;j.isAttached()&&(!A.has(j)||j.is(M)?$||B.insertAfter(j,!1):j.remove())}if(!$){let k=v,j=null;for(;k!==null;){let se=k.getChildren(),Fe=se.length;(Fe===0||se[Fe-1].is(j))&&(x.delete(k.__key),j=k),k=k.getParent()}}if(!c.isToken())c=c.spliceText(a,g-a,t,!0),c.getTextContent()===""?c.remove():c.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);else if(a===g)c.select();else{let k=q(t);k.select(),c.replace(k)}for(let k=1;k0&&(N!==h.getTextContentSize()&&!qe(h)&&([h]=h.splitText(N)),h.setFormat(b));for(let x=u+1;x(T(N)||F(N))&&!N.isInline();if(!t.some(i)){E(T(n),"Expected 'firstBlock' to be an ElementNode");let N=Wl(this);n.splice(N,0,t),r.selectEnd();return}let s=BN(t),l=s.getLastDescendant(),a=s.getChildren(),d=N=>T(N)&&Ko(N)&&!N.isEmpty()&&T(n)&&(!n.isEmpty()||n.canMergeWhenEmpty()),m=!T(n)||!n.isEmpty()?this.insertParagraph():null,c=a[a.length-1],f=a[0];d(f)&&(E(T(n),"Expected 'firstBlock' to be an ElementNode"),n.append(...f.getChildren()),f=a[1]),f&&Qc(n,f);let g=xi(l,Ko);m&&T(g)&&(m.canMergeWhenEmpty()||Ko(c))&&(g.append(...m.getChildren()),m.remove()),T(n)&&n.isEmpty()&&n.remove(),l.selectEnd();let h=T(n)?n.getLastChild():null;Ae(h)&&g!==n&&h.remove()}insertParagraph(){if(this.anchor.key==="root"){let s=I();return H().splice(this.anchor.offset,0,[s]),s.select(),s}let t=Wl(this),e=xi(this.anchor.getNode(),Ko);E(T(e),"Expected ancestor to be an ElementNode");let n=e.getChildAtIndex(t),r=n?[n,...n.getNextSiblings()]:[],i=e.insertNewAfter(this,!1);return i?(i.append(...r),i.selectStart(),i):null}insertLineBreak(t){let e=ht();if(this.insertNodes([e]),t){let n=e.getParentOrThrow(),r=e.getIndexWithinParent();n.select(r,r)}}extract(){let t=this.getNodes(),e=t.length,n=e-1,r=this.anchor,i=this.focus,s=t[0],l=t[n],[a,d]=Or(this);if(e===0)return[];if(e===1){if(L(s)&&!this.isCollapsed()){let m=a>d?d:a,c=a>d?a:d,f=s.splitText(m,c),g=m===0?f[0]:f[1];return g!=null?[g]:[]}return[s]}let u=r.isBefore(i);if(L(s)){let m=u?a:d;m===s.getTextContentSize()?t.shift():m!==0&&([,s]=s.splitText(m),t[0]=s)}if(L(l)){let c=l.getTextContent().length,f=u?d:a;f===0?t.pop():f!==c&&([l]=l.splitText(f),t[n]=l)}return t}modify(t,e,n){let r=this.focus,i=this.anchor,s=t==="move",l=Jt(r,e);if(F(l)&&!l.isIsolated()){if(s&&l.isKeyboardSelectable()){let f=jo();f.add(l.__key),Y(f);return}let c=e?l.getPreviousSibling():l.getNextSibling();if(L(c)){let f=c.__key,g=e?c.getTextContent().length:0;r.set(f,g,"text"),s&&i.set(f,g,"text");return}else{let f=l.getParentOrThrow(),g,h;T(c)?(h=c.__key,g=e?c.getChildrenSize():0):(g=l.getIndexWithinParent(),h=f.__key,e||g++),r.set(h,g,"element"),s&&i.set(h,g,"element");return}}let a=J(),d=ye(a._window);if(!d)return;let u=a._blockCursorElement,m=a._rootElement;if(m!==null&&u!==null&&T(l)&&!l.isInline()&&!l.canBeEmpty()&&br(u,a,m),kN(d,t,e?"backward":"forward",n),d.rangeCount>0){let c=d.getRangeAt(0),f=this.anchor.getNode(),g=ne(f)?f:fl(f);if(this.applyDOMRange(c),this.dirty=!0,!s){let h=this.getNodes(),N=[],b=!1;for(let x=0;x0)if(e){let x=N[0];T(x)?x.selectStart():x.getParentOrThrow().selectStart()}else{let x=N[N.length-1];T(x)?x.selectEnd():x.getParentOrThrow().selectEnd()}(d.anchorNode!==c.startContainer||d.anchorOffset!==c.startOffset)&&RN(this)}}}forwardDeletion(t,e,n){if(!n&&(t.type==="element"&&T(e)&&t.offset===e.getChildrenSize()||t.type==="text"&&t.offset===e.getTextContentSize())){let r=e.getParent(),i=e.getNextSibling()||(r===null?null:r.getNextSibling());if(T(i)&&i.isShadowRoot())return!0}return!1}deleteCharacter(t){let e=this.isCollapsed();if(this.isCollapsed()){let n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;let i=this.focus,s=Jt(i,t);if(F(s)&&!s.isIsolated()){if(s.isKeyboardSelectable()&&T(r)&&r.getChildrenSize()===0){r.remove();let l=jo();l.add(s.__key),Y(l)}else s.remove(),J().dispatchCommand(De,void 0);return}else if(!t&&T(s)&&T(r)&&r.isEmpty()){r.remove(),s.selectStart();return}if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&n.offset===0&&(n.type==="element"?n.getNode():n.getNode().getParentOrThrow()).collapseAtStart(this))return}else{let l=i.type==="text"?i.getNode():null;if(r=n.type==="text"?n.getNode():null,l!==null&&l.isSegmented()){let a=i.offset,d=l.getTextContentSize();if(l.is(r)||t&&a!==d||!t&&a!==0){Ou(l,t,a);return}}else if(r!==null&&r.isSegmented()){let a=n.offset,d=r.getTextContentSize();if(r.is(l)||t&&a!==0||!t&&a!==d){Ou(r,t,a);return}}IN(this,t)}}if(this.removeText(),t&&!e&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){let n=this.anchor.getNode();n.isEmpty()&&ne(n.getParent())&&n.getIndexWithinParent()===0&&n.collapseAtStart(this)}}deleteLine(t){if(this.isCollapsed()){let e=this.anchor.type==="element";if(e&&this.insertText(" "),this.modify("extend",t,"lineboundary"),(t?this.focus:this.anchor).offset===0&&this.modify("extend",t,"character"),e){let r=t?this.anchor:this.focus;r.set(r.key,r.offset+1,r.type)}}this.removeText()}deleteWord(t){if(this.isCollapsed()){let e=this.anchor,n=e.getNode();if(this.forwardDeletion(e,n,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}};function Le(o){return o instanceof Ii}function Du(o){let t=o.offset;if(o.type==="text")return t;let e=o.getNode();return t===e.getChildrenSize()?e.getTextContent().length:0}function Or(o){let t=o.getStartEndPoints();if(t===null)return[0,0];let[e,n]=t;return e.type==="element"&&n.type==="element"&&e.key===n.key&&e.offset===n.offset?[0,0]:[Du(e),Du(n)]}function RN(o){let t=o.focus,e=o.anchor,n=e.key,r=e.offset,i=e.type;yo(e,t.key,t.offset,t.type),yo(t,n,r,i),o._cachedNodes=null}function kN(o,t,e,n){o.modify(t,e,n)}function IN(o,t){let e=o.anchor,n=o.focus,r=e.getNode(),i=n.getNode();if(r===i&&e.type==="text"&&n.type==="text"){let s=e.offset,l=n.offset,a=se||c){i.splice(u,1),c&&(a=void 0);break}}let d=i.join("").trim();d===""?n.remove():(n.setTextContent(d),n.select(a,a))}function $N(o,t,e){let n=o.getParent();return e===null||n===null||!n.canBeEmpty()||n!==e.getNode()}function Au(o,t,e,n){let r=t,i;if(o.nodeType===No){let s=!1,l=o.childNodes,a=l.length,d=n._blockCursorElement;r===a&&(s=!0,r=a-1);let u=l[r],m=!1;if(u===d)u=l[r+1],m=!0;else if(d!==null){let c=d.parentNode;if(o===c){let f=Array.prototype.indexOf.call(c.children,d);t>f&&r--}}if(i=Fo(u),L(i))r=ll(i,s);else{let c=Fo(o);if(c===null)return null;if(T(c)){r=Math.min(c.getChildrenSize(),r);let f=c.getChildAtIndex(r);if(T(f)&&$N(f,r,e)){let g=s?f.getLastDescendant():f.getFirstDescendant();g===null?c=f:(f=g,c=T(f)?f:f.getParentOrThrow()),r=0}L(f)?(i=f,c=null,r=ll(f,s)):f!==c&&s&&!m&&r++}else{let f=c.getIndexWithinParent();t===0&&F(c)&&Fo(o)===c?r=f:r=f+1,c=c.getParentOrThrow()}if(T(c))return Re(c.__key,r,"element")}}else i=Fo(o);return L(i)?Re(i.__key,r,"text"):null}function Ru(o,t,e){let n=o.offset,r=o.getNode();if(n===0){let i=r.getPreviousSibling(),s=r.getParent();if(!t)T(i)&&!e&&i.isInline()?(o.key=i.__key,o.offset=i.getChildrenSize(),o.type="element"):L(i)&&(o.key=i.__key,o.offset=i.getTextContent().length);else if((e||!t)&&i===null&&T(s)&&s.isInline()){let l=s.getPreviousSibling();L(l)&&(o.key=l.__key,o.offset=l.getTextContent().length)}}else if(n===r.getTextContent().length){let i=r.getNextSibling(),s=r.getParent();if(t&&T(i)&&i.isInline())o.key=i.__key,o.offset=0,o.type="element";else if((e||t)&&i===null&&T(s)&&s.isInline()&&!s.canInsertTextAfter()){let l=s.getNextSibling();L(l)&&(o.key=l.__key,o.offset=0)}}}function Iu(o,t,e){if(o.type==="text"&&t.type==="text"){let n=o.isBefore(t),r=o.is(t);Ru(o,n,r),Ru(t,!n,r),r&&(t.key=o.key,t.offset=o.offset,t.type=o.type);let i=J();if(i.isComposing()&&i._compositionKey!==o.key&&_(e)){let s=e.anchor,l=e.focus;yo(o,s.key,s.offset,s.type),yo(t,l.key,l.offset,l.type)}}}function $u(o,t,e,n,r,i){if(o===null||e===null||!jt(r,o,e))return null;let s=Au(o,t,_(i)?i.anchor:null,r);if(s===null)return null;let l=Au(e,n,_(i)?i.focus:null,r);if(l===null)return null;if(s.type==="element"&&l.type==="element"){let a=Fo(o),d=Fo(e);if(F(a)&&F(d))return null}return Iu(s,l,i),[s,l]}function qo(o){return T(o)&&!o.isInline()}function Mi(o,t,e,n,r,i){let s=tt(),l=new So(Re(o,t,r),Re(e,n,i),0,"");return l.dirty=!0,s._selection=l,l}function Xo(){let o=Re("root",0,"element"),t=Re("root",0,"element");return new So(o,t,0,"")}function jo(){return new Ii(new Set)}function Pu(o){let e=o.getEditorState()._selection,n=ye(o._window);return _(e)||e==null?vr(e,n,o,null):e.clone()}function Yl(o,t){return vr(null,o,t,null)}function vr(o,t,e,n){let r=e._window;if(r===null)return null;let i=n||r.event,s=i?i.type:void 0,l=s==="selectionchange",a=!kd()&&(l||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&i&&i.detail===3||s==="drop"||s===void 0),d,u,m,c;if(!_(o)||a){if(t===null)return null;if(d=t.anchorNode,u=t.focusNode,m=t.anchorOffset,c=t.focusOffset,l&&_(o)&&!jt(e,d,u))return o.clone()}else return o.clone();let f=$u(d,m,u,c,e,o);if(f===null)return null;let[g,h]=f;return new So(g,h,_(o)?o.format:0,_(o)?o.style:"")}function C(){return tt()._selection}function Ye(){return J()._editorState._selection}function Rn(o,t,e,n=1){let r=o.anchor,i=o.focus,s=r.getNode(),l=i.getNode();if(!t.is(s)&&!t.is(l))return;let a=t.__key;if(o.isCollapsed()){let d=r.offset;if(e<=d&&n>0||e0||e0||e=l,d=a?i.getChildAtIndex(l-1):i.getChildAtIndex(e);if(L(d)){let u=0;a&&(u=d.getTextContentSize()),t.set(d.__key,u,"text"),n.set(d.__key,u,"text")}return}if(T(i)){let l=i.getChildrenSize(),a=e>=l,d=a?i.getChildAtIndex(l-1):i.getChildAtIndex(e);if(L(d)){let u=0;a&&(u=d.getTextContentSize()),t.set(d.__key,u,"text")}}if(T(s)){let l=s.getChildrenSize(),a=r>=l,d=a?s.getChildAtIndex(l-1):s.getChildAtIndex(r);if(L(d)){let u=0;a&&(u=d.getTextContentSize()),n.set(d.__key,u,"text")}}}function Bu(o,t){let n=t.getEditorState()._selection,r=o._selection;if(_(r)){let i=r.anchor,s=r.focus,l;if(i.type==="text"&&(l=i.getNode(),l.selectionTransform(n,r)),s.type==="text"){let a=s.getNode();l!==a&&a.selectionTransform(n,r)}}}function kn(o,t,e,n,r){let i=null,s=0,l=null;n!==null?(i=n.__key,L(n)?(s=n.getTextContentSize(),l="text"):T(n)&&(s=n.getChildrenSize(),l="element")):r!==null&&(i=r.__key,L(r)?l="text":T(r)&&(l="element")),i!==null&&l!==null?o.set(i,s,l):(s=t.getIndexWithinParent(),s===-1&&(s=e.getChildrenSize()),o.set(e.__key,s,"element"))}function Al(o,t,e,n,r){o.type==="text"?(o.key=e,t||(o.offset+=r)):o.offset>n.getIndexWithinParent()&&(o.offset-=1)}function Fu(o,t,e,n,r,i,s){let l=n.anchorNode,a=n.focusNode,d=n.anchorOffset,u=n.focusOffset,m=document.activeElement;if(r.has("collaboration")&&m!==i||m!==null&&Ln(m))return;if(!_(t)){if(m!==null&&n.isCollapsed&&a instanceof Node){let k=ee(a);if(F(k)){n.removeAllRanges(),rt(k);return}}o!==null&&jt(e,l,a)&&n.removeAllRanges();return}let c=t.anchor,f=t.focus,g=c.key,h=f.key,N=vn(e,g),b=vn(e,h),x=c.offset,S=f.offset,v=t.format,M=t.style,R=t.isCollapsed(),A=N,$=b,B=!1;if(c.type==="text"){A=wn(N);let k=c.getNode();B=k.getFormat()!==v||k.getStyle()!==M}else _(o)&&o.anchor.type==="text"&&(B=!0);if(f.type==="text"&&($=wn(b)),!(A===null||$===null)&&(R&&(o===null||B||_(o)&&(o.format!==v||o.style!==M))&&Jc(v,M,x,g,performance.now()),!(d===x&&u===S&&l===A&&a===$&&!(n.type==="Range"&&R)&&((m===null||!i.contains(m))&&i.focus({preventScroll:!0}),c.type!=="element")))){try{n.setBaseAndExtent(A,x,$,S)}catch(k){__DEV__&&console.warn(k)}if(!r.has("skip-scroll-into-view")&&t.isCollapsed()&&i!==null&&i===document.activeElement){let k=t instanceof So&&t.anchor.type==="element"?A.childNodes[x]||null:n.rangeCount>0?n.getRangeAt(0):null;if(k!==null){let j;if(k instanceof Text){let se=document.createRange();se.selectNode(k),j=se.getBoundingClientRect()}else j=k.getBoundingClientRect();yc(e,j,i)}}Gc()}}function Me(o){let t=C()||Ye();t===null&&(t=H().selectEnd()),t.insertNodes(o)}function Wl(o){let t=o;o.isCollapsed()||t.removeText();let e=C();_(e)&&(t=e),E(_(t),"Unexpected dirty selection to be null");let n=t.anchor,r=n.getNode(),i=n.offset;for(;!Ko(r);)[r,i]=PN(r,i);return i}function PN(o,t){let e=o.getParent();if(!e){let r=I();return H().append(r),r.select(),[H(),0]}if(L(o)){let r=o.splitText(t);if(r.length===0)return[e,o.getIndexWithinParent()];let i=t===0?0:1,s=r[0].getIndexWithinParent()+i;return[e,s]}if(!T(o)||t===0)return[e,o.getIndexWithinParent()];let n=o.getChildAtIndex(t);if(n){let r=new So(Re(o.__key,t,"element"),Re(o.__key,t,"element"),0,""),i=o.insertNewAfter(r);i&&i.append(n,...n.getNextSiblings())}return[e,o.getIndexWithinParent()+1]}function BN(o){let t=I(),e=null;for(let n=0;n99&&E(!1,"One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function tt(){return fe===null&&E(!1,"Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update(), editor.read(), or editorState.read().%s",Wu()),fe}function J(){return he===null&&E(!1,"Unable to find an active editor. This method can only be used synchronously during the callback of editor.update() or editor.read().%s",Wu()),he}function Wu(){let o=0,t=new Set,e=eo.version;if(typeof window<"u")for(let r of document.querySelectorAll("[contenteditable]")){let i=Bo(r);if(Mn(i))o++;else if(i){let s=String(i.constructor.version||"<0.17.1");s===e&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}let n=` Detected on the page: ${o} compatible editor(s) with version ${e}`;return t.size&&(n+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),n}function qu(){return he}function vc(){return fe}function Ku(o,t,e){let n=t.__type,r=Kd(o,n),i=e.get(n);i===void 0&&(i=Array.from(r.transforms),e.set(n,i));let s=i.length;for(let l=0;l0||u>0;){if(a>0){t._dirtyLeaves=new Set;for(let m of l){let c=r.get(m);L(c)&&c.isAttached()&&c.isSimpleText()&&!c.isUnmergeable()&&rl(c),c!==void 0&&Uu(c,i)&&Ku(t,c,s),e.add(m)}if(l=t._dirtyLeaves,a=l.size,a>0){$i++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let m of d){let c=m[0],f=m[1];if(c!=="root"&&!f)continue;let g=r.get(c);g!==void 0&&Uu(g,i)&&Ku(t,g,s),n.set(c,f)}l=t._dirtyLeaves,a=l.size,d=t._dirtyElements,u=d.size,$i++}t._dirtyLeaves=e,t._dirtyElements=n}function Vl(o){return Xl(o,J()._nodes)}function Xl(o,t){let e=o.type,n=t.get(e);n===void 0&&E(!1,'parseEditorState: type "%s" + not found',e);let r=n.klass;o.type!==r.getType()&&E(!1,"LexicalNode: Node %s does not implement .importJSON().",r.name);let i=r.importJSON(o),s=o.children;if(T(i)&&Array.isArray(s))for(let l=0;l{throw new Error("Cannot call set() on a frozen Lexical node map")},t.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},t.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function Rt(o,t){let e=o._pendingEditorState,n=o._rootElement,r=o._headless||n===null;if(e===null)return;let i=o._editorState,s=i._selection,l=e._selection,a=o._dirtyType!==Mt,d=fe,u=ke,m=he,c=o._updating,f=o._observer,g=null;if(o._pendingEditorState=null,o._editorState=e,!r&&a&&f!==null){he=o,fe=e,ke=!1,o._updating=!0;try{let A=o._dirtyType,$=o._dirtyElements,B=o._dirtyLeaves;f.disconnect(),g=Pc(i,e,o,A,$,B)}catch(A){if(A instanceof Error&&o._onError(A),!Zl)Gl(o,null,n,e),ai(o),o._dirtyType=Xt,Zl=!0,Rt(o,i),Zl=!1;else throw A;return}finally{f.observe(n,Hu),o._updating=c,fe=d,ke=u,he=m}}e._readOnly||(e._readOnly=!0,__DEV__&&(Zu(e),_(l)&&(Object.freeze(l.anchor),Object.freeze(l.focus)),Object.freeze(l)));let h=o._dirtyLeaves,N=o._dirtyElements,b=o._normalizedNodes,x=o._updateTags,S=o._deferred,v=e._nodeMap.size;a&&(o._dirtyType=Mt,o._cloneNotNeeded.clear(),o._dirtyLeaves=new Set,o._dirtyElements=new Map,o._normalizedNodes=new Set,o._updateTags=new Set),Dc(o,e);let M=r?null:ye(o._window);if(o._editable&&M!==null&&(a||l===null||l.dirty)){he=o,fe=e;try{if(f!==null&&f.disconnect(),a||l===null||l.dirty){let A=o._blockCursorElement;A!==null&&br(A,o,n),Fu(s,l,o,M,x,n,v)}Mc(o,n,l),f!==null&&f.observe(n,Hu)}finally{he=m,fe=d}}g!==null&&UN(o,g,x,h,i),!_(l)&&l!==null&&(s===null||!s.is(l))&&o.dispatchCommand(De,void 0);let R=o._pendingDecorators;R!==null&&(o._decorators=R,o._pendingDecorators=null,Hn("decorator",o,!0,R)),KN(o,t||i,e),Hn("update",o,!0,{dirtyElements:N,dirtyLeaves:h,editorState:e,normalizedNodes:b,prevEditorState:t||i,tags:x}),WN(o,S),zN(o)}function KN(o,t,e){let n=sl(t),r=sl(e);n!==r&&Hn("textcontent",o,!0,r)}function UN(o,t,e,n,r){let i=Array.from(o._listeners.mutation),s=i.length;for(let l=0;l{r=gl(o,t,e)}),r}let n=Er(o);for(let r=4;r>=0;r--)for(let i=0;i{Rt(o)}):(d._flushSync=!1,u&&(n.clear(),o._deferred=[],o._pendingEditorState=null))}function Ee(o,t,e){o._updating?o._updates.push([t,e]):Vu(o,t,e)}var V=class extends gt{constructor(e){super(e);p(this,"__first");p(this,"__last");p(this,"__size");p(this,"__style");p(this,"__dir");this.__first=null,this.__last=null,this.__size=0,this.__style="",this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__style=e.__style,this.__dir=e.__dir}getStyle(){return this.getLatest().__style}getChildren(){let e=[],n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){let e=[],n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let n=J()._dirtyElements;return n!==null&&n.has(this.__key)}isLastChild(){let e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){let e=[],n=this.getFirstChild();for(;n!==null;){if(L(n)&&e.push(n),T(n)){let r=n.getAllTextNodes();e.push(...r)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;T(e);){let n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;T(e);){let n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){let n=this.getChildren(),r=n.length;if(e>=r){let s=n[r-1];return T(s)&&s.getLastDescendant()||s||null}let i=n[e];return T(i)&&i.getFirstDescendant()||i||null}getFirstChild(){let n=this.getLatest().__first;return n===null?null:Q(n)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&E(!1,"Expected node %s to have a first child.",this.__key),e}getLastChild(){let n=this.getLatest().__last;return n===null?null:Q(n)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&E(!1,"Expected node %s to have a last child.",this.__key),e}getChildAtIndex(e){let n=this.getChildrenSize(),r,i;if(e=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="",n=this.getChildren(),r=n.length;for(let i=0;ir.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let n=this.getWritable();return n.__dir=e,n}setStyle(e){let n=this.getWritable();return n.__style=e||"",this}splice(e,n,r){let i=r.length,s=this.getChildrenSize(),l=this.getWritable(),a=l.__key,d=[],u=[],m=this.getChildAtIndex(e+n),c=null,f=s-n+i;if(e!==0)if(e===s)c=this.getLastChild();else{let h=this.getChildAtIndex(e);h!==null&&(c=h.getPreviousSibling())}if(n>0){let h=c===null?this.getFirstChild():c.getNextSibling();for(let N=0;N({root:Qu(H())}))}};var bo=class extends V{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}};var ef=["left","right","center","justify"];function $r(o){let t=o.style.textAlign||"";return ef.includes(t)?t:o.classList.contains("align-left")?"left":o.classList.contains("align-right")?"right":o.classList.contains("align-center")?"center":o.classList.contains("align-justify")?"justify":""}function qN(o){let t=o.style.paddingLeft||"0";return Yo(t)}function Pr(o){let t=(o.dir||"").toLowerCase();return t==="rtl"||t==="ltr"?t:null}function it(o,t){o.id&&t.setId(o.id),t.setAlignment($r(o)),t.setInset(qN(o)),t.setDirection(Pr(o))}function Lo(o,t){return o.__id!==t.__id||o.__alignment!==t.__alignment||o.__inset!==t.__inset||o.__dir!==t.__dir}function tf(o,t,e){if(o.__id!==t.__id&&e.setAttribute("id",t.__id),o.__alignment!==t.__alignment){for(let n of ef)e.classList.remove("align-"+n);t.__alignment&&e.classList.add("align-"+t.__alignment)}o.__inset!==t.__inset&&(t.__inset?e.style.paddingLeft=`${t.__inset}px`:e.style.removeProperty("paddingLeft")),o.__dir!==t.__dir&&(t.__dir?e.dir=t.__dir:e.removeAttribute("dir"))}function st(o,t){t.__id&&o.setAttribute("id",t.__id),t.__alignment&&o.classList.add("align-"+t.__alignment),t.__inset&&(o.style.paddingLeft=`${t.__inset}px`),t.__dir&&(o.dir=t.__dir)}function lt(o,t){t.setId(o.id),t.setAlignment(o.alignment),t.setInset(o.inset),t.setDirection(o.direction)}var It=class extends V{constructor(){super(...arguments);p(this,"__id","");p(this,"__alignment","");p(this,"__inset",0)}setId(e){let n=this.getWritable();n.__id=e}getId(){return this.getLatest().__id}setAlignment(e){let n=this.getWritable();n.__alignment=e}getAlignment(){return this.getLatest().__alignment}setInset(e){let n=this.getWritable();n.__inset=e}getInset(){return this.getLatest().__inset}exportJSON(){return{...super.exportJSON(),id:this.__id,alignment:this.__alignment,inset:this.__inset}}};function Mo(o,t){t.__alignment=o.__alignment,t.__inset=o.__inset}var ot=class o extends It{constructor(e){super(e);p(this,"__textFormat");p(this,"__textStyle");this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){let n=this.getWritable();return n.__textFormat=e,n}hasTextFormat(e){let n=Oe[e];return(this.getTextFormat()&n)!==0}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){let n=this.getWritable();return n.__textStyle=e,n}static clone(e){return new o(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle,Mo(e,this)}createDOM(e){let n=document.createElement("p"),r=xo(e.theme,"paragraph");return r!==void 0&&n.classList.add(...r),st(n,this),n}updateDOM(e,n,r){return Lo(e,this)}static importDOM(){return{p:e=>({conversion:YN,priority:0})}}exportDOM(e){let{element:n}=super.exportDOM(e);return n&&ge(n)&&this.isEmpty()&&n.append(document.createElement("br")),{element:n}}static importJSON(e){let n=I();return lt(e,n),n.setTextFormat(e.textFormat),n}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,n){let r=I();r.setTextFormat(e.format),r.setTextStyle(e.style);let i=this.getDirection();return r.setDirection(i),r.setStyle(this.getTextStyle()),this.insertAfter(r,n),r}collapseAtStart(){let e=this.getChildren();if(e.length===0||L(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function YN(o){let t=I();return it(o,t),{node:t}}function I(){return re(new ot)}function Ze(o){return o instanceof ot}var ZN=!0,G=0,Ve=1,Kn=2,Xe=3,Ie=4;function Gl(o,t,e,n){let r=o._keyToDOMMap;r.clear(),o._editorState=Ir(),o._pendingEditorState=n,o._compositionKey=null,o._dirtyType=Mt,o._cloneNotNeeded.clear(),o._dirtyLeaves=new Set,o._dirtyElements.clear(),o._normalizedNodes=new Set,o._updateTags=new Set,o._updates=[],o._blockCursorElement=null;let i=o._observer;i!==null&&(i.disconnect(),o._observer=null),t!==null&&(t.textContent=""),e!==null&&(e.textContent="",r.set("root",e))}function VN(o,t){let e=new Map,n=new Set,r=i=>{Object.keys(i).forEach(s=>{let l=e.get(s);l===void 0&&(l=[],e.set(s,l)),l.push(i[s])})};return o.forEach(i=>{let s=i.klass.importDOM;if(s==null||n.has(s))return;n.add(s);let l=s.call(i.klass);l!==null&&r(l)}),t&&r(t),e}function Bi(o){let t=o||{},e=qu(),n=t.theme||{},r=o===void 0?e:t.parentEditor||null,i=t.disableEvents||!1,s=Ir(),l=t.namespace||(r!==null?r._config.namespace:al()),a=t.editorState,d=[Go,nt,zo,Wo,ot,bo,...t.nodes||[]],{onError:u,html:m}=t,c=t.editable!==void 0?t.editable:!0,f;if(o===void 0&&e!==null)f=e._nodes;else{f=new Map;for(let h=0;h{N.hasOwnProperty(B)||console.warn(`${A} must implement static "${B}" method`)}),!N.hasOwnProperty("importDOM")&&N.hasOwnProperty("exportDOM")&&console.warn(`${A} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),$ instanceof kt&&($.hasOwnProperty("decorate")||console.warn(`${$.constructor.name} must implement "decorate" method`)),N.hasOwnProperty("importJSON")||console.warn(`${A} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),$.hasOwnProperty("exportJSON")||console.warn(`${A} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}let S=N.getType(),v=N.transform(),M=new Set;v!==null&&M.add(v),f.set(S,{exportDOM:m&&m.export?m.export.get(N):void 0,klass:N,replace:b,replaceWithKlass:x,transforms:M})}}let g=new eo(s,r,f,{disableEvents:i,namespace:l,theme:n},u||console.error,VN(f,m?m.import:void 0),c);return a!==void 0&&(g._pendingEditorState=a,g._dirtyType=Xt),g}var eo=class{constructor(t,e,n,r,i,s,l){p(this,"constructor");p(this,"_headless");p(this,"_parentEditor");p(this,"_rootElement");p(this,"_editorState");p(this,"_pendingEditorState");p(this,"_compositionKey");p(this,"_deferred");p(this,"_keyToDOMMap");p(this,"_updates");p(this,"_updating");p(this,"_listeners");p(this,"_commands");p(this,"_nodes");p(this,"_decorators");p(this,"_pendingDecorators");p(this,"_config");p(this,"_dirtyType");p(this,"_cloneNotNeeded");p(this,"_dirtyLeaves");p(this,"_dirtyElements");p(this,"_normalizedNodes");p(this,"_updateTags");p(this,"_observer");p(this,"_key");p(this,"_onError");p(this,"_htmlConversions");p(this,"_window");p(this,"_editable");p(this,"_blockCursorElement");this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=Mt,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=al(),this._onError=i,this._htmlConversions=s,this._editable=l,this._headless=e!==null&&e._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){let e=this._listeners.update;return e.add(t),()=>{e.delete(t)}}registerEditableListener(t){let e=this._listeners.editable;return e.add(t),()=>{e.delete(t)}}registerDecoratorListener(t){let e=this._listeners.decorator;return e.add(t),()=>{e.delete(t)}}registerTextContentListener(t){let e=this._listeners.textcontent;return e.add(t),()=>{e.delete(t)}}registerRootListener(t){let e=this._listeners.root;return t(this._rootElement,null),e.add(t),()=>{t(null,this._rootElement),e.delete(t)}}registerCommand(t,e,n){n===void 0&&E(!1,'Listener for type "command" requires a "priority".');let r=this._commands;r.has(t)||r.set(t,[new Set,new Set,new Set,new Set,new Set]);let i=r.get(t);i===void 0&&E(!1,"registerCommand: Command %s not found in command map",String(t));let s=i[n];return s.add(e),()=>{s.delete(e),i.every(l=>l.size===0)&&r.delete(t)}}registerMutationListener(t,e,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,i=this._listeners.mutation;i.set(e,r);let s=n&&n.skipInitialization;return(s===void 0?ZN:s)||this.initializeMutationListener(e,r),()=>{i.delete(e)}}getRegisteredNode(t){let e=this._nodes.get(t.getType());return e===void 0&&E(!1,"Node %s has not been registered. Ensure node has been passed to createEditor.",t.name),e}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){let n=this._editorState,r=wc(n).get(e.getType());if(!r)return;let i=new Map;for(let s of r.keys())i.set(s,"created");i.size>0&&t(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){let n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){let n=this.registerNodeTransformToKlass(t,e),r=[n],i=n.replaceWithKlass;if(i!=null){let s=this.registerNodeTransformToKlass(i,e);r.push(s)}return Yd(this,t.getType()),()=>{r.forEach(s=>s.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,e){return O(this,t,e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){let e=this._rootElement;if(t!==e){let n=xo(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=t,Gl(this,e,t,r),e!==null&&(this._config.disableEvents||jc(e),n!=null&&e.classList.remove(...n)),t!==null){let i=Lc(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=Xt,ai(this),this._updateTags.add("history-merge"),Rt(this),this._config.disableEvents||Xc(t,this),n!=null&&t.classList.add(...n)}else this._editorState=r,this._pendingEditorState=null,this._window=null;Hn("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,e){t.isEmpty()&&E(!1,"setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty."),li(this);let n=this._pendingEditorState,r=this._updateTags,i=e!==void 0?e.tag:null;n!==null&&!n.isEmpty()&&(i!=null&&r.add(i),Rt(this)),this._pendingEditorState=t,this._dirtyType=Xt,this._dirtyElements.set("root",!1),this._compositionKey=null,i!=null&&r.add(i),Rt(this)}parseEditorState(t,e){let n=typeof t=="string"?JSON.parse(t):t;return Yu(n,this,e)}read(t){return Rt(this),this.getEditorState().read(t,{editor:this})}update(t,e){Ee(this,t,e)}updateAndCommit(t,e){this.update(t,e),this.commitUpdates()}focus(t,e={}){let n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),Ee(this,()=>{let r=C(),i=H();r!==null?r.dirty=!0:i.getChildrenSize()!==0&&(e.defaultSelection==="rootStart"?i.selectStart():i.selectEnd())},{onUpdate:()=>{n.removeAttribute("autocapitalize"),t&&t()},tag:"focus"}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}commitUpdates(){Rt(this)}blur(){let t=this._rootElement;t!==null&&t.blur();let e=ye(this._window);e!==null&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Hn("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}};p(eo,"version");eo.version="0.17.1";var Fi=0,Jl=1,Ql=2,Et=0,XN=1,of=2,jN=3,GN=4;function JN(o,t,e){let n=o._nodeMap,r=[];for(let i of t){let s=n.get(i);s!==void 0&&r.push(s)}for(let[i,s]of e){if(!s)continue;let l=n.get(i);l!==void 0&&!ne(l)&&r.push(l)}return r}function QN(o,t,e,n,r){if(o===null||e.size===0&&n.size===0&&!r)return Et;let i=t._selection,s=o._selection;if(r)return XN;if(!_(i)||!_(s)||!s.isCollapsed()||!i.isCollapsed())return Et;let l=JN(t,e,n);if(l.length===0)return Et;if(l.length>1){let b=t._nodeMap,x=b.get(i.anchor.key),S=b.get(s.anchor.key);return x&&S&&!o._nodeMap.has(x.__key)&&L(x)&&x.__text.length===1&&i.anchor.offset===1?of:Et}let a=l[0],d=o._nodeMap.get(a.__key);if(!L(d)||!L(a)||d.__mode!==a.__mode)return Et;let u=d.__text,m=a.__text;if(u===m)return Et;let c=i.anchor,f=s.anchor;if(c.key!==f.key||c.type!=="text")return Et;let g=c.offset,h=f.offset,N=m.length-u.length;return N===1&&h===g-1?of:N===-1&&h===g+1?jN:N===-1&&h===g?GN:Et}function ex(o,t,e){let n=t._nodeMap.get(o),r=e._nodeMap.get(o),i=t._selection,s=e._selection;return!(_(i)&&_(s)&&i.anchor.type==="element"&&i.focus.type==="element"&&s.anchor.type==="text"&&s.focus.type==="text")&&L(n)&&L(r)&&n.__parent===r.__parent?JSON.stringify(t.read(()=>n.exportJSON()))===JSON.stringify(e.read(()=>r.exportJSON())):!1}function tx(o,t){let e=Date.now(),n=Et;return(r,i,s,l,a,d)=>{let u=Date.now();if(d.has("historic"))return n=Et,e=u,Ql;let m=QN(r,i,l,a,o.isComposing()),c=(()=>{let f=s===null||s.editor===o,g=d.has("history-push");if(!g&&f&&d.has("history-merge"))return Fi;if(r===null)return Jl;let N=i._selection;if(!(l.size>0||a.size>0))return N!==null?Fi:Ql;if(g===!1&&m!==Et&&m===n&&u{let m=t.current,c=t.redoStack,f=t.undoStack,g=m===null?null:m.editorState;if(m!==null&&s===g)return;let h=n(l,s,m,a,d,u);if(h===Jl)c.length!==0&&(t.redoStack=[],o.dispatchCommand(po,!1)),m!==null&&(f.push({...m}),o.dispatchCommand(go,!0));else if(h===Ql)return;t.current={editor:o,editorState:s}};return Dt(o.registerCommand(co,()=>(nx(o,t),!0),G),o.registerCommand(uo,()=>(ox(o,t),!0),G),o.registerCommand(qs,()=>(nf(t),!1),G),o.registerCommand(Ys,()=>(nf(t),o.dispatchCommand(po,!1),o.dispatchCommand(go,!1),!0),G),o.registerUpdateListener(r))}function ta(){return{current:null,redoStack:[],undoStack:[]}}var sf=o=>me?(o||window).getSelection():null;function lf(o,t=C()){return t==null&&E(!1,"Expected valid LexicalSelection"),_(t)&&t.isCollapsed()||t.getNodes().length===0?"":Ri(o,t)}function af(o,t=C()){return t==null&&E(!1,"Expected valid LexicalSelection"),_(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(cf(o,t))}function Hi(o,t,e){let n=o.getData("application/x-lexical-editor");if(n)try{let s=JSON.parse(n);if(s.namespace===e._config.namespace&&Array.isArray(s.nodes)){let l=uf(s.nodes);return oa(e,l,t)}}catch{}let r=o.getData("text/html");if(r)try{let l=new DOMParser().parseFromString(r,"text/html"),a=Ai(e,l);return oa(e,a,t)}catch{}let i=o.getData("text/plain")||o.getData("text/uri-list");if(i!=null)if(_(t)){let s=i.split(/(\r?\n|\t)/);s[s.length-1]===""&&s.pop();for(let l=0;l=0;k--){let j=R[k];if(j.is(c)||E(j)&&j.isParentOf(c))break;j.isAttached()&&(!A.has(j)||j.is(M)?$||B.insertAfter(j,!1):j.remove())}if(!$){let k=v,j=null;for(;k!==null;){let se=k.getChildren(),He=se.length;(He===0||se[He-1].is(j))&&(x.delete(k.__key),j=k),k=k.getParent()}}if(!c.isToken())c=c.spliceText(a,g-a,t,!0),c.getTextContent()===""?c.remove():c.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);else if(a===g)c.select();else{let k=q(t);k.select(),c.replace(k)}for(let k=1;k0&&(N!==h.getTextContentSize()&&!Ye(h)&&([h]=h.splitText(N)),h.setFormat(b));for(let x=u+1;x(E(N)||F(N))&&!N.isInline();if(!t.some(i)){T(E(n),"Expected 'firstBlock' to be an ElementNode");let N=ql(this);n.splice(N,0,t),r.selectEnd();return}let s=KN(t),l=s.getLastDescendant(),a=s.getChildren(),d=N=>E(N)&&Uo(N)&&!N.isEmpty()&&E(n)&&(!n.isEmpty()||n.canMergeWhenEmpty()),m=!E(n)||!n.isEmpty()?this.insertParagraph():null,c=a[a.length-1],f=a[0];d(f)&&(T(E(n),"Expected 'firstBlock' to be an ElementNode"),n.append(...f.getChildren()),f=a[1]),f&&tu(n,f);let g=xi(l,Uo);m&&E(g)&&(m.canMergeWhenEmpty()||Uo(c))&&(g.append(...m.getChildren()),m.remove()),E(n)&&n.isEmpty()&&n.remove(),l.selectEnd();let h=E(n)?n.getLastChild():null;ke(h)&&g!==n&&h.remove()}insertParagraph(){if(this.anchor.key==="root"){let s=I();return H().splice(this.anchor.offset,0,[s]),s.select(),s}let t=ql(this),e=xi(this.anchor.getNode(),Uo);T(E(e),"Expected ancestor to be an ElementNode");let n=e.getChildAtIndex(t),r=n?[n,...n.getNextSiblings()]:[],i=e.insertNewAfter(this,!1);return i?(i.append(...r),i.selectStart(),i):null}insertLineBreak(t){let e=ht();if(this.insertNodes([e]),t){let n=e.getParentOrThrow(),r=e.getIndexWithinParent();n.select(r,r)}}extract(){let t=this.getNodes(),e=t.length,n=e-1,r=this.anchor,i=this.focus,s=t[0],l=t[n],[a,d]=Or(this);if(e===0)return[];if(e===1){if(L(s)&&!this.isCollapsed()){let m=a>d?d:a,c=a>d?a:d,f=s.splitText(m,c),g=m===0?f[0]:f[1];return g!=null?[g]:[]}return[s]}let u=r.isBefore(i);if(L(s)){let m=u?a:d;m===s.getTextContentSize()?t.shift():m!==0&&([,s]=s.splitText(m),t[0]=s)}if(L(l)){let c=l.getTextContent().length,f=u?d:a;f===0?t.pop():f!==c&&([l]=l.splitText(f),t[n]=l)}return t}modify(t,e,n){let r=this.focus,i=this.anchor,s=t==="move",l=Jt(r,e);if(F(l)&&!l.isIsolated()){if(s&&l.isKeyboardSelectable()){let f=jo();f.add(l.__key),Y(f);return}let c=e?l.getPreviousSibling():l.getNextSibling();if(L(c)){let f=c.__key,g=e?c.getTextContent().length:0;r.set(f,g,"text"),s&&i.set(f,g,"text");return}else{let f=l.getParentOrThrow(),g,h;E(c)?(h=c.__key,g=e?c.getChildrenSize():0):(g=l.getIndexWithinParent(),h=f.__key,e||g++),r.set(h,g,"element"),s&&i.set(h,g,"element");return}}let a=Q(),d=Le(a._window);if(!d)return;let u=a._blockCursorElement,m=a._rootElement;if(m!==null&&u!==null&&E(l)&&!l.isInline()&&!l.canBeEmpty()&&br(u,a,m),PN(d,t,e?"backward":"forward",n),d.rangeCount>0){let c=d.getRangeAt(0),f=this.anchor.getNode(),g=ne(f)?f:ml(f);if(this.applyDOMRange(c),this.dirty=!0,!s){let h=this.getNodes(),N=[],b=!1;for(let x=0;x0)if(e){let x=N[0];E(x)?x.selectStart():x.getParentOrThrow().selectStart()}else{let x=N[N.length-1];E(x)?x.selectEnd():x.getParentOrThrow().selectEnd()}(d.anchorNode!==c.startContainer||d.anchorOffset!==c.startOffset)&&$N(this)}}}forwardDeletion(t,e,n){if(!n&&(t.type==="element"&&E(e)&&t.offset===e.getChildrenSize()||t.type==="text"&&t.offset===e.getTextContentSize())){let r=e.getParent(),i=e.getNextSibling()||(r===null?null:r.getNextSibling());if(E(i)&&i.isShadowRoot())return!0}return!1}deleteCharacter(t){let e=this.isCollapsed();if(this.isCollapsed()){let n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;let i=this.focus,s=Jt(i,t);if(F(s)&&!s.isIsolated()){if(s.isKeyboardSelectable()&&E(r)&&r.getChildrenSize()===0){r.remove();let l=jo();l.add(s.__key),Y(l)}else s.remove(),Q().dispatchCommand(be,void 0);return}else if(!t&&E(s)&&E(r)&&r.isEmpty()){r.remove(),s.selectStart();return}if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&n.offset===0&&(n.type==="element"?n.getNode():n.getNode().getParentOrThrow()).collapseAtStart(this))return}else{let l=i.type==="text"?i.getNode():null;if(r=n.type==="text"?n.getNode():null,l!==null&&l.isSegmented()){let a=i.offset,d=l.getTextContentSize();if(l.is(r)||t&&a!==d||!t&&a!==0){Ru(l,t,a);return}}else if(r!==null&&r.isSegmented()){let a=n.offset,d=r.getTextContentSize();if(r.is(l)||t&&a!==0||!t&&a!==d){Ru(r,t,a);return}}BN(this,t)}}if(this.removeText(),t&&!e&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){let n=this.anchor.getNode();n.isEmpty()&&ne(n.getParent())&&n.getIndexWithinParent()===0&&n.collapseAtStart(this)}}deleteLine(t){if(this.isCollapsed()){let e=this.anchor.type==="element";if(e&&this.insertText(" "),this.modify("extend",t,"lineboundary"),(t?this.focus:this.anchor).offset===0&&this.modify("extend",t,"character"),e){let r=t?this.anchor:this.focus;r.set(r.key,r.offset+1,r.type)}}this.removeText()}deleteWord(t){if(this.isCollapsed()){let e=this.anchor,n=e.getNode();if(this.forwardDeletion(e,n,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}};function we(o){return o instanceof Ii}function Au(o){let t=o.offset;if(o.type==="text")return t;let e=o.getNode();return t===e.getChildrenSize()?e.getTextContent().length:0}function Or(o){let t=o.getStartEndPoints();if(t===null)return[0,0];let[e,n]=t;return e.type==="element"&&n.type==="element"&&e.key===n.key&&e.offset===n.offset?[0,0]:[Au(e),Au(n)]}function $N(o){let t=o.focus,e=o.anchor,n=e.key,r=e.offset,i=e.type;So(e,t.key,t.offset,t.type),So(t,n,r,i),o._cachedNodes=null}function PN(o,t,e,n){o.modify(t,e,n)}function BN(o,t){let e=o.anchor,n=o.focus,r=e.getNode(),i=n.getNode();if(r===i&&e.type==="text"&&n.type==="text"){let s=e.offset,l=n.offset,a=se||c){i.splice(u,1),c&&(a=void 0);break}}let d=i.join("").trim();d===""?n.remove():(n.setTextContent(d),n.select(a,a))}function FN(o,t,e){let n=o.getParent();return e===null||n===null||!n.canBeEmpty()||n!==e.getNode()}function ku(o,t,e,n){let r=t,i;if(o.nodeType===No){let s=!1,l=o.childNodes,a=l.length,d=n._blockCursorElement;r===a&&(s=!0,r=a-1);let u=l[r],m=!1;if(u===d)u=l[r+1],m=!0;else if(d!==null){let c=d.parentNode;if(o===c){let f=Array.prototype.indexOf.call(c.children,d);t>f&&r--}}if(i=Ho(u),L(i))r=al(i,s);else{let c=Ho(o);if(c===null)return null;if(E(c)){r=Math.min(c.getChildrenSize(),r);let f=c.getChildAtIndex(r);if(E(f)&&FN(f,r,e)){let g=s?f.getLastDescendant():f.getFirstDescendant();g===null?c=f:(f=g,c=E(f)?f:f.getParentOrThrow()),r=0}L(f)?(i=f,c=null,r=al(f,s)):f!==c&&s&&!m&&r++}else{let f=c.getIndexWithinParent();t===0&&F(c)&&Ho(o)===c?r=f:r=f+1,c=c.getParentOrThrow()}if(E(c))return Ie(c.__key,r,"element")}}else i=Ho(o);return L(i)?Ie(i.__key,r,"text"):null}function Iu(o,t,e){let n=o.offset,r=o.getNode();if(n===0){let i=r.getPreviousSibling(),s=r.getParent();if(!t)E(i)&&!e&&i.isInline()?(o.key=i.__key,o.offset=i.getChildrenSize(),o.type="element"):L(i)&&(o.key=i.__key,o.offset=i.getTextContent().length);else if((e||!t)&&i===null&&E(s)&&s.isInline()){let l=s.getPreviousSibling();L(l)&&(o.key=l.__key,o.offset=l.getTextContent().length)}}else if(n===r.getTextContent().length){let i=r.getNextSibling(),s=r.getParent();if(t&&E(i)&&i.isInline())o.key=i.__key,o.offset=0,o.type="element";else if((e||t)&&i===null&&E(s)&&s.isInline()&&!s.canInsertTextAfter()){let l=s.getNextSibling();L(l)&&(o.key=l.__key,o.offset=0)}}}function Pu(o,t,e){if(o.type==="text"&&t.type==="text"){let n=o.isBefore(t),r=o.is(t);Iu(o,n,r),Iu(t,!n,r),r&&(t.key=o.key,t.offset=o.offset,t.type=o.type);let i=Q();if(i.isComposing()&&i._compositionKey!==o.key&&_(e)){let s=e.anchor,l=e.focus;So(o,s.key,s.offset,s.type),So(t,l.key,l.offset,l.type)}}}function Bu(o,t,e,n,r,i){if(o===null||e===null||!jt(r,o,e))return null;let s=ku(o,t,_(i)?i.anchor:null,r);if(s===null)return null;let l=ku(e,n,_(i)?i.focus:null,r);if(l===null)return null;if(s.type==="element"&&l.type==="element"){let a=Ho(o),d=Ho(e);if(F(a)&&F(d))return null}return Pu(s,l,i),[s,l]}function Yo(o){return E(o)&&!o.isInline()}function Mi(o,t,e,n,r,i){let s=tt(),l=new Lo(Ie(o,t,r),Ie(e,n,i),0,"");return l.dirty=!0,s._selection=l,l}function Xo(){let o=Ie("root",0,"element"),t=Ie("root",0,"element");return new Lo(o,t,0,"")}function jo(){return new Ii(new Set)}function Fu(o){let e=o.getEditorState()._selection,n=Le(o._window);return _(e)||e==null?vr(e,n,o,null):e.clone()}function Zl(o,t){return vr(null,o,t,null)}function vr(o,t,e,n){let r=e._window;if(r===null)return null;let i=n||r.event,s=i?i.type:void 0,l=s==="selectionchange",a=!$d()&&(l||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&i&&i.detail===3||s==="drop"||s===void 0),d,u,m,c;if(!_(o)||a){if(t===null)return null;if(d=t.anchorNode,u=t.focusNode,m=t.anchorOffset,c=t.focusOffset,l&&_(o)&&!jt(e,d,u))return o.clone()}else return o.clone();let f=Bu(d,m,u,c,e,o);if(f===null)return null;let[g,h]=f;return new Lo(g,h,_(o)?o.format:0,_(o)?o.style:"")}function C(){return tt()._selection}function Ze(){return Q()._editorState._selection}function Rn(o,t,e,n=1){let r=o.anchor,i=o.focus,s=r.getNode(),l=i.getNode();if(!t.is(s)&&!t.is(l))return;let a=t.__key;if(o.isCollapsed()){let d=r.offset;if(e<=d&&n>0||e0||e0||e=l,d=a?i.getChildAtIndex(l-1):i.getChildAtIndex(e);if(L(d)){let u=0;a&&(u=d.getTextContentSize()),t.set(d.__key,u,"text"),n.set(d.__key,u,"text")}return}if(E(i)){let l=i.getChildrenSize(),a=e>=l,d=a?i.getChildAtIndex(l-1):i.getChildAtIndex(e);if(L(d)){let u=0;a&&(u=d.getTextContentSize()),t.set(d.__key,u,"text")}}if(E(s)){let l=s.getChildrenSize(),a=r>=l,d=a?s.getChildAtIndex(l-1):s.getChildAtIndex(r);if(L(d)){let u=0;a&&(u=d.getTextContentSize()),n.set(d.__key,u,"text")}}}function Hu(o,t){let n=t.getEditorState()._selection,r=o._selection;if(_(r)){let i=r.anchor,s=r.focus,l;if(i.type==="text"&&(l=i.getNode(),l.selectionTransform(n,r)),s.type==="text"){let a=s.getNode();l!==a&&a.selectionTransform(n,r)}}}function kn(o,t,e,n,r){let i=null,s=0,l=null;n!==null?(i=n.__key,L(n)?(s=n.getTextContentSize(),l="text"):E(n)&&(s=n.getChildrenSize(),l="element")):r!==null&&(i=r.__key,L(r)?l="text":E(r)&&(l="element")),i!==null&&l!==null?o.set(i,s,l):(s=t.getIndexWithinParent(),s===-1&&(s=e.getChildrenSize()),o.set(e.__key,s,"element"))}function Rl(o,t,e,n,r){o.type==="text"?(o.key=e,t||(o.offset+=r)):o.offset>n.getIndexWithinParent()&&(o.offset-=1)}function Ku(o,t,e,n,r,i,s){let l=n.anchorNode,a=n.focusNode,d=n.anchorOffset,u=n.focusOffset,m=document.activeElement;if(r.has("collaboration")&&m!==i||m!==null&&Ln(m))return;if(!_(t)){if(m!==null&&n.isCollapsed&&a instanceof Node){let k=G(a);if(F(k)){n.removeAllRanges(),rt(k);return}}o!==null&&jt(e,l,a)&&n.removeAllRanges();return}let c=t.anchor,f=t.focus,g=c.key,h=f.key,N=vn(e,g),b=vn(e,h),x=c.offset,S=f.offset,v=t.format,M=t.style,R=t.isCollapsed(),A=N,$=b,B=!1;if(c.type==="text"){A=wn(N);let k=c.getNode();B=k.getFormat()!==v||k.getStyle()!==M}else _(o)&&o.anchor.type==="text"&&(B=!0);if(f.type==="text"&&($=wn(b)),!(A===null||$===null)&&(R&&(o===null||B||_(o)&&(o.format!==v||o.style!==M))&&eu(v,M,x,g,performance.now()),!(d===x&&u===S&&l===A&&a===$&&!(n.type==="Range"&&R)&&((m===null||!i.contains(m))&&i.focus({preventScroll:!0}),c.type!=="element")))){try{n.setBaseAndExtent(A,x,$,S)}catch(k){__DEV__&&console.warn(k)}if(!r.has("skip-scroll-into-view")&&t.isCollapsed()&&i!==null&&i===document.activeElement){let k=t instanceof Lo&&t.anchor.type==="element"?A.childNodes[x]||null:n.rangeCount>0?n.getRangeAt(0):null;if(k!==null){let j;if(k instanceof Text){let se=document.createRange();se.selectNode(k),j=se.getBoundingClientRect()}else j=k.getBoundingClientRect();Lc(e,j,i)}}Qc()}}function ve(o){let t=C()||Ze();t===null&&(t=H().selectEnd()),t.insertNodes(o)}function ql(o){let t=o;o.isCollapsed()||t.removeText();let e=C();_(e)&&(t=e),T(_(t),"Unexpected dirty selection to be null");let n=t.anchor,r=n.getNode(),i=n.offset;for(;!Uo(r);)[r,i]=HN(r,i);return i}function HN(o,t){let e=o.getParent();if(!e){let r=I();return H().append(r),r.select(),[H(),0]}if(L(o)){let r=o.splitText(t);if(r.length===0)return[e,o.getIndexWithinParent()];let i=t===0?0:1,s=r[0].getIndexWithinParent()+i;return[e,s]}if(!E(o)||t===0)return[e,o.getIndexWithinParent()];let n=o.getChildAtIndex(t);if(n){let r=new Lo(Ie(o.__key,t,"element"),Ie(o.__key,t,"element"),0,""),i=o.insertNewAfter(r);i&&i.append(n,...n.getNextSiblings())}return[e,o.getIndexWithinParent()+1]}function KN(o){let t=I(),e=null;for(let n=0;n99&&T(!1,"One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function tt(){return me===null&&T(!1,"Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update(), editor.read(), or editorState.read().%s",Yu()),me}function Q(){return Ne===null&&T(!1,"Unable to find an active editor. This method can only be used synchronously during the callback of editor.update() or editor.read().%s",Yu()),Ne}function Yu(){let o=0,t=new Set,e=eo.version;if(typeof window<"u")for(let r of document.querySelectorAll("[contenteditable]")){let i=Fo(r);if(Mn(i))o++;else if(i){let s=String(i.constructor.version||"<0.17.1");s===e&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}let n=` Detected on the page: ${o} compatible editor(s) with version ${e}`;return t.size&&(n+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),n}function Zu(){return Ne}function Oc(){return me}function zu(o,t,e){let n=t.__type,r=zd(o,n),i=e.get(n);i===void 0&&(i=Array.from(r.transforms),e.set(n,i));let s=i.length;for(let l=0;l0||u>0;){if(a>0){t._dirtyLeaves=new Set;for(let m of l){let c=r.get(m);L(c)&&c.isAttached()&&c.isSimpleText()&&!c.isUnmergeable()&&il(c),c!==void 0&&Wu(c,i)&&zu(t,c,s),e.add(m)}if(l=t._dirtyLeaves,a=l.size,a>0){$i++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let m of d){let c=m[0],f=m[1];if(c!=="root"&&!f)continue;let g=r.get(c);g!==void 0&&Wu(g,i)&&zu(t,g,s),n.set(c,f)}l=t._dirtyLeaves,a=l.size,d=t._dirtyElements,u=d.size,$i++}t._dirtyLeaves=e,t._dirtyElements=n}function Xl(o){return jl(o,Q()._nodes)}function jl(o,t){let e=o.type,n=t.get(e);n===void 0&&T(!1,'parseEditorState: type "%s" + not found',e);let r=n.klass;o.type!==r.getType()&&T(!1,"LexicalNode: Node %s does not implement .importJSON().",r.name);let i=r.importJSON(o),s=o.children;if(E(i)&&Array.isArray(s))for(let l=0;l{throw new Error("Cannot call set() on a frozen Lexical node map")},t.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},t.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function Rt(o,t){let e=o._pendingEditorState,n=o._rootElement,r=o._headless||n===null;if(e===null)return;let i=o._editorState,s=i._selection,l=e._selection,a=o._dirtyType!==Mt,d=me,u=$e,m=Ne,c=o._updating,f=o._observer,g=null;if(o._pendingEditorState=null,o._editorState=e,!r&&a&&f!==null){Ne=o,me=e,$e=!1,o._updating=!0;try{let A=o._dirtyType,$=o._dirtyElements,B=o._dirtyLeaves;f.disconnect(),g=Fc(i,e,o,A,$,B)}catch(A){if(A instanceof Error&&o._onError(A),!Vl)Jl(o,null,n,e),ai(o),o._dirtyType=Xt,Vl=!0,Rt(o,i),Vl=!1;else throw A;return}finally{f.observe(n,Uu),o._updating=c,me=d,$e=u,Ne=m}}e._readOnly||(e._readOnly=!0,__DEV__&&(Xu(e),_(l)&&(Object.freeze(l.anchor),Object.freeze(l.focus)),Object.freeze(l)));let h=o._dirtyLeaves,N=o._dirtyElements,b=o._normalizedNodes,x=o._updateTags,S=o._deferred,v=e._nodeMap.size;a&&(o._dirtyType=Mt,o._cloneNotNeeded.clear(),o._dirtyLeaves=new Set,o._dirtyElements=new Map,o._normalizedNodes=new Set,o._updateTags=new Set),Ac(o,e);let M=r?null:Le(o._window);if(o._editable&&M!==null&&(a||l===null||l.dirty)){Ne=o,me=e;try{if(f!==null&&f.disconnect(),a||l===null||l.dirty){let A=o._blockCursorElement;A!==null&&br(A,o,n),Ku(s,l,o,M,x,n,v)}vc(o,n,l),f!==null&&f.observe(n,Uu)}finally{Ne=m,me=d}}g!==null&&qN(o,g,x,h,i),!_(l)&&l!==null&&(s===null||!s.is(l))&&o.dispatchCommand(be,void 0);let R=o._pendingDecorators;R!==null&&(o._decorators=R,o._pendingDecorators=null,Hn("decorator",o,!0,R)),WN(o,t||i,e),Hn("update",o,!0,{dirtyElements:N,dirtyLeaves:h,editorState:e,normalizedNodes:b,prevEditorState:t||i,tags:x}),ZN(o,S),YN(o)}function WN(o,t,e){let n=ll(t),r=ll(e);n!==r&&Hn("textcontent",o,!0,r)}function qN(o,t,e,n,r){let i=Array.from(o._listeners.mutation),s=i.length;for(let l=0;l{r=hl(o,t,e)}),r}let n=Er(o);for(let r=4;r>=0;r--)for(let i=0;i{Rt(o)}):(d._flushSync=!1,u&&(n.clear(),o._deferred=[],o._pendingEditorState=null))}function Te(o,t,e){o._updating?o._updates.push([t,e]):ju(o,t,e)}var V=class extends gt{constructor(e){super(e);p(this,"__first");p(this,"__last");p(this,"__size");p(this,"__style");p(this,"__dir");this.__first=null,this.__last=null,this.__size=0,this.__style="",this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__style=e.__style,this.__dir=e.__dir}getStyle(){return this.getLatest().__style}getChildren(){let e=[],n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){let e=[],n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let n=Q()._dirtyElements;return n!==null&&n.has(this.__key)}isLastChild(){let e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){let e=[],n=this.getFirstChild();for(;n!==null;){if(L(n)&&e.push(n),E(n)){let r=n.getAllTextNodes();e.push(...r)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;E(e);){let n=e.getFirstChild();if(n===null)break;e=n}return e}getFirstSelectableDescendant(){if(this.shouldSelectDirectly())return null;let e=this.getFirstChild();for(;E(e)&&!e.shouldSelectDirectly();){let n=e.getFirstChild();if(n===null)break;e=n}return e}getLastDescendant(){let e=this.getLastChild();for(;E(e);){let n=e.getLastChild();if(n===null)break;e=n}return e}getLastSelectableDescendant(){if(this.shouldSelectDirectly())return null;let e=this.getLastChild();for(;E(e)&&!e.shouldSelectDirectly();){let n=e.getLastChild();if(n===null)break;e=n}return e}getDescendantByIndex(e){let n=this.getChildren(),r=n.length;if(e>=r){let s=n[r-1];return E(s)&&s.getLastDescendant()||s||null}let i=n[e];return E(i)&&i.getFirstDescendant()||i||null}getFirstChild(){let n=this.getLatest().__first;return n===null?null:ee(n)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&T(!1,"Expected node %s to have a first child.",this.__key),e}getLastChild(){let n=this.getLatest().__last;return n===null?null:ee(n)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&T(!1,"Expected node %s to have a last child.",this.__key),e}getChildAtIndex(e){let n=this.getChildrenSize(),r,i;if(e=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="",n=this.getChildren(),r=n.length;for(let i=0;ir.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let n=this.getWritable();return n.__dir=e,n}setStyle(e){let n=this.getWritable();return n.__style=e||"",this}splice(e,n,r){let i=r.length,s=this.getChildrenSize(),l=this.getWritable(),a=l.__key,d=[],u=[],m=this.getChildAtIndex(e+n),c=null,f=s-n+i;if(e!==0)if(e===s)c=this.getLastChild();else{let h=this.getChildAtIndex(e);h!==null&&(c=h.getPreviousSibling())}if(n>0){let h=c===null?this.getFirstChild():c.getNextSibling();for(let N=0;N({root:tf(H())}))}};var bo=class extends V{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}};var of=["left","right","center","justify"];function $r(o){let t=o.style.textAlign||"";return of.includes(t)?t:o.classList.contains("align-left")?"left":o.classList.contains("align-right")?"right":o.classList.contains("align-center")?"center":o.classList.contains("align-justify")?"justify":""}function VN(o){let t=o.style.paddingLeft||"0";return Zo(t)}function Pr(o){let t=(o.dir||"").toLowerCase();return t==="rtl"||t==="ltr"?t:null}function it(o,t){o.id&&t.setId(o.id),t.setAlignment($r(o)),t.setInset(VN(o)),t.setDirection(Pr(o))}function Mo(o,t){return o.__id!==t.__id||o.__alignment!==t.__alignment||o.__inset!==t.__inset||o.__dir!==t.__dir}function nf(o,t,e){if(o.__id!==t.__id&&e.setAttribute("id",t.__id),o.__alignment!==t.__alignment){for(let n of of)e.classList.remove("align-"+n);t.__alignment&&e.classList.add("align-"+t.__alignment)}o.__inset!==t.__inset&&(t.__inset?e.style.paddingLeft=`${t.__inset}px`:e.style.removeProperty("paddingLeft")),o.__dir!==t.__dir&&(t.__dir?e.dir=t.__dir:e.removeAttribute("dir"))}function st(o,t){t.__id&&o.setAttribute("id",t.__id),t.__alignment&&o.classList.add("align-"+t.__alignment),t.__inset&&(o.style.paddingLeft=`${t.__inset}px`),t.__dir&&(o.dir=t.__dir)}function lt(o,t){t.setId(o.id),t.setAlignment(o.alignment),t.setInset(o.inset),t.setDirection(o.direction)}var It=class extends V{constructor(){super(...arguments);p(this,"__id","");p(this,"__alignment","");p(this,"__inset",0)}setId(e){let n=this.getWritable();n.__id=e}getId(){return this.getLatest().__id}setAlignment(e){let n=this.getWritable();n.__alignment=e}getAlignment(){return this.getLatest().__alignment}setInset(e){let n=this.getWritable();n.__inset=e}getInset(){return this.getLatest().__inset}exportJSON(){return{...super.exportJSON(),id:this.__id,alignment:this.__alignment,inset:this.__inset}}};function wo(o,t){t.__alignment=o.__alignment,t.__inset=o.__inset}var ot=class o extends It{constructor(e){super(e);p(this,"__textFormat");p(this,"__textStyle");this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){let n=this.getWritable();return n.__textFormat=e,n}hasTextFormat(e){let n=Re[e];return(this.getTextFormat()&n)!==0}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){let n=this.getWritable();return n.__textStyle=e,n}static clone(e){return new o(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle,wo(e,this)}createDOM(e){let n=document.createElement("p"),r=xo(e.theme,"paragraph");return r!==void 0&&n.classList.add(...r),st(n,this),n}updateDOM(e,n,r){return Mo(e,this)}static importDOM(){return{p:e=>({conversion:XN,priority:0})}}exportDOM(e){let{element:n}=super.exportDOM(e);return n&&he(n)&&this.isEmpty()&&n.append(document.createElement("br")),{element:n}}static importJSON(e){let n=I();return lt(e,n),n.setTextFormat(e.textFormat),n}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,n){let r=I();r.setTextFormat(e.format),r.setTextStyle(e.style);let i=this.getDirection();return r.setDirection(i),r.setStyle(this.getTextStyle()),this.insertAfter(r,n),r}collapseAtStart(){let e=this.getChildren();if(e.length===0||L(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function XN(o){let t=I();return it(o,t),{node:t}}function I(){return re(new ot)}function Ve(o){return o instanceof ot}var jN=!0,J=0,De=1,Kn=2,Xe=3,Pe=4;function Jl(o,t,e,n){let r=o._keyToDOMMap;r.clear(),o._editorState=Ir(),o._pendingEditorState=n,o._compositionKey=null,o._dirtyType=Mt,o._cloneNotNeeded.clear(),o._dirtyLeaves=new Set,o._dirtyElements.clear(),o._normalizedNodes=new Set,o._updateTags=new Set,o._updates=[],o._blockCursorElement=null;let i=o._observer;i!==null&&(i.disconnect(),o._observer=null),t!==null&&(t.textContent=""),e!==null&&(e.textContent="",r.set("root",e))}function GN(o,t){let e=new Map,n=new Set,r=i=>{Object.keys(i).forEach(s=>{let l=e.get(s);l===void 0&&(l=[],e.set(s,l)),l.push(i[s])})};return o.forEach(i=>{let s=i.klass.importDOM;if(s==null||n.has(s))return;n.add(s);let l=s.call(i.klass);l!==null&&r(l)}),t&&r(t),e}function Bi(o){let t=o||{},e=Zu(),n=t.theme||{},r=o===void 0?e:t.parentEditor||null,i=t.disableEvents||!1,s=Ir(),l=t.namespace||(r!==null?r._config.namespace:dl()),a=t.editorState,d=[Go,nt,Wo,qo,ot,bo,...t.nodes||[]],{onError:u,html:m}=t,c=t.editable!==void 0?t.editable:!0,f;if(o===void 0&&e!==null)f=e._nodes;else{f=new Map;for(let h=0;h{N.hasOwnProperty(B)||console.warn(`${A} must implement static "${B}" method`)}),!N.hasOwnProperty("importDOM")&&N.hasOwnProperty("exportDOM")&&console.warn(`${A} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),$ instanceof kt&&($.hasOwnProperty("decorate")||console.warn(`${$.constructor.name} must implement "decorate" method`)),N.hasOwnProperty("importJSON")||console.warn(`${A} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),$.hasOwnProperty("exportJSON")||console.warn(`${A} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}let S=N.getType(),v=N.transform(),M=new Set;v!==null&&M.add(v),f.set(S,{exportDOM:m&&m.export?m.export.get(N):void 0,klass:N,replace:b,replaceWithKlass:x,transforms:M})}}let g=new eo(s,r,f,{disableEvents:i,namespace:l,theme:n},u||console.error,GN(f,m?m.import:void 0),c);return a!==void 0&&(g._pendingEditorState=a,g._dirtyType=Xt),g}var eo=class{constructor(t,e,n,r,i,s,l){p(this,"constructor");p(this,"_headless");p(this,"_parentEditor");p(this,"_rootElement");p(this,"_editorState");p(this,"_pendingEditorState");p(this,"_compositionKey");p(this,"_deferred");p(this,"_keyToDOMMap");p(this,"_updates");p(this,"_updating");p(this,"_listeners");p(this,"_commands");p(this,"_nodes");p(this,"_decorators");p(this,"_pendingDecorators");p(this,"_config");p(this,"_dirtyType");p(this,"_cloneNotNeeded");p(this,"_dirtyLeaves");p(this,"_dirtyElements");p(this,"_normalizedNodes");p(this,"_updateTags");p(this,"_observer");p(this,"_key");p(this,"_onError");p(this,"_htmlConversions");p(this,"_window");p(this,"_editable");p(this,"_blockCursorElement");this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=Mt,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=dl(),this._onError=i,this._htmlConversions=s,this._editable=l,this._headless=e!==null&&e._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){let e=this._listeners.update;return e.add(t),()=>{e.delete(t)}}registerEditableListener(t){let e=this._listeners.editable;return e.add(t),()=>{e.delete(t)}}registerDecoratorListener(t){let e=this._listeners.decorator;return e.add(t),()=>{e.delete(t)}}registerTextContentListener(t){let e=this._listeners.textcontent;return e.add(t),()=>{e.delete(t)}}registerRootListener(t){let e=this._listeners.root;return t(this._rootElement,null),e.add(t),()=>{t(null,this._rootElement),e.delete(t)}}registerCommand(t,e,n){n===void 0&&T(!1,'Listener for type "command" requires a "priority".');let r=this._commands;r.has(t)||r.set(t,[new Set,new Set,new Set,new Set,new Set]);let i=r.get(t);i===void 0&&T(!1,"registerCommand: Command %s not found in command map",String(t));let s=i[n];return s.add(e),()=>{s.delete(e),i.every(l=>l.size===0)&&r.delete(t)}}registerMutationListener(t,e,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,i=this._listeners.mutation;i.set(e,r);let s=n&&n.skipInitialization;return(s===void 0?jN:s)||this.initializeMutationListener(e,r),()=>{i.delete(e)}}getRegisteredNode(t){let e=this._nodes.get(t.getType());return e===void 0&&T(!1,"Node %s has not been registered. Ensure node has been passed to createEditor.",t.name),e}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){let n=this._editorState,r=Dc(n).get(e.getType());if(!r)return;let i=new Map;for(let s of r.keys())i.set(s,"created");i.size>0&&t(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){let n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){let n=this.registerNodeTransformToKlass(t,e),r=[n],i=n.replaceWithKlass;if(i!=null){let s=this.registerNodeTransformToKlass(i,e);r.push(s)}return Vd(this,t.getType()),()=>{r.forEach(s=>s.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,e){return O(this,t,e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){let e=this._rootElement;if(t!==e){let n=xo(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=t,Jl(this,e,t,r),e!==null&&(this._config.disableEvents||Jc(e),n!=null&&e.classList.remove(...n)),t!==null){let i=wc(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=Xt,ai(this),this._updateTags.add("history-merge"),Rt(this),this._config.disableEvents||Gc(t,this),n!=null&&t.classList.add(...n)}else this._editorState=r,this._pendingEditorState=null,this._window=null;Hn("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,e){t.isEmpty()&&T(!1,"setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty."),li(this);let n=this._pendingEditorState,r=this._updateTags,i=e!==void 0?e.tag:null;n!==null&&!n.isEmpty()&&(i!=null&&r.add(i),Rt(this)),this._pendingEditorState=t,this._dirtyType=Xt,this._dirtyElements.set("root",!1),this._compositionKey=null,i!=null&&r.add(i),Rt(this)}parseEditorState(t,e){let n=typeof t=="string"?JSON.parse(t):t;return Vu(n,this,e)}read(t){return Rt(this),this.getEditorState().read(t,{editor:this})}update(t,e){Te(this,t,e)}updateAndCommit(t,e){this.update(t,e),this.commitUpdates()}focus(t,e={}){let n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),Te(this,()=>{let r=C(),i=H();r!==null?r.dirty=!0:i.getChildrenSize()!==0&&(e.defaultSelection==="rootStart"?i.selectStart():i.selectEnd())},{onUpdate:()=>{n.removeAttribute("autocapitalize"),t&&t()},tag:"focus"}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}commitUpdates(){Rt(this)}blur(){let t=this._rootElement;t!==null&&t.blur();let e=Le(this._window);e!==null&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Hn("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}};p(eo,"version");eo.version="0.17.1";var Fi=0,Ql=1,ea=2,Et=0,JN=1,rf=2,QN=3,ex=4;function tx(o,t,e){let n=o._nodeMap,r=[];for(let i of t){let s=n.get(i);s!==void 0&&r.push(s)}for(let[i,s]of e){if(!s)continue;let l=n.get(i);l!==void 0&&!ne(l)&&r.push(l)}return r}function ox(o,t,e,n,r){if(o===null||e.size===0&&n.size===0&&!r)return Et;let i=t._selection,s=o._selection;if(r)return JN;if(!_(i)||!_(s)||!s.isCollapsed()||!i.isCollapsed())return Et;let l=tx(t,e,n);if(l.length===0)return Et;if(l.length>1){let b=t._nodeMap,x=b.get(i.anchor.key),S=b.get(s.anchor.key);return x&&S&&!o._nodeMap.has(x.__key)&&L(x)&&x.__text.length===1&&i.anchor.offset===1?rf:Et}let a=l[0],d=o._nodeMap.get(a.__key);if(!L(d)||!L(a)||d.__mode!==a.__mode)return Et;let u=d.__text,m=a.__text;if(u===m)return Et;let c=i.anchor,f=s.anchor;if(c.key!==f.key||c.type!=="text")return Et;let g=c.offset,h=f.offset,N=m.length-u.length;return N===1&&h===g-1?rf:N===-1&&h===g+1?QN:N===-1&&h===g?ex:Et}function nx(o,t,e){let n=t._nodeMap.get(o),r=e._nodeMap.get(o),i=t._selection,s=e._selection;return!(_(i)&&_(s)&&i.anchor.type==="element"&&i.focus.type==="element"&&s.anchor.type==="text"&&s.focus.type==="text")&&L(n)&&L(r)&&n.__parent===r.__parent?JSON.stringify(t.read(()=>n.exportJSON()))===JSON.stringify(e.read(()=>r.exportJSON())):!1}function rx(o,t){let e=Date.now(),n=Et;return(r,i,s,l,a,d)=>{let u=Date.now();if(d.has("historic"))return n=Et,e=u,ea;let m=ox(r,i,l,a,o.isComposing()),c=(()=>{let f=s===null||s.editor===o,g=d.has("history-push");if(!g&&f&&d.has("history-merge"))return Fi;if(r===null)return Ql;let N=i._selection;if(!(l.size>0||a.size>0))return N!==null?Fi:ea;if(g===!1&&m!==Et&&m===n&&u{let m=t.current,c=t.redoStack,f=t.undoStack,g=m===null?null:m.editorState;if(m!==null&&s===g)return;let h=n(l,s,m,a,d,u);if(h===Ql)c.length!==0&&(t.redoStack=[],o.dispatchCommand(po,!1)),m!==null&&(f.push({...m}),o.dispatchCommand(go,!0));else if(h===ea)return;t.current={editor:o,editorState:s}};return Dt(o.registerCommand(co,()=>(sx(o,t),!0),J),o.registerCommand(uo,()=>(ix(o,t),!0),J),o.registerCommand(Ys,()=>(sf(t),!1),J),o.registerCommand(Zs,()=>(sf(t),o.dispatchCommand(po,!1),o.dispatchCommand(go,!1),!0),J),o.registerUpdateListener(r))}function oa(){return{current:null,redoStack:[],undoStack:[]}}var af=o=>pe?(o||window).getSelection():null;function df(o,t=C()){return t==null&&T(!1,"Expected valid LexicalSelection"),_(t)&&t.isCollapsed()||t.getNodes().length===0?"":Ri(o,t)}function cf(o,t=C()){return t==null&&T(!1,"Expected valid LexicalSelection"),_(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(ff(o,t))}function Hi(o,t,e){let n=o.getData("application/x-lexical-editor");if(n)try{let s=JSON.parse(n);if(s.namespace===e._config.namespace&&Array.isArray(s.nodes)){let l=mf(s.nodes);return na(e,l,t)}}catch{}let r=o.getData("text/html");if(r)try{let l=new DOMParser().parseFromString(r,"text/html"),a=Ai(e,l);return na(e,a,t)}catch{}let i=o.getData("text/plain")||o.getData("text/uri-list");if(i!=null)if(_(t)){let s=i.split(/(\r?\n|\t)/);s[s.length-1]===""&&s.pop();for(let l=0;l0?a.text=d:r=!1}for(let d=0;d{o.update(()=>{a(rf(o,t,e))})});let n=o.getRootElement(),r=o._window==null?window.document:o._window.document,i=sf(o._window);if(n===null||i===null)return!1;let s=r.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(r.createTextNode("#")),n.append(s);let l=new Range;return l.setStart(s,0),l.setEnd(s,1),i.removeAllRanges(),i.addRange(l),new Promise((a,d)=>{let u=o.registerCommand(fo,m=>(Nt(m,ClipboardEvent)&&(u(),Un!==null&&(window.clearTimeout(Un),Un=null),a(rf(o,m,e))),!0),Ie);Un=window.setTimeout(()=>{u(),Un=null,a(!1)},ix),r.execCommand("copy"),s.remove()})}function rf(o,t,e){if(e===void 0){let r=sf(o._window);if(!r)return!1;let i=r.anchorNode,s=r.focusNode;if(i!==null&&s!==null&&!jt(o,i,s))return!1;let l=C();if(l===null)return!1;e=Ki(l)}t.preventDefault();let n=t.clipboardData;return n===null?!1:(ff(n,e),!0)}var sx=[["text/html",lf],["application/x-lexical-editor",af]];function Ki(o=C()){let t={"text/plain":o?o.getTextContent():""};if(o){let e=ml();for(let[n,r]of sx){let i=r(e,o);i!==null&&(t[n]=i)}}return t}function ff(o,t){for(let e in t){let n=t[e];n!==void 0&&o.setData(e,n)}}function Ui(o,t){if(typeof document.caretRangeFromPoint<"u"){let e=document.caretRangeFromPoint(o,t);return e===null?null:{node:e.startContainer,offset:e.startOffset}}else if(document.caretPositionFromPoint!=="undefined"){let e=document.caretPositionFromPoint(o,t);return e===null?null:{node:e.offsetNode,offset:e.offset}}else return null}var mf=P("DRAG_DROP_PASTE_FILE");function lx(o,t){o.preventDefault(),t.update(()=>{let e=C(),n=Nt(o,InputEvent)||Nt(o,KeyboardEvent)?null:o.clipboardData;n!=null&&e!==null&&Hi(n,e,t)},{tag:"paste"})}async function ax(o,t){await zn(t,Nt(o,ClipboardEvent)?o:null),t.update(()=>{let e=C();_(e)?e.removeText():Le(e)&&e.getNodes().forEach(n=>n.remove())})}function zi(o){let t=null;if(Nt(o,DragEvent)?t=o.dataTransfer:Nt(o,ClipboardEvent)&&(t=o.clipboardData),t===null)return[!1,[],!1];let e=t.types,n=e.includes("Files"),r=e.includes("text/html")||e.includes("text/plain");return[n,Array.from(t.files),r]}function Wi(o){let t=ee(o);return F(t)}function dx(o){let t=o.focus;return t.key==="root"&&t.offset===H().getChildrenSize()}function na(o){return Dt(o.registerCommand(Ht,e=>{let n=C();return Le(n)?(n.clear(),!0):!1},0),o.registerCommand(Je,e=>{let n=C();return _(n)?(n.deleteCharacter(e),!0):!1},G),o.registerCommand(St,e=>{let n=C();return _(n)?(n.deleteWord(e),!0):!1},G),o.registerCommand(ut,e=>{let n=C();return _(n)?(n.deleteLine(e),!0):!1},G),o.registerCommand(ct,e=>{let n=C();if(typeof e=="string")n!==null&&n.insertText(e);else{if(n===null)return!1;let r=e.dataTransfer;if(r!=null)Hi(r,n,o);else if(_(n)){let i=e.data;return i&&n.insertText(i),!0}}return!0},G),o.registerCommand(hn,()=>{let e=C();return _(e)?(e.removeText(),!0):!1},G),o.registerCommand(xe,e=>{let n=C();return _(n)?(n.formatText(e),!0):!1},G),o.registerCommand(Kt,e=>{let n=C();return _(n)?(n.insertLineBreak(e),!0):!1},G),o.registerCommand(Ut,()=>{let e=C();return _(e)?(e.insertParagraph(),!0):!1},G),o.registerCommand(zs,()=>(Me([vt()]),!0),G),o.registerCommand(zt,e=>{let n=C();if(Le(n)&&!Wi(e.target)){let r=n.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(_(n)){let r=Jt(n.focus,!0);if(!e.shiftKey&&F(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1},G),o.registerCommand(Wt,e=>{let n=C();if(Le(n)){let r=n.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(_(n)){if(dx(n))return e.preventDefault(),!0;let r=Jt(n.focus,!1);if(!e.shiftKey&&F(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1},G),o.registerCommand(Ro,e=>{let n=C();if(Le(n)){let r=n.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectPrevious(),!0}if(!_(n))return!1;if(vi(n,!0)){let r=e.shiftKey;return e.preventDefault(),Di(n,r,!0),!0}return!1},G),o.registerCommand(Ao,e=>{let n=C();if(Le(n)&&!Wi(e.target)){let i=n.getNodes();if(i.length>0)return e.preventDefault(),i[0].selectNext(0,0),!0}if(!_(n))return!1;let r=e.shiftKey;return vi(n,!1)?(e.preventDefault(),Di(n,r,!1),!0):!1},G),o.registerCommand(qt,e=>{if(Wi(e.target))return!1;let n=C();return _(n)?(e.preventDefault(),o.dispatchCommand(Je,!0)):!1},G),o.registerCommand(Yt,e=>{if(Wi(e.target))return!1;let n=C();return _(n)?(e.preventDefault(),o.dispatchCommand(Je,!1)):!1},G),o.registerCommand(Ke,e=>{let n=C();if(!_(n))return!1;if(e!==null){if((Lt||Zt||Vt)&&ho)return!1;if(e.preventDefault(),e.shiftKey)return o.dispatchCommand(Kt,!1)}return o.dispatchCommand(Ut,void 0)},G),o.registerCommand(ko,()=>{let e=C();return _(e)?(o.blur(),!0):!1},G),o.registerCommand($o,e=>{let[,n]=zi(e);if(n.length>0){let i=e.clientX,s=e.clientY,l=Ui(i,s);if(l!==null){let{offset:a,node:d}=l,u=ee(d);if(u!==null){let m=Xo();if(L(u))m.anchor.set(u.getKey(),a,"text"),m.focus.set(u.getKey(),a,"text");else{let f=u.getParentOrThrow().getKey(),g=u.getIndexWithinParent()+1;m.anchor.set(f,g,"element"),m.focus.set(f,g,"element")}let c=Po(m);Y(c)}o.dispatchCommand(mf,n)}return e.preventDefault(),!0}let r=C();return!!_(r)},G),o.registerCommand(sr,e=>{let[n]=zi(e),r=C();return!(n&&!_(r))},G),o.registerCommand(lr,e=>{let[n]=zi(e),r=C();if(n&&!_(r))return!1;let i=e.clientX,s=e.clientY,l=Ui(i,s);if(l!==null){let a=ee(l.node);F(a)&&e.preventDefault()}return!0},G),o.registerCommand(Nn,()=>(ul(),!0),G),o.registerCommand(fo,e=>(zn(o,Nt(e,ClipboardEvent)?e:null),!0),G),o.registerCommand(mo,e=>(ax(e,o),!0),G),o.registerCommand(ao,e=>{let[,n,r]=zi(e);return n.length>0&&!r?(o.dispatchCommand(mf,n),!0):Ln(e.target)?!1:C()!==null?(lx(e,o),!0):!1},G))}var Jo=class o extends V{constructor(e,n){super(n);p(this,"__id","");p(this,"__category","info");p(this,"__alignment","");p(this,"__inset",0);this.__category=e}static getType(){return"callout"}static clone(e){let n=new o(e.__category,e.__key);return n.__id=e.__id,n.__alignment=e.__alignment,n.__inset=e.__inset,n}setCategory(e){let n=this.getWritable();n.__category=e}getCategory(){return this.getLatest().__category}setId(e){let n=this.getWritable();n.__id=e}getId(){return this.getLatest().__id}setAlignment(e){let n=this.getWritable();n.__alignment=e}getAlignment(){return this.getLatest().__alignment}setInset(e){let n=this.getWritable();n.__inset=e}getInset(){return this.getLatest().__inset}createDOM(e,n){let r=document.createElement("p");return r.classList.add("callout",this.__category||""),st(r,this),r}updateDOM(e){return e.__category!==this.__category||Lo(e,this)}insertNewAfter(e,n){let r=e?e.anchor.offset:0,i=r===this.getTextContentSize()||!e?I():Wn(this.__category);if(i.setDirection(this.getDirection()),this.insertAfter(i,n),r===0&&!this.isEmpty()&&e){let s=I();s.select(),this.replace(s,!0)}return i}static importDOM(){return{p(e){return e.classList.contains("callout")?{conversion:n=>{let r="info",i=["info","success","warning","danger"];for(let l of i)if(n.classList.contains(l)){r=l;break}let s=new o(r);return it(n,s),{node:s}},priority:3}:null}}}exportJSON(){return{...super.exportJSON(),type:"callout",version:1,category:this.__category,id:this.__id,alignment:this.__alignment,inset:this.__inset}}static importJSON(e){let n=Wn(e.category);return lt(e,n),n}};function Wn(o="info"){return new Jo(o)}function ra(o){return o instanceof Jo}function ia(o,t="info"){return o instanceof Jo&&o.getCategory()===t}var Qo=class o extends V{constructor(e,n={},r){super(r);p(this,"__url");p(this,"__target");p(this,"__rel");p(this,"__title");let{target:i=null,rel:s=null,title:l=null}=n;this.__url=e,this.__target=i,this.__rel=s,this.__title=l}static getType(){return"link"}static clone(e){return new o(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}createDOM(e){let n=document.createElement("a");return n.href=this.__url,this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),Ce(n,e.theme.link),n}updateDOM(e,n,r){if(n instanceof HTMLAnchorElement){let i=this.__url,s=this.__target,l=this.__rel,a=this.__title;i!==e.__url&&(n.href=i),s!==e.__target&&(s?n.target=s:n.removeAttribute("target")),l!==e.__rel&&(l?n.rel=l:n.removeAttribute("rel")),a!==e.__title&&(a?n.title=a:n.removeAttribute("title"))}return!1}static importDOM(){return{a:e=>({conversion:cx,priority:1})}}static importJSON(e){let n=Tt(e.url,{rel:e.rel,target:e.target,title:e.title});return n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){let n=this.getWritable();n.__url=e}getTarget(){return this.getLatest().__target}setTarget(e){let n=this.getWritable();n.__target=e}getRel(){return this.getLatest().__rel}setRel(e){let n=this.getWritable();n.__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){let n=this.getWritable();n.__title=e}insertNewAfter(e,n=!0){let r=Tt(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n,r){if(!_(n))return!1;let i=n.anchor.getNode(),s=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function cx(o){let t=null;if(Ni(o)){let e=o.textContent;(e!==null&&e!==""||o.children.length>0)&&(t=Tt(o.getAttribute("href")||"",{rel:o.getAttribute("rel"),target:o.getAttribute("target"),title:o.getAttribute("title")}))}return{node:t}}function Tt(o,t){return re(new Qo(o,t))}function $t(o){return o instanceof Qo}var O0=P("TOGGLE_LINK_COMMAND");var en=class o extends V{constructor(e,n,r){super(r);p(this,"__src","");p(this,"__alt","");p(this,"__width",0);p(this,"__height",0);p(this,"__alignment","");this.__src=e,n.alt&&(this.__alt=n.alt),n.width&&(this.__width=n.width),n.height&&(this.__height=n.height)}static getType(){return"image"}static clone(e){let n=new o(e.__src,{alt:e.__alt,width:e.__width,height:e.__height},e.__key);return n.__alignment=e.__alignment,n}setSrc(e){let n=this.getWritable();n.__src=e}getSrc(){return this.getLatest().__src}setAltText(e){let n=this.getWritable();n.__alt=e}getAltText(){return this.getLatest().__alt}setHeight(e){let n=this.getWritable();n.__height=e}getHeight(){return this.getLatest().__height}setWidth(e){let n=this.getWritable();n.__width=e}getWidth(){return this.getLatest().__width}setAlignment(e){let n=this.getWritable();n.__alignment=e}getAlignment(){return this.getLatest().__alignment}isInline(){return!0}createDOM(e,n){let r=document.createElement("img");return r.setAttribute("src",this.__src),this.__width&&r.setAttribute("width",String(this.__width)),this.__height&&r.setAttribute("height",String(this.__height)),this.__alt&&r.setAttribute("alt",this.__alt),this.__alignment&&r.classList.add("align-"+this.__alignment),r.addEventListener("click",i=>{n.update(()=>{this.select()})}),r}updateDOM(e,n){return e.__src!==this.__src&&n.setAttribute("src",this.__src),e.__width!==this.__width&&(this.__width?n.setAttribute("width",String(this.__width)):n.removeAttribute("width")),e.__height!==this.__height&&(this.__height?n.setAttribute("height",String(this.__height)):n.removeAttribute("height")),e.__alt!==this.__alt&&(this.__alt?n.setAttribute("alt",String(this.__alt)):n.removeAttribute("alt")),e.__alignment!==this.__alignment&&(e.__alignment&&n.classList.remove("align-"+e.__alignment),this.__alignment&&n.classList.add("align-"+this.__alignment)),!1}static importDOM(){return{img(e){return{conversion:n=>{let r=n.getAttribute("src")||"",i={alt:n.getAttribute("alt")||"",height:Number.parseInt(n.getAttribute("height")||"0"),width:Number.parseInt(n.getAttribute("width")||"0")},s=new o(r,i);return s.setAlignment($r(n)),{node:s}},priority:3}}}}exportJSON(){return{...super.exportJSON(),type:"image",version:1,src:this.__src,alt:this.__alt,height:this.__height,width:this.__width,alignment:this.__alignment}}static importJSON(e){let n=tn(e.src,{alt:e.alt,width:e.width,height:e.height});return n.setAlignment(e.alignment),n}};function tn(o,t={}){return new en(o,t)}function je(o){return o instanceof en}var qn=class o extends V{constructor(){super(...arguments);p(this,"__id","");p(this,"__summary","");p(this,"__open",!1)}static getType(){return"details"}setId(e){let n=this.getWritable();n.__id=e}getId(){return this.getLatest().__id}setSummary(e){let n=this.getWritable();n.__summary=e}getSummary(){return this.getLatest().__summary}setOpen(e){let n=this.getWritable();n.__open=e}getOpen(){return this.getLatest().__open}static clone(e){let n=new o(e.__key);return n.__id=e.__id,n.__dir=e.__dir,n.__summary=e.__summary,n.__open=e.__open,n}createDOM(e,n){let r=document.createElement("details");this.__id&&r.setAttribute("id",this.__id),this.__dir&&r.setAttribute("dir",this.__dir),this.__open&&r.setAttribute("open","true");let i=document.createElement("summary");return i.textContent=this.__summary,i.setAttribute("contenteditable","false"),i.addEventListener("click",s=>{s.preventDefault(),n.update(()=>{this.select()})}),r.append(i),r}updateDOM(e,n){return e.__open!==this.__open&&n.toggleAttribute("open",this.__open),e.__id!==this.__id||e.__dir!==this.__dir||e.__summary!==this.__summary}static importDOM(){return{details(e){return{conversion:n=>{let r=new o;n.id&&r.setId(n.id),n.dir&&r.setDirection(Pr(n));let i=Array.from(n.children).find(s=>s.nodeName==="SUMMARY");return r.setSummary(i?.textContent||""),{node:r}},priority:3}},summary(e){return{conversion:n=>({node:"ignore"}),priority:3}}}}exportDOM(e){let n=this.createDOM(e._config,e),r=n.querySelectorAll("[contenteditable]");for(let i of r)i.removeAttribute("contenteditable");return n.removeAttribute("open"),{element:n}}exportJSON(){return{...super.exportJSON(),type:"details",version:1,id:this.__id,summary:this.__summary}}static importJSON(e){let n=sa();return n.setId(e.id),n.setDirection(e.direction),n}};function sa(){return new qn}function $e(o){return o instanceof qn}function la(o){let t=1,e=o.getParent();for(;e!=null;){if(X(e)){let n=e.getParent();if(z(n)){t++,e=n.getParent();continue}E(!1,"A ListItemNode must have a ListNode for a parent.")}return t}return t}function aa(o){let t=o.getParent();z(t)||E(!1,"A ListItemNode must have a ListNode for a parent.");let e=t;for(;e!==null;)e=e.getParent(),z(e)&&(t=e);return t}function da(o){let t=[],e=o.getChildren().filter(X);for(let n=0;n{let e=C();if(e!==null){let n=e.getNodes();if(_(e)){let i=e.getStartEndPoints();E(i!==null,"insertList: anchor should be defined");let[s]=i,l=s.getNode(),a=l.getParent();if(hf(l,n)){let d=be(t);if(pe(a)){l.replace(d);let u=Pe();d.append(u)}else if(X(l)){let u=l.getParentOrThrow();Br(d,u.getChildren()),u.replace(d)}return}}let r=new Set;for(let i=0;i0&&o.append(...r),t.remove()}function ua(o){o.update(()=>{let t=C();if(_(t)){let e=new Set,n=t.getNodes(),r=t.anchor.getNode();if(hf(r,n))e.add(aa(r));else for(let i=0;i{if(E(X(e),"node is not a ListItemNode"),e.__checked==null)return;let n=e.getParent();z(n)&&n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:ux,priority:0})}}static importJSON(e){let n=Pe();return n.setChecked(e.checked),n.setValue(e.value),n.setDirection(e.direction),n}exportDOM(e){let n=this.createDOM(e._config);if(n.classList.contains("task-list-item")){let r=y("input",{type:"checkbox",disabled:"disabled"});n.hasAttribute("checked")&&(r.setAttribute("checked","checked"),n.removeAttribute("checked")),n.prepend(r)}return{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...e){for(let n=0;n{e.append(i)})),this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,n=!0){let r=this.getParentOrThrow();if(z(r)||E(!1,"insertAfter: list node is not parent of list item node"),X(e))return super.insertAfter(e,n);let i=this.getNextSiblings();if(r.insertAfter(e,n),i.length!==0){let s=be(r.getListType());i.forEach(l=>s.append(l)),e.insertAfter(s,n)}return e}remove(e){let n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),n&&r&&Yn(n)&&Yn(r)&&(qi(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(e,n=!0){if(this.getTextContent().trim()===""&&this.isLastChild()){let i=this.getParentOrThrow(),s=i.getParent();if(X(s))return s.insertAfter(this),this.selectStart(),null;{let l=I();return i.insertAfter(l,n),this.remove(),l}}let r=Pe(this.__checked==null?void 0:!1);return this.insertAfter(r,n),r}collapseAtStart(e){let n=I();this.getChildren().forEach(a=>n.append(a));let i=this.getParentOrThrow(),s=i.getParentOrThrow(),l=X(s);if(i.getChildrenSize()===1)if(l)i.remove(),s.select();else{i.insertBefore(n),i.remove();let a=e.anchor,d=e.focus,u=n.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(u,a.offset,"element"),d.type==="element"&&d.getNode().is(this)&&d.set(u,d.offset,"element")}else i.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let n=this.getWritable();n.__value=e}getChecked(){let e=this.getLatest(),n,r=this.getParent();return z(r)&&(n=r.getListType()),n==="check"?!!e.__checked:void 0}setChecked(e){let n=this.getWritable();n.__checked=e}toggleChecked(){this.setChecked(!this.__checked)}canInsertAfter(e){return X(e)}canReplaceWith(e){return X(e)}canMergeWith(e){return Ze(e)||X(e)}extractWithChild(e,n){if(!_(n))return!1;let r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return be("bullet")}canMergeWhenEmpty(){return!0}};function Ef(o){let t=o.getChildren(),e=!1,n=!1;for(let r of t)z(r)?n=!0:r.getTextContent().trim().length>0&&(e=!0);return n&&!e}function Tf(o,t){let e=!z(t.getFirstChild());o.classList.toggle("task-list-item",e),t.__checked?o.setAttribute("checked","checked"):o.removeAttribute("checked")}function ux(o){if(o.classList.contains("task-list-item")){for(let r of o.children)if(r.tagName==="INPUT")return fx(r)}let e=o.getAttribute("aria-checked");return{node:Pe(e==="true"?!0:e==="false"?!1:void 0)}}function fx(o){if(!(o.getAttribute("type")==="checkbox"))return{node:null};let e=o.hasAttribute("checked");return{node:Pe(e)}}function Pe(o){return re(new Pt(void 0,o))}function X(o){return o instanceof Pt}var wo=class o extends V{constructor(e,n,r){super(r);p(this,"__tag");p(this,"__start");p(this,"__listType");p(this,"__id","");let i=gx[e]||e;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}static getType(){return"list"}static clone(e){let n=new o(e.__listType,e.__start,e.__key);return n.__id=e.__id,n.__dir=e.__dir,n}getTag(){return this.__tag}setId(e){let n=this.getWritable();n.__id=e}getId(){return this.getLatest().__id}setListType(e){let n=this.getWritable();n.__listType=e,n.__tag=e==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e,n){let r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,Cf(i,e.theme,this),this.__id&&i.setAttribute("id",this.__id),this.__dir&&i.setAttribute("dir",this.__dir),i}updateDOM(e,n,r){return e.__tag!==this.__tag||e.__dir!==this.__dir||e.__id!==this.__id?!0:(Cf(n,r.theme,this),!1)}static transform(){return e=>{E(z(e),"node is not a ListNode"),xf(e),Nf(e)}}static importDOM(){return{ol:()=>({conversion:bf,priority:0}),ul:()=>({conversion:bf,priority:0})}}static importJSON(e){let n=be(e.listType,e.start);return n.setId(e.id),n.setDirection(e.direction),n}exportDOM(e){let{element:n}=super.exportDOM(e);return n&&ge(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1,id:this.__id}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let n=0;n1?n.push(...g):r.push(...g)}}r.length>0&&Oi(o,...r),n.length>0&&Ce(o,...n)}function mx(o){let t=[];for(let e of o)X(e)?t.push(e):t.push(pf(e));return t}function px(o){if(o.getAttribute("__lexicallisttype")==="check"||o.classList.contains("contains-task-list"))return!0;for(let t of o.childNodes)if(ge(t)&&(t.hasAttribute("aria-checked")||t.classList.contains("task-list-item")||t.firstElementChild&&t.firstElementChild.matches('input[type="checkbox"]')))return!0;return!1}function bf(o){let t=o.nodeName.toLowerCase(),e=null;if(t==="ol"){let n=o.start;e=be("number",n)}else t==="ul"&&(px(o)?e=be("check"):e=be("bullet"));return o.id&&e&&e.setId(o.id),o.dir&&e&&e.setDirection(Pr(o)),{after:mx,node:e}}var gx={ol:"number",ul:"bullet"};function be(o,t=1){return re(new wo(o,t))}function z(o){return o instanceof wo}var sM=P("INSERT_UNORDERED_LIST_COMMAND"),lM=P("INSERT_ORDERED_LIST_COMMAND"),aM=P("INSERT_CHECK_LIST_COMMAND"),dM=P("REMOVE_LIST_COMMAND");var ie={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1},no=class o extends V{constructor(e=ie.NO_STATUS,n=1,r,i){super(i);p(this,"__colSpan");p(this,"__rowSpan");p(this,"__headerState");p(this,"__width");p(this,"__backgroundColor");p(this,"__styles",new Map);p(this,"__alignment","");this.__colSpan=n,this.__rowSpan=1,this.__headerState=e,this.__width=r,this.__backgroundColor=null}static getType(){return"tablecell"}static clone(e){let n=new o(e.__headerState,e.__colSpan,e.__width,e.__key);return n.__rowSpan=e.__rowSpan,n.__backgroundColor=e.__backgroundColor,n.__styles=new Map(e.__styles),n.__alignment=e.__alignment,n}static importDOM(){return{td:e=>({conversion:_f,priority:0}),th:e=>({conversion:_f,priority:0})}}static importJSON(e){let n=Be(e.headerState,e.colSpan,e.width);return e.rowSpan&&n.setRowSpan(e.rowSpan),n.setStyles(new Map(Object.entries(e.styles))),n.setAlignment(e.alignment),n}createDOM(e){let n=document.createElement(this.getTag());this.__width&&(n.style.width=`${this.__width}px`),this.__colSpan>1&&(n.colSpan=this.__colSpan),this.__rowSpan>1&&(n.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(n.style.backgroundColor=this.__backgroundColor),Ce(n,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader);for(let[r,i]of this.__styles.entries())n.style.setProperty(r,i);return this.__alignment&&n.classList.add("align-"+this.__alignment),n}exportDOM(e){let{element:n}=super.exportDOM(e);return{element:n}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,type:"tablecell",width:this.getWidth(),styles:Object.fromEntries(this.__styles),alignment:this.__alignment}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e){let n=this.getWritable();return n.__headerState=e,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){let n=this.getWritable();return n.__width=e,this.__width}getWidth(){return this.getLatest().__width}clearWidth(){let e=this.getWritable();e.__width=void 0}getStyles(){let e=this.getLatest();return new Map(e.__styles)}setStyles(e){let n=this.getWritable();n.__styles=new Map(e)}setAlignment(e){let n=this.getWritable();n.__alignment=e}getAlignment(){return this.getLatest().__alignment}updateTag(e){let r=e.toLowerCase()==="th"?ie.ROW:ie.NO_STATUS,i=this.getWritable();i.__headerState=r}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){this.getWritable().__backgroundColor=e}toggleHeaderStyle(e){let n=this.getWritable();return(n.__headerState&e)===e?n.__headerState-=e:n.__headerState+=e,n}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==ie.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor||e.__styles!==this.__styles||e.__alignment!==this.__alignment}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}};function _f(o){let t=o,e=o.nodeName.toLowerCase(),n;/^(\d+(?:\.\d+)?)px$/.test(t.style.width)&&(n=parseFloat(t.style.width));let i=Be(e==="th"?ie.ROW:ie.NO_STATUS,t.colSpan,n);i.__rowSpan=t.rowSpan;let s=t.style,l=s.textDecoration.split(" "),a=s.fontWeight==="700"||s.fontWeight==="bold",d=l.includes("line-through"),u=s.fontStyle==="italic",m=l.includes("underline");if(o instanceof HTMLElement){let f=Bn(o);f.delete("background-color"),i.setStyles(f),i.setAlignment($r(o))}let c=s.backgroundColor||null;return c&&i.setBackgroundColor(c),{after:f=>(f.length===0&&f.push(I()),f),forChild:(f,g)=>{if(D(g)&&!T(f)){let h=I();return Ae(f)&&f.getTextContent()===`
-`?null:(L(f)&&(a&&f.toggleFormat("bold"),d&&f.toggleFormat("strikethrough"),u&&f.toggleFormat("italic"),m&&f.toggleFormat("underline")),h.append(f),h)}return f},node:i}}function Be(o=ie.NO_STATUS,t=1,e){return re(new no(o,t,e))}function D(o){return o instanceof no}var hx=P("INSERT_TABLE_COMMAND");var ro=class o extends V{constructor(e){super(e);p(this,"__height");p(this,"__styles",new Map)}static getType(){return"tablerow"}static clone(e){let n=new o(e.__key);return n.__styles=new Map(e.__styles),n}static importDOM(){return{tr:e=>({conversion:Nx,priority:0})}}static importJSON(e){let n=on();return n.setStyles(new Map(Object.entries(e.styles))),n}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1,styles:Object.fromEntries(this.__styles),height:this.__height||0}}createDOM(e){let n=document.createElement("tr");this.__height&&(n.style.height=`${this.__height}px`);for(let[r,i]of this.__styles.entries())n.style.setProperty(r,i);return Ce(n,e.theme.tableRow),n}isShadowRoot(){return!0}getStyles(){let e=this.getLatest();return new Map(e.__styles)}setStyles(e){let n=this.getWritable();n.__styles=new Map(e)}setHeight(e){let n=this.getWritable();return n.__height=e,this.__height}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height||e.__styles!==this.__styles}canBeEmpty(){return!1}canIndent(){return!1}};function Nx(o){let t=on(),n=Yo(o.style.height);return t.setHeight(n),o instanceof HTMLElement&&t.setStyles(Bn(o)),{node:t}}function on(){return re(new ro)}function te(o){return o instanceof ro}var Zn=class o extends V{static getType(){return"caption"}static clone(t){return new o(t.__key)}createDOM(t,e){return document.createElement("caption")}updateDOM(t,e,n){return!1}isParentRequired(){return!0}canBeEmpty(){return!1}exportJSON(){return{...super.exportJSON(),type:"caption",version:1}}insertDOMIntoParent(t,e){return e.insertBefore(t,e.firstChild),!0}static importJSON(t){return fa()}static importDOM(){return{caption:t=>({conversion(e){return{node:fa()}},priority:0})}}};function fa(){return new Zn}function Fr(o){return o instanceof Zn}function ma(o){for(let t of o.getChildren())if(Fr(t))return!0;return!1}function yf(o,t=""){let e=fa(),n=q(t||" ");e.append(n),o.append(e)}function ga(o,t,e=!0){let n=Kr();for(let r=0;ro===ie.BOTH||o===t?t:ie.NO_STATUS;function Yi(o=!0){let t=C();E(_(t)||W(t),"Expected a RangeSelection or TableSelection");let e=t.focus.getNode(),[n,,r]=we(e),[i,s]=at(r,n,n),l=i[0].length,{startRow:a}=s;if(o){let d=a+n.__rowSpan-1,u=i[d],m=on();for(let f=0;f1;)if(k-=M.__colSpan,k>=0){let{cell:j,startRow:se}=x[k];$=j,B=se}else{N.append(h(v));continue e}$.insertAfter(h(v))}else M.setColSpan(M.__colSpan+1)}g!==null&&Hr(g)}function ha(){let o=C();E(_(o)||W(o),"Expected a RangeSelection or TableSelection");let t=o.anchor.getNode(),e=o.focus.getNode(),[n,,r]=we(t),[i]=we(e),[s,l,a]=at(r,n,i),{startRow:d}=l,{startRow:u}=a,m=u+i.__rowSpan-1;if(s.length===m-d+1){r.remove();return}let c=s[0].length,f=s[m+1],g=r.getChildAtIndex(m+1);for(let h=m;h>=d;h--){for(let b=c-1;b>=0;b--){let{cell:x,startRow:S,startColumn:v}=s[h][b];if(v===b&&(h===d&&S=d&&S+x.__rowSpan-1>m))if(x.setRowSpan(x.__rowSpan-(m-S+1)),E(g!==null,"Expected nextRowNode not to be null"),b===0)xa(g,x);else{let{cell:M}=f[b-1];M.insertAfter(x)}}let N=r.getChildAtIndex(h);E(te(N),"Expected GridNode childAtIndex(%s) to be RowNode",String(h)),N.remove()}if(f!==void 0){let{cell:h}=f[0];Hr(h)}else{let h=s[d-1],{cell:N}=h[0];Hr(N)}}function Na(){let o=C();E(_(o)||W(o),"Expected a RangeSelection or TableSelection");let t=o.anchor.getNode(),e=o.focus.getNode(),[n,,r]=we(t),[i]=we(e),[s,l,a]=at(r,n,i),{startColumn:d}=l,{startRow:u,startColumn:m}=a,c=Math.min(d,m),f=Math.max(d+n.__colSpan-1,m+i.__colSpan-1),g=f-c+1;if(s[0].length===f-c+1){r.selectPrevious(),r.remove();return}let N=s.length;for(let S=0;Sf){if(v===f){let A=f-R+1;M.setColSpan(M.__colSpan-A)}}else M.remove()}let b=s[u],x=d>m?b[d+n.__colSpan]:b[m+i.__colSpan];if(x!==void 0){let{cell:S}=x;Hr(S)}else{let S=m1){for(let l=1;l1){let[l,a]=at(r,e,e),{startColumn:d,startRow:u}=a,m;for(let c=1;c1&&(N+=x.__colSpan-1)}if(h===null)for(let N=0;N!Fr(d));for(let d=0;dx||h>S;){if(cx){let A=S-b,$=x+1;for(let B=0;B<=A;B++)v(d[b+B][$]);x=$}if(h>S){let A=x-N,$=S+1;for(let B=0;B<=A;B++)v(d[$][N+B]);S=$}}let M=[l],R=null;for(let A=f;A<=h;A++)for(let $=c;$<=g;$++){let{cell:B}=d[A][$],k=B.getParent();E(te(k),"Expected TableCellNode parent to be a TableRowNode"),k!==R&&M.push(k),M.push(B,...xx(B)),R=k}return ft()||(this._cachedNodes=M),M}getTextContent(){let t=this.getNodes().filter(n=>D(n)),e="";for(let n=0;n0;){let n=e.pop();E(n!==void 0,"Stack.length > 0; can't be undefined"),T(n)&&e.unshift(...n.getChildren()),n!==o&&t.push(n)}return t}var zr=class{constructor(t,e){p(this,"focusX");p(this,"focusY");p(this,"listenersToRemove");p(this,"table");p(this,"isHighlightingCells");p(this,"anchorX");p(this,"anchorY");p(this,"tableNodeKey");p(this,"anchorCell");p(this,"focusCell");p(this,"anchorCellNodeKey");p(this,"focusCellNodeKey");p(this,"editor");p(this,"tableSelection");p(this,"hasHijackedSelectionStyles");p(this,"isSelecting");this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=e,this.editor=t,this.table={columns:0,domRows:[],rows:0},this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTable(),this.isSelecting=!1}getTable(){return this.table}removeListeners(){Array.from(this.listenersToRemove).forEach(t=>t())}trackTable(){let t=new MutationObserver(e=>{this.editor.update(()=>{let n=!1;for(let i=0;i{let e=this.editor.getElementByKey(this.tableNodeKey);if(!e)throw new Error("Expected to find TableElement in DOM");this.table=nn(e),t.observe(e,{attributes:!0,childList:!0,subtree:!0})})}clearHighlight(){let t=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),t.update(()=>{let e=Q(this.tableNodeKey);if(!K(e))throw new Error("Expected TableNode.");let n=t.getElementByKey(this.tableNodeKey);if(!n)throw new Error("Expected to find TableElement in DOM");let r=nn(n);Ur(t,r,null),Y(null),t.dispatchCommand(De,void 0)})}enableHighlightStyle(){let t=this.editor;t.update(()=>{let e=t.getElementByKey(this.tableNodeKey);if(!e)throw new Error("Expected to find TableElement in DOM");Oi(e,t._config.theme.tableSelection),e.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){let t=this.editor;t.update(()=>{let e=t.getElementByKey(this.tableNodeKey);if(!e)throw new Error("Expected to find TableElement in DOM");Ce(e,t._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableTableSelection(t){if(t!==null&&t.tableKey===this.tableNodeKey){let e=this.editor;this.tableSelection=t,this.isHighlightingCells=!0,this.disableHighlightStyle(),Ur(e,this.table,this.tableSelection)}else t==null?this.clearHighlight():(this.tableNodeKey=t.tableKey,this.updateTableTableSelection(t))}setFocusCellForSelection(t,e=!1){let n=this.editor;n.update(()=>{let r=Q(this.tableNodeKey);if(!K(r))throw new Error("Expected TableNode.");if(!n.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");let s=t.x,l=t.y;if(this.focusCell=t,this.anchorCell!==null){let a=Ta(n._window);a&&a.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==s||this.anchorY!==l||e))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(s===this.focusX&&l===this.focusY)return;if(this.focusX=s,this.focusY=l,this.isHighlightingCells){let a=ee(t.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null&&D(a)&&r.is(vo(a))){let d=a.getKey();this.tableSelection=this.tableSelection.clone()||ji(),this.focusCellNodeKey=d,this.tableSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),Y(this.tableSelection),n.dispatchCommand(De,void 0),Ur(n,this.table,this.tableSelection)}}})}setAnchorCellForSelection(t){this.isHighlightingCells=!1,this.anchorCell=t,this.anchorX=t.x,this.anchorY=t.y,this.editor.update(()=>{let e=ee(t.elem);if(D(e)){let n=e.getKey();this.tableSelection=this.tableSelection!=null?this.tableSelection.clone():ji(),this.anchorCellNodeKey=n}})}formatCells(t){this.editor.update(()=>{let e=C();W(e)||E(!1,"Expected grid selection");let n=Xo(),r=n.anchor,i=n.focus;e.getNodes().forEach(s=>{D(s)&&s.getTextContentSize()!==0&&(r.set(s.getKey(),0,"element"),i.set(s.getKey(),s.getChildrenSize(),"element"),n.formatText(t))}),Y(e),this.editor.dispatchCommand(De,void 0)})}clearText(){let t=this.editor;t.update(()=>{let e=Q(this.tableNodeKey);if(!K(e))throw new Error("Expected TableNode.");let n=C();W(n)||E(!1,"Expected grid selection");let r=n.getNodes().filter(D);if(r.length===this.table.columns*this.table.rows){e.selectPrevious(),e.remove(),H().selectStart();return}r.forEach(i=>{if(T(i)){let s=I(),l=q();s.append(l),i.append(s),i.getChildren().forEach(a=>{a!==s&&a.remove()})}}),Ur(t,this.table,null),Y(null),t.dispatchCommand(De,void 0)})}};var Ex="__lexicalTableSelection",Ta=o=>me?(o||window).getSelection():null,Tx=o=>(o.buttons&1)===1;function _a(o,t,e,n){let r=e.getRootElement();if(r===null)throw new Error("No root element.");let i=new zr(e,o.getKey()),s=e._window||window;Cx(t,i);let l=()=>{let c=()=>{i.isSelecting=!1,s.removeEventListener("mouseup",c),s.removeEventListener("mousemove",f)},f=g=>{setTimeout(()=>{if(!Tx(g)&&i.isSelecting){i.isSelecting=!1,s.removeEventListener("mouseup",c),s.removeEventListener("mousemove",f);return}let h=ba(g.target);h!==null&&(i.anchorX!==h.x||i.anchorY!==h.y)&&(g.preventDefault(),i.setFocusCellForSelection(h))},0)};return{onMouseMove:f,onMouseUp:c}};t.addEventListener("mousedown",c=>{setTimeout(()=>{if(c.button!==0||!s)return;let f=ba(c.target);f!==null&&(sn(c),i.setAnchorCellForSelection(f));let{onMouseUp:g,onMouseMove:h}=l();i.isSelecting=!0,s.addEventListener("mouseup",g),s.addEventListener("mousemove",h)},0)});let a=c=>{c.button===0&&e.update(()=>{let f=C(),g=c.target;W(f)&&f.tableKey===i.tableNodeKey&&r.contains(g)&&i.clearHighlight()})};s.addEventListener("mousedown",a),i.listenersToRemove.add(()=>s.removeEventListener("mousedown",a)),i.listenersToRemove.add(e.registerCommand(Wt,c=>Wr(e,c,"down",o,i),Xe)),i.listenersToRemove.add(e.registerCommand(zt,c=>Wr(e,c,"up",o,i),Xe)),i.listenersToRemove.add(e.registerCommand(Ro,c=>Wr(e,c,"backward",o,i),Xe)),i.listenersToRemove.add(e.registerCommand(Ao,c=>Wr(e,c,"forward",o,i),Xe)),i.listenersToRemove.add(e.registerCommand(ko,c=>{let f=C();if(W(f)){let g=U(f.focus.getNode(),D);if(D(g))return sn(c),g.selectEnd(),!0}return!1},Xe));let d=c=>()=>{let f=C();if(!rn(f,o))return!1;if(W(f))return i.clearText(),!0;if(_(f)){let g=U(f.anchor.getNode(),R=>D(R));if(!D(g))return!1;let h=f.anchor.getNode(),N=f.focus.getNode(),b=o.isParentOf(h),x=o.isParentOf(N);if(b&&!x||x&&!b)return i.clearText(),!0;let v=U(f.anchor.getNode(),R=>T(R)),M=v&&U(v,R=>T(R)&&D(R.getParent()));if(!T(M)||!T(v))return!1;if(c===ut&&M.getPreviousSibling()===null)return!0}return!1};[St,ut,Je].forEach(c=>{i.listenersToRemove.add(e.registerCommand(c,d(c),Ie))});let u=c=>{let f=C();if(!rn(f,o)){let g=f?f.getNodes():null;if(g){let h=g.find(N=>K(N)&&N.getKey()===i.tableNodeKey);if(K(h)){if(!h.getParent())return!1;h.remove()}}return!1}if(W(f))return c&&(c.preventDefault(),c.stopPropagation()),i.clearText(),!0;if(_(f)){let g=U(f.anchor.getNode(),h=>D(h));if(!D(g))return!1}return!1};i.listenersToRemove.add(e.registerCommand(qt,u,Ie)),i.listenersToRemove.add(e.registerCommand(Yt,u,Ie)),i.listenersToRemove.add(e.registerCommand(mo,c=>{let f=C();if(f){if(!(W(f)||_(f)))return!1;zn(e,Nt(c,ClipboardEvent)?c:null,Ki(f));let g=u(c);return _(f)&&f.removeText(),g}return!1},Ie)),i.listenersToRemove.add(e.registerCommand(xe,c=>{let f=C();if(!rn(f,o))return!1;if(W(f))return i.formatCells(c),!0;if(_(f)){let g=U(f.anchor.getNode(),h=>D(h));if(!D(g))return!1}return!1},Ie)),i.listenersToRemove.add(e.registerCommand(ct,c=>{let f=C();if(!rn(f,o))return!1;if(W(f))return i.clearHighlight(),!1;if(_(f)){let g=U(f.anchor.getNode(),h=>D(h));if(!D(g))return!1;if(typeof c=="string"){let h=wf(e,f,o);if(h)return Mf(h,o,[q(c)]),!0}}return!1},Ie)),n&&i.listenersToRemove.add(e.registerCommand(Io,c=>{let f=C();if(!_(f)||!f.isCollapsed()||!rn(f,o))return!1;let g=Ji(f.anchor.getNode());if(g===null)return!1;sn(c);let h=o.getCordsFromCellNode(g,i.table);return vf(i,o,h.x,h.y,c.shiftKey?"backward":"forward"),!0},Ie)),i.listenersToRemove.add(e.registerCommand(ar,c=>o.isSelected(),Xe));function m(c){let f=o.getCordsFromCellNode(c,i.table);return o.getDOMCellFromCordsOrThrow(f.x,f.y,i.table)}return i.listenersToRemove.add(e.registerCommand(rr,c=>{let{nodes:f,selection:g}=c,h=g.getStartEndPoints(),N=W(g),x=_(g)&&U(g.anchor.getNode(),He=>D(He))!==null&&U(g.focus.getNode(),He=>D(He))!==null||N;if(f.length!==1||!K(f[0])||!x||h===null)return!1;let[S]=h,v=f[0],M=v.getChildren(),R=v.getFirstChildOrThrow().getChildrenSize(),A=v.getChildrenSize(),$=U(S.getNode(),He=>D(He)),B=$&&U($,He=>te(He)),k=B&&U(B,He=>K(He));if(!D($)||!te(B)||!K(k))return!1;let j=B.getIndexWithinParent(),se=Math.min(k.getChildrenSize()-1,j+A-1),Fe=$.getIndexWithinParent(),Ed=Math.min(B.getChildrenSize()-1,Fe+R-1),hh=Math.min(Fe,Ed),Nh=Math.min(j,se),xh=Math.max(Fe,Ed),Eh=Math.max(j,se),Th=k.getChildren(),Td=0;for(let He=Nh;He<=Eh;He++){let Cd=Th[He];if(!te(Cd))return!1;let bd=M[Td];if(!te(bd))return!1;let Ch=Cd.getChildren(),bh=bd.getChildren(),_d=0;for(let Fs=hh;Fs<=xh;Fs++){let ni=Ch[Fs];if(!D(ni))return!1;let yd=bh[_d];if(!D(yd))return!1;let _h=ni.getChildren();yd.getChildren().forEach(gn=>{L(gn)&&I().append(gn),ni.append(gn)}),_h.forEach(gn=>gn.remove()),_d++}Td++}return!0},Ie)),i.listenersToRemove.add(e.registerCommand(De,()=>{let c=C(),f=Ye();if(_(c)){let{anchor:g,focus:h}=c,N=g.getNode(),b=h.getNode(),x=Ji(N),S=Ji(b),v=!!(x&&o.is(vo(x))),M=!!(S&&o.is(vo(S))),R=v!==M,A=v&&M,$=c.isBackward();if(R){let B=c.clone();if(M){let[k]=at(o,S,S),j=k[0][0].cell,se=k[k.length-1].at(-1).cell;B.focus.set($?j.getKey():se.getKey(),$?j.getChildrenSize():se.getChildrenSize(),"element")}Y(B),Lf(e,i)}else A&&(x.is(S)||(i.setAnchorCellForSelection(m(x)),i.setFocusCellForSelection(m(S),!0),i.isSelecting||setTimeout(()=>{let{onMouseUp:B,onMouseMove:k}=l();i.isSelecting=!0,s.addEventListener("mouseup",B),s.addEventListener("mousemove",k)},0)))}else if(c&&W(c)&&c.is(f)&&c.tableKey===o.getKey()){let g=Ta(e._window);if(g&&g.anchorNode&&g.focusNode){let h=ee(g.focusNode),N=h&&!o.is(vo(h)),b=ee(g.anchorNode),x=b&&o.is(vo(b));if(N&&x&&g.rangeCount>0){let S=Yl(g,e);S&&(S.anchor.set(o.getKey(),c.isBackward()?o.getChildrenSize():0,"element"),g.removeAllRanges(),Y(S))}}}return c&&!c.is(f)&&(W(c)||W(f))&&i.tableSelection&&!i.tableSelection.is(f)?(W(c)&&c.tableKey===i.tableNodeKey?i.updateTableTableSelection(c):!W(c)&&W(f)&&f.tableKey===i.tableNodeKey&&i.updateTableTableSelection(null),!1):(i.hasHijackedSelectionStyles&&!o.isSelected()?bx(e,i):!i.hasHijackedSelectionStyles&&o.isSelected()&&Lf(e,i),!1)},Ie)),i.listenersToRemove.add(e.registerCommand(Ut,()=>{let c=C();if(!_(c)||!c.isCollapsed()||!rn(c,o))return!1;let f=wf(e,c,o);return f?(Mf(f,o),!0):!1},Ie)),i}function Cx(o,t){o[Ex]=t}function ba(o){let t=o;for(;t!=null;){let e=t.nodeName;if(e==="TD"||e==="TH"){let n=t._cell;return n===void 0?null:n}t=t.parentNode}return null}function nn(o){let t=[],e={columns:0,domRows:t,rows:0},n=o.firstChild,r=0,i=0;for(t.length=0;n!=null;){let s=n.nodeName;if(s==="COLGROUP"||s==="CAPTION"){n=n.nextSibling;continue}if(s==="TD"||s==="TH"){let d=n,u={elem:d,hasBackgroundColor:d.style.backgroundColor!=="",highlighted:!1,x:r,y:i};n._cell=u;let m=t[i];m===void 0&&(m=t[i]=[]),m[r]=u}else{let d=n.firstChild;if(d!=null){n=d;continue}}let l=n.nextSibling;if(l!=null){r++,n=l;continue}let a=n.parentNode;if(a!=null){let d=a.nextSibling;if(d==null)break;i++,r=0,n=d}}return e.columns=r+1,e.rows=i+1,e}function Ur(o,t,e){let n=new Set(e?e.getNodes():[]);ya(t,(r,i)=>{let s=r.elem;n.has(i)?(r.highlighted=!0,Df(o,r)):(r.highlighted=!1,Of(o,r),s.getAttribute("style")||s.removeAttribute("style"))})}function ya(o,t){let{domRows:e}=o;for(let n=0;n{e.highlighted=!0,Df(o,e)})}function bx(o,t){t.enableHighlightStyle(),ya(t.table,e=>{let n=e.elem;e.highlighted=!1,Of(o,e),n.getAttribute("style")||n.removeAttribute("style")})}var vf=(o,t,e,n,r)=>{let i=r==="forward";switch(r){case"backward":case"forward":return e!==(i?o.table.columns-1:0)?Gi(t.getCellNodeFromCordsOrThrow(e+(i?1:-1),n,o.table),i):n!==(i?o.table.rows-1:0)?Gi(t.getCellNodeFromCordsOrThrow(i?0:o.table.columns-1,n+(i?1:-1),o.table),i):i?t.selectNext():t.selectPrevious(),!0;case"up":return n!==0?Gi(t.getCellNodeFromCordsOrThrow(e,n-1,o.table),!1):Ar(t,!1),!0;case"down":return n!==o.table.rows-1?Gi(t.getCellNodeFromCordsOrThrow(e,n+1,o.table),!0):Ar(t,!0),!0;default:return!1}},_x=(o,t,e,n,r)=>{let i=r==="forward";switch(r){case"backward":case"forward":return e!==(i?o.table.columns-1:0)&&o.setFocusCellForSelection(t.getDOMCellFromCordsOrThrow(e+(i?1:-1),n,o.table)),!0;case"up":return n!==0?(o.setFocusCellForSelection(t.getDOMCellFromCordsOrThrow(e,n-1,o.table)),!0):!1;case"down":return n!==o.table.rows-1?(o.setFocusCellForSelection(t.getDOMCellFromCordsOrThrow(e,n+1,o.table)),!0):!1;default:return!1}};function rn(o,t){if(_(o)||W(o)){let e=t.isParentOf(o.anchor.getNode()),n=t.isParentOf(o.focus.getNode());return e&&n}return!1}function Gi(o,t){t?o.selectStart():o.selectEnd()}var Ca="172,206,247";function Df(o,t){let e=t.elem,n=ee(e);E(D(n),"Expected to find LexicalNode from Table Cell DOMNode"),n.getBackgroundColor()===null?e.style.setProperty("background-color",`rgb(${Ca})`):e.style.setProperty("background-image",`linear-gradient(to right, rgba(${Ca},0.85), rgba(${Ca},0.85))`),e.style.setProperty("caret-color","transparent")}function Of(o,t){let e=t.elem,n=ee(e);E(D(n),"Expected to find LexicalNode from Table Cell DOMNode"),n.getBackgroundColor()===null&&e.style.removeProperty("background-color"),e.style.removeProperty("background-image"),e.style.removeProperty("caret-color")}function Ji(o){let t=U(o,D);return D(t)?t:null}function vo(o){let t=U(o,K);return K(t)?t:null}function Wr(o,t,e,n,r){if((e==="up"||e==="down")&&yx(o))return!1;let i=C();if(!rn(i,n)){if(_(i)){if(i.isCollapsed()&&e==="backward"){let s=i.anchor.type,l=i.anchor.offset;if(s!=="element"&&!(s==="text"&&l===0))return!1;let a=i.anchor.getNode();if(!a)return!1;let d=U(a,m=>T(m)&&!m.isInline());if(!d)return!1;let u=d.getPreviousSibling();return!u||!K(u)?!1:(sn(t),u.selectEnd(),!0)}else if(t.shiftKey&&(e==="up"||e==="down")){let s=i.focus.getNode();if(pe(s)){let l=i.getNodes()[0];if(l){let a=U(l,D);if(a&&n.isParentOf(a)){let d=n.getFirstDescendant(),u=n.getLastDescendant();if(!d||!u)return!1;let[m]=we(d),[c]=we(u),f=n.getCordsFromCellNode(m,r.table),g=n.getCordsFromCellNode(c,r.table),h=n.getDOMCellFromCordsOrThrow(f.x,f.y,r.table),N=n.getDOMCellFromCordsOrThrow(g.x,g.y,r.table);return r.setAnchorCellForSelection(h),r.setFocusCellForSelection(N,!0),!0}}return!1}else{let l=U(s,d=>T(d)&&!d.isInline());if(!l)return!1;let a=e==="down"?l.getNextSibling():l.getPreviousSibling();if(K(a)&&r.tableNodeKey===a.getKey()){let d=a.getFirstDescendant(),u=a.getLastDescendant();if(!d||!u)return!1;let[m]=we(d),[c]=we(u),f=i.clone();return f.focus.set((e==="up"?m:c).getKey(),e==="up"?0:c.getChildrenSize(),"element"),Y(f),!0}}}}return!1}if(_(i)&&i.isCollapsed()){let{anchor:s,focus:l}=i,a=U(s.getNode(),D),d=U(l.getNode(),D);if(!D(a)||!a.is(d))return!1;let u=vo(a);if(u!==n&&u!=null){let x=o.getElementByKey(u.getKey());if(x!=null)return r.table=nn(x),Wr(o,t,e,u,r)}if(e==="backward"||e==="forward"){let x=s.type,S=s.offset,v=s.getNode();if(!v)return!1;let M=i.getNodes();return M.length===1&&F(M[0])?!1:Sx(x,S,v,e)?wx(t,v,n,e):!1}let m=o.getElementByKey(a.__key),c=o.getElementByKey(s.key);if(c==null||m==null)return!1;let f;if(s.type==="element")f=c.getBoundingClientRect();else{let x=window.getSelection();if(x===null||x.rangeCount===0)return!1;f=x.getRangeAt(0).getBoundingClientRect()}let g=e==="up"?a.getFirstChild():a.getLastChild();if(g==null)return!1;let h=o.getElementByKey(g.__key);if(h==null)return!1;let N=h.getBoundingClientRect();if(e==="up"?N.top>f.top-f.height:f.bottom+f.height>N.bottom){sn(t);let x=n.getCordsFromCellNode(a,r.table);if(t.shiftKey){let S=n.getDOMCellFromCordsOrThrow(x.x,x.y,r.table);r.setAnchorCellForSelection(S),r.setFocusCellForSelection(S,!0)}else return vf(r,n,x.x,x.y,e);return!0}}else if(W(i)){let{anchor:s,focus:l}=i,a=U(s.getNode(),D),d=U(l.getNode(),D),[u]=i.getNodes(),m=o.getElementByKey(u.getKey());if(!D(a)||!D(d)||!K(u)||m==null)return!1;r.updateTableTableSelection(i);let c=nn(m),f=n.getCordsFromCellNode(a,c),g=n.getDOMCellFromCordsOrThrow(f.x,f.y,c);if(r.setAnchorCellForSelection(g),sn(t),t.shiftKey){let h=n.getCordsFromCellNode(d,c);return _x(r,u,h.x,h.y,e)}else d.selectEnd();return!0}return!1}function sn(o){o.preventDefault(),o.stopImmediatePropagation(),o.stopPropagation()}function yx(o){let t=o.getRootElement();return t?t.hasAttribute("aria-controls")&&t.getAttribute("aria-controls")==="typeahead-menu":!1}function Sx(o,t,e,n){return Lx(o,e,n)||Mx(o,t,e,n)}function Lx(o,t,e){return o==="element"&&(e==="backward"?t.getPreviousSibling()===null:t.getNextSibling()===null)}function Mx(o,t,e,n){let r=U(e,s=>T(s)&&!s.isInline());if(!r)return!1;let i=n==="backward"?t===0:t===e.getTextContentSize();return o==="text"&&i&&(n==="backward"?r.getPreviousSibling()===null:r.getNextSibling()===null)}function wx(o,t,e,n){let r=U(t,D);if(!D(r))return!1;let[i,s]=at(e,r,r);if(!vx(i,s,n))return!1;let l=Dx(t,n,e);return!l||K(l)?!1:(sn(o),n==="backward"?l.selectEnd():l.selectStart(),!0)}function vx(o,t,e){let n=o[0][0],r=o[o.length-1][o[0].length-1],{startColumn:i,startRow:s}=t;return e==="backward"?i===n.startColumn&&s===n.startRow:i===r.startColumn&&s===r.startRow}function Dx(o,t,e){let n=U(o,i=>T(i)&&!i.isInline());if(!n)return;let r=t==="backward"?n.getPreviousSibling():n.getNextSibling();return r&&K(r)?r:t==="backward"?e.getPreviousSibling():e.getNextSibling()}function Mf(o,t,e){let n=I();o==="first"?t.insertBefore(n):t.insertAfter(n),n.append(...e||[]),n.selectEnd()}function wf(o,t,e){let n=e.getParent();if(!n)return;let r=o.getElementByKey(n.getKey());if(!r)return;let i=window.getSelection();if(!i||i.anchorNode!==r)return;let s=U(t.anchor.getNode(),N=>D(N));if(!s)return;let l=U(s,N=>K(N));if(!K(l)||!l.is(e))return;let[a,d]=at(e,s,s),u=a[0][0],m=a[a.length-1][a[0].length-1],{startRow:c,startColumn:f}=d,g=c===u.startRow&&f===u.startColumn,h=c===m.startRow&&f===m.startColumn;return g?"first":h?"last":void 0}var Bt=class{constructor(t){p(this,"rowCount",0);p(this,"columnCount",0);p(this,"cells",[]);this.buildCellMap(t)}buildCellMap(t){let e=[],n=(a,d,u)=>{typeof e[d]>"u"&&(e[d]=[]),e[d][a]=u},r=(a,d)=>!!(e[d]&&e[d][a]),i=t.getChildren().filter(a=>te(a));for(let a=0;aD(c)),m=0;for(let c=0;ca.length));let s=[],l=e[0][0];for(let a=0;a=this.cells.length)throw new Error(`TableMap Error: Attempted to get cell ${n+1} of ${this.cells.length}`);return this.cells[n]}getCellsInRange(t){let e=Math.max(Math.min(t.fromX,t.toX),0),n=Math.min(Math.max(t.fromX,t.toX),this.columnCount-1),r=Math.max(Math.min(t.fromY,t.toY),0),i=Math.min(Math.max(t.fromY,t.toY),this.rowCount-1),s=new Set;for(let l=r;l<=i;l++)for(let a=e;a<=n;a++)s.add(this.getCellAtPosition(a,l));return[...s.values()]}getCellsInColumn(t){return this.getCellsInRange({fromX:t,toX:t,fromY:0,toY:this.rowCount-1})}getRangeForCell(t){let e=null,n=t.getKey();for(let r=0;re&&(n=r,e=r.childElementCount);return n}function Af(o){return[...o.children].map(t=>Ox(t))}function Ox(o){let t=o.style.width||o.getAttribute("width");return t&&!Number.isNaN(Number(t))&&(t=t+"px"),t||""}function La(o,t,e){let n=o.getChildren(),r=0;for(let s of n){let l=s.getChildren().length;l>r&&(r=l)}let i=o.getColWidths();(i.length===0||i.lengthi.length&&console.error(`Attempted to set table column width for column [${t}] but only ${i.length} columns found`),i[t]=xt(e),o.setColWidths(i)}function If(o,t,e){let n=t.getColWidths();if(n.length>e&&n[e].endsWith("px"))return Number(n[e].replace("px",""));let r=o.getElementByKey(t.__key);if(r){let i=kf(r);if(i&&i.children.length>e)return i.children[e].clientWidth}return 0}function $f(o){let t=o.getParent();if(!te(t))return-1;let e=0,n=t.getChildren();for(let r of n){let i=r.getColSpan()||1;if(e+=i,r.getKey()===o.getKey())break}return e-1}function Pf(o,t){let e=Sa(o),n=$f(o);e&&n>=0&&La(e,n,t)}function Bf(o,t){let e=Sa(t),n=$f(t);if(!e)return"";let r=e.getColWidths();return r.length>n?r[n]:""}function Ma(o){if(o.length===0)return null;let t=y("colgroup");for(let e of o){let n=y("col");e&&(n.style.width=e),t.append(n)}return t}function ln(o){if(W(o))return o.getNodes().filter(n=>D(n));let t=Z(o,D);return t?[t]:[]}function Ff(o){let t=o.getShape(),e=ln(o);if(e.length===0)return;let n=Sa(e[0]);if(!n)return;let r=new Bt(n),i=r.getCellAtPosition(t.toX,t.toY);if(!i)return;let s=t.toX+((i.getColSpan()||1)-1),l=t.toY+((i.getRowSpan()||1)-1),a=r.getCellsInRange({fromX:t.fromX,fromY:t.fromY,toX:s,toY:l});if(a.length===0)return;let d=a[0],u=Math.abs(t.fromX-s)+1,m=Math.abs(t.fromY-l)+1;for(let c=1;cD(r));for(let r of n){let i=r.getStyles();i.delete("height"),i.delete("width"),r.setStyles(i),r.clearWidth()}}}function Kf(o){o.setColWidths([]),o.setStyles(new Map);for(let t of o.getChildren()){if(!te(t))continue;t.setStyles(new Map);let e=t.getChildren().filter(n=>D(n));for(let n of e)n.setStyles(new Map),n.setBackgroundColor(null),n.clearWidth()}}function wa(o,t){e:for(let e of o.getChildren()){if(!te(e))continue;let n=e.getChildren();for(let r of n){if(!D(r))return;if(t(r)===!1)break e}}}function Uf(o){let t=null;return wa(o,e=>{let n=e.getStyles().get("padding")||"";if(t===null&&(t=n),n!==t)return t=null,!1}),t||""}var bt=class o extends It{constructor(e){super(e);p(this,"__colWidths",[]);p(this,"__styles",new Map)}static getType(){return"table"}static clone(e){let n=new o(e.__key);return Mo(e,n),n.__colWidths=[...e.__colWidths],n.__styles=new Map(e.__styles),n}static importDOM(){return{table:e=>({conversion:Ax,priority:1})}}static importJSON(e){let n=Kr();return lt(e,n),n.setColWidths(e.colWidths),n.setStyles(new Map(Object.entries(e.styles))),n}exportJSON(){return{...super.exportJSON(),type:"table",version:1,colWidths:this.__colWidths,styles:Object.fromEntries(this.__styles)}}createDOM(e,n){let r=document.createElement("table");Ce(r,e.theme.table),st(r,this);let i=this.getColWidths(),s=Ma(i);s&&r.append(s);for(let[l,a]of this.__styles.entries())r.style.setProperty(l,a);return r}updateDOM(e,n){if(tf(e,this,n),this.__colWidths.join(":")!==e.__colWidths.join(":")){let r=Array.from(n.children).find(s=>s.nodeName==="COLGROUP"),i=Ma(this.__colWidths);r&&r.remove(),i&&n.prepend(i)}if(Array.from(this.__styles.values()).join(":")!==Array.from(e.__styles.values()).join(":")){n.style.cssText="";for(let[r,i]of this.__styles.entries())n.style.setProperty(r,i)}return!1}exportDOM(e){return{...super.exportDOM(e),after:n=>{if(!n)return;let r=n.cloneNode(),i=document.createElement("tbody");if(ge(n))for(let s of Array.from(n.children))s.nodeName==="TR"?i.append(s):s.nodeName==="CAPTION"?r.insertBefore(s,r.firstChild):r.append(s);return r.append(i),r}}}canBeEmpty(){return!1}isShadowRoot(){return!0}setColWidths(e){let n=this.getWritable();n.__colWidths=e}getColWidths(){return[...this.getLatest().__colWidths]}getStyles(){let e=this.getLatest();return new Map(e.__styles)}setStyles(e){let n=this.getWritable();n.__styles=new Map(e)}getCordsFromCellNode(e,n){let{rows:r,domRows:i}=n;for(let s=0;s{if(!d)return;let{elem:u}=d;return ee(u)===e});if(a!==-1)return{x:a,y:s}}throw new Error("Cell not found in table.")}getDOMCellFromCords(e,n,r){let{domRows:i}=r,s=i[n];if(s==null)return null;let l=e{let r=new o;return n.id&&r.setId(n.id),{node:r}},priority:3}}}}exportJSON(){return{...super.exportJSON(),type:"horizontal-rule",version:1,id:this.__id}}static importJSON(e){let n=va();return n.setId(e.id),n}};function va(){return new Vn}function zf(o){return o instanceof Vn}var Wf=o=>(o.split(" ").filter(e=>e.startsWith("language-"))[0]||"").replace("language-",""),an=class o extends kt{constructor(e="",n="",r){super(r);p(this,"__id","");p(this,"__language","");p(this,"__code","");this.__language=e,this.__code=n}static getType(){return"code-block"}static clone(e){let n=new o(e.__language,e.__code,e.__key);return n.__id=e.__id,n}setLanguage(e){let n=this.getWritable();n.__language=e}getLanguage(){return this.getLatest().__language}setCode(e){let n=this.getWritable();n.__code=e}getCode(){return this.getLatest().__code}setId(e){let n=this.getWritable();n.__id=e}getId(){return this.getLatest().__id}decorate(e,n){return{type:"code",getNode:()=>this}}isInline(){return!1}isIsolated(){return!0}createDOM(e,n){let r=y("pre",{id:this.__id||null},[y("code",{class:this.__language?`language-${this.__language}`:null},[this.__code])]);return y("div",{class:"editor-code-block-wrap"},[r])}updateDOM(e,n){let r=n.querySelector("code");return r&&(e.__language!==this.__language&&(r.className=this.__language?`language-${this.__language}`:""),e.__id!==this.__id&&n.setAttribute("id",this.__id),e.__code!==this.__code&&(r.textContent=this.__code)),!1}exportDOM(e){return{element:this.createDOM(e._config,e).querySelector("pre")}}static importDOM(){return{pre(e){return{conversion:n=>{let r=n.querySelector("code"),i=Wf(n.className)||r&&Wf(r.className)||"",s=r?(r.textContent||"").trim():(n.textContent||"").trim(),l=Qi(i,s);return n.id&&l.setId(n.id),{node:l,after(a){return[]}}},priority:3}}}}exportJSON(){return{type:"code-block",version:1,id:this.__id,language:this.__language,code:this.__code}}static importJSON(e){let n=Qi(e.language,e.code);return n.setId(e.id||""),n}};function Qi(o="",t=""){return new an(o,t)}function es(o){return o instanceof an}function qr(o,t){let e=t.getCode(),n=t.getLanguage();window.$components.first("code-editor").open(e,n,"ltr",(i,s)=>{o.update(()=>{t.setCode(i),t.setLanguage(s)})},()=>{})}var Do=class o extends kt{constructor(e,n,r){super(r);p(this,"__id","");p(this,"__drawingId","");p(this,"__drawingUrl","");this.__drawingId=e,this.__drawingUrl=n}static getType(){return"diagram"}static clone(e){let n=new o(e.__drawingId,e.__drawingUrl);return n.__id=e.__id,n}setDrawingIdAndUrl(e,n){let r=this.getWritable();r.__drawingUrl=n,r.__drawingId=e}getDrawingIdAndUrl(){let e=this.getLatest();return{id:e.__drawingId,url:e.__drawingUrl}}setId(e){let n=this.getWritable();n.__id=e}getId(){return this.getLatest().__id}decorate(e,n){return{type:"diagram",getNode:()=>this}}isInline(){return!1}isIsolated(){return!0}createDOM(e,n){return y("div",{id:this.__id||null,"drawio-diagram":this.__drawingId},[y("img",{src:this.__drawingUrl})])}updateDOM(e,n){let r=n.querySelector("img");return r&&(e.__id!==this.__id&&n.setAttribute("id",this.__id),e.__drawingUrl!==this.__drawingUrl&&r.setAttribute("src",this.__drawingUrl),e.__drawingId!==this.__drawingId&&n.setAttribute("drawio-diagram",this.__drawingId)),!1}static importDOM(){return{div(e){return e.hasAttribute("drawio-diagram")?{conversion:n=>{let i=n.querySelector("img")?.getAttribute("src")||"",s=n.getAttribute("drawio-diagram")||"",l=Xn(s,i);return n.id&&l.setId(n.id),{node:l}},priority:3}:null}}}exportJSON(){return{type:"diagram",version:1,id:this.__id,drawingId:this.__drawingId,drawingUrl:this.__drawingUrl}}static importJSON(e){let n=Xn(e.drawingId,e.drawingUrl);return n.setId(e.id||""),n}};function Xn(o="",t=""){return new Do(o,t)}var Rx=["width","height","style","title","name","src","allow","allowfullscreen","loading","sandbox","type","data","controls","autoplay","controlslist","loop","muted","playsinline","poster","preload"];function kx(o){let t={};for(let e of Object.keys(o))Rx.includes(e)&&(t[e]=o[e]);return t}function ts(o,t){let e=Object.assign({},o);if(!o.style)return e;let n=Fl(o.style);return n.delete(t),e.style=Nu(n),e}function qf(o,t){let e=Yf(o),n={};for(let i of t.attributes)n[i.name]=i.value;e.setAttributes(n);let r=[];if(o==="video"||o==="audio"){for(let i of t.children)if(i.tagName==="SOURCE"){let s=i.getAttribute("src"),l=i.getAttribute("type");s&&l&&r.push({src:s,type:l})}e.setSources(r)}return it(t,e),e}var Oo=class o extends V{constructor(e,n){super(n);p(this,"__id","");p(this,"__alignment","");p(this,"__tag");p(this,"__attributes",{});p(this,"__sources",[]);p(this,"__inset",0);this.__tag=e}static getType(){return"media"}static clone(e){let n=new o(e.__tag,e.__key);return n.__attributes=Object.assign({},e.__attributes),n.__sources=e.__sources.map(r=>Object.assign({},r)),n.__id=e.__id,n.__alignment=e.__alignment,n.__inset=e.__inset,n}setTag(e){let n=this.getWritable();n.__tag=e}getTag(){return this.getLatest().__tag}setAttributes(e){let n=this.getWritable();n.__attributes=kx(e)}getAttributes(){let e=this.getLatest();return Object.assign({},e.__attributes)}setSources(e){let n=this.getWritable();n.__sources=e}getSources(){return this.getLatest().__sources.map(n=>Object.assign({},n))}setSrc(e){let n=this.getAttributes(),r=this.getSources();this.__tag==="object"&&(n.data=e),this.__tag==="video"&&r.length>0?(r[0].src=e,delete n.src,r.length>1&&r.splice(1,r.length-1),this.setSources(r)):n.src=e,this.setAttributes(n)}setWidthAndHeight(e,n){let r=Object.assign(this.getAttributes(),{width:e,height:n});r=ts(r,"width"),r=ts(r,"height"),this.setAttributes(r)}setId(e){let n=this.getWritable();n.__id=e}getId(){return this.getLatest().__id}setAlignment(e){let n=this.getWritable();n.__alignment=e}getAlignment(){return this.getLatest().__alignment}setInset(e){let n=this.getWritable();n.__inset=e}getInset(){return this.getLatest().__inset}setHeight(e){if(!e)return;let n=Object.assign(this.getAttributes(),{height:e});this.setAttributes(ts(n,"height"))}getHeight(){let e=this.getLatest();return Yo(e.__attributes.height||"0")}setWidth(e){let n=this.getAttributes(),r=Object.assign(n,{width:e});this.setAttributes(ts(r,"width"))}getWidth(){let e=this.getLatest();return Yo(e.__attributes.width||"0")}isInline(){return!0}isParentRequired(){return!0}createInnerDOM(){let n=(this.__tag==="video"||this.__tag==="audio"?this.__sources:[]).map(i=>y("source",i)),r=y(this.__tag,this.__attributes,n);return st(r,this),r}createDOM(e,n){let r=this.createInnerDOM();return y("span",{class:r.className+" editor-media-wrap"},[r])}updateDOM(e,n){if(e.__tag!==this.__tag||JSON.stringify(e.__sources)!==JSON.stringify(this.__sources)||JSON.stringify(e.__attributes)!==JSON.stringify(this.__attributes))return!0;let r=n.firstElementChild;return e.__id!==this.__id&&xu(r,"id",this.__id),e.__alignment!==this.__alignment&&(e.__alignment&&(n.classList.remove(`align-${e.__alignment}`),r.classList.remove(`align-${e.__alignment}`)),this.__alignment&&(n.classList.add(`align-${this.__alignment}`),r.classList.add(`align-${this.__alignment}`))),e.__inset!==this.__inset&&(n.style.paddingLeft=`${this.__inset}px`),!1}static importDOM(){let e=n=>r=>({conversion:i=>({node:qf(n,i)}),priority:3});return{iframe:e("iframe"),embed:e("embed"),object:e("object"),video:e("video"),audio:e("audio")}}exportDOM(e){return{element:this.createInnerDOM()}}exportJSON(){return{...super.exportJSON(),type:"media",version:1,id:this.__id,alignment:this.__alignment,inset:this.__inset,tag:this.__tag,attributes:this.__attributes,sources:this.__sources}}static importJSON(e){let n=Yf(e.tag);return lt(e,n),n}};function Yf(o){return new Oo(o)}function Zf(o){let n=new DOMParser().parseFromString(`${o}`,"text/html").body.children[0];if(!(n instanceof HTMLElement))return null;let r=n.tagName.toLowerCase();return["embed","iframe","video","audio","object"].includes(r)?qf(r,n):null}var Ix=[{regex:/.*?youtu\.be\/([\w\-_\?&=.]+)/i,w:560,h:314,url:"https://www.youtube.com/embed/$1"},{regex:/.*youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?.*/i,w:560,h:314,url:"https://www.youtube.com/embed/$2?$4"},{regex:/.*youtube.com\/embed\/([a-z0-9\?&=\-_]+).*/i,w:560,h:314,url:"https://www.youtube.com/embed/$1"}],$x=["mp4","mpeg","m4v","m4p","mov"],Px=["3gp","aac","flac","mp3","m4a","ogg","wav","webm"],Bx=["html","htm","php","asp","aspx",""];function Vf(o){for(let s of Ix)if(o.match(s.regex)){let a=o.replace(s.regex,s.url),d=new Oo("iframe");return d.setSrc(a),d.setHeight(s.h),d.setWidth(s.w),d}let t="iframe",n=(o.split("?")[0].split("/").pop()||"").split("."),r=(n.length>1?n[n.length-1]:"").toLowerCase();$x.includes(r)?t="video":Px.includes(r)?t="audio":r&&!Bx.includes(r)&&(t="embed");let i=new Oo(t);return i.setSrc(o),i}function _t(o){return o instanceof Oo}var Jn=class o extends It{constructor(e,n){super(n);p(this,"__tag");this.__tag=e}static getType(){return"heading"}static clone(e){let n=new o(e.__tag,e.__key);return Mo(e,n),n}getTag(){return this.__tag}createDOM(e){let n=this.__tag,r=document.createElement(n),s=e.theme.heading;if(s!==void 0){let l=s[n];Ce(r,l)}return st(r,this),r}updateDOM(e,n){return Lo(e,this)}static importDOM(){return{h1:e=>({conversion:jn,priority:0}),h2:e=>({conversion:jn,priority:0}),h3:e=>({conversion:jn,priority:0}),h4:e=>({conversion:jn,priority:0}),h5:e=>({conversion:jn,priority:0}),h6:e=>({conversion:jn,priority:0})}}exportDOM(e){let{element:n}=super.exportDOM(e);return n&&ge(n)&&this.isEmpty()&&n.append(document.createElement("br")),{element:n}}static importJSON(e){let n=Gn(e.tag);return lt(e,n),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,n=!0){let r=e?e.anchor.offset:0,i=this.getLastDescendant(),l=!i||e&&e.anchor.key===i.getKey()&&r===i.getTextContentSize()||!e?I():Gn(this.getTag()),a=this.getDirection();if(l.setDirection(a),this.insertAfter(l,n),r===0&&!this.isEmpty()&&e){let d=I();d.select(),this.replace(d,!0)}return l}collapseAtStart(){let e=this.isEmpty()?I():Gn(this.getTag());return this.getChildren().forEach(r=>e.append(r)),this.replace(e),!0}extractWithChild(){return!0}};function jn(o){let t=o.nodeName.toLowerCase(),e=null;return(t==="h1"||t==="h2"||t==="h3"||t==="h4"||t==="h5"||t==="h6")&&(e=Gn(t),it(o,e)),{node:e}}function Gn(o){return re(new Jn(o))}function Qn(o){return o instanceof Jn}var er=class o extends It{static getType(){return"quote"}static clone(t){let e=new o(t.__key);return Mo(t,e),e}constructor(t){super(t)}createDOM(t){let e=document.createElement("blockquote");return Ce(e,t.theme.quote),st(e,this),e}updateDOM(t,e){return Lo(t,this)}static importDOM(){return{blockquote:t=>({conversion:Fx,priority:0})}}exportDOM(t){let{element:e}=super.exportDOM(t);return e&&ge(e)&&this.isEmpty()&&e.append(document.createElement("br")),{element:e}}static importJSON(t){let e=os();return lt(t,e),e}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(t,e){let n=I(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,e),n}collapseAtStart(){let t=I();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}};function os(){return re(new er)}function ns(o){return o instanceof er}function Fx(o){let t=os();return it(o,t),{node:t}}function Xf(){return[Jo,Jn,er,wo,Pt,bt,ro,no,Zn,en,Vn,qn,an,Do,Oo,ot,Qo]}function jf(){return[wo,Pt,ot,Qo]}function Gf(o){let t=[en,an,Do],e=n=>{for(let[r,i]of n)if(i==="destroyed"){let s=o.manager.getDecoratorByNodeKey(r);s&&s.teardown()}};for(let n of t)o.editor.registerMutationListener(n,r=>e(r))}function Da(o){return"build"in o}var ve=class{constructor(){p(this,"dom",null);p(this,"context",null);p(this,"abortController",new AbortController)}setContext(t){this.context=t}getContext(){if(this.context===null)throw new Error("Attempted to use EditorUIContext before it has been set");return this.context}getDOMElement(){return this.dom||(this.dom=this.buildDOM()),this.dom}rebuildDOM(){let t=this.buildDOM();return this.dom?.replaceWith(t),this.dom=t,this.dom}trans(t){return this.getContext().translate(t)}updateState(t){}emitEvent(t,e={}){this.dom&&this.dom.dispatchEvent(new CustomEvent("editor::"+t,{detail:e,bubbles:!0}))}onEvent(t,e,n=null){let r=n||this.dom;r&&r.addEventListener("editor::"+t,i=>{e(i.detail)},{signal:this.abortController.signal})}teardown(){this.dom&&this.dom.isConnected&&this.dom.remove(),this.abortController.abort("teardown")}},oe=class extends ve{constructor(e){super();p(this,"children",[]);this.children.push(...e)}buildDOM(){return y("div",{},this.getChildren().map(e=>e.getDOMElement()))}getChildren(){return this.children}addChildren(...e){this.children.push(...e)}removeChildren(...e){for(let n of e)this.removeChild(n)}removeChild(e){let n=this.children.indexOf(e);n!==-1&&this.children.splice(n,1)}updateState(e){for(let n of this.children)n.updateState(e)}setContext(e){super.setContext(e);for(let n of this.getChildren())n.setContext(e)}teardown(){for(let e of this.children)e.teardown();super.teardown()}},Yr=class extends oe{constructor(e,n){super(n);p(this,"className");this.className=e}buildDOM(){return y("div",{class:this.className},this.getChildren().map(e=>e.getDOMElement()))}};function Jf(){let o=()=>((1+Math.random())*65536|0).toString(16).substring(1);return`${o()+o()}-${o()}-${o()}-${o()}-${o()}${o()}${o()}`}function rs(){return((1+Math.random())*65536|0).toString(16).substring(1)}var Ft=class extends ve{constructor(e){super();p(this,"definition");this.definition=e}setValue(e){let n=this.getDOMElement().querySelector("input,select,textarea");this.definition.type==="checkbox"?n.checked=!!e:n.value=e,n.dispatchEvent(new Event("change"))}getName(){return this.definition.name}buildDOM(){let e=`editor-form-field-${this.definition.name}-${Date.now()}`,n;if(this.definition.type==="select"){let r=this.definition.valuesByLabel,s=Object.keys(r).map(l=>y("option",{value:r[l]},[this.trans(l)]));n=y("select",{id:e,name:this.definition.name,class:"editor-form-field-input"},s)}else if(this.definition.type==="textarea")n=y("textarea",{id:e,name:this.definition.name,class:"editor-form-field-input"});else if(this.definition.type==="checkbox")n=y("input",{id:e,name:this.definition.name,type:"checkbox",class:"editor-form-field-input-checkbox",value:"true"});else{if(this.definition.type==="hidden")return n=y("input",{id:e,name:this.definition.name,type:"hidden"}),y("div",{hidden:"true"},[n]);n=y("input",{id:e,name:this.definition.name,class:"editor-form-field-input"})}return y("div",{class:"editor-form-field-wrapper"},[y("label",{class:"editor-form-field-label",for:e},[this.trans(this.definition.label)]),n])}},is=class extends oe{constructor(e){let n=e.fields.map(r=>Da(r)?r.build():new Ft(r));super(n);p(this,"definition");p(this,"onCancel",null);p(this,"onSuccessfulSubmit",null);this.definition=e}setValues(e){for(let n of Object.keys(e)){let r=this.getFieldByName(n);r&&r.setValue(e[n])}}setOnCancel(e){this.onCancel=e}setOnSuccessfulSubmit(e){this.onSuccessfulSubmit=e}getFieldByName(e){let n=r=>{for(let i of r){if(i instanceof Ft&&i.getName()===e)return i;if(i instanceof oe){let s=n(i.getChildren());if(s)return s}}return null};return n(this.getChildren())}buildDOM(){let e=y("button",{type:"button",class:"editor-form-action-secondary"},[this.trans("Cancel")]),n=y("form",{},[...this.children.map(r=>r.getDOMElement()),y("div",{class:"editor-form-actions"},[e,y("button",{type:"submit",class:"editor-form-action-primary"},[this.trans(this.definition.submitText)])])]);return n.addEventListener("submit",async r=>{r.preventDefault();let i=new FormData(n);await this.definition.action(i,this.getContext())&&this.onSuccessfulSubmit&&this.onSuccessfulSubmit()}),e.addEventListener("click",r=>{this.onCancel&&this.onCancel()}),n}},Oa=class extends oe{constructor(e){let n=e.contents.map(r=>Da(r)?r.build():new Ft(r));super(n);p(this,"definition");p(this,"fields");p(this,"id");this.definition=e,this.fields=n,this.id=Jf()}getLabel(){return this.getContext().translate(this.definition.label)}getId(){return this.id}buildDOM(){return y("div",{class:"editor-form-tab-content",role:"tabpanel",id:`editor-tabpanel-${this.id}`,"aria-labelledby":`editor-tab-${this.id}`},this.fields.map(e=>e.getDOMElement()))}},dn=class extends oe{constructor(e){let n=e.map(r=>new Oa(r));super(n);p(this,"definitions",[]);p(this,"tabs",[]);this.definitions=e,this.tabs=n}buildDOM(){let e=[],n=[],r=i=>{for(let s=0;s{r(e.indexOf(s))})}return r(0),y("div",{class:"editor-form-tab-container"},[y("div",{class:"editor-form-tab-controls"},e),y("div",{class:"editor-form-tab-contents"},n)])}};var Qf='';var ss=class extends oe{constructor(e,n){super([new is(e.form)]);p(this,"definition");p(this,"key");this.definition=e,this.key=n}show(e){let n=this.getDOMElement();document.body.append(n);let r=this.getForm();r.setValues(e),r.setOnCancel(this.hide.bind(this)),r.setOnSuccessfulSubmit(this.hide.bind(this)),this.getContext().manager.setModalActive(this.key,this)}hide(){this.getContext().manager.setModalInactive(this.key),this.teardown()}getForm(){return this.children[0]}buildDOM(){let e=y("button",{class:"editor-modal-close",type:"button",title:this.trans("Close")});e.innerHTML=Qf,e.addEventListener("click",this.hide.bind(this));let n=y("div",{class:"editor-modal editor-form-modal"},[y("div",{class:"editor-modal-header"},[y("div",{class:"editor-modal-title"},[this.trans(this.definition.title)]),e]),y("div",{class:"editor-modal-body"},[this.getForm().getDOMElement()])]),r=y("div",{class:"editor-modal-wrapper"},[n]);return r.addEventListener("click",i=>{i.target&&!n.contains(i.target)&&this.hide()}),r}};var ls=class extends oe{constructor(e,n){super(n);p(this,"target");this.target=e}buildDOM(){return y("div",{class:"editor-context-toolbar"},this.getChildren().map(e=>e.getDOMElement()))}updatePosition(){let e=this.getContext().scrollDOM.getBoundingClientRect(),n=this.target.getBoundingClientRect(),r=this.getDOMElement(),i=r.getBoundingClientRect(),s=n.bottom>e.top&&n.tope.bottom;r.classList.toggle("is-above",l);let d=n.left+n.width/2-i.width/2;l?r.style.top=n.top-6-i.height+"px":r.style.top=n.bottom+6+"px",r.style.left=d+"px"}insert(e){this.addChildren(...e),this.getDOMElement().append(...e.map(r=>r.getDOMElement()))}};function Kx(o,t,e){let n=t.getBoundingClientRect(),r=o.getBoundingClientRect();if(o.style.position="fixed",e){let i=n.right;n.right+r.width>window.innerWidth&&(i=Math.max(n.left-r.width,0)),o.style.top=n.top+"px",o.style.left=i+"px"}else{let i=n.left+r.width>window.innerWidth,s=n.left;i&&(s=Math.max(n.right-r.width,0)),o.style.top=n.bottom+"px",o.style.left=s+"px"}}var as=class{constructor(){p(this,"dropdownOptions",new WeakMap);p(this,"openDropdowns",new Set);this.onMenuMouseOver=this.onMenuMouseOver.bind(this),this.onWindowClick=this.onWindowClick.bind(this),window.addEventListener("click",this.onWindowClick)}teardown(){window.removeEventListener("click",this.onWindowClick)}onWindowClick(t){let e=t.target;this.closeAllNotContainingElement(e)}closeAllNotContainingElement(t){for(let e of this.openDropdowns)e.parentElement?.contains(t)||this.closeDropdown(e)}onMenuMouseOver(t){let e=t.target;this.closeAllNotContainingElement(e)}closeAll(){for(let t of this.openDropdowns)this.closeDropdown(t)}closeDropdown(t){t.hidden=!0,t.style.removeProperty("position"),t.style.removeProperty("left"),t.style.removeProperty("top"),this.openDropdowns.delete(t),t.removeEventListener("mouseover",this.onMenuMouseOver);let e=this.getOptions(t).onClose;e&&e()}openDropdown(t){let{toggle:e,showAside:n,onOpen:r}=this.getOptions(t);t.hidden=!1,Kx(t,e,!!n),this.openDropdowns.add(t),t.addEventListener("mouseover",this.onMenuMouseOver),r&&r()}getOptions(t){let e=this.dropdownOptions.get(t);if(!e)throw new Error("Can't find options for dropdown menu");return e}handle(t){let{menu:e,toggle:n,showOnHover:r}=t;this.dropdownOptions.set(e,t);let i=s=>{e.hasAttribute("hidden")?this.openDropdown(e):this.closeDropdown(e)};n.addEventListener("click",i),r&&n.addEventListener("mouseenter",()=>{this.openDropdown(e)})}};var ds=class{constructor(){p(this,"dropdowns",new as);p(this,"modalDefinitionsByKey",{});p(this,"activeModalsByKey",{});p(this,"decoratorConstructorsByType",{});p(this,"decoratorInstancesByNodeKey",{});p(this,"context",null);p(this,"toolbar",null);p(this,"contextToolbarDefinitionsByKey",{});p(this,"activeContextToolbars",[]);p(this,"selectionChangeHandlers",new Set);p(this,"domEventAbortController",new AbortController);p(this,"teardownCallbacks",[])}setContext(t){this.context=t,this.setupEventListeners(),this.setupEditor(t.editor)}getContext(){if(this.context===null)throw new Error("Context attempted to be used without being set");return this.context}triggerStateUpdateForElement(t){t.updateState({selection:null,editor:this.getContext().editor})}registerModal(t,e){this.modalDefinitionsByKey[t]=e}createModal(t){let e=this.modalDefinitionsByKey[t];if(!e)throw new Error(`Attempted to show modal of key [${t}] but no modal registered for that key`);let n=new ss(e,t);return n.setContext(this.getContext()),n}setModalActive(t,e){this.activeModalsByKey[t]=e}setModalInactive(t){delete this.activeModalsByKey[t]}getActiveModal(t){return this.activeModalsByKey[t]}registerDecoratorType(t,e){this.decoratorConstructorsByType[t]=e}getDecorator(t,e){if(this.decoratorInstancesByNodeKey[e])return this.decoratorInstancesByNodeKey[e];let n=this.decoratorConstructorsByType[t];if(!n)throw new Error(`Attempted to use decorator of type [${t}] but not decorator registered for that type`);let r=new n(e);return this.decoratorInstancesByNodeKey[e]=r,r}getDecoratorByNodeKey(t){return this.decoratorInstancesByNodeKey[t]||null}setToolbar(t){this.toolbar&&this.toolbar.teardown(),this.toolbar=t,t.setContext(this.getContext()),this.getContext().containerDOM.prepend(t.getDOMElement())}registerContextToolbar(t,e){this.contextToolbarDefinitionsByKey[t]=e}triggerStateUpdate(t){_u(t.editor,t.selection),this.toolbar?.updateState(t),this.updateContextToolbars(t);for(let e of this.activeContextToolbars)e.updateState(t);this.triggerSelectionChange(t.selection)}triggerStateRefresh(){let t=this.getContext().editor,e={editor:t,selection:ae(t)};this.triggerStateUpdate(e),this.updateContextToolbars(e)}triggerFutureStateRefresh(){requestAnimationFrame(()=>{this.getContext().editor.getEditorState().read(()=>{this.triggerStateRefresh()})})}triggerSelectionChange(t){if(t)for(let e of this.selectionChangeHandlers)e(t)}onSelectionChange(t){this.selectionChangeHandlers.add(t)}offSelectionChange(t){this.selectionChangeHandlers.delete(t)}triggerLayoutUpdate(){window.requestAnimationFrame(()=>{for(let t of this.activeContextToolbars)t.updatePosition()})}getDefaultDirection(){return this.getContext().options.textDirection==="rtl"?"rtl":"ltr"}onTeardown(t){this.teardownCallbacks.push(t)}teardown(){this.domEventAbortController.abort("teardown");for(let[t,e]of Object.entries(this.activeModalsByKey))e.teardown();for(let[t,e]of Object.entries(this.decoratorInstancesByNodeKey))e.teardown();this.toolbar&&this.toolbar.teardown();for(let t of this.activeContextToolbars)t.teardown();this.dropdowns.teardown();for(let t of this.teardownCallbacks)t()}updateContextToolbars(t){for(let s=this.activeContextToolbars.length-1;s>=0;s--)this.activeContextToolbars[s].teardown(),this.activeContextToolbars.splice(s,1);let e=(t.selection?.getNodes()||[])[0]||null;if(!e)return;let n=t.editor.getElementByKey(e.getKey());if(!n)return;let r=Object.keys(this.contextToolbarDefinitionsByKey),i=new Map;for(let s of r){let l=this.contextToolbarDefinitionsByKey[s],a=n.closest(l.selector)||n.querySelector(l.selector);if(a){let d=l.displayTargetLocator?l.displayTargetLocator(a):a;i.has(d)||i.set(d,[]),i.get(d).push(...l.content())}}for(let[s,l]of i){let a=new ls(s,l);a.setContext(this.getContext()),this.activeContextToolbars.push(a),this.getContext().containerDOM.append(a.getDOMElement()),a.updatePosition()}}setupEditor(t){let e=n=>{t.getEditorState().read(()=>{let r=Object.keys(n);for(let i of r){let s=t.getElementByKey(i);if(!s)continue;let l=n[i],a=this.getDecorator(l.type,i);a.setNode(l.getNode());let d=a.render(this.getContext(),s);d&&s.append(d)}})};t.registerDecoratorListener(e),t.registerUpdateListener(({editorState:n,prevEditorState:r})=>{!r._selection?.is(n._selection)&&t.update(()=>{let s=C();this.triggerStateUpdate({editor:t,selection:s})})})}setupEventListeners(){let t=this.triggerLayoutUpdate.bind(this);window.addEventListener("scroll",t,{capture:!0,passive:!0,signal:this.domEventAbortController.signal}),window.addEventListener("resize",t,{passive:!0,signal:this.domEventAbortController.signal})}};function Aa(o,t,e){let n=y("div",{contenteditable:"true",class:`editor-content-area ${e.editorClass||""}`}),r=y("div",{class:"editor-content-wrap"},[n]);o.append(r),o.classList.add("editor-container"),o.setAttribute("dir",e.textDirection),e.darkMode&&o.classList.add("editor-dark");let i=new ds,s={editor:t,containerDOM:o,editorDOM:n,scrollDOM:r,manager:i,translate(l){return e.translations[l]||l},error(l){let a=l instanceof Error?l.message:l;window.$events.error(a)},options:e};return i.setContext(s),s}function cn(o,t){o.update(()=>{let e=H();for(let r of e.getChildren())r.remove(!0);let n=_o(o,t);e.append(...n)})}function em(o,t){o.update(()=>{let e=H(),n=_o(o,t);e.append(...n)})}function tm(o,t){o.update(()=>{let e=H(),n=_o(o,t),r=e.getChildren()[0];for(let i=n.length-1;i>=0;i--)r?r.insertBefore(n[i]):e.append(n[i]),r=n[i]})}function om(o,t){o.update(()=>{let e=C(),n=_o(o,t),r=e?.getNodes()[0],i=r?.getParents()||[];if(i[i.length-1]&&r)for(let l=n.length-1;l>=0;l--)r.insertAfter(n[l])})}function cs(o){return new Promise((t,e)=>{o.getEditorState().read(()=>{let n=Ri(o);t(n)})})}function us(o){o.focus(()=>{},{defaultSelection:"rootStart"})}var tr=class{constructor(t,e,n){p(this,"container");p(this,"dragTargetSelector");p(this,"options");p(this,"startX",0);p(this,"startY",0);p(this,"target",null);this.container=t,this.dragTargetSelector=e,this.options=n,this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.container.addEventListener("mousedown",this.onMouseDown)}teardown(){this.container.removeEventListener("mousedown",this.onMouseDown),this.container.removeEventListener("mouseup",this.onMouseUp),this.container.removeEventListener("mousemove",this.onMouseMove)}onMouseDown(t){this.target=t.target.closest(this.dragTargetSelector),this.target&&(this.startX=t.screenX,this.startY=t.screenY,window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.options.down&&this.options.down(t,this.target))}onMouseMove(t){this.options.move&&this.target&&this.options.move(t,this.target,{x:t.screenX-this.startX,y:t.screenY-this.startY})}onMouseUp(t){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.options.up&&this.target&&this.options.up(t,this.target,{x:t.screenX-this.startX,y:t.screenY-this.startY})}};var Ra=class{constructor(t,e){p(this,"editor");p(this,"editScrollContainer");p(this,"markerDom",null);p(this,"mouseTracker",null);p(this,"dragging",!1);p(this,"targetCell",null);p(this,"xMarkerAtStart",!1);p(this,"yMarkerAtStart",!1);p(this,"activeInTable",!1);this.editor=t,this.editScrollContainer=e,this.setupListeners()}teardown(){this.editScrollContainer.removeEventListener("mousemove",this.onCellMouseMove),window.removeEventListener("scroll",this.onScrollOrResize,{capture:!0}),window.removeEventListener("resize",this.onScrollOrResize),this.mouseTracker&&this.mouseTracker.teardown()}setupListeners(){this.onTableMouseOver=this.onTableMouseOver.bind(this),this.onCellMouseMove=this.onCellMouseMove.bind(this),this.onScrollOrResize=this.onScrollOrResize.bind(this),this.editScrollContainer.addEventListener("mouseover",this.onTableMouseOver,{passive:!0}),window.addEventListener("scroll",this.onScrollOrResize,{capture:!0,passive:!0}),window.addEventListener("resize",this.onScrollOrResize,{passive:!0})}onScrollOrResize(){this.updateCurrentMarkerTargetPosition()}onTableMouseOver(t){if(this.dragging)return;let e=t.target.closest("table");e&&!this.activeInTable?(this.editScrollContainer.addEventListener("mousemove",this.onCellMouseMove,{passive:!0}),this.onCellMouseMove(t),this.activeInTable=!0):!e&&this.activeInTable&&(this.editScrollContainer.removeEventListener("mousemove",this.onCellMouseMove),this.hideMarkers(),this.activeInTable=!1)}onCellMouseMove(t){let e=t.target.closest("td,th");if(!e||this.dragging)return;let n=e.getBoundingClientRect(),r=n.left+n.width/2,i=n.top+n.height/2;this.targetCell=e,this.xMarkerAtStart=t.clientX<=r,this.yMarkerAtStart=t.clientY<=i;let s=this.xMarkerAtStart?n.left:n.right,l=this.yMarkerAtStart?n.top:n.bottom;this.updateMarkersTo(e,s,l)}updateMarkersTo(t,e,n){let r=this.getMarkers(),i=t.closest("table"),s=i.querySelector("caption"),l=i.getBoundingClientRect(),a=this.editScrollContainer.getBoundingClientRect(),d=l.top;s&&(d=s.getBoundingClientRect().bottom);let u=Math.max(d,a.top),c=Math.min(l.bottom,a.bottom)-u;r.x.style.left=e+"px",r.x.style.top=u+"px",r.x.style.height=c+"px",r.y.style.top=n+"px",r.y.style.left=l.left+"px",r.y.style.width=l.width+"px",r.y.hidden=na.bottom,r.x.hidden=l.top>a.bottom||l.bottom0?d-=1:e.xMarkerAtStart&&d===0&&(u=-u),e.editor.update(()=>{let m=ee(a);if(m instanceof bt){let c=If(e.editor,m,d),f=Math.max(c+u,10);La(m,d,f)}})}if(r==="top"&&e.targetCell){let d=e.targetCell;e.editor.update(()=>{let m=ee(d)?.getParent(),c=m?.getIndexWithinParent()||0,f=l.y;e.yMarkerAtStart&&c>0?c-=1:e.yMarkerAtStart&&c===0&&(f=-f);let g=m?.getParent()?.getChildren()[c];if(g instanceof ro){let h=g.getHeight()||0,N=Math.max(h+f,10);g.setHeight(N)}})}}})}getTargetCellColumnIndex(){let t=this.targetCell;if(t===null)return-1;let e=0,n=t.parentElement;for(let r of n?.children||[]){let i=Number(r.getAttribute("colspan"));if((Number.isNaN(i)||i<1)&&(i=1),e+=i,r===t)return e-1}return-1}};function nm(o,t){let e=new Ra(o,t);return()=>{e.teardown()}}function fs(o){return o.html||""}function rm(o){window.$events.listen("editor::replace",e=>{let n=fs(e);cn(o,n)}),window.$events.listen("editor::append",e=>{let n=fs(e);em(o,n)}),window.$events.listen("editor::prepend",e=>{let n=fs(e);tm(o,n)}),window.$events.listen("editor::insert",e=>{let n=fs(e);om(o,n)}),window.$events.listen("editor::focus",()=>{us(o)});let t=!0;o.registerUpdateListener(({dirtyElements:e,dirtyLeaves:n,editorState:r,prevEditorState:i})=>{(e.size>0||n.size>0)&&(t?t=!1:window.$events.emit("editor-html-change",""))})}var ms=class{constructor(t){p(this,"data");this.data=t}hasItems(){return!!this.data&&!!this.data.types&&this.data.types.length>0}containsTabularData(){let t=this.data.getData("text/rtf");return!!t&&t.includes("\\trowd")}getImages(){return this.getFiles().filter(t=>t.type.includes("image"))}getFiles(){let{files:t}=this.data;return[...t]}};function ps(o){window.$components.first("image-manager").show(e=>{o(e)},"gallery")}function im(o){let t=o.thumbs?.display||o.url,e=Tt(t,{target:"_blank"}),n=tn(t,{alt:o.name});return e.append(n),e}async function sm(o,t){if(o===null||o.type.indexOf("image")!==0)throw new Error("Not an image file");let e=o.name||`image-${Date.now()}.png`,n=new FormData;return n.append("file",o,e),n.append("uploaded_to",t),(await window.$http.post("/images/gallery",n)).data}function Ux(o,t){let e=o.clientX,n=o.clientY;return document.elementFromPoint(e,n)?Eu(t,o.clientX,o.clientY):null}function lm(o,t,e){let n=Ux(t,e);n&&rt(n),Kl(o,!0),(!F(n)||!n?.getTextContent())&&n?.remove()}async function zx(o,t,e){let i=((await window.$http.get(`/templates/${t}`)).data||{html:""}).html||"";o.update(()=>{let s=_o(o,i);lm(s,e,o)})}function am(o,t){let e=new ms(o),n=!1;if(!e.hasItems()||e.containsTabularData())return n;let r=e.getImages();return r.length>0&&(n=!0),t.editor.update(async()=>{for(let i of r){let s=window.baseUrl("/loading.gif"),l=tn(s),a=I();a.append(l),Me([a]);try{let d=await sm(i,t.options.pageId),u=d.name.replace(/"/g,"");t.editor.update(()=>{let m=tn(d.thumbs?.display||"",{alt:u}),c=Tt(d.url,{target:"_blank"});c.append(m),l.replace(c)})}catch(d){t.editor.update(()=>{l.remove(!1)}),window.$events.error(d?.data?.message||t.options.translations.imageUploadErrorText),console.error(d)}}}),n}function Wx(o,t){let e=/https?:\/\/([^?#]*?)\.(png|jpeg|jpg|gif|webp|bmp|avif)/i,n=o.getData("text/plain");return n&&e.test(n)?(t.editor.update(()=>{let r=tn(n);Me([r]),r.select()}),!0):!1}function qx(o){let t=o.editor;return e=>{let n=e.dataTransfer?.getData("bookstack/template")||"";if(n)return zx(t,n,e),e.preventDefault(),e.stopPropagation(),!0;let r=e.dataTransfer?.getData("text/html")||"";return r?(t.update(()=>{let i=_o(t,r);lm(i,e,t)}),e.preventDefault(),e.stopPropagation(),!0):e.dataTransfer&&am(e.dataTransfer,o)?(e.preventDefault(),e.stopPropagation(),!0):!1}}function Yx(o){return t=>{if(!t.clipboardData)return!1;let e=Wx(t.clipboardData,o)||am(t.clipboardData,o);return e&&t.preventDefault(),e}}function dm(o){let t=qx(o),e=Yx(o),n=o.editor.registerCommand($o,t,Xe),r=o.editor.registerCommand(ao,e,Xe);return o.scrollDOM.addEventListener("drop",t),()=>{n(),r(),o.scrollDOM.removeEventListener("drop",t)}}var ka=class{constructor(t,e){p(this,"editorContainer");p(this,"editor");this.editor=t,this.editorContainer=e,this.setupListeners()}setupListeners(){this.handleClick=this.handleClick.bind(this),this.editorContainer.addEventListener("click",this.handleClick)}handleClick(t){let e=t.target;e instanceof HTMLElement&&e.nodeName==="LI"&&e.classList.contains("task-list-item")&&(this.handleTaskListItemClick(e,t),t.preventDefault())}handleTaskListItemClick(t,e){let n=t.getBoundingClientRect();e.clientX<=n.right&&e.clientX>=n.left&&e.clientY>=n.top&&e.clientY<=n.bottom||this.editor.update(()=>{let i=ee(t);X(i)&&i.setChecked(!i.getChecked())})}teardown(){this.editorContainer.removeEventListener("click",this.handleClick)}};function cm(o,t){let e=new ka(o,t);return()=>{e.teardown()}}var Ia=class{constructor(t){p(this,"editor");p(this,"tableSelections",new Map);p(this,"unregisterMutationListener",()=>{});this.editor=t,this.init()}init(){this.unregisterMutationListener=this.editor.registerMutationListener(bt,t=>{for(let[e,n]of t)if(n==="created")this.editor.getEditorState().read(()=>{let r=Q(e);K(r)&&this.initializeTableNode(r)});else if(n==="destroyed"){let r=this.tableSelections.get(e);r!==void 0&&(r.removeListeners(),this.tableSelections.delete(e))}})}initializeTableNode(t){let e=t.getKey(),n=this.editor.getElementByKey(e);if(n&&!this.tableSelections.has(e)){let r=_a(t,n,this.editor,!0);this.tableSelections.set(e,r)}}teardown(){this.unregisterMutationListener();for(let[,t]of this.tableSelections)t.removeListeners()}};function um(o){let t=new Ia(o);return()=>{t.teardown()}}var Zx=(o,t)=>Qn(o)&&o.getTag()===t;function gs(o,t){o.update(()=>{Fn(e=>Zx(e,t),()=>Gn(t))})}function Zr(o){o.update(()=>{Fn(Ze,I)})}function Vr(o){o.update(()=>{Fn(ns,os)})}function Xr(o,t){o.getEditorState().read(()=>{let e=C();de(e,r=>z(r)&&r.getListType()===t)?ua(o):ca(o,t)})}function jr(o){o.getEditorState().read(()=>{let t=C(),e=ae(o),n=Z(e,es);n===null?o.update(()=>{let r=Qi();r.setCode(t?.getTextContent()||"");let i=At(t),s=i[0],l=i.slice(1);s?(s.replace(r),l.forEach(a=>a.remove())):Vo(r,!0),qr(o,r),rt(r)}):qr(o,n)})}function fm(o){o.update(()=>{let t=C(),e=At(t),n=!1;for(let i of e)ra(i)||(i.replace(Wn("info"),!0),n=!0);if(n)return;let r=["info","warning","danger","success"];for(let i of e)if(ra(i)){let s=i.getCategory(),a=(r.indexOf(s)+1)%r.length,d=r[a];i.setCategory(d)}})}function hs(o,t){o.update(()=>{let e=C(),n=Z(e,$t);if($t(n)?(n.setURL(t.url),n.setTarget(t.target),n.setTitle(t.title)):(n=Tt(t.url,{title:t.title,target:t.target}),Me([n])),$t(n)){for(let r of n.getChildren())r.remove(!0);n.append(q(t.text))}})}var Gr=class extends oe{constructor(e,n){super([e,n]);p(this,"input");p(this,"action");this.input=e,this.action=n}buildDOM(){return y("div",{class:"editor-action-input-container"},[this.input.getDOMElement(),this.action.getDOMElement()])}};var w=class extends ve{constructor(e){super();p(this,"definition");p(this,"active",!1);p(this,"completedSetup",!1);p(this,"disabled",!1);e.action!==void 0?this.definition=e:this.definition={...e,action(){return!1},isActive:()=>!1}}setContext(e){super.setContext(e),this.definition.setup&&!this.completedSetup&&(this.definition.setup(e,this),this.completedSetup=!0)}buildDOM(){let e=this.getLabel(),n=this.definition.format||"small",r=[];if(this.definition.icon||n==="long"){let s=y("div",{class:"editor-button-icon"});s.innerHTML=this.definition.icon||"",r.push(s)}if(!this.definition.icon||n==="long"){let s=y("div",{class:"editor-button-text"},[e]);r.push(s)}let i=y("button",{type:"button",class:`editor-button editor-button-${n}`,title:this.definition.icon?e:null,disabled:this.disabled?"true":null},r);return i.addEventListener("click",this.onClick.bind(this)),i}onClick(){let e=this.definition.action(this.getContext(),this);e instanceof Promise?e.then(n=>{n===!1&&this.emitEvent("button-action")}):e!==!1&&this.emitEvent("button-action")}updateActiveState(e){let n=this.definition.isActive(e,this.getContext());this.setActiveState(n)}updateDisabledState(e){if(this.definition.isDisabled){let n=this.definition.isDisabled(e,this.getContext());this.toggleDisabled(n)}}setActiveState(e){this.active=e,this.dom?.classList.toggle("editor-button-active",this.active)}updateState(e){this.updateActiveState(e.selection),this.updateDisabledState(e.selection)}isActive(){return this.active}getLabel(){return this.trans(this.definition.label)}toggleDisabled(e){this.disabled=e,e?this.dom?.setAttribute("disabled","true"):this.dom?.removeAttribute("disabled")}};var mm='';var pm='';function Ns(o,t){window.$components.first("entity-selector-popup").show(n=>o(n),{initialValue:t,searchEndpoint:"/search/entity-selector",entityTypes:"page,book,chapter,bookshelf",entityPermission:"view"})}var xs=class extends oe{constructor(e){super([e]);p(this,"input");p(this,"headerMap",new Map);this.input=e}buildDOM(){let e="editor-form-datalist-"+this.input.getName()+"-"+Date.now(),n=this.input.getDOMElement(),r=n.querySelector("input");r?.setAttribute("list",e),r?.setAttribute("autocomplete","off");let i=y("datalist",{id:e}),s=y("div",{class:"editor-link-field-container"},[n,i]);return r?.addEventListener("focusin",()=>{this.updateDataList(i)}),r?.addEventListener("input",()=>{let l=r.value,a=this.headerMap.get(l);a&&this.updateFormFromHeader(a)}),s}updateFormFromHeader(e){this.getHeaderIdAndText(e).then(({id:n,text:r})=>{let i=this.getContext().manager.getActiveModal("link");i&&i.getForm().setValues({url:`#${n}`,text:r,title:r})})}getHeaderIdAndText(e){return new Promise(n=>{this.getContext().editor.update(()=>{let r=e.getId();r||(r="header-"+rs(),e.setId(r));let i=e.getTextContent();n({id:r,text:i})})})}updateDataList(e){this.getContext().editor.getEditorState().read(()=>{let n=Hl(Qn);this.headerMap.clear();let r=[];for(let i of n){let s="header-"+i.getKey();this.headerMap.set(s,i),r.push(y("option",{value:s,label:i.getTextContent().substring(0,54)}))}e.innerHTML="",e.append(...r)})}};function gm(o,t){let e=t.manager.createModal("image"),n=o.getHeight(),r=o.getWidth(),i={src:o.getSrc(),alt:o.getAltText(),height:n===0?"":String(n),width:r===0?"":String(r)};e.show(i)}var hm={submitText:"Apply",async action(o,t){return t.editor.update(()=>{let e=ae(t.editor),n=Z(e,je);je(n)&&(n.setSrc(o.get("src")?.toString()||""),n.setAltText(o.get("alt")?.toString()||""),n.setWidth(Number(o.get("width")?.toString()||"0")),n.setHeight(Number(o.get("height")?.toString()||"0")))}),!0},fields:[{build(){return new Gr(new Ft({label:"Source",name:"src",type:"text"}),new w({label:"Browse files",icon:mm,action(o){ps(t=>{let e=o.manager.getActiveModal("image");e&&e.getForm().setValues({src:t.thumbs?.display||t.url,alt:t.name})})}}))}},{label:"Alternative description",name:"alt",type:"text"},{label:"Width",name:"width",type:"text"},{label:"Height",name:"height",type:"text"}]};function Es(o,t){let e=t.manager.createModal("link");if(o){let n={url:o.getURL(),text:o.getTextContent(),title:o.getTitle()||"",target:o.getTarget()||""};t.editor.update(()=>{let r=jo();r.add(o.getKey()),Y(r)}),e.show(n)}else t.editor.getEditorState().read(()=>{let i={text:C()?.getTextContent()||""};e.show(i)})}var Nm={submitText:"Apply",async action(o,t){return hs(t.editor,{url:o.get("url")?.toString()||"",title:o.get("title")?.toString()||"",target:o.get("target")?.toString()||"",text:o.get("text")?.toString()||""}),!0},fields:[{build(){return new Gr(new xs(new Ft({label:"URL",name:"url",type:"text"})),new w({label:"Browse links",icon:pm,action(o){Ns(t=>{let e=o.manager.getActiveModal("link");e&&e.getForm().setValues({url:t.link,text:t.name,title:t.name})})}}))}},{label:"Text to display",name:"text",type:"text"},{label:"Title",name:"title",type:"text"},{label:"Open link in...",name:"target",type:"select",valuesByLabel:{"Current window":"","New window":"_blank"}}]};function xm(o,t){let e=t.manager.createModal("media"),n={};if(o){let r=o.getAttributes(),i=o.exportDOM(t.editor).element,s=i instanceof HTMLElement?i.outerHTML:"";n={src:r.src||r.data||o.getSources()[0]?.src||"",width:r.width,height:r.height,embed:s,embed_check:s}}e.show(n)}var Em={submitText:"Save",async action(o,t){let e=await new Promise((i,s)=>{t.editor.getEditorState().read(()=>{let l=Z(C(),_t);i(l)})}),n=(o.get("embed")||"").toString().trim(),r=(o.get("embed_check")||"").toString().trim();return n&&n!==r?(t.editor.update(()=>{let i=Zf(n);e&&i?e.replace(i):i&&Me([i])}),!0):(t.editor.update(()=>{let i=(o.get("src")||"").toString().trim(),s=(o.get("height")||"").toString().trim(),l=(o.get("width")||"").toString().trim();if(e){e.setSrc(i),e.setWidthAndHeight(l,s),t.manager.triggerFutureStateRefresh();return}let a=Vf(i);(l||s)&&a.setWidthAndHeight(l,s),Me([a])}),!0)},fields:[{build(){return new dn([{label:"General",contents:[{label:"Source",name:"src",type:"text"},{label:"Width",name:"width",type:"text"},{label:"Height",name:"height",type:"text"}]},{label:"Embed",contents:[{label:"Paste your embed code below:",name:"embed",type:"textarea"},{label:"",name:"embed_check",type:"hidden"}]}])}}]};function Tm(o,t){let e=t.manager.createModal("details");o&&e.show({summary:o.getSummary()})}var Cm={submitText:"Save",async action(o,t){return t.editor.update(()=>{let e=Z(C(),$e),n=(o.get("summary")||"").toString().trim();$e(e)&&e.setSummary(n)}),!0},fields:[{label:"Toggle label",name:"summary",type:"text"}]};function Ts(o,t){return gs(o.editor,t),o.manager.triggerFutureStateRefresh(),!0}function so(o){return(t,e)=>(o(t),e.manager.triggerFutureStateRefresh(),!0)}function bm(o){return o.dispatchCommand(xe,"code"),!0}var _m={"meta+s":()=>(window.$events.emit("editor-save-draft"),!0),"meta+enter":()=>(window.$events.emit("editor-save-page"),!0),"meta+1":(o,t)=>Ts(t,"h2"),"meta+2":(o,t)=>Ts(t,"h3"),"meta+3":(o,t)=>Ts(t,"h4"),"meta+4":(o,t)=>Ts(t,"h5"),"meta+5":so(Zr),"meta+d":so(Zr),"meta+6":so(Vr),"meta+q":so(Vr),"meta+7":so(jr),"meta+e":so(jr),"meta+8":bm,"meta+shift+e":bm,"meta+9":so(fm),"meta+o":so(o=>Xr(o,"number")),"meta+p":so(o=>Xr(o,"bullet")),"meta+k":(o,t)=>(o.getEditorState().read(()=>{let e=Z(C(),$t);Es(e,t)}),!0),"meta+shift+k":(o,t)=>(Ns(e=>{hs(o,{text:e.name,title:e.link,target:"",url:e.link})}),!0)};function jx(o){return t=>{let e=Gx(t);_m[e]&&_m[e](o.editor,o)&&(t.stopPropagation(),t.preventDefault())}}function Gx(o){return[(ym()?o.metaKey:o.ctrlKey)?"meta":"",o.shiftKey?"shift":"",o.key].filter(Boolean).join("+").toLowerCase()}function ym(){return window.navigator.userAgent.includes("Mac OS X")}function Jx(o){o.registerCommand(Ke,t=>ym()?t?.metaKey||!1:t?.ctrlKey||!1,Xe)}function $a(o){let t=jx(o);return Jx(o.editor),o.editor.registerRootListener((e,n)=>{e?.addEventListener("keydown",t),n?.removeEventListener("keydown",t)})}function Qx(o){return je(o)||_t(o)}var Pa=class{constructor(t){p(this,"context");p(this,"resizerDOM",null);p(this,"targetNode",null);p(this,"scrollContainer");p(this,"mouseTracker",null);p(this,"activeSelection","");p(this,"loadAbortController",new AbortController);this.context=t,this.scrollContainer=t.scrollDOM,this.onSelectionChange=this.onSelectionChange.bind(this),this.onTargetDOMLoad=this.onTargetDOMLoad.bind(this),t.manager.onSelectionChange(this.onSelectionChange)}onSelectionChange(t){let e=t?.getNodes()||[];if(this.activeSelection&&this.hide(),e.length===1&&Qx(e[0])){let n=e[0],r=this.getTargetDOM(n);r&&this.showForNode(n,r)}}getTargetDOM(t){if(t==null)return null;let e=this.context.editor.getElementByKey(t.__key);return e&&e.nodeName==="SPAN"&&(e=e.firstElementChild),e}onTargetDOMLoad(){this.updateResizerPosition()}teardown(){this.context.manager.offSelectionChange(this.onSelectionChange),this.hide()}showForNode(t,e){this.resizerDOM=this.buildDOM(),this.targetNode=t;let n=y("span",{class:"editor-node-resizer-ghost"});je(t)&&(n=y("img",{src:e.getAttribute("src"),class:"editor-node-resizer-ghost"})),this.resizerDOM.append(n),this.context.scrollDOM.append(this.resizerDOM),this.updateResizerPosition(),this.mouseTracker=this.setupTracker(this.resizerDOM,t,e),this.activeSelection=t.getKey(),e.matches("img, embed, iframe, object")&&(this.loadAbortController=new AbortController,e.addEventListener("load",this.onTargetDOMLoad,{signal:this.loadAbortController.signal}))}updateResizerPosition(){let t=this.getTargetDOM(this.targetNode);if(!this.resizerDOM||!t)return;let e=this.scrollContainer.getBoundingClientRect(),n=t.getBoundingClientRect(),r=n.top-(e.top-this.scrollContainer.scrollTop),i=n.left-e.left;this.resizerDOM.style.top=`${r}px`,this.resizerDOM.style.left=`${i}px`,this.resizerDOM.style.width=n.width+"px",this.resizerDOM.style.height=n.height+"px"}updateDOMSize(t,e){this.resizerDOM&&(this.resizerDOM.style.width=t+"px",this.resizerDOM.style.height=e+"px")}hide(){this.mouseTracker?.teardown(),this.resizerDOM?.remove(),this.targetNode=null,this.activeSelection="",this.loadAbortController.abort()}buildDOM(){let e=["nw","ne","se","sw"].map(n=>y("div",{class:`editor-node-resizer-handle ${n}`}));return y("div",{class:"editor-node-resizer"},e)}setupTracker(t,e,n){let r=0,i=0,s=0,l=!1,a=this,d=!1,u=!1,m=c=>{let f=c.x;d&&(f=0-f);let g=c.y;u&&(g=0-g);let h=Math.sqrt(Math.pow(Math.abs(f),2)+Math.pow(Math.abs(g),2)),b=f+g>0?h:0-h,x=Math.max(5,Math.round(r+b)),S=Math.round(x*s);return{width:x,height:S}};return new tr(t,".editor-node-resizer-handle",{down(c,f){a.resizerDOM?.classList.add("active"),a.context.editor.getEditorState().read(()=>{let g=n.getBoundingClientRect();r=e.getWidth()||g.width,i=e.getHeight()||g.height,e.getHeight()&&(l=!0),s=i/r}),d=f.classList.contains("nw")||f.classList.contains("sw"),u=f.classList.contains("nw")||f.classList.contains("ne")},move(c,f,g){let h=m(g);a.updateDOMSize(h.width,h.height)},up(c,f,g){let h=m(g);a.context.editor.update(()=>{e.setWidth(h.width),e.setHeight(l?h.height:0)},{onUpdate:()=>{requestAnimationFrame(()=>{a.context.manager.triggerLayoutUpdate(),a.updateResizerPosition()})}}),a.resizerDOM?.classList.remove("active")}})}};function Sm(o){let t=new Pa(o);return()=>{t.teardown()}}function eE(o){let t=o.getParent();if(!z(t))return o;let e=o.getChildren().filter(d=>z(d))[0]||null,n=e?.getChildren()||[],r=t.getChildren(),i=r.findIndex(d=>d.getKey()===o.getKey()),s=i===0,l=Pe(),a=be(t.getListType());if(a.append(l),l.append(...o.getChildren()),s?o.append(a):(r[i-1].append(a),o.remove()),e){for(let d of n)l.insertAfter(d);e.remove()}return l}function tE(o){let t=o.getParent(),e=t?.getParent(),n=e?.getParent();if(!z(t)||!z(n)||!X(e))return o;let r=o.getNextSiblings();if(e.insertAfter(o),t.getChildren().length===0&&t.remove(),r.length>0){let i=be(t.getListType());i.append(...r),o.append(i)}return t.getChildrenSize()===0&&t.remove(),e.getChildren().length===0&&e.remove(),o}function oE(o){let t=o?.getNodes()||[],[e,n]=o?.getStartEndPoints()||[null,null],r=new Set;if(o&&e){o.isBackward()&&n&&([n,e]=[e,n]);let s=e.getNode().getParents(),l=!1;for(let a of s)X(a)&&(l?r.add(a.getKey()):l=!0)}let i=[];e:for(let s of t){if(X(s)){r.has(s.getKey())||i.push(s);continue}let l=s.getParents();for(let a of l)if(X(a)){r.has(a.getKey())||i.push(a);continue e}i.push(null)}return i}function nE(o){let t={};for(let n of o){if(n===null)continue;let r=n.getKey();typeof t[r]>"u"&&(t[r]=n)}let e=Object.values(t);return Tu(e)}function Jr(o,t){let e=C(),n=e?.getStartEndPoints(),r=oE(e);if(r.length>0&&!r.includes(null)){let l=[],a=nE(r);if(t>0)for(let d of a)l.push(eE(d));else if(t<0){for(let d of[...a].reverse())l.push(tE(d));l.reverse()}if(l.length===1&&n){let d=l[0],u=d.getChildren()[0];u||(u=q(""),d.append(u)),u.select(n[0].offset,n[1].offset)}else wu(l);return}let s=At(e);for(let l of s)if(Cu(l)){let a=l.getInset(),d=Math.min(Math.max(a+t,0),500);l.setInset(d)}vu(o)}var or=class extends Error{constructor(e,n){super(e.statusText);p(this,"data");p(this,"headers");p(this,"original");p(this,"redirected");p(this,"status");p(this,"statusText");p(this,"url");this.data=n,this.headers=e.headers,this.redirected=e.redirected,this.status=e.status,this.statusText=e.statusText,this.url=e.url,this.original=e}};function Cs(o){return new Promise((t,e)=>{o.oncomplete=o.onsuccess=()=>t(o.result),o.onabort=o.onerror=()=>e(o.error)})}function rE(o,t){let e,n=()=>{if(e)return e;let r=indexedDB.open(o);return r.onupgradeneeded=()=>r.result.createObjectStore(t),e=Cs(r),e.then(i=>{i.onclose=()=>e=void 0},()=>{}),e};return(r,i)=>n().then(s=>i(s.transaction(t,r).objectStore(t)))}var Ba;function Fa(){return Ba||(Ba=rE("keyval-store","keyval")),Ba}function Ha(o,t=Fa()){return t("readonly",e=>Cs(e.get(o)))}function Ka(o,t,e=Fa()){return e("readwrite",n=>(n.put(t,o),Cs(n.transaction)))}function Ua(o,t=Fa()){return t("readwrite",e=>(e.delete(o),Cs(e.transaction)))}var yt=null,qa,bs,za,Wa="last-drawing-save";function Ya(o){yt?.contentWindow?.postMessage(JSON.stringify(o),qa)}function sE(o){Ka(Wa,o.data),za&&za(o.data).then(()=>{Ua(Wa)})}function lE(o){Ya({action:"export",format:"xmlpng",xml:o.xml,spin:"Updating drawing"})}function aE(){bs&&bs().then(o=>{Ya({action:"load",autosave:1,xml:o})})}function dE(){let o={};yt&&(window.$events.emitPublic(yt,"editor-drawio::configure",{config:o}),Ya({action:"configure",config:o}))}function Lm(){window.removeEventListener("message",Mm),yt&&document.body.removeChild(yt)}function Mm(o){if(!o.data||o.data.length<1||o.origin!==qa)return;let t=JSON.parse(o.data);t.event==="init"?aE():t.event==="exit"?Lm():t.event==="save"?lE(t):t.event==="export"?sE(t):t.event==="configure"&&dE()}async function cE(){let o=await Ha(Wa),t=document.getElementById("unsaved-drawing-dialog");t||console.error("Missing expected unsaved-drawing dialog"),o&&t&&await window.$components.firstOnElement(t,"confirm-dialog").show()&&(bs=async()=>o)}async function wm(o,t,e){bs=t,za=e,await cE(),yt=document.createElement("iframe"),yt.setAttribute("frameborder","0"),window.addEventListener("message",Mm),yt.setAttribute("src",o),yt.setAttribute("class","fullscreen"),yt.style.backgroundColor="#FFFFFF",document.body.appendChild(yt),qa=new URL(o).origin}async function vm(o,t){let e={image:o,uploaded_to:t};return(await window.$http.post(window.baseUrl("/images/drawio"),e)).data}function Za(){Lm()}async function Dm(o){try{return`data:image/png;base64,${(await window.$http.get(window.baseUrl(`/images/drawio/base64/${o}`))).data.content}`}catch(t){throw t instanceof or&&window.$events.showResponseError(t),Za(),t}}function lo(o){return o instanceof Do}function fE(o,t){o.status===413?window.$events.emit("error",t.options.translations.serverUploadLimitText||""):window.$events.emit("error",t.options.translations.imageUploadErrorText||""),console.error(o)}async function mE(o,t){return await new Promise((n,r)=>{o.getEditorState().read(()=>{let{id:i}=t.getDrawingIdAndUrl();n(i)})})||""}async function pE(o,t,e,n){if(Za(),n){let r=window.baseUrl("/loading.gif");o.editor.update(()=>{t.setDrawingIdAndUrl("",r)})}try{let r=await vm(e,o.options.pageId);o.editor.update(()=>{t.setDrawingIdAndUrl(String(r.id),r.url)})}catch(r){throw r instanceof or&&fE(r,o),n&&o.editor.update(()=>{t.remove()}),new Error(`Failed to save image with error: ${r}`)}}function Qr(o,t){let e=!1;wm(o.options.drawioUrl,async()=>{let n=await mE(o.editor,t);return e=!n,e?"":Dm(n)},async n=>pE(o,t,n,e))}function gE(o){window.$components.first("image-manager").show(e=>{o(e)},"drawio")}function Om(o){let t=ae(o.editor);gE(e=>{o.editor.update(()=>{let n=Xn(e.id,e.url),r=Z(t,lo);lo(r)?r.replace(n):Me([n])})})}function Va(o){if(o.length===1){let t=o[0];if(F(t)||je(t)||_t(t)||lo(t))return!0}return!1}function Am(o){let t=ae(o)?.getNodes()||[];Va(t)&&o.update(()=>{t[0].remove()})}function hE(o,t){let e=ae(o)?.getNodes()||[];if(Va(e)){let n=e[0],r=Zo(n)||n,i=t?.shiftKey===!0;if(r)return requestAnimationFrame(()=>{o.update(()=>{let s=I();i?r.insertBefore(s):r.insertAfter(s),s.select()})}),t?.preventDefault(),!0}return!1}function Rm(o,t,e=!0){let n=ae(o)?.getNodes()||[];if(!Va(n))return!1;t?.preventDefault();let r=n[0];return o.update(()=>{Ar(r,e)}),!0}function NE(o,t){let e=km(o);return e===null||e.detailsSibling?!1:(o.update(()=>{let n=I();e.parentDetails.insertAfter(n),n.select()}),t?.preventDefault(),!0)}function xE(o,t){let e=km(o);if(e===null||e.parentBlock.getTextContent()!=="")return!1;t?.preventDefault();let n=e.parentDetails.getNextSibling();return o.update(()=>{if(n)n.selectStart();else{let r=I();e.parentDetails.insertAfter(r),r.select()}e.parentBlock.remove()}),!0}function km(o){let e=ae(o)?.getNodes()[0];if(!e)return null;let n=Zo(e),r=Ot(e,$e);if(!$e(r)||n===null||n.getKey()!==r.getLastChild()?.getKey())return null;let i=r.getNextSibling();return{parentDetails:r,parentBlock:n,detailsSibling:i}}function EE(o){if(o.length!==1)return!1;let t=o[0];return X(t)||X(t.getParent())}function TE(o,t){let e=t?.shiftKey?-40:40,r=C()?.getNodes()||[];return r.length>1||EE(r)?(o.update(()=>{Jr(o,e)}),t?.preventDefault(),!0):!1}function Im(o){let t=o.editor.registerCommand(qt,()=>(Am(o.editor),!1),Ve),e=o.editor.registerCommand(Yt,()=>(Am(o.editor),!1),Ve),n=o.editor.registerCommand(Ke,l=>hE(o.editor,l)||xE(o.editor,l),Ve),r=o.editor.registerCommand(Io,l=>TE(o.editor,l),Ve),i=o.editor.registerCommand(zt,l=>Rm(o.editor,l,!1),Ve),s=o.editor.registerCommand(Wt,l=>NE(o.editor,l)||Rm(o.editor,l,!0),Ve);return()=>{t(),e(),n(),r(),i(),s()}}function CE(o){return o.toLowerCase().startsWith("http")?/(http|https):\/\/(\S+)\.\S+$/.test(o):!1}function bE(o,t,e){let n=t.getStartEndPoints();if(!n)return;let r=n[0].offset,i=o.getTextContent(),a=i.slice(0,r).lastIndexOf(" ")+1,d=i.slice(a,r);CE(d)&&e.update(()=>{let u=Tt(d);u.append(new nt(d));let m=o.splitText(a,r),c=a>0?1:0,f=m[c];f&&f.replace(u)})}function Xa(o){let t=r=>{let i=C(),s=yu(i);return s&&i&&bE(s,i,o),!1},e=o.registerCommand(ir,t,Kn),n=o.registerCommand(Ke,t,Kn);return()=>{e(),n()}}var _s=class extends oe{buildDOM(){let t=this.getChildren().map(i=>i.getDOMElement()),e=y("div",{class:"editor-format-menu-dropdown editor-dropdown-menu editor-dropdown-menu-vertical",hidden:"true"},t),n=y("button",{class:"editor-format-menu-toggle editor-button",type:"button"},[this.trans("Formats")]),r=y("div",{class:"editor-format-menu editor-dropdown-menu-container"},[n,e]);return this.getContext().manager.dropdowns.handle({toggle:n,menu:e}),this.onEvent("button-action",()=>{this.getContext().manager.dropdowns.closeAll()},r),r}updateState(t){super.updateState(t);for(let e of this.children){if(e instanceof w&&e.isActive()){this.updateToggleLabel(e.getLabel());return}if(e instanceof oe){for(let n of e.getChildren())if(n instanceof w&&n.isActive()){this.updateToggleLabel(n.getLabel());return}}}this.updateToggleLabel(this.trans("Formats"))}updateToggleLabel(t){let e=this.getDOMElement().querySelector("button");e&&(e.innerText=t)}};var Ge=class extends w{constructor(e,n){super(n);p(this,"previewSampleElement");this.previewSampleElement=e}buildDOM(){let e=super.buildDOM();e.innerHTML="";let n=y("span",{class:"editor-button-format-preview"},[this.getLabel()]),r=this.getStylesFromPreview();for(let i of Object.keys(r))n.style.setProperty(i,r[i]);return e.append(n),e}getStylesFromPreview(){let e=y("div",{style:"display: none",hidden:"true",class:"page-content"}),n=this.previewSampleElement.cloneNode();n.textContent=this.getLabel(),e.append(n),document.body.append(e);let r=["color","font-size","background-color","border-inline-start"],i={},s=window.getComputedStyle(n);for(let l of r)i[l]=s.getPropertyValue(l);return e.remove(),i}};var $m='';var ys=class extends w{buildDOM(){let t=super.buildDOM(),e=y("div",{class:"editor-menu-button-icon"});return e.innerHTML=$m,t.append(e),t}};var yE={showOnHover:!1,direction:"horizontal",showAside:void 0,hideOnAction:!0,button:{label:"Menu"}},Te=class extends oe{constructor(e,n){super(n);p(this,"button");p(this,"childItems");p(this,"open",!1);p(this,"options");if(this.childItems=n,this.options=Object.assign({},yE,e),e.button instanceof w)this.button=e.button;else{let r=e.button.format==="long"?ys:w;this.button=new r({...e.button,action(){return!1},isActive:()=>this.open})}this.addChildren(this.button)}insertItems(...e){this.addChildren(...e),this.childItems.push(...e)}buildDOM(){let e=this.button.getDOMElement(),n=this.childItems.map(s=>s.getDOMElement()),r=y("div",{class:`editor-dropdown-menu editor-dropdown-menu-${this.options.direction}`,hidden:"true"},n),i=y("div",{class:"editor-dropdown-menu-container"},[e,r]);return this.getContext().manager.dropdowns.handle({toggle:e,menu:r,showOnHover:this.options.showOnHover,showAside:typeof this.options.showAside=="boolean"?this.options.showAside:this.options.direction==="vertical",onOpen:()=>{this.open=!0,this.getContext().manager.triggerStateUpdateForElement(this.button)},onClose:()=>{this.open=!1,this.getContext().manager.triggerStateUpdateForElement(this.button)}}),this.options.hideOnAction&&this.onEvent("button-action",()=>{this.getContext().manager.dropdowns.closeAll()},i),i}};var Pm='';var Bm='';var Fm=["#000000","#ffffff","#BFEDD2","#FBEEB8","#F8CAC6","#ECCAFA","#C2E0F4","#2DC26B","#F1C40F","#E03E2D","#B96AD9","#3598DB","#169179","#E67E23","#BA372A","#843FA1","#236FA1","#ECF0F1","#CED4D9","#95A5A6","#7E8C8D","#34495E"],Hm="bs-lexical-custom-colors",un=class extends ve{constructor(e){super();p(this,"callback");this.callback=e}buildDOM(){let e=rs(),r=[...Fm,...this.getCustomColorChoices()].map(u=>y("div",{class:"editor-color-select-option",style:`background-color: ${u}`,"data-color":u,"aria-label":u})),i=y("div",{class:"editor-color-select-option","data-color":"",title:this.getContext().translate("Remove color")},[]);i.innerHTML=Pm,r.push(i);let s=y("label",{class:"editor-color-select-option",for:`color-select-${e}`,"data-color":"",title:this.getContext().translate("Custom color")},[]);s.innerHTML=Bm,r.push(s);let l=y("input",{type:"color",hidden:"true",id:`color-select-${e}`});r.push(l),l.addEventListener("change",u=>{l.value&&(this.storeCustomColorChoice(l.value),this.setColor(l.value),this.rebuildDOM())});let a=[];for(let u=0;u{let l=s.target.closest(".editor-table-creator-cell");if(l){let a=Number(l.dataset.rows||0),d=Number(l.dataset.columns||0);this.updateGridSelection(a,d,n,r)}}),i.addEventListener("click",s=>{let l=s.target.closest(".editor-table-creator-cell");l&&this.onCellClick(l)}),i.addEventListener("mouseleave",s=>{this.updateGridSelection(0,0,n,r)}),y("div",{class:"editor-table-creator"},[i,r])}updateGridSelection(t,e,n,r){for(let i of n){let s=Number(i.dataset.rows)<=t&&Number(i.dataset.columns)<=e;i.classList.toggle("active",s)}r.textContent=`${t} x ${e}`}onCellClick(t){let e=Number(t.dataset.rows||0),n=Number(t.dataset.columns||0);if(e<1||n<1)return;let r=Math.min(Math.round(840/n),240),i=Array(n).fill(r+"px");this.getContext().editor.update(()=>{let s=ga(e,n,!1);s.setColWidths(i),Vo(s)})}};var ei=class extends w{constructor(e,n){super(e);p(this,"style");this.style=n}getColorBar(){let e=this.getDOMElement().querySelector("svg .editor-icon-color-bar");if(!e)throw new Error(`Could not find expected color bar in the icon for this ${this.definition.label} button`);return e}updateState(e){if(super.updateState(e),_(e.selection)){let n=Bl(e.selection,this.style);this.getColorBar().setAttribute("fill",n)}}};var Km='';var dt=class extends oe{constructor(e,n){super(n);p(this,"size");p(this,"overflowButton");p(this,"content");this.size=e,this.content=n,this.overflowButton=new Te({button:{label:"More",icon:Km},hideOnAction:!1},[]),this.addChildren(this.overflowButton)}buildDOM(){let e=this.content.length>this.size?this.size-1:this.size,n=this.content.slice(0,e),r=this.content.slice(e),i=n.map(s=>s.getDOMElement());return r.length>0&&(this.removeChildren(...r),this.overflowButton.insertItems(...r),i.push(this.overflowButton.getDOMElement())),y("div",{class:"editor-overflow-container"},i)}};var ja='';var Ls='';var Um='';var zm='';var Wm='';var qm='';var Ym='';var Zm='';var Vm=`