(self.rspackChunk_jupyter_docprovider_extension=self.rspackChunk_jupyter_docprovider_extension||[]).push([[525],{8165(e,t,r){"use strict";var o=r(9138),i=r(6095),n=r(4531);e.exports=r(7196)||o.call(n,i)},2012(e,t,r){"use strict";var o=r(9138),i=r(6095),n=r(8165);e.exports=function(){return n(o,i,arguments)}},6095(e){"use strict";e.exports=Function.prototype.apply},4531(e){"use strict";e.exports=Function.prototype.call},9903(e,t,r){"use strict";var o=r(9138),i=r(3468),n=r(4531),s=r(8165);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return s(o,n,e)}},7196(e){"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},8498(e,t,r){"use strict";var o=r(6108),i=r(4940),n=r(9903),s=r(2012);e.exports=function(e){var t=n(arguments),r=1+e.length-(arguments.length-1);return o(t,r>0?r:0,!0)},i?i(e.exports,"apply",{value:s}):e.exports.apply=s},4607(e,t,r){"use strict";var o=r(528),i=r(9903),n=i([o("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=o(e,!!t);return"function"==typeof r&&n(e,".prototype.")>-1?i([r]):r}},4965(e,t,r){"use strict";var o=r(6758),i=r.n(o),n=r(935),s=r.n(n)()(i());s.push([e.id,`.jp-CollapsiblePanel {
  border: var(--jp-nbdime-output-color1) solid 1pt;
}

button.jp-CollapsiblePanel-header-icon {
  height: 24px;
  width: 24px;
  float: right;
  font-size: var(--jp-ui-font-size1);
  margin-top: 0.1em;
  padding: 0 2px;

  color: var(--jp-ui-font-color2);
  background-color: transparent;

  border: 1px solid var(--jp-nbdime-output-color2);
  border-radius: 2px;

  text-decoration: none;
  transition: background-color 0.1s ease;
}

/* Remove text border, as we don't use button text for icon */
button.jp-CollapsiblePanel-header-icon::-moz-focus-inner {
  border: none;
}

button.jp-CollapsiblePanel-header-icon:focus,
button.jp-CollapsiblePanel-header-icon:hover,
button.jp-CollapsiblePanel-header-icon:active {
  border: 1px solid var(--jp-ui-font-color1);
}

.jp-CollapsiblePanel-header {
  padding-top: 0.2em;
  padding-bottom: 0.2em;
  background-color: var(--jp-nbdime-output-color3);
  padding-left: 2em;
  padding-right: 2em;
  border-top: var(--jp-nbdime-output-color1) solid 1pt;
  color: var(--jp-ui-font-color1);
}

.jp-CollapsiblePanel-container {
  overflow: hidden;
}

.jp-CollapsiblePanel-slider {
  /* complete liquid height based on the parent's height!! */
  height: 100%;

  /* only transition on transform properties which are hardware accelerated = way better performances */
  -webkit-transition:
    -webkit-transform 0.3s ease,
    height 0.3s;
  -moz-transition:
    -moz-transform 0.3s ease,
    height 0.3s;
  -ms-transition:
    -ms-transform 0.3s ease,
    height 0.3s;
  transition:
    transform 0.3s ease,
    height 0.3s;
}

.jp-CollapsiblePanel-opened {
  /* visible */
  -webkit-transform: translate(0, 0%);
  -moz-transform: translate(0, 0%);
  -ms-transform: translate(0, 0%);
  transform: translate(0, 0%);
  height: 100%;
}

.jp-CollapsiblePanel-closed {
  /* completely offscreen */
  -webkit-transform: translate(0, -100%);
  -moz-transform: translate(0, -100%);
  -ms-transform: translate(0, -100%);
  transform: translate(0, -100%);
  height: 0;
}
`,""]),r.d(t,{},{A:s})},1349(e,t,r){"use strict";var o=r(6758),i=r.n(o),n=r(935),s=r.n(n)()(i());s.push([e.id,`.nbdime-root .cm-merge-pane {
  background-color: var(--jp-cell-editor-background);
}

.nbdime-root .jp-Mergeview-root {
  border: var(--codemirror-border);
}

.nbdime-root .cm-merge-1pane {
  display: grid;
  /* editor */
  grid-template-columns: 100%;
  grid-auto-rows: minmax(18px, auto);
}

.nbdime-root .cm-merge-2pane {
  display: grid;
  /* editor | gap | editor */
  grid-template-columns: 47% 6% 47%;
  grid-auto-rows: minmax(18px, auto);
}

.nbdime-root .cm-merge-2pane > div:first-child {
  grid-column: 1;
}

.nbdime-root .cm-merge-2pane > div:last-child {
  grid-column: 3;
}

.nbdime-root .cm-merge-3pane,
.nbdime-root .cm-merge-4pane {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(18px, auto);
  gap: var(--jp-border-width);
  background-color: var(--jp-cell-editor-border-color);
}

.nbdime-root .cm-merge-left-editor {
  grid-column: 1;
  grid-row: 1;
}

.nbdime-root .cm-central-editor {
  grid-column: 2;
  grid-row: 1;
}

.nbdime-root .cm-merge-right-editor {
  grid-column: 3;
  grid-row: 1;
}

.nbdime-root .cm-merge-4pane > .cm-merge-editor {
  grid-column: 1/4;
  grid-row: 2;
}

.nbdime-root .cm-merge-spacer {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 5px,
    rgba(255, 255, 255, 0.5) 5px,
    rgba(255, 255, 255, 0.5) 10px
  );
}

.nbdime-root .cm-merge-gap {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  z-index: 2;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border-left: var(--codemirror-border);
  border-right: var(--codemirror-border);
  color: var(--jp-ui-font-color2);
  background: var(--jp-layout-color2);
  user-select: none;
}

.nbdime-root .cm-merge-scrolllock {
  cursor: pointer;
  line-height: 1;
}

.nbdime-root .cm-merge-pane > .cm-editor {
  display: inline-block;
  white-space: normal;
  vertical-align: top;
  width: 100%;
  background-color: transparent;
}

.nbdime-root .cm-merge-pane-rightmost {
  position: absolute;
  right: 0px;
  z-index: 1;
}

.nbdime-root .cm-merge-pane-unchanged {
  width: 100%;
}

.nbdime-root .cm-merge-r-deleted,
.cm-l-deleted,
.cm-merge-m-deleted {
  background-color: var(--jp-diff-deleted-color2);
}

.nbdime-root .cm-gutter {
  cursor: default;
}
`,""]),r.d(t,{},{A:s})},9999(e,t,r){"use strict";var o=r(6758),i=r.n(o),n=r(935),s=r.n(n)()(i());s.push([e.id,`.jp-Notebook-diff .jp-Diff-unchanged .jp-Output *:first-child {
  margin-left: auto;
}

.jp-Notebook-diff .jp-Diff-unchanged .jp-Output *:last-child {
  margin-right: auto;
}

/* Alternative for showing single cell when cells are equal */
.jp-Notebook-diff .jp-Diff-unchanged {
  margin-left: 10%;
  width: 80%;
}

.jp-Notebook-diff .jp-Diff-unchanged .jp-Diff-unchanged {
  margin-left: 0;
  width: 100%;
}

/* Match input border of unchanged cell source */
.jp-Notebook-diff .jp-Diff-unchanged .cm-merge-pane-unchanged {
  border: var(--codemirror-border);
}

/* Do not use border between unchanged cells */
.jp-Notebook-diff .jp-Diff-unchanged + .jp-Diff-unchanged > div:first-of-type {
  border: none;
}

/* When unchanged hide cell ids and float the execution count left */
.jp-Notebook-diff .jp-Diff-unchanged .jp-Cellrow-header-cellId {
  display: none;
}

.jp-Notebook-diff .jp-Diff-unchanged .jp-Cellrow-header {
  float: left;
}

.jp-Notebook-diff .jp-Cellrow-header-cellId {
  align-self: center;
  text-align: center;
  color: var(--jp-ui-font-color2);
}

.jp-Notebook-diff .jp-Metadata-diff {
  margin-bottom: 20px;
  border: solid black thin;
}

.jp-Notebook-diff .jp-Cell-diff {
  margin-bottom: 20px;
}

/* Border on top of cell */
.jp-Notebook-diff .jp-Cell-diff > div:first-of-type {
  border-top: solid #ccc 1px;
}

.jp-Notebook-diff .jp-Diff-added .jp-Cellrow-source,
.jp-Notebook-diff .jp-Diff-added .jp-Cellrow-outputs {
  border-left: var(--codemirror-border);
}

.jp-Notebook-diff .jp-Diff-deleted .jp-Cellrow-source,
.jp-Notebook-diff .jp-Diff-deleted .jp-Cellrow-outputs {
  border-right: var(--codemirror-border);
}

/* Add/delete chunks for small width devices (added before delete) */
.jp-Notebook-diff .jp-Diff-addremchunk {
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
}

.jp-Notebook-diff .jp-Diff-addremchunk .jp-Diff-addedchunk,
.jp-Notebook-diff .jp-Diff-addremchunk .jp-Diff-removedchunk {
  width: 100%;
}

/* Add/delete chunks should show side-by-side for larger screens */
@media (min-width: 1000px) {
  .jp-Notebook-diff .jp-Diff-addremchunk {
    flex-direction: row-reverse;
  }

  .jp-Notebook-diff .jp-Diff-addremchunk .jp-Diff-addedchunk,
  .jp-Notebook-diff .jp-Diff-addremchunk .jp-Diff-removedchunk {
    width: 47%;
  }
}

/* Hide metadata changes by default */
.jp-Notebook-diff .jp-Diff-added .jp-Cellrow-metadata,
.jp-Notebook-diff .jp-Diff-deleted .jp-Cellrow-metadata,
.jp-Notebook-diff .jp-Diff-unchanged .jp-Cellrow-outputs {
  display: none;
}

.jp-Notebook-diff .jp-Diff-added .jp-Cellrow-outputs,
.jp-Notebook-diff .jp-Diff-deleted .jp-Cellrow-outputs {
  border-top: var(--jp-nbdime-output-color1) solid 1pt;
}

.jp-Notebook-diff .jp-Diff-added .jp-Diff-unchanged {
  margin-left: 25%;
  width: 75%;
}

.jp-Notebook-diff .jp-Diff-deleted .jp-Diff-unchanged {
  margin-left: 0;
  width: 75%;
}

.jp-Notebook-diff .jp-Diff-unchanged .jp-Output-result > * {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.jp-Notebook-diff .jp-Cellrow-outputs .jp-Diff-twoway .jp-Diff-base {
  float: left;
  width: 47%;
}

.jp-Notebook-diff .jp-Cellrow-outputs .jp-Diff-twoway .jp-Diff-remote {
  float: right;
  width: 47%;
}

.jp-Notebook-diff .jp-Output-result img {
  max-width: 100%;
}

.jp-Notebook-diff .cm-merge-right-editor {
  position: relative;
  left: 6%;
}

.jp-Notebook-diff .jp-Cellrow-source .cm-merge-pane-deleted,
.jp-Notebook-diff .jp-Cellrow-source .cm-merge-pane-added {
  width: 75%;
}

.jp-Notebook-diff
  .jp-Diff-twoway
  .jp-Cellrow-outputs
  .jp-Diff-unchanged
  .jp-CodeMirrorWidget {
  width: initial;
  max-width: 100%;
}

/* Ensure unchanged images are centered */
.jp-Notebook-diff
  .jp-Diff-twoway
  .jp-Cellrow-outputs
  .jp-Diff-unchanged
  .jp-RenderedImage {
  text-align: center;
}

.jp-Notebook-diff .cm-line {
  /* enable positioning pseudo-elements relative to line */
  position: relative;
}

/* Color diff highlighting according to style vars */
.jp-Notebook-diff .cm-merge-r-chunk {
  background-color: var(--jp-diff-deleted-color2);
}

/* border-top/bottom without taking up space */
.jp-Notebook-diff .cm-merge-r-chunk-start::before,
.jp-Notebook-diff .cm-merge-r-chunk-end::after {
  content: '';
  width: 100%;
  height: 1px;
  background: var(--jp-diff-deleted-color0);
  display: block;
  position: absolute;
  left: 0px;
}

.jp-Notebook-diff .cm-merge-r-connect {
  fill: var(--jp-diff-deleted-color2);
  stroke: var(--jp-diff-deleted-color0);
  stroke-width: 1px;
}

.jp-Notebook-diff .cm-merge-spacer {
  background-color: var(--jp-diff-deleted-color2);
}

.jp-Notebook-diff .cm-line .cm-merge-r-inserted {
  background-color: var(--jp-diff-added-color0);
}

.jp-Notebook-diff .cm-diff-right-editor .cm-merge-r-chunk {
  background-color: var(--jp-diff-added-color2);
}

/* border-top/bottom without taking up space */
.jp-Notebook-diff .cm-diff-right-editor .cm-merge-r-chunk-start::before,
.jp-Notebook-diff .cm-diff-right-editor .cm-merge-r-chunk-end::after {
  content: '';
  width: 100%;
  height: 1px;
  background: var(--jp-diff-added-color0);
  display: block;
  position: absolute;
  left: 0px;
}

.jp-Notebook-diff .cm-diff-right-editor .cm-merge-r-connect {
  fill: var(--jp-diff-added-color2);
  stroke: var(--jp-diff-added-color0);
  stroke-width: 1px;
}

.jp-Notebook-diff .cm-diff-right-editor .cm-merge-spacer {
  background-color: var(--jp-diff-added-color2);
}

/* Unset outer border from common */
.jp-Notebook-diff .jp-Mergeview-root.cm-merge-1pane {
  border: unset;
}

.jp-Notebook-diff .cm-merge-pane-deleted,
.jp-Notebook-diff .jp-Diff-deleted .jp-Diff-renderedOutput,
.jp-Cellrow-outputs .jp-Diff-twoway .jp-Diff-base {
  background-color: var(--jp-diff-deleted-color2);
  border: solid 1px var(--jp-diff-deleted-color0);
}

.jp-Notebook-diff .cm-merge-pane-added,
.jp-Notebook-diff .jp-Diff-added .jp-Diff-renderedOutput,
.jp-Cellrow-outputs .jp-Diff-twoway .jp-Diff-remote {
  background-color: var(--jp-diff-added-color2);
  border: solid 1px var(--jp-diff-added-color0);
}

.jp-Notebook-diff .jp-Diff-added .cm-merge-pane-added,
.jp-Notebook-diff .jp-Diff-deleted .cm-merge-pane-deleted {
  width: 100%;
}

.jp-Notebook-diff .jp-Cellrow-header > .jp-InputPrompt {
  text-align: left;
  flex-basis: min-content;
}

.jp-CollapsiblePanel-container {
  background-color: var(--jp-layout-color1);
  color: var(--jp-ui-font-color1);
}

/*
Output mimetype selection:
*/

.jp-Notebook-diff .jp-Diff-outputPanel .jp-Diff-outputMenu {
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  background-color: var(--jp-layout-color1);
  color: var(--jp-ui-font-color1);
  padding: 3px 5px;
  border: var(--jp-border-width) solid var(--jp-cell-editor-border-color);
  z-index: 10;
}

.jp-Notebook-diff .jp-Diff-outputPanel:hover .jp-Diff-outputMenu {
  display: initial;
}

.jp-Notebook-diff .jp-Diff-trustOutputButton {
  display: none;
}

.jp-Notebook-diff .jp-Diff-trustCandidate .jp-Diff-trustOutputButton {
  display: initial;
}

.jp-Notebook-diff
  .jp-Diff-outputPanel:not(.jp-Diff-trustCandidate)
  .jp-diff-base64Output
  + .jp-Diff-outputMenu {
  display: none;
}

.jp-Notebook-diff
  .jp-Diff-outputPanel
  .jp-Diff-outputMenu
  > :not(:first-child) {
  margin-left: 5px;
}

.jp-Diff-outputsContainer > .lm-Widget:not(:last-child) {
  padding-bottom: 6px;
  min-height: 2em;
  border-bottom: var(--jp-border-width) solid var(--jp-nbdime-output-color2);
}

.jp-Notebook-diff .jp-Diff-renderedOutput {
  /* Ensure output is always large enough to show menu */
  min-height: 2em;
}
`,""]),r.d(t,{},{A:s})},667(e,t,r){"use strict";var o=r(6758),i=r.n(o),n=r(935),s=r.n(n)()(i());s.push([e.id,`:root {
  --codemirror-border: var(--jp-border-width) solid
    var(--jp-cell-editor-border-color);

  --jp-nbdime-output-color1: rgba(0, 141, 255, 0.7);
  --jp-nbdime-output-color2: rgba(0, 141, 255, 0.5);
  --jp-nbdime-output-color3: rgba(0, 141, 255, 0.3);

  --jp-diff-added-color0: rgba(0, 200, 20, 0.6);
  --jp-diff-added-color1: rgba(0, 200, 20, 0.3);
  --jp-diff-added-color2: rgba(0, 200, 20, 0.3);

  --jp-diff-deleted-color0: rgba(240, 20, 0, 0.55);
  --jp-diff-deleted-color1: rgba(255, 20, 0, 0.3);
  --jp-diff-deleted-color2: rgba(255, 20, 0, 0.3);

  --jp-merge-local-color1: #cbcbf8;
  --jp-merge-local-color2: #ececff;
  --jp-merge-local-color3: #e6e6ff;

  --jp-merge-remote-color1: #beb;
  --jp-merge-remote-color2: #dfd;
  --jp-merge-remote-color3: #d8f9d8;

  --jp-merge-both-color1: #f88888;
  --jp-merge-both-color2: #ffdddd;

  --jp-merge-either-color1: #aee;
  --jp-merge-either-color2: #cff4f4;
}
`,""]),r.d(t,{},{A:s})},558(e,t,r){"use strict";var o=r(6758),i=r.n(o),n=r(935),s=r.n(n)()(i());s.push([e.id,`.lm-FlexPanel {
  display: flex;
}

.lm-FlexPanel.lm-mod-left-to-right {
  flex-direction: row;
}

.lm-FlexPanel.lm-mod-right-to-left {
  flex-direction: row-reverse;
}

.lm-FlexPanel.lm-mod-top-to-bottom {
  flex-direction: column;
}

.lm-FlexPanel.lm-mod-bottom-to-top {
  flex-direction: column-reverse;
}
`,""]),r.d(t,{},{A:s})},935(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",o=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),o&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),o&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,o,i,n){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var l=0;l<this.length;l++){var a=this[l][0];null!=a&&(s[a]=!0)}for(var d=0;d<e.length;d++){var c=[].concat(e[d]);o&&s[c[0]]||(void 0!==n&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=n),r&&(c[2]&&(c[1]="@media ".concat(c[2]," {").concat(c[1],"}")),c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},6758(e){"use strict";e.exports=function(e){return e[1]}},686(e,t,r){"use strict";var o=r(4940),i=r(5731),n=r(3468),s=r(9336);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new n("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!s&&s(e,t);if(o)o(e,t,{configurable:null===d&&f?f.configurable:!d,enumerable:null===l&&f?f.enumerable:!l,value:r,writable:null===a&&f?f.writable:!a});else if(!c&&(l||a||d))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},6423(e,t,r){"use strict";var o,i=r(9903),n=r(9336);try{o=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!o&&n&&n(Object.prototype,"__proto__"),l=Object,a=l.getPrototypeOf;e.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof a&&function(e){return a(null==e?e:l(e))}},4940(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},9110(e){"use strict";e.exports=EvalError},9838(e){"use strict";e.exports=Error},1155(e){"use strict";e.exports=RangeError},4943(e){"use strict";e.exports=ReferenceError},5731(e){"use strict";e.exports=SyntaxError},3468(e){"use strict";e.exports=TypeError},2140(e){"use strict";e.exports=URIError},9629(e){"use strict";e.exports=Object},8794(e){"use strict";var t=Object.prototype.toString,r=Math.max,o=function(e,t){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},i=function(e,t){for(var r=[],o=t||0,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},n=function(e,t){for(var r="",o=0;o<e.length;o+=1)r+=e[o],o+1<e.length&&(r+=t);return r};e.exports=function(e){var s,l=this;if("function"!=typeof l||"[object Function]"!==t.apply(l))throw TypeError("Function.prototype.bind called on incompatible "+l);for(var a=i(arguments,1),d=r(0,l.length-a.length),c=[],f=0;f<d;f++)c[f]="$"+f;if(s=Function("binder","return function ("+n(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof s){var t=l.apply(this,o(a,arguments));return Object(t)===t?t:this}return l.apply(e,o(a,arguments))}),l.prototype){var u=function(){};u.prototype=l.prototype,s.prototype=new u,u.prototype=null}return s}},9138(e,t,r){"use strict";var o=r(8794);e.exports=Function.prototype.bind||o},528(e,t,r){"use strict";var o,i=r(9629),n=r(9838),s=r(9110),l=r(1155),a=r(4943),d=r(5731),c=r(3468),f=r(2140),u=r(8479),h=r(8449),p=r(8129),m=r(2387),g=r(5865),y=r(1319),b=r(6882),w=Function,v=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(e){}},_=r(9336),j=r(4940),k=function(){throw new c},x=_?function(){try{return arguments.callee,k}catch(e){try{return _(arguments,"callee").get}catch(e){return k}}}():k,C=r(3558)(),E=r(6369),D=r(7345),S=r(7859),A=r(6095),O=r(4531),T={},P="u">typeof Uint8Array&&E?E(Uint8Array):o,I={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?o:ArrayBuffer,"%ArrayIteratorPrototype%":C&&E?E([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":"u"<typeof Atomics?o:Atomics,"%BigInt%":"u"<typeof BigInt?o:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?o:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"u"<typeof Float16Array?o:Float16Array,"%Float32Array%":"u"<typeof Float32Array?o:Float32Array,"%Float64Array%":"u"<typeof Float64Array?o:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?o:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":T,"%Int8Array%":"u"<typeof Int8Array?o:Int8Array,"%Int16Array%":"u"<typeof Int16Array?o:Int16Array,"%Int32Array%":"u"<typeof Int32Array?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&E?E(E([][Symbol.iterator]())):o,"%JSON%":"object"==typeof JSON?JSON:o,"%Map%":"u"<typeof Map?o:Map,"%MapIteratorPrototype%":"u">typeof Map&&C&&E?E(new Map()[Symbol.iterator]()):o,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?o:Promise,"%Proxy%":"u"<typeof Proxy?o:Proxy,"%RangeError%":l,"%ReferenceError%":a,"%Reflect%":"u"<typeof Reflect?o:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?o:Set,"%SetIteratorPrototype%":"u">typeof Set&&C&&E?E(new Set()[Symbol.iterator]()):o,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&E?E(""[Symbol.iterator]()):o,"%Symbol%":C?Symbol:o,"%SyntaxError%":d,"%ThrowTypeError%":x,"%TypedArray%":P,"%TypeError%":c,"%Uint8Array%":"u"<typeof Uint8Array?o:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?o:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?o:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?o:Uint32Array,"%URIError%":f,"%WeakMap%":"u"<typeof WeakMap?o:WeakMap,"%WeakRef%":"u"<typeof WeakRef?o:WeakRef,"%WeakSet%":"u"<typeof WeakSet?o:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":A,"%Object.defineProperty%":j,"%Object.getPrototypeOf%":D,"%Math.abs%":u,"%Math.floor%":h,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":g,"%Math.round%":y,"%Math.sign%":b,"%Reflect.getPrototypeOf%":S};if(E)try{null.error}catch(e){var M=E(E(e));I["%Error.prototype%"]=M}var F=function e(t){var r;if("%AsyncFunction%"===t)r=v("async function () {}");else if("%GeneratorFunction%"===t)r=v("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=v("async function* () {}");else if("%AsyncGenerator%"===t){var o=e("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&E&&(r=E(i.prototype))}return I[t]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},W=r(9138),R=r(8554),L=W.call(O,Array.prototype.concat),B=W.call(A,Array.prototype.splice),V=W.call(O,String.prototype.replace),U=W.call(O,String.prototype.slice),z=W.call(O,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,H=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new d("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new d("invalid intrinsic syntax, expected opening `%`");var o=[];return V(e,G,function(e,t,r,i){o[o.length]=r?V(i,K,"$1"):t||e}),o},$=function(e,t){var r,o=e;if(R(N,o)&&(o="%"+(r=N[o])[0]+"%"),R(I,o)){var i=I[o];if(i===T&&(i=F(o)),void 0===i&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new d("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new d("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=H(e),o=r.length>0?r[0]:"",i=$("%"+o+"%",t),n=i.name,s=i.value,l=!1,a=i.alias;a&&(o=a[0],B(r,L([0,1],a)));for(var f=1,u=!0;f<r.length;f+=1){var h=r[f],p=U(h,0,1),m=U(h,-1);if(('"'===p||"'"===p||"`"===p||'"'===m||"'"===m||"`"===m)&&p!==m)throw new d("property names with quotes must have matching quotes");if("constructor"!==h&&u||(l=!0),o+="."+h,R(I,n="%"+o+"%"))s=I[n];else if(null!=s){if(!(h in s)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(_&&f+1>=r.length){var g=_(s,h);s=(u=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:s[h]}else u=R(s,h),s=s[h];u&&!l&&(I[n]=s)}}return s}},7345(e,t,r){"use strict";e.exports=r(9629).getPrototypeOf||null},7859(e){"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},6369(e,t,r){"use strict";var o=r(7859),i=r(7345),n=r(6423);e.exports=o?function(e){return o(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return i(e)}:n?function(e){return n(e)}:null},1292(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},9336(e,t,r){"use strict";var o=r(1292);if(o)try{o([],"length")}catch(e){o=null}e.exports=o},7239(e,t,r){"use strict";var o=r(4940),i=function(){return!!o};i.hasArrayLengthDefineBug=function(){if(!o)return null;try{return 1!==o([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},3558(e,t,r){"use strict";var o="u">typeof Symbol&&Symbol,i=r(2908);e.exports=function(){return"function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&i()}},2908(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var o in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},8554(e,t,r){"use strict";var o=Function.prototype.call,i=Object.prototype.hasOwnProperty;e.exports=r(9138).call(o,i)},6815(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},5172(e,t,r){"use strict";var o=("u">typeof JSON?JSON:r(6998)).stringify,i=r(6815),n=r(9228),s=r(8498),l=r(4607),a=l("Array.prototype.join"),d=l("Array.prototype.indexOf"),c=l("Array.prototype.splice"),f=l("Array.prototype.sort"),u=function(e,t){for(var r="",o=0;o<e;o+=1)r+=t;return r},h=function(e,t,r){return r};e.exports=function(e){var t=arguments.length>1?arguments[1]:void 0,r=t&&t.space||"";"number"==typeof r&&(r=u(r," "));var l=!!t&&"boolean"==typeof t.cycles&&t.cycles,p=t&&t.replacer?s(t.replacer):h;if(t&&void 0!==t.collapseEmpty&&"boolean"!=typeof t.collapseEmpty)throw TypeError("`collapseEmpty` must be a boolean, if provided");var m=!!t&&t.collapseEmpty,g="function"==typeof t?t:t&&t.cmp,y=g&&function(e){var t=g.length>2&&function(t){return e[t]};return function(r,o){return g({key:r,value:e[r]},{key:o,value:e[o]},t?{__proto__:null,get:t}:void 0)}},b=[];return function e(t,s,h,g){var w=r?"\n"+u(g,r):"",v=r?": ":":";if(h&&h.toJSON&&"function"==typeof h.toJSON&&(h=h.toJSON()),void 0!==(h=p(t,s,h))){if("object"!=typeof h||null===h)return o(h);var _=function(e,t){return m&&0===e.length?t:("[]"===t?"[":"{")+a(e,",")+w+("[]"===t?"]":"}")};if(i(h)){for(var j=[],k=0;k<h.length;k++){var x=e(h,k,h[k],g+1)||o(null);j[j.length]=w+r+x}return _(j,"[]")}if(-1!==d(b,h)){if(l)return o("__cycle__");throw TypeError("Converting circular structure to JSON")}b[b.length]=h;for(var C=f(n(h),y&&y(h)),j=[],k=0;k<C.length;k++){var s=C[k],E=e(h,s,h[s],g+1);if(E){var D=o(s)+v+E;j[j.length]=w+r+D}}return c(b,d(b,h),1),_(j,"{}")}}({"":e},"",e,0)}},6998(e,t,r){"use strict";t.parse=r(6921),t.stringify=r(9191)},6921(e){"use strict";var t,r,o,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"	"};function n(e){throw{name:"SyntaxError",message:e,at:t,text:o}}function s(e){return e&&e!==r&&n("Expected '"+e+"' instead of '"+r+"'"),r=o.charAt(t),t+=1,r}function l(){var e,t="";for("-"===r&&(t="-",s("-"));r>="0"&&r<="9";)t+=r,s();if("."===r)for(t+=".";s()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,s(),("-"===r||"+"===r)&&(t+=r,s());r>="0"&&r<="9";)t+=r,s();return isFinite(e=Number(t))||n("Bad number"),e}function a(){var e,t,o,l="";if('"'===r)for(;s();)if('"'===r)return s(),l;else if("\\"===r)if(s(),"u"===r){for(t=0,o=0;t<4&&isFinite(e=parseInt(s(),16));t+=1)o=16*o+e;l+=String.fromCharCode(o)}else if("string"==typeof i[r])l+=i[r];else break;else l+=r;n("Bad string")}function d(){for(;r&&r<=" ";)s()}function c(){switch(d(),r){case"{":var e,t={};if("{"===r){if(s("{"),d(),"}"===r)return s("}"),t;for(;r;){if(e=a(),d(),s(":"),Object.prototype.hasOwnProperty.call(t,e)&&n('Duplicate key "'+e+'"'),t[e]=c(),d(),"}"===r)return s("}"),t;s(","),d()}}n("Bad object");return;case"[":var o=[];if("["===r){if(s("["),d(),"]"===r)return s("]"),o;for(;r;){if(o.push(c()),d(),"]"===r)return s("]"),o;s(","),d()}}n("Bad array");return;case'"':return a();case"-":return l();default:return r>="0"&&r<="9"?l():function(){switch(r){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null;default:n("Unexpected '"+r+"'")}}()}}e.exports=function(e,i){var s;return o=e,t=0,r=" ",s=c(),d(),r&&n("Syntax error"),"function"==typeof i?function e(t,r){var o,n,s=t[r];if(s&&"object"==typeof s)for(o in c)Object.prototype.hasOwnProperty.call(s,o)&&(void 0===(n=e(s,o))?delete s[o]:s[o]=n);return i.call(t,r,s)}({"":s},""):s}},9191(e){"use strict";var t,r,o,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}e.exports=function(e,i,n){var l;if(t="",r="","number"==typeof n)for(l=0;l<n;l+=1)r+=" ";else"string"==typeof n&&(r=n);if(o=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw Error("JSON.stringify");return function e(i,n){var l,a,d,c,f,u=t,h=n[i];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(i)),"function"==typeof o&&(h=o.call(n,i,h)),typeof h){case"string":return s(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(t+=r,f=[],"[object Array]"===Object.prototype.toString.apply(h)){for(c=h.length,l=0;l<c;l+=1)f[l]=e(l,h)||"null";return d=0===f.length?"[]":t?"[\n"+t+f.join(",\n"+t)+"\n"+u+"]":"["+f.join(",")+"]",t=u,d}if(o&&"object"==typeof o)for(c=o.length,l=0;l<c;l+=1)"string"==typeof(a=o[l])&&(d=e(a,h))&&f.push(s(a)+(t?": ":":")+d);else for(a in h)Object.prototype.hasOwnProperty.call(h,a)&&(d=e(a,h))&&f.push(s(a)+(t?": ":":")+d);return d=0===f.length?"{}":t?"{\n"+t+f.join(",\n"+t)+"\n"+u+"}":"{"+f.join(",")+"}",t=u,d}}("",{"":e})}},8479(e){"use strict";e.exports=Math.abs},8449(e){"use strict";e.exports=Math.floor},2422(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},8129(e){"use strict";e.exports=Math.max},2387(e){"use strict";e.exports=Math.min},5865(e){"use strict";e.exports=Math.pow},1319(e){"use strict";e.exports=Math.round},6882(e,t,r){"use strict";var o=r(2422);e.exports=function(e){return o(e)||0===e?e:e<0?-1:1}},4439(e,t,r){"use strict";r.d(t,{DU:()=>s,es:()=>function e(t,r){if(t)for(let o of t)o.source=r,"patch"===o.op&&e(o.diff,r);return t},jo:()=>l,lH:()=>f});var o=r(2937);class i{constructor(e,t,r,o,i){this.baseFrom=e,this.baseTo=t,this.remoteFrom=r,this.remoteTo=o,this.sources=i?[i]:[]}inEdit(e){return e>=this.baseFrom&&e<=this.baseTo}inOrig(e){return e>=this.remoteFrom&&e<=this.remoteTo}}class n{constructor(){this._currentGhost=null,this.chunks=[],this.editOffset=0}_getCurrent(){return this._currentGhost?(this._currentGhost=null,null):this.chunks.length>0?this.chunks[this.chunks.length-1]:null}_overlapChunk(e,t,r){return r?e.inOrig(t.from.line):e.inEdit(t.from.line)}addDiff(e,t){let r=e.to.line-e.from.line;e.endsOnNewline&&(r+=1);let n=0===e.from.column&&r>0,s=+!e.chunkStartLine,l=e.chunkStartLine&&e.endsOnNewline&&n?0:1,a=this._getCurrent();if(a&&(t?this._overlapChunk(a,e,t)?(a.remoteTo=Math.max(a.remoteTo,e.from.line+l+r),a.baseTo=Math.max(a.baseTo,e.from.line+l+this.editOffset),e.source&&!(0,o.xm)(e.source,a.sources)&&a.sources.push(e.source)):a=null:this._overlapChunk(a,e,t)?(a.remoteTo=Math.max(a.remoteTo,e.from.line+l-this.editOffset),a.baseTo=Math.max(a.baseTo,e.from.line+l+r),e.source&&!(0,o.xm)(e.source,a.sources)&&a.sources.push(e.source)):a=null),!a){if(t){let t=e.from.line,o=t+this.editOffset;a=new i(o+s,o+l,t+s,t+l+r)}else{let t=e.from.line,o=t-this.editOffset;a=new i(t+s,t+l+r,o+s,o+l)}e.source&&a.sources.push(e.source),this.chunks.push(a)}a.sources=a.sources.filter(o.Am),this.editOffset+=t?-r:r}addGhost(e,t,r){let n=e.to.line-e.from.line;e.endsOnNewline&&(n+=1);let s=0===e.from.column&&n>0,l=+!e.chunkStartLine,a=e.chunkStartLine&&e.endsOnNewline&&s?0:1;t||(a+=n);let d=this._currentGhost,c=e.from.line+(t?r:0);if(d){let t=c-this.editOffset;d.baseTo>c?(d.remoteTo=Math.max(d.remoteTo,t+a),d.baseTo=Math.max(d.baseTo,c+a),e.source&&!(0,o.xm)(e.source,d.sources)&&d.sources.push(e.source)):d=null}if(!d){let t=c-this.editOffset;d=new i(c+l,c+a,t+l,t+a),e.source&&d.sources.push(e.source),this.chunks.push(d)}this._currentGhost=d,d.sources=d.sources.filter(o.Am)}}class s extends n{_overlapChunk(e,t,r){let o=t.from.line;return((e.baseFrom!==e.baseTo||e.remoteFrom>=e.remoteTo)&&(o+=1),r)?e.inOrig(o):e.inEdit(o)}}function l(e){let t=null,r=[];for(let i of e)null===t?t=(0,o.Ic)(i):t.inEdit(i.baseFrom)?(t.remoteTo=Math.max(t.remoteTo,i.remoteTo),t.baseTo=Math.max(t.baseTo,i.baseTo),t.sources=t.sources.concat(i.sources)):(r.push(t),t=(0,o.Ic)(i)),t.sources=t.sources.filter(o.Am);return null!==t&&r.push(t),r}var a=r(5190),d=r(7067);function c(e,t){let r=[];if(!Array.isArray(t))throw Error();let i=0;for(let n of e)if((0,o.xm)(n.op,["addrange","patch"]))r.push(n);else if("removerange"===n.op){for(;t[i]<n.key;)i+=1;if(t[i]!==n.key)throw Error();for(;i<t.length-1&&t[i+1]<=n.key+n.length;)r.push((0,a.zK)(t[i],t[i+1]-t[i])),i+=1}else throw Error("Unhandled diff entry op "+n.op);return r}function f(e,t){let r=[];for(let i of t){let t=[(0,d.PR)(e,[i],"local"),(0,d.PR)(e,[i],"remote")],n=function(e,t){let r=[0,e.length];for(let e of t)if((0,o.T5)(e)){let t=function(e){let t=[];for(let r of e){let e,o=r.key;t.push(o),"addrange"===r.op||("removerange"===r.op?(e=o+r.length,t.push(e)):"patch"===r.op&&(e=o+1,t.push(e)))}return t.filter(o.Am)}(e);r=r.concat(t)}r=r.filter(o.Am).sort();let i=[];for(let e of t)(0,o.T5)(e)?i.push(c(e,r)):i.push(e);return function(e,t){let r=Array.apply(null,Array(t.length)).map(Number.prototype.valueOf,0),i=[];for(let n=0;n<e.length;++n){let s=e[n],l=n<e.length-1?e[n+1]:s,a=[];for(let e=0;e<t.length;++e){let o=t[e],i=[];for(;o&&r[e]<o.length&&o[r[e]].key===s;)i.push(o[r[e]]),r[e]+=1;a.push(i)}if(function(e){for(let t of e)if((0,o.T5)(t))return!0;return!1}(a)){let e={baseStart:s,baseEnd:l,diffs:a};i.push(e)}}return i}(r,i)}(e,t);r=r.concat(function(e,t,r){if(r.length<2)return[t];let i=[];for(let n of r){let r=t.customDiff;(0,o.T5)(r)&&(t.localPath.length>0&&(r=(0,d.Ye)(r,t.localPath)),r=c(r,[0,e.length,n.baseStart,n.baseEnd].filter(o.Am).sort())),i.push(new d.jT(t.absolutePath.slice(),n.diffs[0],n.diffs[1],t.action,t.conflict))}return i}(e,i,n))}return r}},9375(e,t,r){"use strict";class o extends Error{constructor(e,t="error"){super(e),Object.setPrototypeOf(this,o.prototype),this.message=e,this.stack=Error().stack,this.severity=t}}r.d(t,{N:()=>o})},2937(e,t,r){"use strict";function o(e,t){return t.indexOf(e)>=0}function i(e){return null!==e&&0!==e.length}function n(e){return e.match(/^.*(\r\n|\r|\n|$)/gm)}function s(e){let t=Object.create(Object.getPrototypeOf(e));for(let r in e){let o=e[r];if(null!=o&&o.hasOwnProperty("constructor")&&o.constructor===Function)continue;let i=Object.getOwnPropertyDescriptor(e,r);i&&!i.get&&Object.defineProperty(t,r,i)}return t}function l(e,t){if(e===t)return!0;if(null===e||null===t||e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}function a(e,t){if(null===e||null===t)return null;if(e===t)return e.slice();let r=0;for(;r<Math.min(e.length,t.length)&&e[r]===t[r];++r);return e.slice(0,r)}function d(e,t){if(e===t||null===e||0===e.length)return!0;if(null===t||e.length>t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}function c(e,t){return m(e,function(e,r){let o=e[t],i=r[t];return o<i?-1:+(o>i)})}function f(e,t){if(t<1)return"";let r="",o=e.valueOf();for(;t>1;)1&t&&(r+=o),t>>=1,o+=o;return r+o}function u(e){let t=[];return e.reduce(function(e,r,o){return t[o]=e+r.length},0),t}function h(e,t,r){return r.indexOf(e)===t}function p(e,t){let r=[];for(let o of([e,t]=e.length>t.length?[e,t]:[t,e],e))-1!==t.indexOf(o)&&r.push(o);return r}function m(e,t){let r=[];for(let t=0;t<e.length;++t)r.push({index:t,key:e[t]});r=r.sort((e,r)=>t(e.key,r.key)||e.index-r.index);let o=Array(e.length);for(let t=0;t<e.length;++t)o[t]=e[r[t].index];return o}function g(e,t){for(let r of(void 0===t&&(t=document.createElement("select")),e)){let e=document.createElement("option");e.text=r,t.appendChild(e)}return t}r.d(t,{A4:()=>function e(t){if("object"!=typeof t){if(o(typeof t,["string","number","boolean"]))return t;throw TypeError("Cannot deepcopy non-object")}if(null===t)return null;if(Array.isArray(t)){let r=t.length,o=Array(r);for(let i=0;i<r;i++)o[i]=e(t[i]);return o}{let r={};for(let o in void 0!==t.prototype&&(r.prototype=t.prototype),t)r[o]=e(t[o]);return r}},Am:()=>h,Bf:()=>f,Dk:()=>g,E$:()=>p,Ic:()=>s,Nt:()=>a,T5:()=>i,WC:()=>u,qd:()=>m,r1:()=>l,r6:()=>c,uJ:()=>d,uz:()=>n,xm:()=>o})},5190(e,t,r){"use strict";var o=r(2937);function i(e,t){return{op:"replace",key:e,value:t}}function n(e){return{op:"remove",key:e}}function s(e,t){return{op:"addrange",key:e,valuelist:t}}function l(e,t){return{op:"removerange",key:e,length:t}}function a(e,t){return{op:"patch",key:e,diff:t}}function d(e,t){if("number"!=typeof t.key)throw console.warn("Invalid patch details",e,t),TypeError(`Invalid patch sequence op: Key is not a number: ${t.key}`);let r=t.key;if("addrange"===t.op){if(r<0||r>e.length||isNaN(r))throw RangeError("Invalid add range diff op: Key out of range: "+r)}else if("removerange"===t.op){if(r<0||r>=e.length||isNaN(r))throw RangeError("Invalid remove range diff op: Key out of range: "+r);if(r+t.length>e.length||isNaN(r))throw RangeError("Invalid remove range diff op: Range too long!")}else if("patch"===t.op){if(r<0||r>=e.length||isNaN(r))throw RangeError("Invalid patch diff op: Key out of range: "+r)}else throw Error("Invalid op: "+t.op)}function c(e,t,r){let i=t.op;if("string"!=typeof t.key)throw console.warn("Invalid patch details",e,t,r),TypeError(`Invalid patch object op: Key is not a string: ${t.key}`);let n=t.key;if("add"===i){if((0,o.xm)(n,r))throw Error("Invalid add key diff op: Key already present: "+n)}else if("remove"===i){if(!(0,o.xm)(n,r))throw Error("Invalid remove key diff op: Missing key: "+n)}else if("replace"===i){if(!(0,o.xm)(n,r))throw Error("Invalid replace key diff op: Missing key: "+n)}else if("patch"===i){if(!(0,o.xm)(n,r))throw Error("Invalid patch key diff op: Missing key: "+n)}else throw Error("Invalid op: "+i)}r.d(t,{Fj:()=>c,JE:()=>d,MM:()=>s,_z:()=>n,c:()=>i,iK:()=>a,zK:()=>l})},7560(e,t,r){"use strict";r.d(t,{Tm:()=>j,Uv:()=>D,GO:()=>b,Os:()=>f,BZ:()=>C,IC:()=>E,bM:()=>h,AZ:()=>_,Uh:()=>u,nr:()=>k,az:()=>x,ov:()=>w,ZT:()=>p});var o,i=r(2706),n=r(9375),s=r(8643),l=r(7989),a=r(3854),d=r(4439),c=r(8749);class f{constructor(e,t,r,o,i,n,s){this.base=e,this._remote=t,null===e?(console.assert(0===o.length),this.deletions=[]):this.deletions=(0,a.VK)(o,e),null===t?(console.assert(0===r.length),this.additions=[]):this.additions=(0,a.VK)(r,t),this.collapsible=!0===i,this.collapsible&&(this.collapsibleHeader=n||"",this.startCollapsed=!0===s)}iterateDiffs(){return new f.DiffIter(this)}getLineChunks(){let e=new d.DU,t=this.iterateDiffs();for(let r=t.next();void 0!==r;r=t.next())e.addDiff(r.range,r.isAddition);return e.chunks}get remote(){return this._remote}set remote(e){this._remote=e}get unchanged(){return this.base===this.remote}get added(){return null===this.base}get deleted(){return null===this.remote}get additions(){return this._additions}set additions(e){this._additions=e}get deletions(){return this._deletions}set deletions(e){this._deletions=e}}function u(e,t){console.assert(!!t,"Patch model needs diff.");let r=l.JSONExt.deepCopy(e),o=(0,c.S3)(r),i=(0,c.b6)(r,t);return new f(o,i.remote,i.additions,i.deletions)}function h(e,t){let r=(0,c.S3)(e),o=(0,c.S3)(t),i=[],n=[];if(null===e&&null===t)throw Error("Invalid arguments to createDirectStringDiffModel(). Both base and remote cannot be equal!");if(null===e)r=null,i.push(new a.nC(0,o.length,void 0));else if(null===t)o=null,n.push(new a.nC(0,r.length,void 0));else if(o!==r)throw Error("Invalid arguments to createDirectStringDiffModel(). Either base or remote should be null, or they should be equal!");return new f(r,o,i,n)}function p(e,t,r){"code"===t.cell_type?e.mimetype=r:"markdown"===t.cell_type?e.mimetype="text/markdown":i.isRaw(t)&&(e.mimetype=t.metadata.format||"text/plain")}(o=f||(f={})).DiffIter=class{constructor(e){this.editOffset=0,this.done=!1,this.ia=0,this.id=0,this.hintTakeDeletion=!1,this.model=e}next(){let e=null,t=null,r=this.model.additions,o=this.model.deletions,i=this.hintTakeDeletion;if(this.hintTakeDeletion=!1,this.ia<this.model.additions.length)if(this.id<o.length){let t=r[this.ia],n=o[this.id];t.from.line===n.from.line-this.editOffset&&t.from.column===n.from.column?i?e=!1:(this.hintTakeDeletion=!0,e=!0):e=!!(t.from.line<n.from.line-this.editOffset)||t.from.line===n.from.line-this.editOffset&&!!(t.from.column<n.from.column)}else e=!0;else if(this.id<o.length)e=!1;else{this.done=!0;return}let n=(t=e?r[this.ia++]:o[this.id++]).to.line-t.from.line;return t.endsOnNewline&&(n+=1),this.editOffset+=e?-n:n,{range:t,isAddition:e}}},o.SyncedDiffIter=class e{static cmp(e,t,r,o){if(void 0===e&&void 0===t)return 0;if(void 0===e)return 1;if(void 0===t)return -1;let i=e.range.from.line+(e.isAddition?r:0),n=t.range.from.line+(t.isAddition?o:0);return i<n||e.range.from.column<t.range.from.column?-1:+(i>n||e.range.from.column>t.range.from.column)}constructor(e){for(let t of(this.currentOffset=0,this.models=[],this.iterators=[],this.values=[],this.offsets=[],e)){if(null===t)continue;this.models.push(t);let e=t.iterateDiffs();this.iterators.push(e),this.offsets.push(0),this.values.push(e.next())}}next(){let t=0;for(let r=1;r<this.values.length;++r)0>e.cmp(this.values[r],this.values[t],this.iterators[r].editOffset,this.iterators[t].editOffset)&&(t=r);this.i=t;let r=this.values[t];return this.currentOffset=this.offsets[t],this.offsets[t]=this.iterators[t].editOffset,void 0!==r&&(this.values[t]=this.iterators[t].next()),r}currentModel(){return this.models[this.i]}};var m=r(6401);class g{constructor(e,t,r){if(this.trustedChanged=new m.Signal(this),!t&&!e)throw Error("Either remote or base value need to be given");this.base=e,!t&&r?this.remote=(0,c.F6)(e,r):this.remote=t,this.diff=r||null,this.collapsible=!1}get unchanged(){return JSON.stringify(this.base)===JSON.stringify(this.remote)}get added(){return null===this.base}get deleted(){return null===this.remote}stringify(e){let t=function(e,r,o){if(!e)return e;if(Array.isArray(r)){let i=r.length>2?r.slice(1):r[1];return o?t(o(e,r[0]),i,o):t(e[r[0]],i,o)}return o?o(e,r):e[r]},r=l.JSONExt.deepCopy(this.base),o=e?t(r,e):r,i=l.JSONExt.deepCopy(this.remote),n=e?t(i,e):i,a=this.diff&&e?t(this.diff,e,s.WM):this.diff,d=null;return(d=this.unchanged||this.added||this.deleted||!a?h(o,n):u(o,a)).mimetype=e?this.innerMimeType(e):"application/json",d.collapsible=this.collapsible,d.collapsibleHeader=this.collapsibleHeader,d.startCollapsed=this.startCollapsed,d}get trusted(){return this._trusted}set trusted(e){this._trusted!==e&&(this._trusted=e,this.trustedChanged.emit(e))}get contents(){let e=[];return this.base&&e.push(this.base),this.remote&&this.remote!==this.base&&e.push(this.remote),e}}let y=["text/plain","application/vnd.jupyter.stdout","application/vnd.jupyter.stderr"];class b extends g{hasMimeType(e){let t=this.base||this.remote;return i.isStream(t)&&-1!==y.indexOf(e)?"text":i.isError(t)?"traceback":(i.isExecuteResult(t)||i.isDisplayData(t))&&e in t.data?["data",e]:null}innerMimeType(e){let t=(this.base||this.remote).output_type;if("stream"===t&&"text"===e||"error"===t&&"traceback"===e)return"text/plain";if(("execute_result"===t||"display_data"===t)&&Array.isArray(e))return e[1];throw new n.N("Unknown MIME type for key: "+e)}stringify(e){let t=super.stringify(e);return e&&(t.mimetype=this.innerMimeType(e)),t}}function w(e,t,r){let o=[];if(null!==t||r)if(null===e){if(null===t)throw Error("Either base or remote need to be specififed!");for(let e of t)o.push(new b(null,e))}else if(t===e)for(let t of e)o.push(new b(t,t));else if(r){let t=0,i=0;for(let n of r){let r=n.key;for(let i of e.slice(t,r))o.push(new b(i,i));if("addrange"===n.op){for(let e of n.valuelist)o.push(new b(null,e));i=0}else if("removerange"===n.op){let t=n.length;for(let i=r;i<r+t;i++)o.push(new b(e[i],null));i=t}else if("patch"===n.op)o.push(new b(e[r],null,n.diff)),i=1;else throw Error("Invalid diff operation: "+n);t=Math.max(t,r+i)}for(let r of e.slice(t))o.push(new b(r,r))}else throw Error("Invalid arguments to makeOutputModels()");else{if(null===e)throw Error("Either base or remote need to be specififed!");for(let t of e)o.push(new b(t,null))}return o}class v{constructor(e,t,r,o,i){this.base=e,this.remote=t,this.collapsible=!0===r,this.collapsible&&(this.collapsibleHeader=o||"",this.startCollapsed=!0===i)}get unchanged(){return this.base===this.remote}get added(){return void 0===this.base}get deleted(){return void 0===this.remote}}function _(e,t,r){if(!r)return new v(e,t);if("add"===r.op){if(void 0!==e)throw Error("Invalid diff op on immutable value");return new v(e,r.value)}if("remove"===r.op){if(void 0===e)throw Error("Invalid diff op on immutable value");return new v(e,void 0)}if(void 0===e)throw Error("Invalid diff op on immutable value");return new v(e,r.value)}class j{constructor(e,t,r,o,i,s){if(this.source=e,this.metadata=t,this.outputs=r,this.executionCount=o,this.cellType=i,this.cellId=s,null===r&&"code"===i)throw new n.N("Invalid code cell, missing outputs!");this.metadata.collapsible=!0,this.metadata.collapsibleHeader="Metadata changed",this.metadata.startCollapsed=!0}get unchanged(){let e=this.source.unchanged;if(e=e&&(!this.metadata||this.metadata.unchanged),this.outputs)for(let t of this.outputs)e=e&&t.unchanged;return this.executionCount&&(e=e&&this.executionCount.unchanged),e}get added(){return this.source.added}get deleted(){return this.source.deleted}getChunkedOutputs(){if(null===this.outputs)return null;let e=[];if(this.added||this.deleted)for(let t of this.outputs)e.push([t]);else{let t=[];for(let r of this.outputs)r.added||r.deleted?t.push(r):(t.length&&e.push(t),e.push([r]),t=[]);t.length&&e.push(t)}return e}}function k(e,t,r){let o=null,n=null,l=null,a=null,d=(0,s.WM)(t,"source");if(p(o=d?u(e.source,d):h(e.source,e.source),e,r),n=(d=(0,s.WM)(t,"metadata"))?u(e.metadata,d):h(e.metadata,e.metadata),i.isCode(e)){let r=e.outputs,o=(0,s.WM)(t,"outputs");l=o?w(r,null,o):w(r,r);let i=e.execution_count;a=_(i,i,(0,s.y_)(t,"execution_count"))}let c=e.id,f=_(c,c,(0,s.y_)(t,"id"));return new j(o,n,l,a,e.cell_type,f)}function x(e,t){let r=h(e.source,e.source);p(r,e,t);let o=h(e.metadata,e.metadata),n=null,s=null;if(i.isCode(e)){n=w(e.outputs,e.outputs);let t=e.execution_count;s=_(t,t)}let l=e.id,a=_(l,l);return new j(r,o,n,s,e.cell_type,a)}function C(e,t){let r=h(null,e.source);p(r,e,t);let o=h(null,e.metadata),n=null,s=null;i.isCode(e)&&(n=w(null,e.outputs),s=_(null,e.execution_count));let l=_(null,e.id);return new j(r,o,n,s,e.cell_type,l)}function E(e,t){let r=h(e.source,null);p(r,e,t);let o=h(e.metadata,null),n=null,s=null;i.isCode(e)&&(n=w(e.outputs,null),s=_(e.execution_count,null));let l=_(e.id,null);return new j(r,o,n,s,e.cell_type,l)}class D{constructor(e,t){let r,o=(0,s.WM)(t,"metadata");e.metadata&&o?this.metadata=u(e.metadata,o):this.metadata=null,this.metadata&&(this.metadata.collapsible=!0,this.metadata.collapsibleHeader="Notebook metadata changed",this.metadata.startCollapsed=!0);try{r=e.metadata.language_info.mimetype}catch(e){}this.mimetype=r||"text/python",this.cells=[],this.chunkedCells=[];let i=0,n=0,l=-1,a=[];for(let r of(0,s.WM)(t,"cells")||[]){let t=r.key;for(let r=i;r<t;r++){let t=x(e.cells[r],this.mimetype);this.cells.push(t),this.chunkedCells.push([t])}if(t!==l&&(a=[],this.chunkedCells.push(a),l=t),"addrange"===r.op){for(let e of r.valuelist){let t=C(e,this.mimetype);this.cells.push(t),a.push(t)}n=0}else if("removerange"===r.op){n=r.length;for(let r=t;r<t+n;r++){let t=E(e.cells[r],this.mimetype);this.cells.push(t),a.push(t)}}else if("patch"===r.op){a.length>0&&(a=[],this.chunkedCells.push(a));let o=k(e.cells[t],r.diff,this.mimetype);this.cells.push(o),a.push(o),n=1}i=Math.max(i,t+n)}for(let t=i;t<e.cells.length;t++){let r=x(e.cells[t],this.mimetype);this.cells.push(r),this.chunkedCells.push([r])}}}},3854(e,t,r){"use strict";var o=r(2937);class i{constructor(e,t,r){this.from=e,this.to=e+t,this.source=r}offset(e){this.from+=e,this.to+=e}}class n{constructor(e,t,r,o){this.from=e,this.to=t,this.chunkStartLine=!0===r,this.endsOnNewline=!0===o}}function s(e,t){if(0===e.length)return 0;let r=null;return(e.some(function(e,o){return e>=t&&(r=o,!0)}),null===r)?e.length:r}function l(e,t){return e.line(t.line+1).from+t.column}function a(e,t){let r=e.lineAt(t);return{line:r.number-1,column:t-r.from}}function d(e,t){let r=[],i=-1;for(;-1!==(i=t.indexOf("\n",i+1));)r.push(i);let l=[];for(let i of e){let e=s(r,i.from),a=e>0?r[e-1]+1:0,d={line:e,column:i.from-a};a=(e=s(r,i.to-1))>0?r[e-1]+1:0;let c={line:e,column:i.to-a},f=(0,o.xm)(i.from,r),u=(0,o.xm)(i.to-1,r),h=0===d.column&&(d.line!==c.line||u||i.to===t.length)||!f||!(0,o.xm)(i.from-1,r)&&!(0,o.xm)(i.to,r),p=new n(d,c,h,u);p.source=i.source,l.push(p)}return l}r.d(t,{TU:()=>l,VK:()=>d,Z3:()=>a,nC:()=>i})},8643(e,t,r){"use strict";var o=r(2937),i=r(5190);function n(e,t){if(!e)return null;for(let r=0;r<e.length;++r)if(e[r].key===t)return e[r].diff||null;return null}function s(e,t){if(!e)return null;for(let r=0;r<e.length;++r)if(e[r].key===t)return e[r];return null}function l(e,t){"string"==typeof e&&(e=(0,o.uz)(e));let r=[0].concat((0,o.WC)(e)),n=[];for(let s of t){!function(e,t){if((0,i.JE)(e,t),"patch"===t.op){let r=e[t.key],o=t.diff;if(null!==o)for(let e of o)(0,i.JE)(r,e)}}(e,s);let t=r[s.key];if("patch"===s.op){let e=s.diff;if(null!==e)for(let r of e){let e=(0,o.Ic)(r);e.key+=t,n.push(e)}}else{let e=null;if("addrange"===s.op)e=(0,i.MM)(t,s.valuelist.join(""));else{let o=s.key+s.length;e=(0,i.zK)(t,r[o]-t)}e.source=s.source,n.push(e)}}return(0,o.r6)(n,"key")}r.d(t,{FF:()=>l,IR:()=>function e(t){if(!t)return null;let r=[];for(let i of t)if("patch"===i.op)r.push({key:i.key,op:i.op,diff:e(i.diff)});else{let e=(0,o.Ic)(i);delete e.source,r.push(e)}return r},WM:()=>n,y_:()=>s})},2969(e,t,r){"use strict";r.d(t,{Zx:()=>eJ});var o,i,n,s,l,a,d,c,f,u,h=r(1660),p=r(9303),m=r(9180);class g extends h.Panel{constructor({model:e,editorFactory:t,translator:r,...o}){super(),this._editorFactory=t,this._model=e,this._translator=r??m.nullTranslator,this._viewOptions=o}}let y="jp-CollapsiblePanel-header-icon",b="jp-CollapsiblePanel-header-icon-opened",w="jp-CollapsiblePanel-header-icon-closed",v="jp-CollapsiblePanel-opened",_="jp-CollapsiblePanel-closed";class j extends h.Panel{static createHeader(e){let t=new h.Panel;t.addClass("jp-CollapsiblePanel-header"),e&&(t.node.textContent=e);let r=document.createElement("button");return r.className=y,t.node.appendChild(r),t}constructor(e,t,r){super(),this.addClass("jp-CollapsiblePanel"),this.inner=e;let o=j.createHeader(t);this.header=o,this.button=o.node.getElementsByClassName(y)[0],o.node.onclick=this.toggleCollapsed.bind(this),this.addWidget(o),this.container=new h.Panel,this.container.addClass("jp-CollapsiblePanel-container"),this.slider=new h.Panel,this.slider.addClass("jp-CollapsiblePanel-slider"),this.slider.addWidget(e),this.container.addWidget(this.slider),this.addWidget(this.container),this.slider.addClass(!0===r?_:v),this.button.classList.add(!0===r?w:b),this.button.classList.add("fa"),this.button.classList.add(!0===r?"fa-caret-down":"fa-caret-up")}toggleCollapsed(){let e=this.slider,t=this.button;this.collapsed?(e.removeClass(_),e.addClass(v),t.classList.remove(w),t.classList.add(b),this.button.classList.remove("fa-caret-down"),this.button.classList.add("fa-caret-up")):(e.removeClass(v),e.addClass(_),t.classList.remove(b),t.classList.add(w),this.button.classList.remove("fa-caret-up"),this.button.classList.add("fa-caret-down"))}get collapsed(){return this.slider.hasClass(_)}set headerTitle(e){this.header.node.innerText=e}}var k=r(5424),x=r(6377);r(2706),r(6401),r(8643);var C=r(7560),E=r(7067),D=r(8749),S=r(2937),A=r(4439),O=r(3854);class T extends C.Os{constructor(e,t,r,o,i,n){super((0,D.S3)(e),"",[],[],o,i,n),this.rawBase=e,this.decisions=t,this._outdated=!0,this._sourceModels=r,this._update()}get additions(){return this._outdated&&this._update(),this._additions}set additions(e){this._additions=e}get deletions(){return this._outdated&&this._update(),this._deletions}set deletions(e){this._deletions=e}get remote(){return this._outdated&&this._update(),this._remote}set remote(e){this._remote=e}invalidate(){this._outdated=!0}get invalid(){return this._outdated}getLineChunks(){let e=[this];e=e.concat(this._sourceModels);let t=new A.DU,r=new C.Os.SyncedDiffIter(e);for(let e=r.next();void 0!==e;e=r.next())if(r.currentModel()===this)t.addDiff(e.range,e.isAddition);else{if(!e.range.source||"base"!==e.range.source.decision.action)continue;t.addGhost(e.range,e.isAddition,r.currentOffset)}return t.chunks}_update(){this._outdated=!1;let e=(0,E.PR)(this.rawBase,this.decisions,"merged"),t=(0,D.b6)(this.rawBase,e);this._additions=(0,O.VK)(t.additions,t.remote),this._deletions=(0,O.VK)(t.deletions,this.base||""),this._remote=t.remote}}r(9375),r(7989);var P=r(7421),I=r(7651),M=r(651),F=r(2681);class N extends M.CodeEditorWrapper{constructor(e){const{factory:t,value:r,...o}=e,i=new I.YFile;r&&(i.source=r),super({model:new M.CodeEditor.Model({sharedModel:i}),factory:t??W(),editorOptions:o}),this.staticLoaded=!1}get cm(){return this.editor.editor}get doc(){return this.editor.doc}}function W(e={}){let t=new F.CodeMirrorEditorFactory({extensions:e.extensions??function(e){let t=new F.EditorExtensionRegistry,r=["lineNumbers","readOnly","theme","allowMultipleSelections","tabSize"];for(let o of F.EditorExtensionRegistry.getDefaultExtensions({themes:e}))for(let e of r)o.name===e&&t.addExtension(o);return t.addExtension({name:"shared-model-binding",factory:e=>{let t=e.model.sharedModel;return F.EditorExtensionRegistry.createImmutableExtension((0,F.ybinding)({ytext:t.ysource,undoManager:t.undoManager??void 0}))}}),t}(function(){let e=new F.EditorThemeRegistry;for(let t of F.EditorThemeRegistry.getDefaultThemes())e.addTheme(t);return e}()),languages:e.languages??function(){let e=new F.EditorLanguageRegistry;for(let t of F.EditorLanguageRegistry.getDefaultLanguages())e.addLanguage(t);return e.addLanguage({name:"ipythongfm",mime:"text/x-ipythongfm",load:async()=>{let[t,o]=await Promise.all([Promise.all([r.e(388),r.e(297)]).then(r.bind(r,7927)),r.e(102).then(r.bind(r,5637))]);return t.markdown({base:t.markdownLanguage,codeLanguages:t=>e.findBest(t),extensions:[(0,F.parseMathIPython)(P.StreamLanguage.define(o.stexMath).parser)]})}}),e}(),translator:e.translator??m.nullTranslator});return t.newInlineEditor.bind(t)}let R="➭︎",L="⚠︎";(o=a||(a={}))[o.DIFF_DELETE=-1]="DIFF_DELETE",o[o.DIFF_INSERT=1]="DIFF_INSERT",o[o.DIFF_EQUAL=0]="DIFF_EQUAL",(i=d||(d={}))[i.INCOMING=0]="INCOMING",i[i.OUTGOING=1]="OUTGOING";let B="jp-Merge-gutter-picker",V="jp-Merge-gutter-conflict",U=x.Decoration.line({class:"jp-Merge-conflict"}),z=["chunk","conflict","start","end"];(c||(c={})).buildEditorDecorationDict=function(e,t){let r=t?"-"+t:"",o="cm-merge-"+e;return{chunk:x.Decoration.line({class:o+"-chunk"+r}),start:x.Decoration.line({class:o+"-chunk-start"+r}),end:x.Decoration.line({class:o+"-chunk-end"+r}),endEmpty:x.Decoration.line({class:o+"-chunk-end"+r+"-empty"}),conflict:U,inserted:x.Decoration.mark({class:o+"-inserted"}),deleted:x.Decoration.mark({class:o+"-deleted"})}};let G={left:c.buildEditorDecorationDict("l"),right:c.buildEditorDecorationDict("r"),localMerge:c.buildEditorDecorationDict("m","local"),remoteMerge:c.buildEditorDecorationDict("m","remote"),customMerge:c.buildEditorDecorationDict("m","custom"),eitherMerge:c.buildEditorDecorationDict("m","either"),mixedMerge:c.buildEditorDecorationDict("m","mixed")},K=x.EditorView.baseTheme({".cm-collapsedLines":{cursor:"pointer",color:"var(--jp-ui-font-color1)",backgroundColor:"var(--jp-layout-color2)",border:"var(--jp-border-width) solid var(--jp-border-color1)",fontSize:"90%",padding:"0 3px",borderRadius:"4px"}});function H(e=!0){let t=[K,Z,Q];return e?[...t,eo,ec,ef]:t}function $({from:e,to:t},r){return{from:r.mapPos(e),to:r.mapPos(t)}}let J=k.StateEffect.define({map:$}),q=k.StateEffect.define({map:$}),Z=k.StateField.define({create:()=>x.Decoration.none,update(e,t){for(let r of(e=e.map(t.changes),t.effects)){let t;r.is(J)&&(t=G[r.value.decorationKey][r.value.highlightType],e=e.update({add:[t.range(r.value.from,r.value.to)]})),r.is(q)&&(t=G[r.value.decorationKey][r.value.highlightType],e=e.update({filter:(e,r,o)=>t.spec.class!==o.spec.class}))}return e},provide:e=>x.EditorView.decorations.from(e)}),Y=k.StateEffect.define({map:(e,t)=>e.map(t)}),Q=k.StateField.define({create:()=>x.Decoration.none,update:(e,t)=>{for(let e of t.effects)if(e.is(Y))return e.value;return e.map(t.changes)},provide:e=>x.EditorView.decorations.from(e)});class X extends x.WidgetType{constructor(e){super(),this.size=e}toDOM(){let e=document.createElement("div");return e.className="cm-merge-spacer",e.style.height=this.size+"px",e.style.minWidth="1px",e}}let ee=k.StateEffect.define({map:(e,t)=>({from:t.mapPos(e.from),block:e.block,on:e.on,type:e.type})}),et=k.StateEffect.define({map:e=>({type:e.type})});class er extends x.GutterMarker{constructor(e){super(),this.symbol=e.symbol,this.className=e.className,this.block=e.block}toDOM(){let e=e_("div",this.symbol);return e.className=this.className,e}eq(e){return e===this}}let eo=k.StateField.define({create:()=>k.RangeSet.empty,update:(e,t)=>{for(let r of(e=e.map(t.changes),t.effects)){if(r.is(ee)&&r.value.on){let t="picker"===r.value.type?r.value.block?en:ei:r.value.block?el:es,o=!1;e.between(r.value.from,r.value.from,(e,i,n)=>{if(e===r.value.from&&n.eq(t))return o=!0,!1}),o||(e=e.update({add:[t.range(r.value.from)]}))}r.is(et)&&(e=k.RangeSet.empty)}return e}}),ei=new er({symbol:R,className:B,block:!1}),en=new er({symbol:R,className:B,block:!0}),es=new er({symbol:L,className:V,block:!1}),el=new er({symbol:L,className:V,block:!0}),ea=k.StateEffect.define({map:(e,t)=>({line:t.mapPos(e.line),chunk:e.chunk,type:e.type})}),ed=k.StateEffect.define({map:e=>({type:e.type})}),ec=k.StateField.define({create:()=>new Map,update:(e,t)=>{for(let r of t.effects)r.is(ea)&&"picker"===r.value.type&&e.set(r.value.line,r.value.chunk);return e}}),ef=k.StateField.define({create:()=>new Map,update:(e,t)=>{for(let r of t.effects)r.is(ea)&&"conflict"===r.value.type&&e.set(r.value.line,r.value.chunk);return e}}),eu=k.StateEffect.define({map:(e,t)=>t.mapPos(e)}),eh=k.StateEffect.define({map:(e,t)=>e.map(t)});class ep extends x.WidgetType{constructor(e,t){super(),this.lines=e,this.siblings=t}eq(e){return this.lines==e.lines&&this.siblings.every(t=>e.siblings.findIndex(e=>e.line==t.line&&e.cm==t.cm)>=0)}toDOM(e){let t=document.createElement("div");return t.className="cm-collapsedLines",t.textContent=e.state.phrase("(…$ unchanged lines…)",this.lines),t.addEventListener("click",t=>{let r=e.posAtDOM(t.target);this.siblings.forEach(t=>{if(t.cm===e)e.dispatch({effects:eu.of(r)});else{let e=t.cm.state.doc.line(t.line).from;t.cm.dispatch({effects:eu.of(e)})}})}),t}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}}let em=k.StateField.define({create:e=>x.Decoration.none,update(e,t){for(let e of t.effects)if(e.is(eh))return e.value;for(let r of(e=e.map(t.changes),t.effects))r.is(eu)&&(e=e.update({filter:e=>e!=r.value}));return e},provide:e=>x.EditorView.decorations.from(e)});function eg(e){let{remote:t,local:r,merged:o,readOnly:i,factory:n,collapseIdentical:s,showBase:l,translator:a}=e,d={remote:t,local:r,merged:o,config:{readOnly:i},factory:n??W(),collapseIdentical:s,showBase:l,translator:a},c=new ev(d),f=[];c.left&&f.push(c.left),c.right&&f.push(c.right),c.merge&&f.push(c.merge);let u=(t||o).mimetype;if(u){for(let e of f)e.remoteEditorWidget.model.mimeType=u;c.base.model.mimeType=u}return c}class ey{constructor({model:e,type:t,options:r,lockScroll:o,translator:i}){this._model=e,this._trans=(i??m.nullTranslator).load("nbdime"),this._type=t,this._lockScroll=o??!0;let n=this._model.remote||"";this._remoteEditorWidget=new N({...r,value:n}),this.setScrollLock(this._lockScroll)}init(e){this._baseEditorWidget=e,this._lineChunks=this._model.getLineChunks(),this._chunks=(0,A.jo)(this._lineChunks),this.updateView(),this.syncScroll()}updateView(){let e=this._baseEditorWidget.cm,t=this._remoteEditorWidget.cm;this.clearHighlighting(t,this._model.additions,this._chunks,a.DIFF_INSERT),this.clearHighlighting(e,this._model.deletions,this._chunks,a.DIFF_DELETE),this.updateHighlighting(t,this._model.additions,this._chunks,a.DIFF_INSERT),this.updateHighlighting(e,this._model.deletions,this._chunks,a.DIFF_DELETE)}syncModel(){if(!this.modelInvalid())return;let e=this.remoteEditorWidget.cm,t=this._model.getLineChunks(),r=(0,A.jo)(t);if(this._model.remote===e.state.doc.toString()){this._lineChunks=t,this._chunks=r;return}let o=e.state.selection.main.head,i=(0,S.uz)(this._model.remote);e.dispatch({changes:{from:0,to:e.state.doc.length,insert:i.slice(0,i.length).join("")}},{selection:{anchor:o}}),this._lineChunks=t,this._chunks=r}buildGap(){let e=this._lockButton=e_("div",void 0,"cm-merge-scrolllock");e.title=this._trans.__("Toggle locked scrolling"),this.setScrollLock(this._lockScroll),e.addEventListener("click",e=>{this.setScrollLock(!this._lockScroll)});let t=e_("div",[e],"cm-merge-gap");return this._gap=t,this._gap}setScrollLock(e){this._lockScroll=e,this._lockButton&&(this._lockButton.innerHTML=e?"⇛⇚":"⇛&nbsp;&nbsp;⇚"),window.requestAnimationFrame(()=>{this._remoteEditorWidget.cm.scrollDOM.scrollLeft=this._baseEditorWidget.cm.scrollDOM.scrollLeft,this._remoteEditorWidget.cm.scrollDOM.scrollTop=this._baseEditorWidget.cm.scrollDOM.scrollTop})}modelInvalid(){return this._model instanceof T&&this._model.invalid}syncScroll(){if(this.modelInvalid())return;let e=this._baseEditorWidget.cm.scrollDOM,t=this._remoteEditorWidget.cm.scrollDOM;e.addEventListener("scroll",r=>{this._lockScroll&&window.requestAnimationFrame(function(){t.scrollLeft=e.scrollLeft,t.scrollTop=e.scrollTop})},{passive:!0}),t.addEventListener("scroll",r=>{this._lockScroll&&window.requestAnimationFrame(function(){e.scrollLeft=t.scrollLeft,e.scrollTop=t.scrollTop})},{passive:!0})}getDecorationKey(e){let t=this._type,r=t;if("merge"===this._type&&(r=(t=e[0].action)+"Merge",e.length>1)){for(let o of e.slice(1))if(o.action!==t){r="mixedMerge";break}}return r}getConflictState(e){let t=!1;if(e.length>0){for(let r of e)if(r.decision.conflict){t=!0;break}}return t}createGutterEffects(e,t,r,o,i=!1){let n=[];return n.push(ee.of({from:r,on:!0,type:o,block:i})),n.push(ea.of({line:(0,O.Z3)(e.state.doc,r).line,chunk:t,type:o})),n}buildLineEffects(e,t){let r=[],o=e===this._baseEditorWidget.cm;for(let i of t){let t,n,s=this.getDecorationKey(i.sources),l=this.getConflictState(i.sources);o?(t=i.baseFrom,n=i.baseTo):(t=i.remoteFrom,n=i.remoteTo);for(let o=t;o<n;o++){let a={line:o,column:0},d=(0,O.TU)(e.state.doc,a);if(r.push(J.of({from:d,to:d,highlightType:"chunk",decorationKey:s})),l&&r.push(J.of({from:d,to:d,highlightType:"conflict",decorationKey:s})),o===t)if(r.push(J.of({from:d,to:d,highlightType:"start",decorationKey:s})),s.includes("Merge"))if(e===this._baseEditorWidget.cm)for(let t of i.sources)"custom"!==t.decision.action||(0,S.T5)(t.decision.localDiff)||(0,S.T5)(t.decision.remoteDiff)||(r=r.concat(this.createGutterEffects(e,i,d,"picker")));else l&&e===this.remoteEditorWidget.cm&&(r=r.concat(this.createGutterEffects(e,i,d,"conflict")));else r=r.concat(this.createGutterEffects(e,i,d,"picker"));o===n-1&&r.push(J.of({from:d,to:d,highlightType:"end",decorationKey:s}))}if(t===n){let o=(0,O.TU)(e.state.doc,{line:t,column:0});r.push(J.of({from:o,to:o,highlightType:"endEmpty",decorationKey:s})),s.includes("Merge")?l&&(r=r.concat(this.createGutterEffects(e,i,o,"conflict",!0))):r=r.concat(this.createGutterEffects(e,i,o,"picker",!0))}}return r}clearLineEffects(e,t){let r=[];for(let e of t){let t=e.sources,o=this.getDecorationKey(t);for(let e of z)r.push(q.of({highlightType:e,decorationKey:o}))}return e!==this._baseEditorWidget.cm&&(r.push(et.of({type:"all"})),r.push(ed.of({type:"picker"})),r.push(ed.of({type:"conflict"}))),r}buildCharacterHighlighting(e,t,r){let o=[],i=[];if(r===a.DIFF_INSERT||r===a.DIFF_DELETE){let n=r===a.DIFF_DELETE?"deleted":"inserted";for(let r of t){void 0!==r.source&&i.push(r.source);let t=(0,O.TU)(e.state.doc,{line:r.from.line,column:r.from.column}),s=(0,O.TU)(e.state.doc,{line:r.to.line,column:r.to.column});o.push(J.of({from:t,to:s,highlightType:n,decorationKey:this.getDecorationKey(i)}))}}return o}clearCharacterHighlighting(e,t,r){let o=[],i=[];if(r===a.DIFF_INSERT||r===a.DIFF_DELETE){let e=r===a.DIFF_DELETE?"deleted":"inserted";for(let r of t){void 0!==r.source&&i.push(r.source);let t=this.getDecorationKey(i);o.push(q.of({highlightType:e,decorationKey:t}))}}return o}updateHighlighting(e,t,r,o){let i=this.buildLineEffects(e,r),n=this.buildCharacterHighlighting(e,t,o),s=i.concat(n);e.dispatch({effects:s})}clearHighlighting(e,t,r,o){let i=this.clearLineEffects(e,r),n=this.clearCharacterHighlighting(e,t,o),s=i.concat(n);e.dispatch({effects:s})}get remoteEditorWidget(){return this._remoteEditorWidget}get baseEditorWidget(){return this._baseEditorWidget}get chunks(){return this._chunks}get lineChunks(){return this._lineChunks}get model(){return this._model}}function eb(e,t){let r=0;for(let o=0;o<t.length;o++){let i=t[o];if(i.baseTo>e&&i.baseFrom<=e)return 0;if(i.baseFrom>e)break;r=i.remoteTo-i.baseTo}return e+r}function ew(e,t){let r=e.baseFrom,o=t[t.length-1];for(let e=0;e<t.length;++e){let i=t[e];if(i.baseFrom===r)return i.remoteTo;if(i.baseFrom>r){o=t[e-1];break}}return e.baseTo+(o?o.remoteTo-o.baseTo:0)}class ev extends h.Panel{constructor(e){super(),this._collapseIdentical=2,this._showBase=!0,this._measuring=-1,this._trans=(e.translator??m.nullTranslator).load("nbdime");let t=e.remote,r=e.local||null,o=e.merged||null,i=this._left=null,n=this._right=null,s=this._merge=null;void 0!==e.collapseIdentical&&(this._collapseIdentical="number"==typeof e.collapseIdentical?Math.max(-1,e.collapseIdentical):e.collapseIdentical?2:-1);let l=0,a=e.remote||e.merged;if(!a)throw Error("Either remote or merged model needs to be specified!");const d=null!==a.base?a.base:a.remote??"";let c=e.config?.readOnly??!1;e.config={...e.config,lineNumbers:e.config?.lineNumbers!==!1,readOnly:!0},o&&(e.config.lineWrap=e.config.lineWrap??!1),this._aligning=!0;const f=x.EditorView.updateListener.of(e=>{this._measuring<0&&e.viewportChanged&&!e.transactions.some(e=>e.effects.some(e=>e.is(Y)))&&this.alignViews()}),u=[eo,(0,x.gutter)({class:"cm-gutter",markers:e=>e.state.field(eo).update({filter:(e,t,r)=>!r.block}),widgetMarker:(e,t,r)=>{if(!(t instanceof X))return null;let o=e.state.field(eo).update({filter:(e,t,o)=>o.block&&r.from===e});if(o.size>1)throw Error("More than one block gutter widget matched");return 1===o.size?o.iter().value:null},initialSpacer:()=>ei,domEventHandlers:{mouseup:(e,t,r)=>0===r.button&&(this.onGutterClick(e,t),!0)}})],p=!!o,g=p?[f,u,H(p)]:H(p);g.push(k.EditorState.phrases.of({"(…$ unchanged lines…)":this._trans.__("(…$ unchanged lines…)")}));const y=!o&&(t?.unchanged||t?.added||t?.deleted);if(this._collapseIdentical>=0&&!y&&g.push(em),this._base=new N({...e,extensions:[e.extensions??[],g],value:d}),this.addClass("jp-Mergeview-root"),o){let a,d;this.addClass("cm-merge-grid-panel");const f=this._showBase=!1!==e.showBase;r&&null!==r.remote?a=(i=this._left=new ey({model:r,type:"left",options:{...e,config:{...e.config},extensions:[e.extensions??[],g]},lockScroll:f,translator:e.translator})).remoteEditorWidget:(i=this._left=null,a=new h.Widget({node:e_("div",this._trans.__("Value missing"),"jp-mod-missing")})),this.addWidget(a),a.addClass("cm-merge-pane"),a.addClass("cm-merge-left-editor"),f&&(this.addWidget(this._base),this._base.addClass("cm-merge-pane"),this._base.addClass("cm-central-editor")),t&&null!==t.remote?d=(n=this._right=new ey({model:t,type:"right",options:{...e,config:{...e.config},extensions:[e.extensions??[],g]},lockScroll:f,translator:e.translator})).remoteEditorWidget:(n=this._right=null,d=new h.Widget({node:e_("div",this._trans.__("Value missing"),"jp-mod-missing")})),this.addWidget(d),d.addClass("cm-merge-pane"),d.addClass("cm-merge-right-editor");let u=(s=this._merge=new ey({model:o,type:"merge",options:{...e,config:{...e.config,readOnly:c},extensions:[e.extensions??[],g]},lockScroll:f,translator:e.translator})).remoteEditorWidget;if(f)this.addWidget(u);else{function b(e,t){e.addEventListener("scroll",()=>{window.requestAnimationFrame(function(){t.scrollLeft=e.scrollLeft,t.scrollTop=e.scrollTop})},{passive:!0}),t.addEventListener("scroll",()=>{window.requestAnimationFrame(function(){e.scrollLeft=t.scrollLeft,e.scrollTop=t.scrollTop})},{passive:!0})}this.insertWidget(1,u),this.left&&b(this.merge.remoteEditorWidget.cm.scrollDOM,this.left.remoteEditorWidget.cm.scrollDOM),this.right&&b(this.merge.remoteEditorWidget.cm.scrollDOM,this.right.remoteEditorWidget.cm.scrollDOM)}u.addClass("cm-merge-pane"),u.addClass("cm-merge-editor"),l=3+ +!!f}else if(t)if(t.unchanged||t.added||t.deleted)l=1,this.addWidget(this._base),t.unchanged?this._base.addClass("cm-merge-pane-unchanged"):t.added?this._base.addClass("cm-merge-pane-added"):t.deleted&&this._base.addClass("cm-merge-pane-deleted"),this._base.addClass("cm-merge-pane");else{l=2,this.addWidget(this._base),this._base.addClass("cm-merge-pane"),this._base.addClass("cm-diff-left-editor");let r=(n=this._right=new ey({model:t,type:"right",options:{...e,config:{...e.config},extensions:[e.extensions??[],g]},translator:e.translator})).remoteEditorWidget;r.addClass("cm-merge-pane"),r.addClass("cm-diff-right-editor"),this.addWidget(new h.Widget({node:n.buildGap()})),this.addWidget(r)}for(let e of(this.addClass("cm-merge-"+l+"pane"),[i,n,s]))e&&e.init(this._base);this._collapseIdentical>=0&&this.collapseIdenticalStretches(),this._aligning=!1,this._diffViews.length>0&&this.scheduleAlignViews()}alignViews(){let e=this._showBase?this._base.cm.defaultLineHeight:this._diffViews[0].remoteEditorWidget.cm.defaultLineHeight;if(this._aligning)return;this._aligning=!0;let t=function(e){let t=[],r=[],o=e[0],i=e.slice(1);for(let e=0;e<o.lineChunks.length;e++){let n=o.lineChunks[e],s=[n.baseTo,n.remoteTo];for(let e of i)s.push(ew(n,e.lineChunks));if(t.length>0&&t[t.length-1][0]===s[0]){let e=t[t.length-1];for(let t=0;t<s.length;++t)e[t]=Math.max(e[t],s[t])}else if(t.length>0){let e=t[t.length-1],o=s[0]-e[0];for(let t=1;t<s.length;++t)if(o!==s[t]-e[t]){o=null;break}if(null===o)t.push(s);else{r.push(s[0]);continue}}else t.push(s)}for(let e=0;e<i.length;e++)for(let n=0;n<i[e].lineChunks.length;n++){let s=i[e].lineChunks[n],l=0;for(;l<t.length;l++){let e=t[l];if((0,S.xm)(s.baseTo,r)){l=-1;break}if(e[0]>=s.baseTo)break}if(l>-1){let r=[s.baseTo,ew(s,o.lineChunks)];for(let t=0;t<i.length;t++)t===e?r.push(s.remoteTo):r.push(ew(s,i[t].lineChunks));if(t.length>l&&t[l][0]===s.baseTo){let e=t[l];for(let t=0;t<r.length;++t)e[t]=Math.max(e[t],r[t])}else t.splice(l,0,r)}}return t}(this._diffViews),r=[this.base.cm,...this._diffViews.map(e=>e.remoteEditorWidget.cm)],o=[];for(let e=0;e<r.length;e++)o.push(new k.RangeSetBuilder);let i=Array(r.length).fill(0),n=r.map(e=>e.state.doc.lines);for(let s of t){let t=this._showBase?s.slice(0,3):s,l=Math.max(...t),a=t.map((e,t)=>l-e-i[t]),d=this._showBase?Math.min(...a):Math.min(...a.slice(1));a.map(e=>e-d).forEach((s,l)=>{if(!this._showBase&&0===l)return;let a=t[l];if(s>0&&a<n[l]){i[l]+=s;let t=(0,O.TU)(r[l].state.doc,{line:a,column:0});o[l].add(t,t,x.Decoration.widget({widget:new X(s*e),block:!0,side:-1}))}})}let s=n.map((e,t)=>e+i[t]),l=Math.max(...s);s.slice(0,this._showBase?3:4).forEach((t,n)=>{if(l>t){let s=r[n].state.doc.length,a=l-t;i[n]+=a,o[n].add(s,s,x.Decoration.widget({widget:new X(a*e),block:!0,side:1}))}});for(let e=0;e<(this._showBase&&r.length>2?r.length-1:r.length);e++){if(0===e&&!this._showBase)continue;let t=o[e].finish();k.RangeSet.eq([t],[r[e].state.field(Q)])||r[e].dispatch({effects:Y.of(t)})}this._aligning=!1}scheduleAlignViews(){this._measuring<0&&(this._measuring=window.requestAnimationFrame(()=>{this._measuring=-1,this.alignViews()}))}getMergedValue(){if(!this.merge)throw Error('No merged value; missing "merged" view');return this.merge.remoteEditorWidget.doc.toString()}collapseIdenticalStretches(){let e=this._collapseIdentical;if(e<0)return;let t=this.base.cm,r=Array(t.state.doc.lines).fill(!0),o=[new k.RangeSetBuilder];this.left&&(o.push(new k.RangeSetBuilder),ej(this.left,e,r)),this.right&&(o.push(new k.RangeSetBuilder),ej(this.right,e,r)),this.merge&&(o.push(new k.RangeSetBuilder),ej(this.merge,e,r));for(let i=0;i<r.length;i++)if(r[i]){let n=i+1,s=1;for(;i<r.length-1&&r[i+1];i++,s++);if(s>e){let e=[{line:n,cm:t}];this.left&&e.push({line:eb(n,this.left.chunks),cm:this.left.remoteEditorWidget.cm}),this.right&&e.push({line:eb(n,this.right.chunks),cm:this.right.remoteEditorWidget.cm}),this.merge&&e.push({line:eb(n,this.merge.chunks),cm:this.merge.remoteEditorWidget.cm}),e.forEach((t,r)=>{let i=t.cm.state.doc.line(t.line).from,n=t.cm.state.doc.line(t.line+s-1).to;o[r].add(i,n,x.Decoration.replace({widget:new ep(s,e),block:!0}))})}}let i=[t,...this._diffViews.map(e=>e.remoteEditorWidget.cm)];o.forEach((e,t)=>{let r=e.finish();i[t].dispatch({effects:eh.of(r)})})}onGutterClick(e,t){let r=[],o=t.from,i=(0,O.Z3)(e.state.doc,o).line;if(e!=this.merge?.remoteEditorWidget.cm){let o=e.state.field(ec).get(i);if(e!=this._base.cm)for(let e of o.sources)e.decision.action=e.action;else if(this.merge&&e===this._base.cm)for(let e of o.sources)e.decision.action="base";for(let e=o.sources.length-1;e>=0;--e){let t=o.sources[e];this.merge&&(0,S.T5)(t.decision.customDiff)&&(t.decision.customDiff=[])}o.sources.length,r.push(ee.of({from:t.from,on:!1,type:"picker",block:!1}))}else for(let t of e.state.field(ef).get(i).sources)e!==this._base.cm&&(t.decision.conflict=!1);return e.dispatch({effects:r}),this.updateDiffModels(),this.updateDiffViews(),this.alignViews(),!0}updateDiffModels(){for(let e of this._diffViews)e.model instanceof T&&e.model.invalidate(),e.syncModel()}updateDiffViews(){for(let e of(this.clearBaseEditorPickers(),this._diffViews))e.updateView()}clearBaseEditorPickers(){let e=[];e.push(et.of({type:"all"})),e.push(ed.of({type:"picker"})),this._base.cm.dispatch({effects:e})}get left(){return this._left}get right(){return this._right}get merge(){return this._merge}get base(){return this._base}get _diffViews(){return[this.left,this.right,this.merge].filter(e=>null!==e)}}function e_(e,t,r,o){let i=document.createElement(e);if(r&&(i.className=r),o&&(i.style.cssText=o),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(let e=0;e<t.length;++e)i.appendChild(t[e]);return i}function ej(e,t,r){for(let o=0;o<e.chunks.length;o++){let i=e.chunks[o];for(let e=i.baseFrom-t;e<i.baseTo+t;e++){let t=e;t>=0&&t<r.length&&(r[t]=!1)}}}var ek=r(1086),ex=r(8081);class eC extends h.PanelLayout{constructor(e={}){super(),this.order=null,this._wrap=!1,this._minimumSpacing=4,this._justifyContent=null,this._alignItems=null,this._alignContent=null,this._dirty=!1,this._direction="top-to-bottom",this._stretchType=null,this._evenSizes=!1,void 0!==e.direction&&(this._direction=e.direction),void 0!==e.minimumSpacing&&(this._minimumSpacing=f.clampSpacing(e.minimumSpacing)),void 0!==e.wrap&&(this._wrap=e.wrap),void 0!==e.justifyContent&&(this._justifyContent=e.justifyContent),void 0!==e.alignItems&&(this._alignItems=e.alignItems),void 0!==e.alignContent&&(this._alignContent=e.alignContent),void 0!==e.stretchType&&(this._stretchType=e.stretchType),void 0!==e.evenSizes&&(this._evenSizes=e.evenSizes)}get direction(){return this._direction}set direction(e){this._direction===e||(this._direction=e,this.parent&&(f.toggleDirection(this.parent,e),this.parent.fit()))}get minimumSpacing(){return this._minimumSpacing}set minimumSpacing(e){e=f.clampSpacing(e),this._minimumSpacing===e||(this._minimumSpacing=e,this.parent&&(this.parent.node.style.flexWrap=e?"wrap":"nowrap",this.parent.fit()))}get wrap(){return this._wrap}set wrap(e){this._wrap===e||(this._wrap=e,this.parent&&(this.parent.node.style.flexWrap=e?"wrap":"nowrap",this.parent.fit()))}get justifyContent(){return this._justifyContent}set justifyContent(e){if(this._justifyContent===e)return;this._justifyContent=e;let t=f.translateFlexString(e);this.parent&&(this.parent.node.style.justifyContent=t,this.parent.fit())}get alignItems(){return this._alignItems}set alignItems(e){if(this._alignItems===e)return;this._alignItems=e;let t=f.translateFlexString(e);this.parent&&(this.parent.node.style.alignItems=t,this.parent.fit())}get alignContent(){return this._alignContent}set alignContent(e){if(this._alignContent===e)return;this._alignContent=e;let t=f.translateFlexString(e);this.parent&&(this.parent.node.style.alignContent=t,!1!==this._wrap&&this.parent.fit())}get stretchType(){return this._stretchType}set stretchType(e){this._stretchType===e||(this._stretchType=e,this.parent&&this.parent.fit())}get evenSizes(){return this._evenSizes}set evenSizes(e){this._evenSizes===e||(this._evenSizes=e,this.parent&&this.parent.fit())}isHorizontal(){return"right-to-left"===this.direction||"left-to-right"===this.direction}isVertical(){return!this.isHorizontal()}init(){f.toggleDirection(this.parent,this.direction),super.init()}attachWidget(e,t){super.attachWidget(e,t),this.order&&ek.ArrayExt.insert(this.order,e,t),this.parent.fit()}moveWidget(e,t,r){e!==t&&(this.order||(this.order=this.widgets.slice()),ek.ArrayExt.move(this.order,e,t),this._dirty=!0),this.parent.update()}detachWidget(e,t){if(this.order){let e=0;for(;e<this.order.length;++e)if(t===this.order[e]){ek.ArrayExt.removeAt(this.order,e);break}}super.detachWidget(e,t),this.parent.fit()}onAfterShow(e){super.onAfterShow(e),this.parent.update()}onAfterAttach(e){super.onAfterAttach(e),f.toggleDirection(this.parent,this._direction);let t=this.parent.node.style;t.flexWrap=this._wrap?"wrap":"nowrap",t.justifyContent=f.translateFlexString(this._justifyContent)||"",t.alignContent=f.translateFlexString(this._alignContent)||"",t.alignItems=f.translateFlexString(this._alignItems)||"",this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update()}onUpdateRequest(e){this.parent.isVisible&&this._update()}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){this._dirty=!0;let e=this.parent.parent;e&&ex.MessageLoop.sendMessage(e,h.Widget.Msg.FitRequest),this._dirty&&ex.MessageLoop.sendMessage(this.parent,h.Widget.Msg.UpdateRequest)}_update(){this._dirty=!1;let e=this.order||this.widgets;if(0===e.length)return;let t=this.minimumSpacing.toString()+"px";if(this.isHorizontal())for(let r=0;r<e.length-1;++r)e[r].node.style.marginRight=t;else for(let r=0;r<e.length-1;++r)e[r].node.style.marginBottom=t;if(this._evenSizes||this.stretchType){let t=null,r=null,o=null;if(this._evenSizes)t=0,r=1;else switch(this._stretchType){case"grow":r=1,o=0;break;case"shrink":r=0,o=1;break;case"both":r=1,o=1;break;case"fixed":r=0,o=0;break;default:throw TypeError("Invalid stretch type: "+this._stretchType)}for(let i=0;i<e.length;++i){let n=e[i].node.style;null!==t&&(n.flexBasis=t.toString()),null!==r&&(n.flexGrow=r.toString()),null!==o&&(n.flexShrink=o.toString())}}for(let t=0;t<e.length;++t)e[t].node.style.order=this.order?t.toString():""}}(n=eC||(eC={})).getGrow=function(e){let t=e.node.style.flexGrow;return t?parseInt(t,10):null},n.setGrow=function(e,t,r=!0){e.node.style.flexGrow=null===t?"":t.toString(),r&&e.parent&&e.parent.fit()},n.getShrink=function(e){let t=e.node.style.flexShrink;return t?parseInt(t,10):null},n.setShrink=function(e,t,r=!0){e.node.style.flexShrink=null===t?"":t.toString(),r&&e.parent&&e.parent.fit()},n.getSizeBasis=function(e){let t=e.node.style.flexBasis;return"auto"===t?"auto":t?parseInt(t.replace("px",""),10):null},n.setSizeBasis=function(e,t,r=!0){"auto"===t?e.node.style.flexBasis=t:null===t?e.node.style.flexBasis="":e.node.style.flexBasis=t.toString()+"px",r&&e.parent&&e.parent.fit()},(s=f||(f={})).isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},s.translateFlexString=function(e){return("start"===e||"end"===e)&&(e="flex-"+e),e},s.toggleDirection=function(e,t){e.toggleClass("lm-mod-left-to-right","left-to-right"===t),e.toggleClass("lm-mod-right-to-left","right-to-left"===t),e.toggleClass("lm-mod-top-to-bottom","top-to-bottom"===t),e.toggleClass("lm-mod-bottom-to-top","bottom-to-top"===t)},s.clampSpacing=function(e){return Math.max(0,Math.floor(e))};let eE="lm-FlexPanel-child";class eD extends h.Panel{constructor(e={}){super({layout:u.createLayout(e)}),e.layout||(void 0!==e.minimumSpacing&&(this.minimumSpacing=e.minimumSpacing),void 0!==e.direction&&(this.direction=e.direction)),this.addClass("lm-FlexPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get minimumSpacing(){return this.layout.minimumSpacing}set minimumSpacing(e){this.layout.minimumSpacing=e}get wrap(){return this.layout.wrap}set wrap(e){this.layout.wrap=e}get justifyContent(){return this.layout.justifyContent}set justifyContent(e){this.layout.justifyContent=e}get alignItems(){return this.layout.alignItems}set alignItems(e){this.layout.alignItems=e}get alignContent(){return this.layout.alignContent}set alignContent(e){this.layout.alignContent=e}get layout(){return super.layout}set layout(e){super.layout=e}get stretchType(){return this.layout.stretchType}set stretchType(e){this.layout.stretchType=e}get evenSizes(){return this.layout.evenSizes}set evenSizes(e){this.layout.evenSizes=e}onChildAdded(e){e.child.addClass(eE)}onChildRemoved(e){e.child.removeClass(eE)}onAfterAttach(e){super.onAfterAttach(e),this.fit()}}(l=eD||(eD={})).getGrow=function(e){return eC.getGrow(e)},l.setGrow=function(e,t){eC.setGrow(e,t)},l.getShrink=function(e){return eC.getShrink(e)},l.setShrink=function(e,t){eC.setShrink(e,t)},l.getSizeBasis=function(e){return eC.getSizeBasis(e)},l.setSizeBasis=function(e,t){eC.setSizeBasis(e,t)},(u||(u={})).createLayout=function(e){return e.layout||new eC(e)};let eS="jp-Diff-twoway",eA="jp-Diff-added",eO="jp-Diff-deleted",eT="jp-Diff-unchanged",eP=["jp-Diff-base","jp-Diff-remote"],eI="jp-Diff-addremchunk",eM="jp-Diff-addedchunk",eF="jp-Diff-removedchunk",eN="jp-Diff-label";class eW extends h.Widget{constructor(e,t,r,o){super(),this.rendermime=r,this.model=e,this.mimetype=o;let i=e.base,n=e.remote;this.layout=new h.PanelLayout;let s=0;if(i){let r=this.createSubView(i,e.trusted);this.layout.addWidget(r),r.addClass(t[s++])}if(n&&n!==i){let r=this.createSubView(n,e.trusted);this.layout.addWidget(r),r.addClass(t[s++])}}get layout(){return super.layout}set layout(e){super.layout=e}}let eR="jp-Diff-trustCandidate",eL=["text/html"],eB=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function eV(e,t=64){return null!==e&&e.length>t&&eB.test(e.replace("\n",""))}class eU extends g{constructor({parent:e,editorClasses:t,rendermime:r,...o}){if(super(o),this._mimetype=null,this.forceText=!1,this.rendermime=r,this._trans=this._translator.load("nbdime"),this.editorClasses=t,this._model.trustedChanged.connect((e,t)=>{this.trustedChanged(t)}),eU.isTrustSignificant(this._model,this.rendermime)&&this.addClass(eR),this._model.added){if(!e.added){let e=new h.Widget;e.node.textContent=this._trans.__("Output added"),e.addClass(eN),this.addWidget(e)}this.addClass(eA)}else if(this._model.deleted){if(!e.deleted){let e=new h.Widget;e.node.textContent=this._trans.__("Output deleted"),e.addClass(eN),this.addWidget(e)}this.addClass(eO)}else this._model.unchanged?this.addClass(eT):this.addClass(eS);let i=this.createView();this.initContainer(i),this.createHoverMenu(),this.addClass("jp-Diff-outputPanel")}initContainer(e){this._model.collapsible?this.container=new j(e,this._model.collapsibleHeader,this._model.startCollapsed):(this.container=this,this.container.addWidget(e)),this.view=e}replaceView(e){let t=this.view,r=this.container.widgets.indexOf(t);this.container.insertWidget(r,e),t.parent=null,this.view=e}createView(e=!1){let t=this._model,r=this.rendermime;return ez.canRender(t,r)&&!e?new ez(t,this.editorClasses,r,this.selectedMimetype):this.createOutputTextView()}createOutputTextView(){let e,t=this._model,r=null;if(null===this.selectedMimetype?(0,ek.find)(this.rendermime.mimeTypes,e=>null!==(r=t.hasMimeType(e))):r=t.hasMimeType(this.selectedMimetype),r){let o=t.stringify(r);eV(o.base||o.remote)||(e=eg({remote:o,factory:this._editorFactory,translator:this._translator,...this._viewOptions}))}return e||(e=eg({remote:t.stringify(),factory:this._editorFactory,translator:this._translator,...this._viewOptions})),e}createHoverMenu(){this.menu=new h.Panel,this.menu.addClass("jp-Diff-outputMenu"),this.container.addWidget(this.menu);let e=document.createElement("button"),t=[this._trans.__("Show source"),this._trans.__("Render")];e.textContent=t[0],e.onclick=r=>{this.forceText=!this.forceText,e.textContent=t[+!!this.forceText],this.updateView()};let r=new h.Widget({node:e});r.addClass("jp-Diff-showOutputSourceButton"),this.menu.addWidget(r);let o=document.createElement("button");o.textContent=this._trans.__("Trust"),o.onclick=e=>{this._model.trusted=!this._model.trusted},(r=new h.Widget({node:o})).addClass("jp-Diff-trustOutputButton"),this.menu.addWidget(r);let i=[];for(let e of this._model.contents){let t=p.OutputModel.getData(e);i=i.concat(Object.keys(t))}if((i=i.filter(S.Am)).length>1){let e=(0,S.Dk)(i),t=this.selectedMimetype;t&&(e.selectedIndex=i.indexOf(t)),e.onchange=t=>{this.selectedMimetype=i[e.selectedIndex]},(r=new h.Widget({node:e})).addClass("jp-Diff-outputMimetypeSelect"),this.menu.addWidget(r)}else if(1===i.length){let e=document.createElement("span");e.innerText=i[0],r=new h.Widget({node:e}),this.menu.addWidget(r)}}trustedChanged(e){this.updateView(),e?this.removeClass(eR):eU.isTrustSignificant(this._model,this.rendermime)&&this.addClass(eR)}updateView(){let e=this._model;if(this.view instanceof ez)if(!this.forceText&&ez.canRender(e,this.rendermime))this.view.updateView(this.selectedMimetype,e.trusted);else{let e=this.createView(this.forceText);this.replaceView(e)}else{let e=this.createView(this.forceText);this.replaceView(e)}}get selectedMimetype(){if(null!==this._mimetype)return this._mimetype;let e=p.OutputModel.getData(this._model.base||this._model.remote),t=this.rendermime.preferredMimeType(e,this._model.trusted?"any":"ensure");return void 0===t?null:t}set selectedMimetype(e){this._mimetype!==e&&(this._mimetype=e,this.updateView())}static isTrustSignificant(e,t){if(e.trusted)return!1;let r=[];for(let o of(e.base&&r.push(e.base),e.remote&&e.remote!==e.base&&r.push(e.remote),r)){let e=Object.keys(new p.OutputModel({value:o,trusted:!1}).data),r=(0,ek.toArray)(t.mimeTypes);for(let o of(0,S.E$)(e,r)){let e=t.getFactory(o);if(e&&(!e.safe||-1!==eL.indexOf(o)))return!0}}return!1}}class ez extends eW{constructor(e,t,r,o){super(e,t,r,o)}createSubView(e,t){let r=new eG(this.rendermime);return r.updateView(e,t,this.mimetype),r}updateView(e,t){let r=0,o=this.model;this.mimetype=e,(0,ek.each)(this.layout.widgets,i=>{if(i instanceof eG){let n=null;0===r&&o.base?n=o.base:o.remote&&(n=o.remote),n&&i.updateView(n,t,e),++r}})}static canRender(e,t){for(let r of e.contents){let o=p.OutputModel.getData(r);if(!t.preferredMimeType(o,e.trusted?"any":"ensure"))return!1}return!0}}class eG extends h.Panel{constructor(e){super(),this.rendermime=e}updateView(e,t,r){let o=this.renderer;this.renderer=this.createRenderer(e,t,r),void 0!==o&&o.dispose(),this.addWidget(this.renderer)}createRenderer(e,t,r){let o=new p.OutputModel({value:e,trusted:t}),i=this.rendermime.createRenderer(r);return i.renderModel(o),i.addClass("jp-Diff-renderedOutput"),eV(p.OutputModel.getData(e)[r])&&i.addClass("jp-diff-base64Output"),i}}let eK="jp-Cellrow-outputs";class eH extends g{constructor({rendermime:e,mimetype:t,...r}){super(r),this.addClass("jp-Cell-diff"),this._rendermime=e,this._trans=this._translator.load("nbdime"),this.mimetype=t,this.init()}init(){let e=this.model,t=eP.slice();e.added?(this.addClass(eA),t=eP.slice(1,2)):e.deleted?(this.addClass(eO),t=eP.slice(0,1)):e.unchanged?this.addClass(eT):this.addClass(eS);let r=eH.createView({model:e.source,parent:e,editorClasses:t,rendermime:this._rendermime,editorFactory:this._editorFactory,translator:this._translator,...this._viewOptions});if(r.addClass("jp-Cellrow-source"),e.executionCount||e.cellId){let t=e=>{let t=new h.Widget;return t.node.innerText=e,t},o=eH.createHeader();eD.setGrow(o,1),r.insertWidget(0,o);let i=e.executionCount?eH.createPrompts(e.executionCount,e):{base:null,remote:null},n=e.cellId?eH.createIdentifiers(e.cellId,e):{base:null,remote:null};for(let r of["base","remote"]){let s=i[r],l=n[r];if(e.executionCount&&null!==s){let e=t(s);e.addClass("jp-InputPrompt"),e.addClass("jp-Cellrow-header-executionCount"),o.addWidget(e)}if(e.cellId&&null!==l){let e=t(`Cell ID: ${l}`);e.addClass("jp-Cellrow-header-cellId"),eD.setGrow(e,1),o.addWidget(e)}}}if(this.addWidget(r),!e.metadata.unchanged){let r=eH.createView({model:e.metadata,parent:e,editorClasses:t,rendermime:this._rendermime,editorFactory:this._editorFactory,translator:this._translator,...this._viewOptions});r.addClass("jp-Cellrow-metadata"),this.addWidget(r)}let o=e.getChunkedOutputs();if((0,S.T5)(o)){let r=new h.Panel;r.addClass("jp-Diff-outputsContainer");let i=!1;for(let n of o)if(1===n.length){let o=n[0],s=eH.createView({model:o,parent:e,editorClasses:t,rendermime:this._rendermime,editorFactory:this._editorFactory,translator:this._translator,...this._viewOptions});r.addWidget(s),i=i||!o.unchanged||o.added||o.deleted}else{let o=new h.Panel;o.addClass(eI);let s=new h.Panel;s.addClass(eM);let l=new h.Panel;for(let r of(l.addClass(eF),n)){let o=r.deleted?l:s,n=eH.createView({model:r,parent:e,editorClasses:t,rendermime:this._rendermime,editorFactory:this._editorFactory,translator:this._translator,...this._viewOptions});o.addWidget(n),i=i||!r.unchanged||r.added||r.deleted}o.addWidget(s),o.addWidget(l),r.addWidget(o)}if(e.added||e.deleted)r.addClass(eK),this.addWidget(r);else{let e=!i,t=new j(r,i?this._trans.__("Outputs changed"):this._trans.__("Outputs unchanged"),e);t.addClass(eK),this.addWidget(t)}}}static createHeader(){let e=new eD({direction:"left-to-right"});return e.addClass("jp-Cellrow-header"),e}static createPrompts(e,t){let r={base:null,remote:null};if(!t.added){let t=e.base;r.base=`In [${t||" "}]:`}if(!t.unchanged&&!t.deleted){let t=e.remote;r.remote=`In [${t||" "}]:`}return r}static createIdentifiers(e,t){return{base:e.base,remote:e.remote}}static createView({model:e,parent:t,editorClasses:r,rendermime:o,editorFactory:i,translator:n,...s}){let l;if(e instanceof C.Os){let r=null;if(e.unchanged&&"markdown"===t.cellType){let t=new p.MimeModel({data:{"text/markdown":e.base}}),i=o.preferredMimeType(t.data,"ensure");if(!i)throw Error("No renderer for output");let n=o.createRenderer(i);n.renderModel(t),r=n}else r=eg({remote:e,factory:i,translator:n,...s});e.collapsible?l=new j(r,e.collapsibleHeader,e.startCollapsed):(l=new h.Panel).addWidget(r)}else if(e instanceof C.GO)l=new eU({model:e,parent:t,editorClasses:r,rendermime:o,editorFactory:i,translator:n}),e.added?l.addClass(eA):e.deleted?l.addClass(eO):e.unchanged?l.addClass(eT):l.addClass(eS);else throw Error("Unrecognized model type.");return l}get model(){return this._model}}class e$ extends g{constructor(e){super(e),console.assert(!this._model.added&&!this._model.deleted),this.addClass("jp-Metadata-diff"),this.init()}init(){let e=this._model;if(!e.unchanged){this.addClass(eS);let t=eg({remote:e,factory:this._editorFactory,translator:this._translator,...this._viewOptions});e.collapsible&&(t=new j(t,e.collapsibleHeader,e.startCollapsed)),this.addWidget(t)}}}class eJ extends g{constructor({rendermime:e,...t}){super(t),this._rendermime=e,this.addClass("jp-Notebook-diff")}init(){let e=this._model,t=this._rendermime,r=Promise.resolve();for(let o of(r=r.then(()=>{e.metadata&&this.addWidget(new e$({model:e.metadata,editorFactory:this._editorFactory,translator:this._translator,...this._viewOptions}))}),e.chunkedCells))r=r.then(()=>new Promise(r=>{if(1!==o.length||o[0].added||o[0].deleted){let r=new h.Panel;r.addClass(eI);let i=new h.Panel;i.addClass(eM);let n=new h.Panel;for(let r of(n.addClass(eF),o))(r.deleted?n:i).addWidget(new eH({model:r,rendermime:t,mimetype:e.mimetype,editorFactory:this._editorFactory,translator:this._translator,...this._viewOptions}));r.addWidget(i),r.addWidget(n),this.addWidget(r)}else this.addWidget(new eH({model:o[0],rendermime:t,mimetype:e.mimetype,editorFactory:this._editorFactory,translator:this._translator,...this._viewOptions}));requestAnimationFrame(()=>{r()})}));return r}get model(){return this._model}}},7067(e,t,r){"use strict";var o=r(5190),i=r(8643),n=r(8749),s=r(2937);function l(e,t){return void 0===e?t:e}class a{constructor(e,t=null,r=null,o="base",i=!1,n=null,d=null){this.level=0,e instanceof Array?this._path=e:e instanceof a?(this._path=e.absolutePath.slice(),t=e.localDiff,r=e.remoteDiff,o=e.action,i=e.conflict,n=e.customDiff,d=e.similarInsert,this.level=e.level):(this._path=l(e.common_path,[]),t=l(e.local_diff,t),r=l(e.remote_diff,r),o=function(e){if((0,s.xm)(e,["base","local","remote","local_then_remote","remote_then_local","custom","clear","clear_parent","either"]))return e;throw Error("Invalid merge decision action: "+e)}(l(e.action,o)),i=l(e.conflict,i),n=l(e.custom_diff,n),d=l(e.similar_insert,d)),this.localDiff=t,this.remoteDiff=r,this.action=o,this.conflict=i,this.customDiff=n,this.similarInsert=d}setValuesFrom(e){this._path=e.absolutePath.slice(),this.localDiff=e.localDiff,this.remoteDiff=e.remoteDiff,this.action=e.action,this.conflict=e.conflict,this.customDiff=e.customDiff,this.similarInsert=e.similarInsert,this.level=e.level}get localPath(){return this._path.slice(this.level)}get absolutePath(){return this._path}set absolutePath(e){this._path=e}pushPath(e){this._path.push(e)}get diffs(){let e=[this.localDiff,this.remoteDiff];return this.customDiff&&e.push(this.customDiff),e}set diffs(e){this.localDiff=e[0],this.remoteDiff=e[1],e.length>2&&(this.customDiff=e[2])}serialize(){return{common_path:this.absolutePath.slice(),local_diff:(0,i.IR)(this.localDiff),remote_diff:(0,i.IR)(this.remoteDiff),action:this.action,conflict:this.conflict,custom_diff:(0,i.IR)(this.customDiff)}}}function d(e,t){return function(e,t){if(e.length!==t.length)return t.length-e.length;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return 0}(e.absolutePath,t.absolutePath)}function c(e,t){if(e.length<1)return null;let r=0;for(let t of e){if(null!==t&&t.length>0)break;r++}if(r===e.length)return console.log("Empty merge decision (no diffs)!"),null;let o=e[r],i=o[0].op,n=o[0].key;for(let t of e)if(t&&t.length>0){for(let e of t)if(e.op!==i||e.key!==n)return null}if("patch"===i){if(!0!==t){for(let t of e)if(t&&t.length>0&&(1!==t.length||!t[0].diff||1!==t[0].diff.length))return null}let r=[];for(let t of e)t&&t.length>0?r.push(t[0].diff):r.push(null);return{diffs:r,key:n}}return null}function f(e,t){for(let r of t.reverse())e=[(0,o.iK)(r,e)];return e}function u(e){for(let t of e){let e=t.diffs,r=t.absolutePath||[],o=c(e,!0);for(;o;)r.push(o.key),o=c(e=o.diffs,!0);t.absolutePath=r,t.diffs=e}}function h(e,t){return e&&t?e.concat(t):e?e.slice():t?t.slice():[]}function p(e,t){let r=t.action;if("base"===r)return[];if("local"===r||"either"===r)return t.localDiff?t.localDiff.slice():[];if("remote"===r)return t.remoteDiff?t.remoteDiff.slice():[];if("custom"===r)return t.customDiff?t.customDiff.slice():[];if("local_then_remote"===r)return h(t.localDiff,t.remoteDiff);else if("remote_then_local"===r)return h(t.remoteDiff,t.localDiff);else if("clear"===r){let r=null;if("object"!=typeof e)throw TypeError("Can only use `'clear'` action on objects/dicts");for(let e of h(t.localDiff,t.remoteDiff))if(r){if(r!==e.key)throw Error("Cannot combine diffs with different keys")}else r=e.key;if(!r)return[];{var i;let n=(0,o.c)(r,(i=e[r])instanceof Array?[]:"string"==typeof i?"":null===i||(0,s.xm)(typeof i,["number","boolean"])?null:{});return n.source={decision:t,action:"custom"},[n]}}else if("clear_parent"===r)if(Array.isArray(e)){let r=(0,o.zK)(0,e.length);return r.source={decision:t,action:"custom"},[r]}else if("string"==typeof e){let r=(0,s.uz)(e).length,i=(0,o.zK)(0,r);return i.source={decision:t,action:"custom"},[i]}else{let r=[];for(let i of e){let e=(0,o._z)(i);e.source={decision:t,action:"custom"},r.push(e)}return r}else throw Error('The action "'+r+'" is not defined')}function m(e,t){for(let r=0;r<t.length;++r){if("string"==typeof e)return[t.slice(0,r),t.slice(r)];e=e[t[r]]}return[t,null]}function g(e,t){let r=(0,s.A4)(e),o=null,i=null,l=null,a=null,d=[],c=!1;for(let e of t){let t=m(r,e.localPath),u=t[0],h=t[1];if((0,s.r1)(u,o))if(c);else{"clear_parent"===e.action&&(c=!0,d=[]);let t=p(a,e);h&&(t=f(t,h)),d=d.concat(t)}else{for(let e of(null!==o&&(null===i?r=(0,n.F6)(a,d):i[l]=(0,n.F6)(a,d)),o=u.slice(),a=r,i=null,l=null,u))i=a,a=a[e],l=e;d=p(a,e),h&&(d=f(d,h)),c="clear_parent"===e.action}}return null!==o&&(null===i?r=(0,n.F6)(a,d):i[l]=(0,n.F6)(a,d)),r}function y(e,t,r){let o={},n=[],l="local"===r,a="merged"===r;for(let s of(l||a||console.assert("remote"===r),t)){let t=null,r=m(e,s.localPath),d=r[0],c=r[1];if(a)t=p(function(e,t){for(let r of t)e=e[r];return e}(e,d),s);else if(null===(t=l?s.localDiff:s.remoteDiff))continue;let u="/"+d.join("/");if(o.hasOwnProperty(u))if(c){let e=(0,i.WM)(o[u].diff,c[0]);e?e.push.apply(e,t):(t=f(t,c),o[u].diff.push(t[0]))}else o[u].diff=o[u].diff.concat(t);else c&&(t=f(t,c)),o[u]={diff:t,path:d},n.push(u)}return 0===Object.keys(o).length?null:(o.hasOwnProperty("/")||(o["/"]={diff:[],path:[]},n.push("/")),function e(t,r){let o=[],i=null;for(let n=0;n<r.length;++n){let l,a=t[r[n]].path,d=t[r[n]].diff;if(o=o.concat(d),l=n===r.length-1?i:t[r[n+1]].path,(0,s.uJ)(l,a))null!==l&&(o=f(o,a.slice(l.length)),i=l);else{let i=e(t,r.slice(n+1));l=t[r[r.length-1]].path;let d=(0,s.Nt)(a,l),c=d?d.length:0;o=f(o,a.slice(c)).concat(f(i,l.slice(c)));break}}return o}(o,n))}function b(e,t){let r=new a(e);for(let e of t.slice().reverse()){if(0===r.absolutePath.length)throw Error("Cannot remove key from empty decision path: "+e+", "+r);let t=r.absolutePath.pop();if(t!==e)throw Error("Cannot push a patch that doesn't correspond to a key in the decision path! Key: "+e+"; Remaining path: "+r.absolutePath.concat([t]));let i=r.localDiff&&r.localDiff.length>0,n=r.remoteDiff&&r.remoteDiff.length>0,s=r.customDiff&&r.customDiff.length>0;r.localDiff=i?[(0,o.iK)(e,r.localDiff)]:null,r.remoteDiff=n?[(0,o.iK)(e,r.remoteDiff)]:null,r.customDiff=s?[(0,o.iK)(e,r.customDiff)]:null}return r}function w(e,t,r,o){let i=[];for(let n of(r=r||0,e))(void 0===o||!(n.absolutePath.length>o))&&(0,s.uJ)(t,n.absolutePath.slice(r))&&(n.level=r+t.length,i.push(n));return i}r.d(t,{MI:()=>u,O3:()=>g,PR:()=>y,Rh:()=>c,Ye:()=>f,g4:()=>d,jT:()=>a,sQ:()=>w,tp:()=>b})},8749(e,t,r){"use strict";r.d(t,{F6:()=>function e(t,r){if("string"==typeof t)return p(t,r,0,!1).remote;if(Array.isArray(t))return function(t,r){if(null===r)return(0,o.A4)(t);let i=[],n=0,s=0;for(let a of r){(0,l.JE)(t,a);let r=a.key;for(let e of t.slice(n,r))i.push((0,o.A4)(e));"addrange"===a.op?(i=i.concat(a.valuelist),s=0):"removerange"===a.op?s=a.length:"patch"===a.op&&(i.push(e(t[r],a.diff)),s=1),n=Math.max(n,r+s)}for(let e of t.slice(n))i.push((0,o.A4)(e));return i}(s.JSONExt.deepCopy(t),r);if("number"==typeof t||"boolean"==typeof t)throw TypeError("Cannot patch an atomic type: "+typeof t);if(null!==t)return function(t,r){let i={},n=Object.keys(t);if(r)for(let o of r){(0,l.Fj)(t,o,n);let r=o.key;"add"===o.op?i[r]=o.value:"remove"===o.op?n.splice(n.indexOf(r),1):"replace"===o.op?(n.splice(n.indexOf(r),1),i[r]=o.value):"patch"===o.op&&(n.splice(n.indexOf(r),1),i[r]=e(t[r],o.diff))}for(let e of n)i[e]=(0,o.A4)(t[e]);return i}(s.JSONExt.deepCopy(t),r);throw TypeError("Cannot patch a null base!")},b6:()=>function e(t,r,n){if(void 0===n&&(n=0),"string"==typeof t){let e=n>0;return p(t,r,n,e)}if(Array.isArray(t))return function(t,r,i){let n="",s=[],a=[],c=0;if(null===r)return{remote:u(t,i),additions:s,deletions:a};let f=0,h=0;for(let o of r){(0,l.JE)(t,o);let r=o.key;for(;r>f;f++){let e=u(t[f],i+1)+",\n";n+=e,c+=e.length}if("addrange"===o.op){let e="";for(let t of o.valuelist)e+=u(t,i+1)+",\n";let l=e.length;r===t.length&&(l-=1),s.push(new d.nC(n.length,l,o.source)),n+=e,h=0}else if("removerange"===o.op){let e="",n=o.length;for(let o=r;o<r+n;o++)e+=u(t[o],i+1)+",\n";let s=e.length;n+r===t.length&&(s-=1),a.push(new d.nC(c,s,o.source)),c+=e.length,h=o.length}else if("patch"===o.op){let l=e(t[r],o.diff,i+1);h=1;let d=l.remote+",\n";m(n.length,l.additions,l.deletions),s=s.concat(l.additions),a=a.concat(l.deletions),c+=u(t[r],i+1).length,n+=d}f=Math.max(f,r+h)}for(;t.length>f;f++)n+=u(t[f],i+1)+",\n";",\n"===n.slice(n.length-2)&&(n=n.slice(0,n.length-2));let p=(0,o.Bf)("  ",i);return n=p+"[\n"+n+"\n"+p+"]",m(p.length+2,s,a),{remote:n,additions:s,deletions:a}}(t,r,n);if("number"==typeof t||"boolean"==typeof t)throw TypeError("Cannot patch an atomic type: "+typeof t);if(null!==t)return function(t,r,n){let s="",a=[],c=[],f=0;if(null===r)return{remote:u(t,n),additions:a,deletions:c};let h=new i(t,r),p=h.baseKeys.slice();for(let r of h.keys()){var g,y;let i=(g=r,y=n+1,(0,o.Bf)("  ",y)+'"'+g+'": ');if(h.isDiffKey(r)){let g=h.getDiffEntry(r);if((0,l.Fj)(t,g,p),(0,o.xm)(g.op,["add","replace","remove"])){let e="replace"===g.op;if("add"===g.op||"replace"===g.op){let t=u(g.value,n+1,!1)+",\n",r=s.length,o=t.length;e?r+=i.length:o+=i.length,(e||!h.entriesAfterCurrentAddRem())&&(o-=2,"add"===g.op&&(o+=1)),a.push(new d.nC(r,o,g.source)),s+=i+t}if("remove"===g.op||"replace"===g.op){let o=u(t[r],n+1,!1)+",\n",s=f,l=o.length;e?s+=i.length:l+=i.length,(e||!h.entriesAfterCurrentAddRem())&&(l-=2,"remove"===g.op&&(l+=1)),c.push(new d.nC(s,l,g.source)),f+=i.length+o.length,p.splice(p.indexOf(r),1)}}else if("patch"===g.op){let o=e(t[r],g.diff,n+1),l=o.remote;l=i+l.slice((n+1)*2)+",\n",m(s.length+i.length-(n+1)*2,o.additions,o.deletions),s+=l,a=a.concat(o.additions),c=c.concat(o.deletions),f+=u(t[r],n+1,!1).length+i.length+2,p.splice(p.indexOf(r),1)}}else{let e=i+u(t[r],n+1,!1)+",\n";s+=e,f+=e.length}}",\n"===s.slice(s.length-2)&&(s=s.slice(0,s.length-2));let b=(0,o.Bf)("  ",n);return s=b+"{\n"+s+"\n"+b+"}",m(b.length+2,a,c),{remote:s,additions:a,deletions:c}}(t,r,n);throw TypeError("Cannot patch a null base!")},S3:()=>h});var o=r(2937);class i{constructor(e,t){this._diffLUT={};let r=[];if(t)for(let e of t)r.push(e.key),this._diffLUT[e.key]=e;this._diffKeys=r,this.baseKeys=n(e)}keys(){this._remainingKeys=this.baseKeys.concat(this._diffKeys).filter(o.Am).sort();let e=this;return{[Symbol.iterator]:()=>e}}isDiffKey(e){return(0,o.xm)(e,this._diffKeys)}getDiffEntry(e){return this._diffLUT[e]}entriesAfterCurrentAddRem(){if(void 0===this._currentIsAddition)throw Error("Current op is not an add or remove op");let e=this._currentIsAddition?"remove":"add";for(let t of this._remainingKeys)if(!(0,o.xm)(t,this._diffKeys))return!0;else if(this._diffLUT[t].op!==e)return!0;return!1}next(){let e=this._remainingKeys.shift();if(!e)return{done:!0,value:void 0};if(e&&(0,o.xm)(e,this._diffKeys)){let t=this._diffLUT[e].op;"add"===t?this._currentIsAddition=!0:"remove"===t?this._currentIsAddition=!1:this._currentIsAddition=void 0}return{value:e,done:!1}}}let n=Object.keys||function(e){let t=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(let o in e)t.call(e,o)&&r.push(o);return r};var s=r(7989),l=r(5190),a=r(8643),d=r(3854),c=r(5172),f=r.n(c);function u(e,t,r=!0){let i=f()(e,{space:"  "});return t&&(i=function(e,t,r){r=!1!==r;let i=e.split("\n"),n=Array(i.length);r||(n[0]=i[0]);for(let e=+!r;e<i.length;e++)n[e]=(0,o.Bf)("  ",t)+i[e];return n.join("\n")}(i,t,r)),i}function h(e){return"string"==typeof e?e:null===e?"":u(e)}function p(e,t,r,o){let i=[],n=[],s=0;if(null===t)return{remote:o?u(e,r):e,additions:i,deletions:n};t=(0,a.FF)(e,t);let l=0,c=0,f="";for(let r of t){let t=r.key,o=e.slice(l,t);if(f+=o,s+=o.length,"addrange"===r.op){let e=r.valuelist;i.push(new d.nC(f.length,e.length,r.source)),f+=e,c=0}else"removerange"===r.op&&(c=r.length,n.push(new d.nC(s,c,r.source)),s+=c);l=Math.max(l,t+c)}return f+=e.slice(l,e.length),o&&(f=u(f,r),m(2*r+1,i,n),g(f,i),g(u(e,r),n)),{remote:f,additions:i,deletions:n}}function m(e,t,r){for(let r of t)r.offset(e);for(let t of r)t.offset(e)}function g(e,t){let r,o=/\\uD[89A-Fa-f][0-9a-fA-F]{2}\\uD[c-fC-F][0-9a-fA-F]{2}/g,i=/(?!\\uD[c-fC-F][0-9a-fA-F]{2})\\u(?!D[89A-Fa-f][0-9a-fA-F]{2})\d{4}/g,n=[],s=[];for(let t of['\\"',"\\\\","\\/","\\b","\\f","\\n","\\r","\\t"]){let r=JSON.parse('"'+t+'"').length,o=0;for(;!((o=e.indexOf(t,o))<0);)n.push(o),s.push(2-r),o++}for(;null!==(r=i.exec(e));)n.push(r.index),s.push(6-JSON.parse('"'+r[0]+'"').length);for(;null!==(r=o.exec(e));)n.push(r.index),s.push(12-JSON.parse('"'+r[0]+'"').length);for(let e=0;e<n.length;e++)for(let r of t){let t=n[e],o=s[e];r.from>t&&(r.from+=o),r.to>t&&(r.to+=o)}}},8160(e,t,r){"use strict";var o;if(!Object.keys){var i=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=r(968),l=Object.prototype.propertyIsEnumerable,a=!l.call({toString:null},"toString"),d=l.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("u"<typeof window)return!1;for(var e in window)try{if(!u["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),p=function(e){if("u"<typeof window||!h)return f(e);try{return f(e)}catch(e){return!1}};o=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),o=s(e),l=t&&"[object String]"===n.call(e),f=[];if(!t&&!r&&!o)throw TypeError("Object.keys called on a non-object");var u=d&&r;if(l&&e.length>0&&!i.call(e,0))for(var h=0;h<e.length;++h)f.push(String(h));if(o&&e.length>0)for(var m=0;m<e.length;++m)f.push(String(m));else for(var g in e)!(u&&"prototype"===g)&&i.call(e,g)&&f.push(String(g));if(a)for(var y=p(e),b=0;b<c.length;++b)!(y&&"constructor"===c[b])&&i.call(e,c[b])&&f.push(c[b]);return f}}e.exports=o},9228(e,t,r){"use strict";var o=Array.prototype.slice,i=r(968),n=Object.keys,s=n?function(e){return n(e)}:r(8160),l=Object.keys;s.shim=function(){return Object.keys?!function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)&&(Object.keys=function(e){return i(e)?l(o.call(e)):l(e)}):Object.keys=s,Object.keys||s},e.exports=s},968(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),o="[object Arguments]"===r;return o||(o="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),o}},6108(e,t,r){"use strict";var o=r(528),i=r(686),n=r(7239)(),s=r(9336),l=r(3468),a=o("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new l("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||a(t)!==t)throw new l("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,d=!0;if("length"in e&&s){var c=s(e,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(d=!1)}return(o||d||!r)&&(n?i(e,"length",t,!0,!0):i(e,"length",t)),e}},2079(e,t,r){"use strict";var o=r(2591),i=r.n(o),n=r(1740),s=r.n(n),l=r(8128),a=r.n(l),d=r(855),c=r.n(d),f=r(3051),u=r.n(f),h=r(3656),p=r.n(h),m=r(4965),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=a().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=u(),i()(m.A,g),m.A&&m.A.locals&&m.A.locals},5227(e,t,r){"use strict";var o=r(2591),i=r.n(o),n=r(1740),s=r.n(n),l=r(8128),a=r.n(l),d=r(855),c=r.n(d),f=r(3051),u=r.n(f),h=r(3656),p=r.n(h),m=r(1349),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=a().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=u(),i()(m.A,g),m.A&&m.A.locals&&m.A.locals},3461(e,t,r){"use strict";var o=r(2591),i=r.n(o),n=r(1740),s=r.n(n),l=r(8128),a=r.n(l),d=r(855),c=r.n(d),f=r(3051),u=r.n(f),h=r(3656),p=r.n(h),m=r(9999),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=a().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=u(),i()(m.A,g),m.A&&m.A.locals&&m.A.locals},5557(e,t,r){"use strict";var o=r(2591),i=r.n(o),n=r(1740),s=r.n(n),l=r(8128),a=r.n(l),d=r(855),c=r.n(d),f=r(3051),u=r.n(f),h=r(3656),p=r.n(h),m=r(667),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=a().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=u(),i()(m.A,g),m.A&&m.A.locals&&m.A.locals},6116(e,t,r){"use strict";var o=r(2591),i=r.n(o),n=r(1740),s=r.n(n),l=r(8128),a=r.n(l),d=r(855),c=r.n(d),f=r(3051),u=r.n(f),h=r(3656),p=r.n(h),m=r(558),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=a().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=u(),i()(m.A,g),m.A&&m.A.locals&&m.A.locals},2591(e){"use strict";var t=[];function r(e){for(var r=-1,o=0;o<t.length;o++)if(t[o].identifier===e){r=o;break}return r}function o(e,o){for(var i={},n=[],s=0;s<e.length;s++){var l=e[s],a=o.base?l[0]+o.base:l[0],d=i[a]||0,c="".concat(a," ").concat(d);i[a]=d+1;var f=r(c),u={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)t[f].references++,t[f].updater(u);else{var h=function(e,t){var r=t.domAPI(t);return r.update(e),function(t){t?(t.css!==e.css||t.media!==e.media||t.sourceMap!==e.sourceMap||t.supports!==e.supports||t.layer!==e.layer)&&r.update(e=t):r.remove()}}(u,o);o.byIndex=s,t.splice(s,0,{identifier:c,updater:h,references:1})}n.push(c)}return n}e.exports=function(e,i){var n=o(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<n.length;s++){var l=r(n[s]);t[l].references--}for(var a=o(e,i),d=0;d<n.length;d++){var c=r(n[d]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}n=a}}},8128(e){"use strict";var t={};e.exports=function(e,r){var o=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!o)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(r)}},3051(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},1740(e){"use strict";e.exports=function(e){if("u"<typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){var o,i,n;o="",r.supports&&(o+="@supports (".concat(r.supports,") {")),r.media&&(o+="@media ".concat(r.media," {")),(i=void 0!==r.layer)&&(o+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),o+=r.css,i&&(o+="}"),r.media&&(o+="}"),r.supports&&(o+="}"),(n=r.sourceMap)&&"u">typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),e.styleTagTransform(o,t,e.options)},remove:function(){var e;null===(e=t).parentNode||e.parentNode.removeChild(e)}}}},3656(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}}]);