PageSourceSearch

https://scan.art/_next/static/chunks/7130-4b8206730acb7b78.js

js scan.art collected 2026-10-02 06:49:10 UTC 310,205 bytes, 4 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7130],{89567:function(t,e,n){var r=n(40554);t.exports=function(t,e){var n;if("function"!=typeof e)throw TypeError("Expected a function");return t=r(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}},51463:function(t,e,n){var r=n(89567);t.exports=function(t){return r(2,t)}},18601:function(t,e,n){var r=n(14841),i=1/0;t.exports=function(t){return t?(t=r(t))===i||t===-i?(t<0?-1:1)*17976931348623157e292:t==t?t:0:0===t?t:0}},40554:function(t,e,n){var r=n(18601);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},60944:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r=(0,n(71301).Z)("arrow-down","IconArrowDown",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 13l-6 6",key:"svg-1"}],["path",{d:"M6 13l6 6",key:"svg-2"}]])},86453:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r=(0,n(71301).Z)("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]])},26644:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r=(0,n(71301).Z)("arrows-up-down","IconArrowsUpDown",[["path",{d:"M7 3l0 18",key:"svg-0"}],["path",{d:"M10 6l-3 -3l-3 3",key:"svg-1"}],["path",{d:"M20 18l-3 3l-3 -3",key:"svg-2"}],["path",{d:"M17 21l0 -18",key:"svg-3"}]])},86729:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r=(0,n(71301).Z)("camera","IconCamera",[["path",{d:"M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M9 13a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]])},22820:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r=(0,n(71301).Z)("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]])},56076:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r=(0,n(71301).Z)("dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]])},13356:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r=(0,n(71301).Z)("layout-grid","IconLayoutGrid",[["path",{d:"M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M14 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-3"}]])},20300:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var r=(0,n(71301).Z)("list","IconList",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]])},52796:function(t,e,n){t.exports=n(10643)},13264:function(t){"use strict";var e=!!("undefined"!=typeof window&&window.document&&window.document.createElement),n={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:e&&!!(window.addEventListener||window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};t.exports=n},84518:function(t){var e,n,r,i,o,s,l,a,c,u,h,d,p,f,m,g=!1;function y(){if(!g){g=!0;var t=navigator.userAgent,y=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Ice
1weasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),v=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(d=/\b(iPhone|iP[ao]d)/.exec(t),p=/\b(iP[ao]d)/.exec(t),u=/Android/i.exec(t),f=/FBAN\/\w+;/i.exec(t),m=/Mobile/i.exec(t),h=!!/Win64/.exec(t),y){(e=y[1]?parseFloat(y[1]):y[5]?parseFloat(y[5]):NaN)&&document&&document.documentMode&&(e=document.documentMode);var x=/(?:Trident\/(\d+.\d+))/.exec(t);s=x?parseFloat(x[1])+4:e,n=y[2]?parseFloat(y[2]):NaN,r=y[3]?parseFloat(y[3]):NaN,o=(i=y[4]?parseFloat(y[4]):NaN)&&(y=/(?:Chrome\/(\d+\.\d+))/.exec(t))&&y[1]?parseFloat(y[1]):NaN}else e=n=r=o=i=NaN;if(v){if(v[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);l=!b||parseFloat(b[1].replace("_","."))}else l=!1;a=!!v[2],c=!!v[3]}else l=a=c=!1}}var v={ie:function(){return y()||e},ieCompatibilityMode:function(){return y()||s>e},ie64:function(){return v.ie()&&h},firefox:function(){return y()||n},opera:function(){return y()||r},webkit:function(){return y()||i},safari:function(){return v.webkit()},chrome:function(){return y()||o},windows:function(){return y()||a},osx:function(){return y()||l},linux:function(){return y()||c},iphone:function(){return y()||d},mobile:function(){return y()||d||p||u||m},nativeApp:function(){return y()||f},android:function(){return y()||u},ipad:function(){return y()||p}};t.exports=v},96534:function(t,e,n){"use strict";var r,i=n(13264);i.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),t.exports=function(t,e){if(!i.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,o=n in document;if(!o){var s=document.createElement("div");s.setAttribute(n,"return;"),o="function"==typeof s[n]}return!o&&r&&"wheel"===t&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}},10643:function(t,e,n){"use strict";var r=n(84518),i=n(96534);function o(t){var e=0,n=0,r=0,i=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),r=10*e,i=10*n,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||i)&&t.deltaMode&&(1==t.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!e&&(e=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:i}}o.getEventType=function(){return r.firefox()?"DOMMouseScroll":i("wheel")?"wheel":"mousewheel"},t.exports=o},83913:function(t,e,n){"use strict";n.d(e,{ZP:function(){return v}});var r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},o=n(67294),s=n(52796),l=n.n(s);function a(t,e,n,r,i){void 0===i&&(i=0);var o=m(e.width,e.height,i),s=o.width,l=o.height;return{x:c(t.x,s,n.width,r),y:c(t.y,l,n.height,r)}}function c(t,e,n,r){var i=e*r/2-n/2;return g(t,-i,i)}function u(t,e){return Math.sqrt(Math.pow(t.y-e.y,2)+Math.pow(t.x-e.x,2))}function h(t,e){return 180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI}function d(t,e){return Math.min(t,Math.max(0,e))}function p(t,e){return e}function f(t,e){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function m(t,e,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}function g(t,e,n){return Math.min(Math.max(t,e),n)}function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter(function(t){return"string"==typeof t&&t.length>0}).join(" ").trim()}var v=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.imageRef=o.createRef(),n.videoRef=o.createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var t=!0;n.resizeObserver=new window.ResizeObserver(function(e){if(t){t=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(t){return t.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var t=n.computeSizes();t&&(n.emitCropData(),n.setInitialCrop(t)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(t){if(n.props.initialCroppedAreaPercentages){var e,r,i,o,s,l,a,c=(e=n.props.initialCroppedAreaPercentages,r=n.mediaSize,i=n.props.rotation,o=n.props.minZoom,s=n.props.maxZoom,l=m(r.
1width,r.height,i),{crop:{x:(a=g(t.width/l.width*(100/e.width),o,s))*l.width/2-t.width/2-l.width*a*(e.x/100),y:a*l.height/2-t.height/2-l.height*a*(e.y/100)},zoom:a}),u=c.crop,h=c.zoom;n.props.onCropChange(u),n.props.onZoomChange&&n.props.onZoomChange(h)}else if(n.props.initialCroppedAreaPixels){var d,p,f,y,v,x,b,k,w,S=(d=n.props.initialCroppedAreaPixels,p=n.mediaSize,f=n.props.rotation,y=n.props.minZoom,v=n.props.maxZoom,void 0===f&&(f=0),x=m(p.naturalWidth,p.naturalHeight,f),k=g((b=p.width>p.height?p.width/p.naturalWidth:p.height/p.naturalHeight,t.height>t.width?t.height/(d.height*b):t.width/(d.width*b)),y,v),w=t.height>t.width?t.height/d.height:t.width/d.width,{crop:{x:((x.width-d.width)/2-d.x)*w,y:((x.height-d.height)/2-d.y)*w},zoom:k}),u=S.crop,h=S.zoom;n.props.onCropChange(u),n.props.onZoomChange&&n.props.onZoomChange(h)}},n.computeSizes=function(){var t,e,r,o,s,l,a=n.imageRef.current||n.videoRef.current;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var c,u,h,d,p,f,g,y,v,x,b,k=n.containerRect.width/n.containerRect.height,w=(null===(t=n.imageRef.current)||void 0===t?void 0:t.naturalWidth)||(null===(e=n.videoRef.current)||void 0===e?void 0:e.videoWidth)||0,S=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef.current)||void 0===o?void 0:o.videoHeight)||0,M=a.offsetWidth<w||a.offsetHeight<S,C=w/S,T=void 0;if(M)switch(n.props.objectFit){default:case"contain":T=k>C?{width:n.containerRect.height*C,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/C};break;case"horizontal-cover":T={width:n.containerRect.width,height:n.containerRect.width/C};break;case"vertical-cover":T={width:n.containerRect.height*C,height:n.containerRect.height};break;case"auto-cover":T=w>S?{width:n.containerRect.width,height:n.containerRect.width/C}:{width:n.containerRect.height*C,height:n.containerRect.height}}else T={width:a.offsetWidth,height:a.offsetHeight};n.mediaSize=i(i({},T),{naturalWidth:w,naturalHeight:S}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var E=n.props.cropSize?n.props.cropSize:(c=n.mediaSize.width,u=n.mediaSize.height,h=n.containerRect.width,d=n.containerRect.height,p=n.props.aspect,void 0===(f=n.props.rotation)&&(f=0),y=(g=m(c,u,f)).width,v=g.height,(x=Math.min(y,h))>(b=Math.min(v,d))*p?{width:b*p,height:b}:{width:x,height:x/p});return((null===(s=n.state.cropSize)||void 0===s?void 0:s.height)!==E.height||(null===(l=n.state.cropSize)||void 0===l?void 0:l.width)!==E.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(E),n.setState({cropSize:E},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(E),E}},n.onMouseDown=function(t){n.currentDoc&&(t.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(e.getMousePoint(t)))},n.onMouseMove=function(t){return n.onDrag(e.getMousePoint(t))},n.onTouchStart=function(t){n.currentDoc&&(n.isTouching=!0,(!n.props.onTouchRequest||n.props.onTouchRequest(t))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===t.touches.length?n.onPinchStart(t):1===t.touches.length&&n.onDragStart(e.getTouchPoint(t.touches[0]))))},n.onTouchMove=function(t){t.preventDefault(),2===t.touches.length?n.onPinchMove(t):1===t.touches.length&&n.onDrag(e.getTouchPoint(t.touches[0]))},n.onGestureStart=function(t){n.currentDoc&&(t.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(t){if(t.preventDefault(),!n.isTouching){var r=e.getMousePoint(t),i=n.gestureZoomStart-1+t.scale;if(n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var o=n.gestureRotationStart+t.rotation;n.props.onRotationChange(o)}}},n.onGestureEnd=function(t){n.cleanEvents()},n.onDragStart=function(t){var e,r,o=t.x,s=t.y;n.dragStartPosition={x:o,y:s},n.dragStartCrop=i({},n.props.crop),null===(r=(e=n.props).onInteractionStart)||void 0===r||r.call(e)},n.onDrag=function(t){var e=t.x,r=t.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&void 0!==e&&void 0!==r){var t=e-n.dragStartPosition.x,i=r-n.dragStartPosition.y,o={x:n.dragStartCrop.x+t,y:n.dragStartCrop.y+i},s=n.props.restrictPosition?a(o,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):o;n.props.onCropChange(s)}}))},n.onDragStopped=function(){var t,e;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(e=(t=n.props).onInteractionEnd)||void 0===e||e.call(t)},n.onWheel=function(t){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(t))){t.preventDefault();var r=e.getMousePoint(t),i=l()(t).pixelY,o=n.props.zoom-i*n.props.zoomSpeed/200;n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var t,e;return null===(e=(t=n.props).onInteractionStart)||void 0===e?void 0:e.call(t)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var t,e;return null===(e=(t=n.props).onInteractionEnd)||void 0===e?void 0:e.call(t)})},250)}},n.getPointOnContainer=function(t){var e=t.x,r=t.y;if(!n.containerRect)throw Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(e-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(t){var e=t.x,r=t.y,i=n.props,o=i.crop,s=i.zoom;return{x:(e+o.x)/s,y:(r+o.y)/s}},n.setNewZoom=function(t,e,r){var i=(void 0===r?{}:r).shouldUpdatePosition;if(n.state.cropSize&&n.props.onZoomChange){var o=g(t,n.props.minZoom,n.props.maxZoom);if(void 0===i||i){var s=n.getPointOnContainer(e),l=n.getPointOnMedia(s),c={x:l.x*o-s.x,y:l.y*o-s.y},u=n.props.restrictPosition?a(c,n.mediaSize,n.state.cropSize,o,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(o)}},n.getCropData=function(){var t,e,r,o,s,l,c,u,h,f,g,y,v,x,b;return n.state.cropSize?(t=n.props.restrictPosition?a(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,e=n.mediaSize,r=n.state.cropSize,o=n.getAspect(),s=n.props.zoom,l=n.props.rotation,c=n.props.restrictPosition,void 0===l&&(l=0),void 0===c&&(c=!0),u=c?d:p,h=m(e.width,e.height,l),f=m(e.n
1aturalWidth,e.naturalHeight,l),g={x:u(100,((h.width-r.width/s)/2-t.x/s)/h.width*100),y:u(100,((h.height-r.height/s)/2-t.y/s)/h.height*100),width:u(100,r.width/h.width*100/s),height:u(100,r.height/h.height*100/s)},y=Math.round(u(f.width,g.width*f.width/100)),v=Math.round(u(f.height,g.height*f.height/100)),x=f.width>=f.height*o?{width:Math.round(v*o),height:v}:{width:y,height:Math.round(y/o)},b=i(i({},x),{x:Math.round(u(f.width-x.width,g.x*f.width/100)),y:Math.round(u(f.height-x.height,g.y*f.height/100))}),{croppedAreaPercentages:g,croppedAreaPixels:b}):null},n.emitCropData=function(){var t=n.getCropData();if(t){var e=t.croppedAreaPercentages,r=t.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(e,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(e,r)}},n.emitCropAreaChange=function(){var t=n.getCropData();if(t){var e=t.croppedAreaPercentages,r=t.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(e,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var t=n.props.restrictPosition?a(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(t),n.emitCropData()}},n}return!function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  overflow: hidden;\n  user-select: none;\n  touch-action: none;\n  cursor: move;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n  max-width: 100%;\n  max-height: 100%;\n  margin: auto;\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n  width: 100%;\n  height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n  width: auto;\n  height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  transform: translate(-50%, -50%);\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  box-sizing: border-box;\n  box-shadow: 0 0 0 9999em;\n  color: rgba(0, 0, 0, 0.5);\n  overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n  border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 0;\n  bottom: 0;\n  left: 33.33%;\n  right: 33.33%;\n  border-top: 0;\n  border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 33.33%;\n  bottom: 33.33%;\n  left: 0;\n  right: 0;\n  border-left: 0;\n  border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},e.prototype.componentWillUnmount=function(){var t,e;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},e.prototype.componentDidUpdate=function(t){var e,n,r,i,o,s,l,a,c;t.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):t.aspect!==this.props.aspect?this.computeSizes():t.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(e=t.cropSize)||void 0===e?void 0:e.he
1ight)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=t.cropSize)||void 0===r?void 0:r.width)!==(null===(i=this.props.cropSize)||void 0===i?void 0:i.width)?this.computeSizes():((null===(o=t.crop)||void 0===o?void 0:o.x)!==(null===(s=this.props.crop)||void 0===s?void 0:s.x)||(null===(l=t.crop)||void 0===l?void 0:l.y)!==(null===(a=this.props.crop)||void 0===a?void 0:a.y))&&this.emitCropAreaChange(),t.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),t.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},e.prototype.getAspect=function(){var t=this.props,e=t.cropSize,n=t.aspect;return e?e.width/e.height:n},e.prototype.onPinchStart=function(t){var n=e.getTouchPoint(t.touches[0]),r=e.getTouchPoint(t.touches[1]);this.lastPinchDistance=u(n,r),this.lastPinchRotation=h(n,r),this.onDragStart(f(n,r))},e.prototype.onPinchMove=function(t){var n=this;if(this.currentDoc&&this.currentWindow){var r=e.getTouchPoint(t.touches[0]),i=e.getTouchPoint(t.touches[1]),o=f(r,i);this.onDrag(o),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var t=u(r,i),e=n.props.zoom*(t/n.lastPinchDistance);n.setNewZoom(e,o,{shouldUpdatePosition:!1}),n.lastPinchDistance=t;var s=h(r,i),l=n.props.rotation+(s-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(l),n.lastPinchRotation=s})}},e.prototype.render=function(){var t=this,e=this.props,n=e.image,r=e.video,s=e.mediaProps,l=e.transform,a=e.crop,c=a.x,u=a.y,h=e.rotation,d=e.zoom,p=e.cropShape,f=e.showGrid,m=e.style,g=m.containerStyle,v=m.cropAreaStyle,x=m.mediaStyle,b=e.classes,k=b.containerClassName,w=b.cropAreaClassName,S=b.mediaClassName,M=e.objectFit;return o.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef=e},"data-testid":"container",style:g,className:y("reactEasyCrop_Container",k)},n?o.createElement("img",i({alt:"",className:y("reactEasyCrop_Image","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical","auto-cover"===M&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),S)},s,{src:n,ref:this.imageRef,style:i(i({},x),{transform:l||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(h,"deg) scale(").concat(d,")")}),onLoad:this.onMediaLoad})):r&&o.createElement("video",i({autoPlay:!0,loop:!0,muted:!0,className:y("reactEasyCrop_Video","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical","auto-cover"===M&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),S)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:i(i({},x),{transform:l||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(h,"deg) scale(").concat(d,")")}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map(function(t){return o.createElement("source",i({key:t.src},t))})),this.state.cropSize&&o.createElement("div",{style:i(i({},v),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:y("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",f&&"reactEasyCrop_CropAreaGrid",w)}))},e.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},e.getMousePoint=function(t){return{x:Number(t.clientX),y:Number(t.clientY)}},e.getTouchPoint=function(t){return{x:Number(t.clientX),y:Number(t.clientY)}},e}(o.Component)},60303:function(t,e,n){var r;r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e){var n,r,i,o=t.exports={};function s(){throw Error("setTimeout has not been defined")}function l(){throw Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}
1catch(t){n=s}try{r="function"==typeof clearTimeout?clearTimeout:l}catch(t){r=l}}();var c=[],u=!1,h=-1;function d(){u&&i&&(u=!1,i.length?c=i.concat(c):h=-1,c.length&&p())}function p(){if(!u){var t=a(d);u=!0;for(var e=c.length;e;){for(i=c,c=[];++h<e;)i&&i[h].run();h=-1,e=c.length}i=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},function(t,e,n){"use strict";(function(e){var n=function(t){};"production"!==e.env.NODE_ENV&&(n=function(t){if(void 0===t)throw Error("invariant requires an error message argument")}),t.exports=function(t,e,r,i,o,s,l,a){if(n(e),!t){var c;if(void 0===e)c=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,i,o,s,l,a],h=0;(c=Error(e.replace(/%s/g,function(){return u[h++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=((r=n(4))&&r.__esModule?r:{default:r}).default.createContext({registerPane:function(){},unregisterPane:function(){}});e.default=i,t.exports=e.default},function(t,e,n){"use strict";(function(e){var r,i=n(1);"production"!==e.env.NODE_ENV&&(r=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+t.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(o);try{throw Error(o)}catch(t){}},i=function(t,e){if(void 0===e)throw Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==e.indexOf("Failed Composite propType: ")&&!t){for(var n=arguments.length,i=Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];r.apply(void 0,[e].concat(i))}}),t.exports=i}).call(e,n(0))},function(t,e,n){(function(e){if("production"!==e.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=n(13)(function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},!0)}else t.exports=n(12)()}).call(e,n(0))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(4),o=a(i),s=a(n(7)),l=a(n(5));function a(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&("object"==typeof e||"function"==typeof e)?e:t}var u=function(t){function e(){!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,e);for(var t,n,r,i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=c(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(o))),r.panes={}
vendor: 4,973 bytes, line 1
1,r.registerPane=function(t,e){e.forEach(function(e){r.panes[e]||(r.panes[e]=[]),r.findPane(t,e)||(r.panes[e].length>0&&r.syncScrollPosition(r.panes[e][0],t),r.panes[e].push(t))}),r.addEvents(t,e)},r.unregisterPane=function(t,e){e.forEach(function(e){r.findPane(t,e)&&(r.removeEvents(t),r.panes[e].splice(r.panes[e].indexOf(t),1))})},r.addEvents=function(t,e){t.onscroll=r.handlePaneScroll.bind(r,t,e)},r.removeEvents=function(t){t.onscroll=null},r.findPane=function(t,e){return!!r.panes[e]&&r.panes[e].find(function(e){return e===t})},r.handlePaneScroll=function(t,e){r.props.enabled&&window.requestAnimationFrame(function(){r.syncScrollPositions(t,e)})},r.syncScrollPositions=function(t,e){e.forEach(function(n){r.panes[n].forEach(function(i){t!==i&&(r.removeEvents(i,n),r.syncScrollPosition(t,i),window.requestAnimationFrame(function(){r.addEvents(i,e)}))})}),r.props.onSync&&r.props.onSync(t)},c(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"getContextValue",value:function(){return{registerPane:this.registerPane,unregisterPane:this.unregisterPane}}},{key:"syncScrollPosition",value:function(t,e){var n=t.scrollTop,r=t.scrollHeight,i=t.clientHeight,o=t.scrollLeft,s=t.scrollWidth,l=t.clientWidth,a=r-i,c=s-l,u=this.props,h=u.proportional,d=u.vertical,p=u.horizontal,f=e.scrollHeight-i,m=e.scrollWidth-l;d&&a>0&&(e.scrollTop=h?f*n/a:n),p&&c>0&&(e.scrollLeft=h?m*o/c:o)}},{key:"render",value:function(){return o.default.createElement(l.default.Provider,{value:this.getContextValue()},o.default.Children.only(this.props.children))}}]),e}(i.Component);u.propTypes={onSync:s.default.func,children:s.default.element.isRequired,proportional:s.default.bool,vertical:s.default.bool,horizontal:s.default.bool,enabled:s.default.bool},u.defaultProps={proportional:!0,vertical:!0,horizontal:!0,enabled:!0},e.default=u,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(4),o=l(n(7)),s=l(n(5));function l(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&("object"==typeof e||"function"==typeof e)?e:t}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.toArray=function(t){return[].concat(t)},n.updateNode=function(){n.props.attachTo?n.node=n.props.attachTo.current:n.node=n.childRef.current},n.childRef=t.innerRef?t.innerRef:(0,i.createRef)(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"componentDidMount",value:function(){this.props.enabled&&(this.updateNode(),this.node&&this.context.registerPane(this.node,this.toArray(this.props.group)))}},{key:"componentDidUpdate",value:function(t){this.props.attachTo!==t.attachTo&&(this.node&&this.context.unregisterPane(this.node,this.toArray(t.group)),this.updateNode(),this.node&&this.context.registerPane(this.node,this.toArray(t.group))),this.node&&this.props.enabled!==t.enabled&&(this.props.enabled?this.context.registerPane(this.node,this.toArray(t.group)):this.context.unregisterPane(this.node,this.toArray(t.group))),this.node&&this.props.enabled&&this.props.group!==t.group&&(this.context.unregisterPane(this.node,this.toArray(t.group)),this.context.registerPane(this.node,this.toArray(this.props.group)))}},{key:"componentWillUnmount",value:function(){this.node&&this.props.enabled&&this.context.unregisterPane(this.node,this.toArray(this.props.group))}},{key:"render",value:function(){return this.props.attachTo?this.props.children:(0,i.cloneElement)(i.Children.only(this.props.children),{ref:this.childRef})}}]),e}(i.Component);a.contextType=s.default,a.propTypes={children:o.default.node.isRequired,attachTo:o.default.oneOfType([o.default.func,o.default.shape({current:o.default.any})]),group:o.default.oneOfType([o.default.string,o.default.arrayOf(o.default.string)]),enabled:o.default.bool,innerRef:o.default.oneOfType([o.default.func,o.default.shape({current:o.default.any})])},a.defaultProps={group:"default",enabled:!0},e.default=a,t.exports=e.default},function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0});var r=n(8);Object.defineProperty(e,"ScrollSync",{enumerable:!0,get:function(){return o(r).default}});var i=n(9);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"ScrollSyncPane",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,n){"use strict";(function(e){if("production"!==e.env.NODE_ENV)var r=n(2),i=n(6),o=n(3),s={};t.exports=function(t,n,l,a,c){if("production"!==e.env.NODE_ENV){for(var u in t)if(t.hasOwnProperty(u)){var h;try{r("function"==typeof t[u],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",a||"React class",l,u),h=t[u](n,u,a,l,null,o)}catch(t){h=t}if(i(!h||h instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",l,u,typeof h),h instanceof Error&&!(h.message in s)){s[h.message]=!0;var d=c?c():"";i(!1,"Failed %s type: %s%s",l,h.message,null!=d?d:"")}}}}}).call(e,n(0))},function(t,e,n){"use strict";var r=n(1),i=n(2),o=n(3);t.exports=function(){function t(t,e,n,r,s,l){l!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e,n){"use strict";(function(e){var r=n(1),i=n(2),o=n(6),s=n(3),l=n(11);t.exports=function(t,n){var a="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",u={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:d(r.thatReturnsNull),arrayOf:function(t){return d(function(e,n,r,i,o){if("function"!=typeof t)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var l=e[n];if(!Array.isArray(l))return new h("Invalid "+i+" `"+o+"` of type "+("`"+f(l))+"` supplied to `"+r+"`, expected an array.");for(var a=0;a<l.length;a++){var c=t(l,a,r,i,o+"["+a+"]",s);if(c instanceof Error)return c}return null})},element:d(function(e,n,r,i,o){var s=e[n];return t(s)?null:new h("Invalid "+i+" `"+o+"` of type "+("`"+f(s))+"` supplied to `"+r+"`, expected a single ReactElement.")}),instanceOf:function(t){return d(function(e,n,r,i,o){if(!(e[n]instanceof t)){var s,l=t.name||c;return new h("Invalid "+i+" `"+o+"` of type "+("`"+((s=e[n]).constructor&&s.constructor.name?s.constructor.name:c))+"` supplied to `"+r+"`, expected instance of `"+l+"`.")}return null})},node:d(function(e,n,r,i,o){return!function e(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(e);if(null===n||t(n))return!0;var r=function(t){var e=t&&(a&&t[a]||t["@@iterator"]);if("function"==typeof e)return e}(n);if(!r)return!1;var i,o=r.call(n);if(r!==n.entries){for(;!(i=o.next()).done;)if(!e(i.value))return!1}else for(;!(i=o.next()).done;){var s=i.value;if(s&&!e(s[1]))return!1}return!0;default:return!1}}(e[n])?new h("Invalid "+i+" `"+o+"` supplied to `"+r+"`, expected a ReactNode."):null}),objectOf:function(t){return d(function(e,n,r,i,o){if("function"!=typeof t)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=e[n],a=f(l);if("object"!==a)return new h("Invalid "+i+" `"+o+"` of type "+("`"+a)+"` supplied to `"+r+"`, expected an object.");for(var c in l)if(l.hasOwnProperty(c)){var u=t(l,c,r,i,o+"."+c,s);if(u instanceof Error)return u}return null})},oneOf:function(t){return Array.isArray(t)?d(function(e,n,r,i,o){for(var s,l=e[n],a=0;a<t.length;a++)if(l===(s=t[a])?0!==l||1/l==1/s:l!=l&&s!=s)return null;return new h("Invalid "+i+" `"+o+"` of value `"+l+"` "+("supplied to `"+r)+"`, expected one of "+JSON.stringify(t)+".")}):("production"!==e.env.NODE_ENV&&o(!1,"Invalid argument supplied to oneOf, expected an instance of array."),r.thatReturnsNull)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==e.env.NODE_ENV&&o(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),r.thatReturnsNull;for(var n=0;n<t.length;n++){var i=t[n];if("function"!=typeof i)return o(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",function(t){var e=m(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}(i),n),r.thatReturnsNull}return d(function(e,n,r,i,o){for(var l=0;l<t.length;l++)if(null==(0,t[l])(e,n,r,i,o,s))return null;return new h("Invalid "+i+" `"+o+"` supplied to `"+r+"`.")})},shape:function(t){return d(function(e,n,r,i,o){var l=e[n],a=f(l);if("object"!==a)return new h("Invalid "+i+" `"+o+"` of type `"+a+"` supplied to `"+r+"`, expected `object`.");for(var c in t){var u=t[c];if(u){var d=u(l,c,r,i,o+"."+c,s);if(d)return d}}return null})}};function h(t){this.message=t,this.stack=""}
1function d(t){if("production"!==e.env.NODE_ENV)var r={},l=0;function a(a,u,d,p,f,m,g){if(p=p||c,m=m||d,g!==s){if(n)i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==e.env.NODE_ENV&&"undefined"!=typeof console){var y=p+":"+d;!r[y]&&l<3&&(o(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",m,p),r[y]=!0,l++)}}return null!=u[d]?t(u,d,p,f,m):a?new h(null===u[d]?"The "+f+" `"+m+"` is marked as required in `"+p+"`, but its value is `null`.":"The "+f+" `"+m+"` is marked as required in `"+p+"`, but its value is `undefined`."):null}var u=a.bind(null,!1);return u.isRequired=a.bind(null,!0),u}function p(t){return d(function(e,n,r,i,o,s){var l=e[n];return f(l)!==t?new h("Invalid "+i+" `"+o+"` of type "+("`"+m(l))+"` supplied to `"+r+"`, expected `"+t+"`."):null})}function f(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol?"symbol":e}function m(t){if(null==t)return""+t;var e=f(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}return h.prototype=Error.prototype,u.checkPropTypes=l,u.PropTypes=u,u}}).call(e,n(0))}])},t.exports=r(n(67294))},64829:function(t,e,n){"use strict";function r(t){return e=>{try{return t.validateSync(e,{abortEarly:!1}),{}}catch(e){let t={};return e.inner.forEach(e=>{t[e.path.replaceAll("[",".").replaceAll("]","")]=e.message}),t}}}n.d(e,{X:function(){return r}})},53907:function(t,e,n){"use strict";n.d(e,{c:function(){return i}});var r=n(67294);function i(t,e,n={leading:!1}){let[i,o]=(0,r.useState)(t),s=(0,r.useRef)(!1),l=(0,r.useRef)(null),a=(0,r.useRef)(!1),c=()=>window.clearTimeout(l.current);return(0,r.useEffect)(()=>{s.current&&(!a.current&&n.leading?(a.current=!0,o(t)):(c(),l.current=window.setTimeout(()=>{a.current=!1,o(t)},e)))},[t,n.leading,e]),(0,r.useEffect)(()=>(s.current=!0,c),[]),[i,c]}},27111:function(t,e,n){"use strict";n.d(e,{L:function(){return t8}});var r=n(85893),i=n(67294),o=n(9535),s=n(90987),l=n(43806),a=n(99809);let c={linkControlLabel:"Link",colorPickerControlLabel:"Text color",highlightControlLabel:"Highlight text",colorControlLabel:t=>`Set text color ${t}`,boldControlLabel:"Bold",italicControlLabel:"Italic",underlineControlLabel:"Underline",strikeControlLabel:"Strikethrough",clearFormattingControlLabel:"Clear formatting",unlinkControlLabel:"Remove link",bulletListControlLabel:"Bullet list",orderedListControlLabel:"Ordered list",h1ControlLabel:"Heading 1",h2ControlLabel:"Heading 2",h3ControlLabel:"Heading 3",h4ControlLabel:"Heading 4",h5ControlLabel:"Heading 5",h6ControlLabel:"Heading 6",blockquoteControlLabel:"Blockquote",alignLeftControlLabel:"Align text: left",alignCenterControlLabel:"Align text: center",alignRightControlLabel:"Align text: right",alignJustifyControlLabel:"Align text: justify",codeControlLabel:"Code",codeBlockControlLabel:"Code block",subscriptControlLabel:"Subscript",superscriptControlLabel:"Superscript",unsetColorControlLabel:"Unset color",hrControlLabel:"Horizontal line",undoControlLabel:"Undo",redoControlLabel:"Redo",tasksControlLabel:"Task list",tasksSinkLabel:"Decrease task level",tasksLiftLabel:"Increase task level",linkEditorInputLabel:"Enter URL",linkEditorInputPlaceholder:"https://example.com/",linkEditorExternalLink:"Open link in a new tab",linkEditorInternalLink:"Open link in the same tab",linkEditorSave:"Save",colorPickerCancel:"Cancel",colorPickerClear:"Clear color",colorPickerColorPicker:"Color picker",colorPickerPalette:"Color palette",colorPickerSave:"Save",colorPickerColorLabel:t=>`Set text color ${t}`},[u,h]=(0,n(70679).R)("RichTextEditor component was not found in tree");var d=n(71284),p=n(49746),f={root:"m_dd3f7539",typographyStylesProvider:"m_d37966d9",content:"m_c2204cc2",linkEditorDropdown:"m_8a991b4f",control:"m_c2207da6",controlsGroup:"m_2ab47ef2",linkEditor:"m_b67b711e",linkEditorInput:"m_296cf94c",linkEditorExternalControl:"m_cfef614",linkEditorSave:"m_3b28e7bb",toolbar:"m_4574a3c4",taskList:"m_8b44009a"};let m={},g=(0,o.d5)((t,e)=>{let{classNames:n,className:i,style:o,styles:l,vars:c,...u}=(0,s.w)("RichTextEditorContent",m,t),f=h();return f.withTypographyStyles?(0,r.jsx)(p.l,{...f.getStyles("typographyStylesProvider",{className:i,style:o,styles:l,classNames:n}
1),unstyled:f.unstyled,ref:e,children:(0,r.jsx)(a.x,{component:d.kg,editor:f.editor,...f.getStyles("content",{classNames:n,styles:l}),...u})}):(0,r.jsx)(a.x,{component:d.kg,editor:f.editor,...f.getStyles("content",{classNames:n,styles:l,className:i,style:o}),...u})});function y(t){return(0,r.jsx)("svg",{...t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}function v(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z"}),(0,r.jsx)("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"})]})}function x(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M11 5l6 0"}),(0,r.jsx)("path",{d:"M7 19l6 0"}),(0,r.jsx)("path",{d:"M14 5l-4 14"})]})}function b(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M7 5v5a5 5 0 0 0 10 0v-5"}),(0,r.jsx)("path",{d:"M5 19h14"})]})}function k(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 12l14 0"}),(0,r.jsx)("path",{d:"M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5"})]})}function w(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M17 15l4 4m0 -4l-4 4"}),(0,r.jsx)("path",{d:"M7 6v-1h11v1"}),(0,r.jsx)("path",{d:"M7 19l4 0"}),(0,r.jsx)("path",{d:"M13 5l-4 14"})]})}function S(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M19 18v-8l-2 2"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function M(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function C(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M19 14a2 2 0 1 0 -2 -2"}),(0,r.jsx)("path",{d:"M17 16a2 2 0 1 0 2 -2"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function T(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M20 18v-8l-4 6h5"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function E(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function R(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z"}),(0,r.jsx)("path",{d:"M21 12a2 2 0 1 0 -4 0v4"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function A(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M9 6l11 0"}),(0,r.jsx)("path",{d:"M9 12l11 0"}),(0,r.jsx)("path",{d:"M9 18l11 0"}),(0,r.jsx)("path",{d:"M5 6l0 .01"}),(0,r.jsx)("path",{d:"M5 12l0 .01"}),(0,r.jsx)("path",{d:"M5 18l0 .01"})]})}function I(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M11 6h9"}),(0,r.jsx)("path",{d:"M11 12h9"}),(0,r.jsx)("path",{d:"M12 18h8"}),(0,r.jsx)("path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4"}),(0,r.jsx)("path",{d:"M6 10v-6l-2 2"})]})}function O(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M17 22v-2"}),(0,r.jsx)("path",{d:"M9 15l6 -6"}),(0,r.jsx)("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),(0,r.jsx)("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"}),(0,r.jsx)("path",{d:"M20 17h2"}),(0,r.jsx)("path",{d:"M2 7h2"}),(0,r.jsx)("path",{d:"M7 2v2"})]})}function j(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M6 15h15"}),(0,r.jsx)("path",{d:"M21 19h-15"}),(0,r.jsx)("path",{d:"M15 11h6"}),(0,r.jsx)("path",{d:"M21 7h-6"}),(0,r.jsx)("path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"}),(0,r.jsx)("path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"})]})}function L(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M4 6l16 0"}),(0,r.jsx)("path",{d:"M4 12l10 0"}),(0,r.jsx)("path",{d:"M4 18l14 0"})]})}function z(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M4 6l16 0"}),(0,r.jsx)("path",{d:"M10 12l10 0"}),(0,r.jsx)("path",{d:"M6 18l14 0"})]})}function P(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M4 6l16 0"}),(0,r.jsx)("path",{d:"M8 12l8 0"}),(0,r.jsx)("path",{d:"M6 18l12 0"})]})}function H(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M4 6l16 0"}),(0,r.jsx)("path",{d:"M4 12l16 0"}),(0,r.jsx)("path",{d:"M4 18l12 0"})]})}function N(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 7l8 10m-8 0l8 -10"}),(0,r.jsx)("path",{d:"M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function _(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 7l8 10m-8 0l8 -10"}),(0,r.jsx)("path",{d:"M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function D(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M7 8l-4 4l4 4"}),(0,r.jsx)("path",{d:"M17 8l4 4l-4 4"}),(0,r.jsx)("path",{d:"M14 4l-4 16"})]})}function B(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),(0,r.jsx)("path",{d:"M12.5 5.5l4 4"}),(0,r.jsx)("path",{d:"M4.5 13.5l4 4"}),(0,r.jsx)("path",{d:"M21 15v4h-8l4 -4z"})]})}function F(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 12h2"}),(0,r.jsx)("path",{d:"M17 12h2"}),(0,r.jsx)("path",{d:"M11 12h2"})]})}function $(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"}),(0,r.jsx)("path",{d:"M3 3l18 18"})]})}function W(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M11 7l6 6"}),(0,r.jsx)("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]})}function J(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M18 6l-12 12"}),(0,r.jsx)("path",{d:"M6 6l12 12"})]})}function q(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25"}),(0,r.jsx)("path",{d:"M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,r.jsx)("path",{d:"M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,r.jsx)("path",{d:"M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function V(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 12l5 5l10 -10"})]})}function U(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M9 15l6 -6"}),(0,r.jsx)("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),(0,r.jsx)("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"})]})}function K(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6"}),(0,r.jsx)("path",{d:"M11 13l9 -9"}),(0,r.jsx)("path",{d:"M15 4h5v5"})]})}function Y(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M9 14l-4 -4l4 -4"}),(0,r.jsx)("path",{d:"M5 10h11a4 4 0 1 1 0 8h-1"})]})}function G(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M15 14l4 -4l-4 -4"}),(0,r.jsx)("path",{d:"M19 10h-11a4 4 0 1 0 0 8h1"})]})}function Z(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5"}),(0,r.jsx)("path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5"}),(0,r.jsx)("path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5"}),(0,r.jsx)("path",{d:"M11 6l9 0"}),(0,r.jsx)("path",{d:"M11 12l9 0"}),(0,r.jsx)("path",{d:"M11 18l9 0"})]})}function X(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M20 6l-11 0"}),(0,r.jsx)("path",{d:"M20 12l-7 0"}),(0,r.jsx)("path",{d:"M20 18l-11 0"}),(0,r.jsx)("path",{d:"M4 8l4 4l-4 4"})]})}function Q(t){return(0,r.jsxs)(y,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M20 6l-7 0"}),(0,r.jsx)("path",{d:"M20 12l-9 0"}),(0,r.jsx)("path",{d:"M20 18l-7 0"}),(0,r.jsx)("path",{d:"M8 8l-4 4l4 4"})]})}g.classes=f,g.displayName="@mantine/tiptap/RichTextEditorContent";var tt=n(91166),te=n(88565);let tn={interactive:!0},tr=(0,o.d5)((t,e)=>{let{classNames:n,className:i,style:o,styles:l,vars:a,interactive:c,active:u,onMouseDown:d,disabled:p,...f}=(0,s.w)("RichTextEditorControl",tn,t),m=h();return(0,r.jsx)(tt.k,{...f,...m.getStyles("control",{className:i,style:o,classNames:n,styles:l}),disabled:p,"data-rich-text-editor-control":!0,tabIndex:c?0:-1,"data-interactive":c||void 0,"data-disabled":p||void 0,"data-active":u||void 0,"aria-pressed":u&&c||void 0,"aria-hidden":!c||void 0,ref:e,unstyled:m.unstyled,onMouseDown:t=>{t.preventDefault(),d?.(t)}})});tr.classes=f,tr.displayName="@mantine/tiptap/RichTextEditorControl";let ti=(0,i.forwardRef)(({className:t,icon:e,...n},i)=>(0,r.jsx)(tr,{ref:i,...n,children:(0,r.jsx)(e,{style:{width:(0,te.h)(16),height:(0,te.h)(16)}})}));function to({label:t,isActive:e,operation:n,icon:o,isDisabled:s}){let l=(0,i.forwardRef)((i,l)=>{let{editor:a,labels:c}=h(),u=c[t];return(0,r.jsx)(ti,{...i,"aria-label":u,title:u,active:!!e?.name&&a?.isActive(e.name,e.attributes),ref:l,onClick:()=>a?.chain().focus()[n.name](n.attributes).run(),icon:i.icon||o,disabled:s?.(a)||!1})});return l.displayName=`@mantine/tiptap/${t}`,l}ti.displayName="@mantine/tiptap/RichTextEditorControlBase";let ts=to({label:"boldControlLabel",icon:t=>(0,r.jsx)(v,{...t}),isActive:{name:"bold"},operation:{name:"toggleBold"}}
1),tl=to({label:"italicControlLabel",icon:t=>(0,r.jsx)(x,{...t}),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),ta=to({label:"underlineControlLabel",icon:t=>(0,r.jsx)(b,{...t}),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),tc=to({label:"strikeControlLabel",icon:t=>(0,r.jsx)(k,{...t}),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),tu=to({label:"clearFormattingControlLabel",icon:t=>(0,r.jsx)(w,{...t}),operation:{name:"unsetAllMarks"}}),th=to({label:"unlinkControlLabel",icon:t=>(0,r.jsx)(O,{...t}),operation:{name:"unsetLink"}}),td=to({label:"bulletListControlLabel",icon:t=>(0,r.jsx)(A,{...t}),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),tp=to({label:"orderedListControlLabel",icon:t=>(0,r.jsx)(I,{...t}),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),tf=to({label:"h1ControlLabel",icon:t=>(0,r.jsx)(S,{...t}),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),tm=to({label:"h2ControlLabel",icon:t=>(0,r.jsx)(M,{...t}),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),tg=to({label:"h3ControlLabel",icon:t=>(0,r.jsx)(C,{...t}),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),ty=to({label:"h4ControlLabel",icon:t=>(0,r.jsx)(T,{...t}),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),tv=to({label:"h5ControlLabel",icon:t=>(0,r.jsx)(E,{...t}),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),tx=to({label:"h6ControlLabel",icon:t=>(0,r.jsx)(R,{...t}),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),tb=to({label:"blockquoteControlLabel",icon:t=>(0,r.jsx)(j,{...t}),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),tk=to({label:"alignLeftControlLabel",icon:t=>(0,r.jsx)(L,{...t}),operation:{name:"setTextAlign",attributes:"left"}}),tw=to({label:"alignRightControlLabel",icon:t=>(0,r.jsx)(z,{...t}),operation:{name:"setTextAlign",attributes:"right"}}),tS=to({label:"alignCenterControlLabel",icon:t=>(0,r.jsx)(P,{...t}),operation:{name:"setTextAlign",attributes:"center"}}),tM=to({label:"alignJustifyControlLabel",icon:t=>(0,r.jsx)(H,{...t}),operation:{name:"setTextAlign",attributes:"justify"}}),tC=to({label:"subscriptControlLabel",icon:t=>(0,r.jsx)(N,{...t}),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),tT=to({label:"superscriptControlLabel",icon:t=>(0,r.jsx)(_,{...t}),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),tE=to({label:"codeControlLabel",icon:t=>(0,r.jsx)(D,{...t}),isActive:{name:"code"},operation:{name:"toggleCode"}}),tR=to({label:"codeBlockControlLabel",icon:t=>(0,r.jsx)(D,{...t}),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),tA=to({label:"highlightControlLabel",icon:t=>(0,r.jsx)(B,{...t}),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),tI=to({label:"hrControlLabel",icon:t=>(0,r.jsx)(F,{...t}),operation:{name:"setHorizontalRule"}}),tO=to({label:"unsetColorControlLabel",icon:t=>(0,r.jsx)($,{...t}),operation:{name:"unsetColor"}}),tj=to({label:"undoControlLabel",icon:t=>(0,r.jsx)(Y,{...t}),isDisabled:t=>!t?.can().undo(),operation:{name:"undo"}}),tL=to({label:"redoControlLabel",icon:t=>(0,r.jsx)(G,{...t}),isDisabled:t=>!t?.can().redo(),operation:{name:"redo"}}),tz=to({label:"tasksControlLabel",icon:t=>(0,r.jsx)(Z,{...t}),isActive:{name:"taskList"},operation:{name:"toggleTaskList"}}),tP=to({label:"tasksSinkLabel",icon:t=>(0,r.jsx)(X,{...t}),operation:{name:"sinkListItem",attributes:"taskItem"},isDisabled:t=>!t?.can().sinkListItem("taskItem")}),tH=to({label:"tasksLiftLabel",icon:t=>(0,r.jsx)(Q,{...t}),operation:{name:"liftListItem",attributes:"taskItem"},isDisabled:t=>!t?.can().liftListItem("taskItem")});var tN=n(19784),t_=n(24309),tD=n(86414),tB=n(19729),tF=n(73581),t$=n(37113),tW=n(77953);let tJ=t=>(0,r.jsx)(U,{...t}),tq={},tV=(0,o.d5)((t,e)=>{let n=(0,s.w)("RichTextEditorLinkControl",tq,t),{classNames:o,className:l,style:a,styles:c,vars:u,icon:d,popoverProps:p,disableTooltips:f,initialExternal:m,...g}=n,y=h(),v={classNames:o,styles:c},[x,b]=function(t){let[e,n]=(0,i.useState)("");return[e,t=>{if(t){if("function"==typeof t)n(t);else if("object"==typeof t&&"nativeEvent"in t){let{currentTarget:e}=t;n("checkbox"===e.type?e.checked:e.value)}else n(t)}else n(t)}]}(0),[k,w]=(0,i.useState)(m),[S,{open:M,close:C}]=(0,t$.q)(!1),T=()=>{M();let t=y.editor?.getAttributes("link");b(t?.href||""),w(t?.href?t?.target==="_blank":m)},E=()=>{C(),b(""),w(m)},R=()=>{E(),""===x?y.editor?.chain().focus().extendMarkRange("link").unsetLink().run():y.editor?.chain().focus().extendMarkRange("link").setLink({href:x,target:k?"_blank":null}).run()};(0,tW.s)("edit-link",T,!1);let{resolvedClassNames:A,resolvedStyles:I}=(0,tN.h)({classNames:o,styles:c,props:n});return(0,r.jsxs)(t_.J,{trapFocus:!0,shadow:"md",withinPortal:!0,opened:S,onChange:t=>!t&&E(),offset:-44,zIndex:1e4,...p,children:[(0,r.jsx)(t_.J.Target,{children:(0,r.jsx)(ti,{icon:d||tJ,...g,"aria-label":y.labels.linkControlLabel,title:y.labels.linkControlLabel,onClick:T,active:y.editor?.isActive("link"),ref:e,classNames:A,styles:I,className:l,style:a})}),(0,r.jsx)(t_.J.Dropdown,{...y.getStyles("linkEditorDropdown",v),children:(0,r.jsxs)("div",{...y.getStyles("linkEditor",v),children:[(0,r.jsx)(tD.o,{placeholder:y.labels.linkEditorInputPlaceholder,"aria-label":y.labels.linkEditorInputLabel,type:"url",value:x,onChange:b,classNames:{input:y.getStyles("linkEditorInput",v).className},onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),R())},rightSection:(0,r.jsx)(tB.u,{label:k?y.labels.linkEditorExternalLink:y.labels.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:f,zIndex:1e4,children:(0,r.jsx)(tt.k,{onClick:()=>w(t=>!t),"data-active":k||void 0,...y.getStyles("linkEditorExternalControl",v),children:(0,r.jsx)(K,{style:{width:(0,te.h)(14),height:(0,te.h)(14)}})})})}),(0,r.jsx)(tF.z,{variant:"default",onClick:R,...y.getStyles("linkEditorSave",v),children:y.labels.linkEditorSave})]})})]})});tV.classes=f,tV.displayName="@mantine/tiptap/RichTextEditorLinkControl";var tU=n(52762),tK=n(40158),tY=n(80242),tG=n(44765),tZ=n(68269);let tX={},tQ=(0,i.forwardRef)((t,e)=>{let{popoverProps:n,colors:o,colorPickerProps:l,...a}=(0,s.w)("RichTextEditorColorPickerControl",tX,t),{editor:c,labels:u,getStyles:d}=h(),[p,{toggle:f,close:m}]=(0,t$.q)(!1),[g,y]=(0,i.useState)("palette"),v=c?.getAttributes("textStyle").color||"var(--mantine-color-text)",x=(t,e=!0)=>{(c?.chain()).focus().setColor(t).run(),e&&m()},b=o.map((t,e)=>(0,r.jsx)(tU.b,{component:"button",color:t,onClick:()=>x(t),size:26,radius:"xs",style:{cursor:"pointer"},title:u.colorPickerColorLabel(t),"aria-label":u.colorPickerColorLabel(t)},e));return(0,r.jsxs)(t_.J,{opened:p,withinPortal:!0,trapFocus:!0,onChange:t=>!t&&m(),...n,children:[(0,r.jsx)(t_.J.Target,{children:(0,r.jsx)(tr,{...a,"aria-label":u.colorPickerControlLabel,title:u.colorPickerControlLabel,ref:e,onClick:f,children:(0,r.jsx)(tU.b,{color:v,size:14})})}),(0,r.jsxs)(t_.J.Dropdown,{...d("linkEditorDropdown"),children:["palette"===g&&(0,r.jsx)(tK.M,{cols:7,spacing:2,children:b}
1),"colorPicker"===g&&(0,r.jsx)(tY.z,{defaultValue:v,onChange:t=>x(t,!1),...l}),(0,r.jsx)(tB.u.Group,{closeDelay:200,children:(0,r.jsxs)(tG.Z,{justify:"flex-end",gap:"xs",mt:"sm",children:["palette"===g&&(0,r.jsx)(tZ.A,{variant:"default",onClick:m,title:u.colorPickerCancel,"aria-label":u.colorPickerCancel,children:(0,r.jsx)(J,{style:{width:(0,te.h)(16),height:(0,te.h)(16)}})}),(0,r.jsx)(tZ.A,{variant:"default",onClick:()=>{(c?.chain()).focus().unsetColor().run(),m()},title:u.colorPickerClear,"aria-label":u.colorPickerClear,children:(0,r.jsx)($,{style:{width:(0,te.h)(16),height:(0,te.h)(16)}})}),"palette"===g?(0,r.jsx)(tZ.A,{variant:"default",onClick:()=>y("colorPicker"),title:u.colorPickerColorPicker,"aria-label":u.colorPickerColorPicker,children:(0,r.jsx)(W,{style:{width:(0,te.h)(16),height:(0,te.h)(16)}})}):(0,r.jsx)(tZ.A,{variant:"default",onClick:()=>y("palette"),"aria-label":u.colorPickerPalette,title:u.colorPickerPalette,children:(0,r.jsx)(q,{style:{width:(0,te.h)(16),height:(0,te.h)(16)}})}),"colorPicker"===g&&(0,r.jsx)(tZ.A,{variant:"default",onClick:m,title:u.colorPickerSave,"aria-label":u.colorPickerSave,children:(0,r.jsx)(V,{style:{width:(0,te.h)(16),height:(0,te.h)(16)}})})]})})]})]})});tQ.displayName="@mantine/tiptap/ColorPickerControl";let t0={},t1=(0,i.forwardRef)((t,e)=>{let{color:n,...i}=(0,s.w)("RichTextEditorColorControl",t0,t),{editor:o,labels:l}=h(),a=o?.getAttributes("textStyle").color||null,c=l.colorControlLabel(n);return(0,r.jsx)(tr,{...i,active:a===n,"aria-label":c,title:c,onClick:()=>(o?.chain()).focus().setColor(n).run(),ref:e,children:(0,r.jsx)(tU.b,{color:n,size:14})})});t1.displayName="@mantine/tiptap/RichTextEditorColorControl";let t2={},t4=(0,o.d5)((t,e)=>{let{classNames:n,className:i,style:o,styles:l,vars:c,...u}=(0,s.w)("RichTextEditorControlsGroup",t2,t),d=h();return(0,r.jsx)(a.x,{ref:e,...d.getStyles("controlsGroup",{className:i,style:o,styles:l,classNames:n}),...u})});t4.classes=f,t4.displayName="@mantine/tiptap/RichTextEditorControlsGroup";let t3={},t5=(0,o.d5)((t,e)=>{let{classNames:n,className:i,style:o,styles:l,vars:c,sticky:u,stickyOffset:d,mod:p,...f}=(0,s.w)("RichTextEditorToolbar",t3,t),m=h();return(0,r.jsx)(a.x,{ref:e,mod:[{sticky:u},p],...m.getStyles("toolbar",{className:i,style:o,styles:l,classNames:n}),...f,__vars:{"--rte-sticky-offset":(0,te.h)(d)}})});t5.classes=f,t5.displayName="@mantine/tiptap/RichTextEditorToolbar";let t6={withCodeHighlightStyles:!0,withTypographyStyles:!0},t8=(0,o.d5)((t,e)=>{let n=(0,s.w)("RichTextEditor",t6,t),{classNames:o,className:h,style:d,styles:p,unstyled:m,vars:g,editor:y,withCodeHighlightStyles:v,withTypographyStyles:x,labels:b,children:k,...w}=n,S=(0,l.y)({name:"RichTextEditor",classes:f,props:n,className:h,style:d,classNames:o,styles:p,unstyled:m,vars:g}),M=(0,i.useMemo)(()=>({...c,...b}),[b]);return(0,r.jsx)(u,{value:{editor:y,getStyles:S,labels:M,withCodeHighlightStyles:v,withTypographyStyles:x,unstyled:m},children:(0,r.jsx)(a.x,{...S("root"),...w,ref:e,children:k})})});t8.classes=f,t8.displayName="@mantine/tiptap/RichTextEditor",t8.Content=g,t8.Control=tr,t8.Toolbar=t5,t8.ControlsGroup=t4,t8.Bold=ts,t8.Italic=tl,t8.Strikethrough=tc,t8.Underline=ta,t8.ClearFormatting=tu,t8.H1=tf,t8.H2=tm,t8.H3=tg,t8.H4=ty,t8.H5=tv,t8.H6=tx,t8.BulletList=td,t8.OrderedList=tp,t8.Link=tV,t8.Unlink=th,t8.Blockquote=tb,t8.AlignLeft=tk,t8.AlignRight=tw,t8.AlignCenter=tS,t8.AlignJustify=tM,t8.Superscript=tT,t8.Subscript=tC,t8.Code=tE,t8.CodeBlock=tR,t8.ColorPicker=tQ,t8.Color=t1,t8.Highlight=tA,t8.Hr=tI,t8.UnsetColor=tO,t8.Undo=tj,t8.Redo=tL,t8.TaskList=tz,t8.TaskListSink=tP,t8.TaskListLift=tH},30941:function(t,e,n){"use strict";n.d(e,{r:function(){return tN}});var r=n(5865);let i=(t,e)=>{for(let n in e)t[n]=e[n];return t},o="numeric",s="ascii",l="alpha",a="asciinumeric",c="alphanumeric",u="domain",h="emoji",d="whitespace";function p(t,e,n){for(let r in e[o]&&(e[a]=!0,e[c]=!0),e[s]&&(e[a]=!0,e[l]=!0),e[a]&&(e[c]=!0),e[l]&&(e[c]=!0),e[c]&&(e[u]=!0),e[h]&&(e[u]=!0),e){let e=(r in n||(n[r]=[]),n[r]);0>e.indexOf(t)&&e.push(t)}}function f(t){void 0===t&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}f.groups={},f.prototype={accepts(){return!!this.t},go(t){let e=this.j[t];if(e)return e;for(let e=0;e<this.jr.length;e++){let n=this.jr[e][0],r=this.jr[e][1];if(r&&n.test(t))return r}return this.jd},has(t,e){return void 0===e&&(e=!1),e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){let i;return r=r||f.groups,e&&e.j?i=e:(i=new f(e),n&&r&&p(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this,o=t.length;if(!o)return i;for(let e=0;e<o-1;e++)i=i.tt(t[e]);return i.tt(t[o-1],e,n,r)},tt(t,e,n,r){if(r=r||f.groups,e&&e.j)return this.j[t]=e,e;let o,s=this.go(t);return s?(i((o=new f).j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new f,e&&(r&&(o.t&&"string"==typeof o.t?p(e,i(function(t,e){let n={};for(let r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}(o.t,r),n),r):n&&p(e,n,r)),o.t=e),this.j[t]=o,o}};let m=(t,e,n,r,i)=>t.ta(e,n,r,i),g=(t,e,n,r,i)=>t.tr(e,n,r,i),y=(t,e,n,r,i)=>t.ts(e,n,r,i),v=(t,e,n,r,i)=>t.tt(e,n,r,i),x="WORD",b="UWORD",k="LOCALHOST",w="UTLD",S="SCHEME",M="SLASH_SCHEME",C="OPENBRACE",T="CLOSEBRACE",E="OPENBRACKET",R="CLOSEBRACKET",A="OPENPAREN",I="CLOSEPAREN",O="OPENANGLEBRACKET",j="CLOSEANGLEBRACKET",L="FULLWIDTHLEFTPAREN",z
1="FULLWIDTHRIGHTPAREN",P="LEFTCORNERBRACKET",H="RIGHTCORNERBRACKET",N="LEFTWHITECORNERBRACKET",_="RIGHTWHITECORNERBRACKET",D="FULLWIDTHLESSTHAN",B="FULLWIDTHGREATERTHAN",F="AMPERSAND",$="APOSTROPHE",W="ASTERISK",J="BACKSLASH",q="BACKTICK",V="CARET",U="COLON",K="COMMA",Y="DOLLAR",G="EQUALS",Z="EXCLAMATION",X="HYPHEN",Q="PERCENT",tt="PIPE",te="PLUS",tn="POUND",tr="QUERY",ti="QUOTE",to="SEMI",ts="SLASH",tl="TILDE",ta="UNDERSCORE",tc="EMOJI";var tu=Object.freeze({__proto__:null,WORD:x,UWORD:b,LOCALHOST:k,TLD:"TLD",UTLD:w,SCHEME:S,SLASH_SCHEME:M,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:C,CLOSEBRACE:T,OPENBRACKET:E,CLOSEBRACKET:R,OPENPAREN:A,CLOSEPAREN:I,OPENANGLEBRACKET:O,CLOSEANGLEBRACKET:j,FULLWIDTHLEFTPAREN:L,FULLWIDTHRIGHTPAREN:z,LEFTCORNERBRACKET:P,RIGHTCORNERBRACKET:H,LEFTWHITECORNERBRACKET:N,RIGHTWHITECORNERBRACKET:_,FULLWIDTHLESSTHAN:D,FULLWIDTHGREATERTHAN:B,AMPERSAND:F,APOSTROPHE:$,ASTERISK:W,AT:"AT",BACKSLASH:J,BACKTICK:q,CARET:V,COLON:U,COMMA:K,DOLLAR:Y,DOT:"DOT",EQUALS:G,EXCLAMATION:Z,HYPHEN:X,PERCENT:Q,PIPE:tt,PLUS:te,POUND:tn,QUERY:tr,QUOTE:ti,SEMI:to,SLASH:ts,TILDE:tl,UNDERSCORE:ta,EMOJI:tc,SYM:"SYM"});let th=/[a-z]/,td=/\p{L}/u,tp=/\p{Emoji}/u,tf=/\d/,tm=/\s/,tg=null,ty=null;function tv(t,e,n,r,i){let o;let s=e.length;for(let n=0;n<s-1;n++){let s=e[n];t.j[s]?o=t.j[s]:((o=new f(r)).jr=i.slice(),t.j[s]=o),t=o}return(o=new f(n)).jr=i.slice(),t.j[e[s-1]]=o,o}function tx(t){let e=[],n=[],r=0;for(;r<t.length;){let i=0;for(;"0123456789".indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+i),10);e>0;e--)n.pop();r+=i}else n.push(t[r]),r++}return e}let tb={defaultProtocol:"http",events:null,format:tw,formatHref:tw,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function tk(t,e){void 0===e&&(e=null);let n=i({},tb);t&&(n=i(n,t instanceof tk?t.o:t));let r=n.ignoreTags,o=[];for(let t=0;t<r.length;t++)o.push(r[t].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}function tw(t){return t}function tS(t,e){this.t="token",this.v=t,this.tk=e}function tM(t,e){class n extends tS{constructor(e,n){super(e,n),this.t=t}}for(let t in e)n.prototype[t]=e[t];return n.t=t,n}tk.prototype={o:tb,ignoreTags:[],defaultRender:t=>t,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){let r=null!=e,i=this.o[t];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:tb[t])&&r&&(i=i(e,n)):"function"==typeof i&&r&&(i=i(e,n.t,n))),i},getObj(t,e,n){let r=this.o[t];return"function"==typeof r&&null!=e&&(r=r(e,n.t,n)),r},render(t){let e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}},tS.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){let e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t){return void 0===t&&(t=tb.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){let e=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",e,this),r=t.get("tagName",e,this),o=this.toFormattedString(t),s={},l=t.get("className",e,this),a=t.get("target",e,this),c=t.get("rel",e,this),u=t.getObj("attributes",e,this),h=t.getObj("events",e,this);return s.href=n,l&&(s.class=l),a&&(s.target=a),c&&(s.rel=c),u&&i(s,u),{tagName:r,attributes:s,content:o,eventListeners:h}}};let tC=tM("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),tT=tM("text"),tE=tM("nl"),tR=tM("url",{isLink:!0,toHref(t){return void 0===t&&(t=tb.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){let t=this.tk;return t.length>=2&&t[0].t!==k&&t[1].t===U}}),tA=t=>new f(t);function tI(t,e,n){let r=n[0].s,i=n[n.length-1].e;return new t(e.slice(r,i),n)}let tO="undefined"!=typeof console&&console&&console.warn||(()=>{}),tj={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function tL(t,e){if(void 0===e&&(e=!1),tj.initialized&&tO(`linkifyjs: already initialized - will not register custom scheme "${t}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw Error(`linkifyjs: incorrect scheme format.
21. Must only contain digits, lowercase ASCII letters or "-"
32. Cannot start or end with "-"
43. "-" cannot repeat`);tj.customSchemes.push([t,e])}function tz(t){return tj.initialized||function(){tj.scanner=function(t){void 0===t&&(t=[]);let e={};f.groups=e;let n=new f;null==tg&&(tg=tx("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
4ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==ty&&(ty=tx("ελ1υ2бг1ел3дети4ею2католик6ом3мÐ
4ºÐ´2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3Õ°Õ¡Õµ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1ì»´2삼성2한국2")),v(n,"'",$),v(n,"{",C),v(n,"}",T),v(n,"[",E),v(n,"]",R),v(n,"(",A),v(n,")",I),v(n,"<",O),v(n,">",j),v(n,"(",L),v(n,")",z),v(n,"「",P),v(n,"」",H),v(n,"『",N),v(n,"』",_),v(n,"<",D),v(n,">",B),v(n,"&",F),v(n,"*",W),v(n,"@","AT"),v(n,"`",q),v(n,"^",V),v(n,":",U),v(n,",",K),v(n,"$",Y),v(n,".","DOT"),v(n,"=",G),v(n,"!",Z),v(n,"-",X),v(n,"%",Q),v(n,"|",tt),v(n,"+",te),v(n,"#",tn),v(n,"?",tr),v(n,'"',ti),v(n,"/",ts),v(n,";",to),v(n,"~",tl),v(n,"_",ta),v(n,"\\",J);let r=g(n,tf,"NUM",{[o]:!0});g(r,tf,r);let c=g(n,th,x,{[s]:!0});g(c,th,c);let m=g(n,td,b,{[l]:!0});g(m,th),g(m,td,m);let tb=g(n,tm,"WS",{[d]:!0});v(n,"\n","NL",{[d]:!0}),v(tb,"\n"),g(tb,tm,tb);let tk=g(n,tp,tc,{[h]:!0});g(tk,tp,tk),v(tk,"️",tk),g(v(tk,"‍"),tp,tk);let tw=[[th,c]],tS=[[th,null],[td,m]];for(let t=0;t<tg.length;t++)tv(n,tg[t],"TLD",x,tw);for(let t=0;t<ty.length;t++)tv(n,ty[t],w,b,tS);p("TLD",{tld:!0,ascii:!0},e),p(w,{utld:!0,alpha:!0},e),tv(n,"file",S,x,tw),tv(n,"mailto",S,x,tw),tv(n,"http",M,x,tw),tv(n,"https",M,x,tw),tv(n,"ftp",M,x,tw),tv(n,"ftps",M,x,tw),p(S,{scheme:!0,ascii:!0},e),p(M,{slashscheme:!0,ascii:!0},e),t=t.sort((t,e)=>t[0]>e[0]?1:-1);for(let e=0;e<t.length;e++){let r=t[e][0],i=t[e][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?i[u]=!0:th.test(r)?tf.test(r)?i[a]=!0:i[s]=!0:i[o]=!0,y(n,r,r,i)}return y(n,"localhost",k,{ascii:!0}),n.jd=new f("SYM"),{start:n,tokens:i({groups:e},tu)}}(tj.customSchemes);for(let t=0;t<tj.tokenQueue.length;t++)tj.tokenQueue[t][1]({scanner:tj.scanner});tj.parser=function(t){let{groups:e}=t,n=e.domain.concat([F,W,"AT",J,q,V,Y,G,X,"NUM",Q,tt,te,tn,ts,"SYM",tl,ta]),r=[$,U,K,"DOT",Z,tr,ti,to,O,j,C,T,R,E,A,I,L,z,P,H,N,_,D,B],i=[F,$,W,J,q,V,Y,G,X,C,T,Q,tt,te,tn,tr,ts,"SYM",tl,ta],o=tA(),s=v(o,tl);m(s,i,s),m(s,e.domain,s);let l=tA(),a=tA(),c=tA();m(o,e.domain,l),m(o,e.scheme,a),m(o,e.slashscheme,c),m(l,i,s),m(l,e.domain,l);let u=v(l,"AT");v(s,"AT",u),v(a,"AT",u),v(c,"AT",u);let h=v(s,"DOT");m(h,i,s),m(h,e.domain,s);let d=tA();m(u,e.domain,d),m(d,e.domain,d);let p=v(d,"DOT");m(p,e.domain,d);let f=tA(tC);m(p,e.tld,f),m(p,e.utld,f),v(u,k,f);let g=v(d,X);m(g,e.domain,d),m(f,e.domain,d),v(f,"DOT",p),v(f,X,g),m(v(f,U),e.numeric,tC);let y=v(l,X),x=v(l,"DOT");m(y,e.domain,l),m(x,i,s),m(x,e.domain,l);let b=tA(tR);m(x,e.tld,b),m(x,e.utld,b),m(b,e.domain,l),m(b,i,s),v(b,"DOT",x),v(b,X,y),v(b,"AT",u);let w=v(b,U),S=tA(tR);m(w,e.numeric,S);let M=tA(tR),tc=tA();m(M,n,M),m(M,r,tc),m(tc,n,M),m(tc,r,tc),v(b,ts,M),v(S,ts,M);let th=v(a,U),td=v(c,U),tp=v(td,ts),tf=v(tp,ts);m(a,e.domain,l),v(a,"DOT",x),v(a,X,y),m(c,e.domain,l),v(c,"DOT",x),v(c,X,y),m(th,e.domain,M),v(th,ts,M),m(tf,e.domain,M),m(tf,n,M),v(tf,ts,M);let tm=[[C,T],[E,R],[A,I],[O,j],[L,z],[P,H],[N,_],[D,B]];for(let t=0;t<tm.length;t++){let[e,i]=tm[t],o=v(M,e);v(tc,e,o),v(o,i,M);let s=tA(tR);m(o,n,s);let l=tA();m(o,r),m(s,n,s),m(s,r,l),m(l,n,s),m(l,r,l),v(s,i,M),v(l,i,M)}
4return v(o,k,b),v(o,"NL",tE),{start:o,tokens:tu}}(tj.scanner.tokens);for(let t=0;t<tj.pluginQueue.length;t++)tj.pluginQueue[t][1]({scanner:tj.scanner,parser:tj.parser});tj.initialized=!0}(),function(t,e,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let l=t,a=null,c=null,u=0,h=null,d=-1;for(;i<r&&!(a=l.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=a||l.go(n[i].t));)a=null,(l=c).accepts()?(d=0,h=l):d>=0&&d++,i++,u++;if(d<0)(i-=u)<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(tI(tT,e,s)),s=[]),i-=d,u-=d;let t=h.t,r=n.slice(i-u,i);o.push(tI(t,e,r))}}return s.length>0&&o.push(tI(tT,e,s)),o}(tj.parser.start,t,function(t,e){let n=function(t){let e=[],n=t.length,r=0;for(;r<n;){let i,o=t.charCodeAt(r),s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,t=>t.toLowerCase())),r=n.length,i=[],o=0,s=0;for(;s<r;){let l=t,a=null,c=0,u=null,h=-1,d=-1;for(;s<r&&(a=l.go(n[s]));)(l=a).accepts()?(h=0,d=0,u=l):h>=0&&(h+=n[s].length,d++),c+=n[s].length,o+=n[s].length,s++;o-=h,s-=d,c-=h,i.push({t:u.t,v:e.slice(o-c,o),s:o-c,e:o})}return i}(tj.scanner.start,t))}function tP(t,e,n){if(void 0===e&&(e=null),void 0===n&&(n=null),e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new tk(n),i=tz(t),o=[];for(let t=0;t<i.length;t++){let n=i[t];n.isLink&&(!e||n.t===e)&&r.check(n)&&o.push(n.toFormattedObject(r))}return o}var tH=n(2376);let tN=r.vc.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(t=>{if("string"==typeof t){tL(t);return}tL(t.scheme,t.optionalSlashes)})},onDestroy(){f.groups={},tj.scanner=null,tj.parser=null,tj.tokenQueue=[],tj.pluginQueue=[],tj.customSchemes=[],tj.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){var e;return(null===(e=t.href)||void 0===e?void 0:e.startsWith("javascript:"))?["a",(0,r.P1)(this.options.HTMLAttributes,{...t,href:""}),0]:["a",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.K9)({find:t=>{let e=[];
4if(t){let n=tP(t).filter(t=>t.isLink);n.length&&n.forEach(t=>e.push({text:t.value,data:{href:t.href},index:t.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){var t,e,n;let i=[];return this.options.autolink&&i.push((t={type:this.type,validate:this.options.validate},new tH.Sy({key:new tH.H$("autolink"),appendTransaction:(e,n,i)=>{let o=e.some(t=>t.docChanged)&&!n.doc.eq(i.doc),s=e.some(t=>t.getMeta("preventAutolink"));if(!o||s)return;let{tr:l}=i,a=(0,r.XP)(n.doc,[...e]);if((0,r.QC)(a).forEach(({newRange:e})=>{let n,o;let s=(0,r.b5)(i.doc,e,t=>t.isTextblock);if(s.length>1?(n=s[0],o=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ")):s.length&&i.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(n=s[0],o=i.doc.textBetween(n.pos,e.to,void 0," ")),n&&o){let e=o.split(" ").filter(t=>""!==t);if(e.length<=0)return!1;let s=e[e.length-1],a=n.pos+o.lastIndexOf(s);if(!s)return!1;let c=tz(s).map(t=>t.toObject());if(!(1===c.length?c[0].isLink:3===c.length&&!!c[1].isLink&&["()","[]"].includes(c[0].value+c[2].value)))return!1;c.filter(t=>t.isLink).map(t=>({...t,from:a+t.start+1,to:a+t.end+1})).filter(t=>!i.schema.marks.code||!i.doc.rangeHasMark(t.from,t.to,i.schema.marks.code)).filter(e=>!t.validate||t.validate(e.value)).forEach(e=>{(0,r.tI)(e.from,e.to,i.doc).some(e=>e.mark.type===t.type)||l.addMark(e.from,e.to,t.type.create({href:e.href}))})}}),l.steps.length)return l}}))),this.options.openOnClick&&i.push((e={type:this.type},new tH.Sy({key:new tH.H$("handleClickLink"),props:{handleClick:(t,n,i)=>{var o,s;if(0!==i.button)return!1;let l=i.target,a=[];for(;"DIV"!==l.nodeName;)a.push(l),l=l.parentNode;if(!a.find(t=>"A"===t.nodeName))return!1;let c=(0,r.u9)(t.state,e.type.name),u=i.target,h=null!==(o=null==u?void 0:u.href)&&void 0!==o?o:c.href,d=null!==(s=null==u?void 0:u.target)&&void 0!==s?s:c.target;return!!u&&!!h&&(window.open(h,d),!0)}}}))),this.options.linkOnPaste&&i.push((n={editor:this.editor,type:this.type},new tH.Sy({key:new tH.H$("handlePasteLink"),props:{handlePaste:(t,e,r)=>{let{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let l="";r.content.forEach(t=>{l+=t.textContent});let a=tP(l).find(t=>t.isLink&&t.value===l);return!!l&&!!a&&(n.editor.commands.setMark(n.type,{href:a.href}),!0)}}}))),i}}).extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1})},59403:function(t,e,n){"use strict";n.d(e,{N:function(){return a}});var r=n(32161),i=n(52924),o=n(9499);class s extends i.z{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,e){super.setOptions({...t,behavior:(0,o.Gm)()},e)}getOptimisticResult(t){return t.behavior=(0,o.Gm)(),super.getOptimisticResult(t)}fetchNextPage({pageParam:t,...e}={}){return this.fetch({...e,meta:{fetchMore:{direction:"forward",pageParam:t}}})}fetchPreviousPage({pageParam:t,...e}={}){return this.fetch({...e,meta:{fetchMore:{direction:"backward",pageParam:t}}})}createResult(t,e){var n,r,i,s,l,a;let{state:c}=t,u=super.createResult(t,e),{isFetching:h,isRefetching:d}=u,p=h&&(null==(n=c.fetchMeta)?void 0:null==(r=n.fetchMore)?void 0:r.direction)==="forward",f=h&&(null==(i=c.fetchMeta)?void 0:null==(s=i.fetchMore)?void 0:s.direction)==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,o.Qy)(e,null==(l=c.data)?void 0:l.pages),hasPreviousPage:(0,o.ZF)(e,null==(a=c.data)?void 0:a.pages),isFetchingNextPage:p,isFetchingPreviousPage:f,isRefetching:d&&!p&&!f}}}var l=n(67187);function a(t,e,n){let i=(0,r._v)(t,e,n);return(0,l.r)(i,s)}},48228:function(t,e,n){"use strict";n.d(e,{D:function(){return d}});var r=n(67294),i=n(32161),o=n(89886),s=n(30081),l=n(33989);class a extends l.l{constructor(t,e){super(),this.client=t,this.setOptions(e),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;let n=this.options;this.options=this.client.defaultMutationOptions(t),(0,i.VS)(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(e=this.currentMutation)||e.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;null==(t=this.currentMutation)||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();let e={listeners:!0};"success"===t.type?e.onSuccess=!0:"error"===t.type&&(e.onError=!0),this.notify(e)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,e){return this.mutateOptions=e,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==t?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let t=this.currentMutation?this.currentMutation.state:(0,o.R)(),e={...t,isLoading:"loading"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset};this.currentResult=e}notify(t){s.V.batch(()=>
4{if(this.mutateOptions&&this.hasListeners()){var e,n,r,i,o,s,l,a;t.onSuccess?(null==(e=(n=this.mutateOptions).onSuccess)||e.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(i=this.mutateOptions).onSettled)||r.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):t.onError&&(null==(o=(s=this.mutateOptions).onError)||o.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(l=(a=this.mutateOptions).onSettled)||l.call(a,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}t.listeners&&this.listeners.forEach(({listener:t})=>{t(this.currentResult)})})}}var c=n(464),u=n(85945),h=n(24798);function d(t,e,n){let o=(0,i.lV)(t,e,n),l=(0,u.NL)({context:o.context}),[d]=r.useState(()=>new a(l,o));r.useEffect(()=>{d.setOptions(o)},[d,o]);let f=(0,c.$)(r.useCallback(t=>d.subscribe(s.V.batchCalls(t)),[d]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),m=r.useCallback((t,e)=>{d.mutate(t,e).catch(p)},[d]);if(f.error&&(0,h.L)(d.options.useErrorBoundary,[f.error]))throw f.error;return{...f,mutate:m,mutateAsync:f.mutate}}function p(){}},36492:function(t,e,n){"use strict";n.d(e,{a:function(){return s}});var r=n(32161),i=n(52924),o=n(67187);function s(t,e,n){let s=(0,r._v)(t,e,n);return(0,o.r)(s,i.z)}},50601:function(t,e,n){"use strict";n.d(e,{ZP:function(){return s}});var r=n(5865);let i=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,o=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,s=r.vc.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:t}){return["mark",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}}
4,addInputRules(){return[(0,r.Cf)({find:i,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:o,type:this.type})]}})},93237:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(5865),i=n(2376),o=n(84348);let s=r.hj.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new i.Sy({key:new i.H$("placeholder"),props:{decorations:({doc:t,selection:e})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=e,s=[];if(!n)return null;let l=this.editor.isEmpty;return t.descendants((t,e)=>{let n=i>=e&&i<=e+t.nodeSize,a=!t.isLeaf&&(0,r.bR)(t);if((n||!this.options.showOnlyCurrent)&&a){let r=[this.options.emptyNodeClass];l&&r.push(this.options.emptyEditorClass);let i=o.p.node(e,e+t.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:e,hasAnchor:n}):this.options.placeholder});s.push(i)}return this.options.includeChildren}),o.EH.create(t,s)}}})]}})},18151:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(5865);let i=r.vc.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:t=>"sub"===t&&null}],renderHTML({HTMLAttributes:t}){return["sub",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}})},41705:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(5865);let i=r.vc.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML({HTMLAttributes:t}){return["sup",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}})},96279:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});let r=n(5865).hj.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>t.style.textAlign||this.options.defaultAlignment,renderHTML:t=>t.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${t.textAlign}`}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>!!this.options.alignments.includes(t)&&this.options.types.every(n=>e.updateAttributes(n,{textAlign:t})),unsetTextAlign:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}})},48510:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(5865);let i=r.vc.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}],renderHTML({HTMLAttributes:t}){return["u",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})},71284:function(t,e,n){"use strict";n.d(e,{jE:function(){return d},kg:function(){return u}});var r=n(67294),i=n(73935),o=n(5865);let s=(...t)=>e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})},l=({renderers:t})=>r.createElement(r.Fragment,null,Object.entries(t).map(([t,e])=>i.createPortal(e.reactElement,e.element,t)));class a extends r.Component{constructor(t){super(t),this.editorContentRef=r.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let{editor:t}=this.props;if(t&&t.options.element){if(t.contentComponent)return;let e=this.editorContentRef.current;e.append(...t.options.element.childNodes),t.setOptions({element:e}),t.contentComponent=this,t.createNodeViews(),this.initialized=!0}}maybeFlushSync(t){this.initialized?(0,i.flushSync)(t):t()}setRenderer(t,e){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>({renderers:{...n,[t]:e}}))})}removeRenderer(t){this.maybeFlushSync(()=>{this.setState(({renderers:e})=>{let n={...e};return delete n[t],{renderers:n}})})}componentWillUnmount(){let{editor:t}=this.props;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild))return;let e=document.createElement("div");e.append(...t.options.element.childNodes),t.setOptions({element:e})}render(){let{editor:t,innerRef:e,...n}=this.props;return r.createElement(r.Fragment,null,r.createElement("div",{ref:s(e,this.editorContentRef),...n}),r.createElement(l,{renderers:this.state.renderers}))}}let c=(0,r.forwardRef)((t,e)=>{let n=r.useMemo(()=>Math.floor(4294967295*Math.random()).toString(),[t.editor]);return r.createElement(a,{key:n,innerRef:e,...t})}),u=r.memo(c);class h extends o.ML{constructor(){super(...arguments),this.contentComponent=null}}let d=(t={},e=[])=>{let n=(0,r.useRef)(null),[,i]=(0,r.useState)({}),{onBeforeCreate:o,onBlur:s,onCreate:l,onDestroy:a,onFocus:c,onSelectionUpdate:u,onTransaction:d,onUpdate:p}=t,f=(0,r.useRef)(o),m=(0,r.useRef)(s),g=(0,r.useRef)(l),y=(0,r.useRef)(a),v=(0,r.useRef)(c),x=(0,r.useRef)(u),b=(0,r.useRef)(d),k=(0,r.useRef)(p);return(0,r.useEffect)(()=>{n.current&&(o&&(n.current.off("beforeCreate",f.current),n.current.on("beforeCreate",o),f.current=o),s&&(n.current.off("blur",m.current),n.current.on("blur",s),m.current=s),l&&(n.current.off("create",g.current),n.current.on("create",l),g.current=l),a&&(n.current.off("destroy",y.current),n.current.on("destroy",a),y.current=a),c&&(n.current.off("focus",v.current),n.current.on("focus",c),v.current=c),u&&(n.current.off("selectionUpdate",x.current),n.current.on("selectionUpdate",u),x.current=u),d&&(n.current.off("transaction",b.current),n.current.on("transaction",d),b.current=d),p&&(n.current.off("update",k.current),n.current.on("update",p),k.current=p))},[o,s,l,a,c,u,d,p,n.current]),(0,r.useEffect)(()=>{let e=!0,r=new h(t);return n.current=r,n.current.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{e&&i({})})})}),()=>{e=!1,r.destroy()}},e),n.current};(0,r.createContext)({editor:null}).Consumer;let p=(0,r.createContext)({onDragStart:void 0}),f=()=>(0,r.useContext)(p);r.forwardRef((t,e)=>{let{onDragStart:n}=f(),i=t.as||"div";return r.createElement(i,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})})},54929:function(t,e,n){"use strict";n.d(e,{Z:function(){return tx}});var r=n(5865);let i=/^\s*>\s$/,o=r.NB.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return["blockquote",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}}
4,addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,r.S0)({find:i,type:this.type})]}}),s=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,a=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,c=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,u=r.vc.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],renderHTML({HTMLAttributes:t}){return["strong",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.Cf)({find:s,type:this.t
4ype}),(0,r.Cf)({find:a,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:l,type:this.type}),(0,r.K9)({find:c,type:this.type})]}}),h=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.P1)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),d=r.vc.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>!!Object.entries((0,r.Jo)(t,this.type)).some(([,t])=>!!t)||e.unsetMark(this.name)}}}),p=/^\s*([-+*])\s$/,f=r.NB.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:t}){return["ul",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(h.name,this.editor.getAttributes(d.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}}
4,addInputRules(){let t=(0,r.S0)({find:p,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.S0)({find:p,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(d.name),editor:this.editor})),[t]}}),m=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,g=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,y=r.vc.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:t}){return["code",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.Cf)({find:m,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:g,type:this.type})]}});var v=n(2376);let x=/^```([a-z]+)?[\s\n]$/,b=/^~~~([a-z]+)?[\s\n]$/,k=r.NB.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:t=>{var e;let{languageClassPrefix:n}=this.options;return[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter(t=>t.startsWith(n)).map(t=>t.replace(n,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:e}){return["pre",(0,r.P1)(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!!t&&e.parent.type.name===this.name&&(!!n||!e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!!o&&!!s&&t.chain().command(({tr:t})=>(t.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let s=i.after();return!(void 0===s||r.nodeAt(s))&&t.commands.exitCode()}}}
4,addInputRules(){return[(0,r.zK)({find:x,type:this.type,getAttributes:t=>({language:t[1]})}),(0,r.zK)({find:b,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new v.Sy({key:new v.H$("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;let{tr:s}=t.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(v.Bs.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),w=r.NB.create({name:"doc",topNode:!0,content:"block+"});var S=n(16560);class M{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i;if(r){let t=n.nodeBefore,e=n.nodeAfter;if(t||e){let n=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(n){let r=n.getBoundingClientRect(),o=t?r.bottom:r.top;t&&e&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:r.left,right:r.right,top:o-this.width/2,bottom:o+this.width/2}}}}if(!i){let t=this.editorView.coordsAtPos(this.cursorPos);i={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let o=this.editorView.dom.offsetParent;if(!this.element&&(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),o&&(o!=document.body||"static"!=getComputedStyle(o).position)){let n=o.getBoundingClientRect();t=n.left-o.scrollLeft,e=n.top-o.scrollTop}else t=-pageXOffset,e=-pageYOffset;this.element.style.left=i.left-t+"px",this.element.style.top=i.top-e+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,e,t):r;if(e&&!i){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=(0,S.nj)(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}let C=r.hj.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(t={}){return new v.Sy({view:e=>new M(e,t)})}(this.options)]}});var T=n(82696),E=n(12806),R=n(84348);class A extends v.Y1{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return A.valid(n)?new A(n):v.Y1.near(n)}content(){return E.p2.empty}eq(t){return t instanceof A&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new A(t.resolve(e.pos))}getBookmark(){return new I(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let t=r.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;
4if(t.inlineContent)return!1}}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let t=r.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}}return!0}(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&A.valid(t))return t;let r=t.pos,i=null;for(let n=t.depth;;n--){let o=t.node(n);if(e>0?t.indexAfter(n)<o.childCount:t.index(n)>0){i=o.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let s=t.doc.resolve(r);if(A.valid(s))return s}for(;;){let o=e>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!v.qv.isSelectable(i)){t=t.doc.resolve(r+i.nodeSize*e),n=!1;continue t}break}i=o,r+=e;let s=t.doc.resolve(r);if(A.valid(s))return s}return null}}}A.prototype.visible=!1,A.findFrom=A.findGapCursorFrom,v.Y1.jsonID("gapcursor",A);class I{constructor(t){this.pos=t}map(t){return new I(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return A.valid(e)?new A(e):v.Y1.near(e)}}let O=(0,T.$)({ArrowLeft:j("horiz",-1),ArrowRight:j("horiz",1),ArrowUp:j("vert",-1),ArrowDown:j("vert",1)});function j(t,e){let n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,i){let o=t.selection,s=e>0?o.$to:o.$from,l=o.empty;if(o instanceof v.Bs){if(!i.endOfTextblock(n)||0==s.depth)return!1;l=!1,s=t.doc.resolve(e>0?s.after():s.before())}let a=A.findGapCursorFrom(s,e,l);return!!a&&(r&&r(t.tr.setSelection(new A(a))),!0)}}function L(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!A.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&v.qv.isSelectable(t.state.doc.nodeAt(i.inside)))&&(t.dispatch(t.state.tr.setSelection(new A(r))),!0)}function z(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof A))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=E.HY.empty;for(let t=r.length-1;t>=0;t--)i=E.HY.from(r[t].createAndFill(null,i));let o=t.state.tr.replace(n.pos,n.pos,new E.p2(i,0,0));return o.setSelection(v.Bs.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function P(t){if(!(t.selection instanceof A))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",R.EH.create(t.doc,[R.p.widget(t.selection.head,e,{key:"gapcursor"})])}let H=r.hj.create({name:"gapCursor",addProseMirrorPlugins:()=>[new v.Sy({props:{decorations:P,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&A.valid(n)?new A(n):null,handleClick:L,handleKeyDown:O,handleDOMEvents:{beforeinput
4:z}}})],extendNodeSchema(t){var e;let n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=(0,r.nU)((0,r.Nl)(t,"allowGapCursor",n)))&&void 0!==e?e:null}}}),N=r.NB.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",(0,r.P1)(this.options.HTMLAttributes,t)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:t,storedMarks:i}=n;if(t.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,l=i||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{if(e&&l&&o){let e=l.filter(t=>s.includes(t.type.name));t.ensureMarks(e)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),_=r.NB.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){let n=this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>(0,r.zK)({find:RegExp(`^(#{1,${t}}
4)\\s$`),type:this.type,getAttributes:{level:t}}))}});var D=function(){};D.prototype.append=function(t){return t.length?(t=D.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},D.prototype.prepend=function(t){return t.length?D.from(t).append(this):this},D.prototype.appendInner=function(t){return new F(this,t)},D.prototype.slice=function(t,e){return(void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e)?D.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},D.prototype.get=function(t){if(!(t<0)&&!(t>=this.length))return this.getInner(t)},D.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},D.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(e,n){return r.push(t(e,n))},e,n),r},D.from=function(t){return t instanceof D?t:t&&t.length?new B(t):D.empty};var B=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var i=e;i<n;i++)if(!1===t(this.values[i],r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var i=e-1;i>=n;i--)if(!1===t(this.values[i],r+i))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(D);D.empty=new B([]);var F=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var i=this.left.length;if(e<i&&!1===this.left.forEachInner(t,e,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length;if(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(t,Math.min(e,i),n,r))return!1},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(D);class ${constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){let n,r,i,o;if(0==this.eventCount)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}e&&(r=(n=this.remapping(s,this.items.length)).maps.length);let l=t.tr,a=[],c=[];return this.items.forEach((t,e)=>{if(!t.step){n||(r=(n=this.remapping(s,e+1)).maps.length),r--,c.push(t);return}if(n){c.push(new W(t.map));let e=t.step.map(n.slice(r)),i;e&&l.maybeStep(e).doc&&(i=l.mapping.maps[l.mapping.maps.length-1],a.push(new W(i,void 0,void 0,a.length+c.length))),r--,i&&n.appendMap(i,r)}else l.maybeStep(t.step);if(t.selection)return i=n?t.selection.map(n.slice(r)):t.selection,o=new $(this.items.slice(0,s).append(c.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:o,transform:l,selection:i}}addTransform(t,e,n,r){var i,o;let s,l=[],a=this.eventCount,c=this.items,u=!r&&c.length?c.get(c.length-1):null;for(let n=0;n<t.steps.length;n++){let i=t.steps[n].invert(t.docs[n]),o=new W(t.mapping.maps[n],i,e),s;(s=u&&u.merge(o))&&(o=s,n?l.pop():c=c.slice(0,c.length-1)),l.push(o),e&&(a++,e=void 0),r||(u=
4o)}let h=a-n.depth;return h>q&&(i=c,o=h,i.forEach((t,e)=>{if(t.selection&&0==o--)return s=e,!1}),c=i.slice(s),a-=h),new $(c.append(l),a)}remapping(t,e){let n=new S.vs;return this.items.forEach((e,r)=>{let i=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,i)},t,e),n}addMaps(t){return 0==this.eventCount?this:new $(this.items.append(t.map(t=>new W(t))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),i=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(t=>{t.selection&&s--},r);let l=e;this.items.forEach(e=>{let r=i.getMirror(--l);if(null==r)return;o=Math.min(o,r);let a=i.maps[r];if(e.step){let o=t.steps[r].invert(t.docs[r]),c=e.selection&&e.selection.map(i.slice(l+1,r));c&&s++,n.push(new W(a,o,c))}else n.push(new W(a))},r);let a=[];for(let t=e;t<o;t++)a.push(new W(i.maps[t]));let c=new $(this.items.slice(0,r).append(a).append(n),s);return c.emptyItemCount()>500&&(c=c.compress(this.items.length-n.length)),c}emptyItemCount(){let t=0;return this.items.forEach(e=>{!e.step&&t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],i=0;return this.items.forEach((o,s)=>{if(s>=t)r.push(o),o.selection&&i++;else if(o.step){let t=o.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let l=o.selection&&o.selection.map(e.slice(n));l&&i++;let a=new W(s.invert(),t,l),c,u=r.length-1;(c=r.length&&r[u].merge(a))?r[u]=c:r.push(a)}}else o.map&&n--},this.items.length,0),new $(D.from(r.reverse()),i)}}$.empty=new $(D.empty,0);class W{constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new W(e.getMap().invert(),e,this.selection)}}}class J{constructor(t,e,n,r,i){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let q=20;function V(t){let e=[];return t.forEach((t,n,r,i)=>e.push(r,i)),e}function U(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}let K=!1,Y=null;function G(t){let e=t.plugins;if(Y!=e){K=!1,Y=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){K=!0;break}}return K}let Z=new v.H$("history"),X=new v.H$("closeHistory");function Q(t,e){return(n,r)=>{let i=Z.getState(n);if(!i||0==(t?i.undone:i.done).eventCount)return!1;if(r){let o=function(t,e,n){let r=G(e),i=Z.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),l=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),a=new J(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(s).setMeta(Z,{redo:n,historyState:a})}(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}let tt=Q(!1,!0),te=Q(!0,!0);Q(!1,!1),Q(!0,!1);let tn=r.hj.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>tt(t,e),redo:()=>({state:t,dispatch:e})=>te(t,e)}),addProseMirrorPlugins(){return[function(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new v.Sy({key:Z,state:{init:()=>new J($.empty,$.empty,null,0,-1),apply:(e,n,r)=>(function(t,e,n,r){let i=n.getMeta(Z),o;if(i)return i.historyState;n.getMeta(X)&&(t=new J(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(Z))return s.getMeta(Z).redo?new J(t.done.addTransform(n,void 0,r,G(e)),t.undone,V(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new J(t.done,t.undone.addTransform(n,void 0,r,G(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new J(t.done.rebased(n,o),t.undone.rebased(n,o),U(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new J(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),U(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let i=n.getMeta("composition"),o=0==t.prevTime||!s&&t.prevComposition!=i&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;
4return t.mapping.maps[0].forEach((t,r)=>{for(let i=0;i<e.length;i+=2)t<=e[i+1]&&r>=e[i]&&(n=!0)}),n}(n,t.prevRanges)),l=s?U(t.prevRanges,n.mapping):V(n.mapping.maps[n.steps.length-1]);return new J(t.done.addTransform(n,o?e.selection.getBookmark():void 0,r,G(e)),$.empty,l,n.time,null==i?t.prevComposition:i)}})(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?tt:"historyRedo"==n?te:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),tr=r.NB.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",(0,r.P1)(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{let{$to:n}=e.selection,r=t();return 0===n.parentOffset?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:t,dispatch:e})=>{var n;if(e){let{$to:e}=t.selection,r=e.end();if(e.nodeAfter)e.nodeAfter.isTextblock?t.setSelection(v.Bs.create(t.doc,e.pos+1)):e.nodeAfter.isBlock?t.setSelection(v.qv.create(t.doc,e.pos)):t.setSelection(v.Bs.create(t.doc,e.pos));else{let i=null===(n=e.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();i&&(t.insert(r,i),t.setSelection(v.Bs.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.x2)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
4ype})]}}),ti=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,to=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,ts=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,tl=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,ta=r.vc.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:t}){return["em",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.Cf)({find:ti,type:this.type}),(0,r.Cf)({find:ts,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:to,type:this.type}),(0,r.K9)({find:tl,type:this.type})]}}),tc=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.P1)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),tu=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.P1)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),th=r.vc.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>!!Object.entries((0,r.Jo)(t,this.type)).some(([,t])=>!!t)||e.unsetMark(this.name)}}}),td=/^(\d+)\.\s$/,tp=r.NB.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){let{start:e,...n}=t;return 1===e?["ol",(0,r.P1)(this.options.HTMLAttributes,n),0]:["ol",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(tu.name,this.editor.getAttributes(th.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}}
4,addInputRules(){let t=(0,r.S0)({find:td,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.S0)({find:td,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(th.name)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}}),tf=r.NB.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),tm=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,tg=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,ty=r.vc.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){let t={};return(0,r.eE)()?t["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():t["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),t},addInputRules(){return[(0,r.Cf)({find:tm,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:tg,type:this.type})]}}),tv=r.NB.create({name:"text",group:"inline"}),tx=r.hj.create({name:"starterKit",addExtensions(){var t,e,n,r,i,s,l,a,c,h,d,p,m,g,v,x,b,S;let M=[];return!1!==this.options.blockquote&&M.push(o.configure(null===(t=this.options)||void 0===t?void 0:t.blockquote)),!1!==this.options.bold&&M.push(u.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.bulletList&&M.push(f.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&M.push(y.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&M.push(k.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&M.push(w.configure(null===(s=this.options)||void 0===s?void 0:s.document)),!1!==this.options.dropcursor&&M.push(C.configure(null===(l=this.options)||void 0===l?void 0:l.dropcursor)),!1!==this.options.gapcursor&&M.push(H.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&M.push(N.configure(null===(c=this.options)||void 0===c?void 0:c.hardBreak)),!1!==this.options.heading&&M.push(_.configure(null===(h=this.options)||void 0===h?void 0:h.heading)),!1!==this.options.history&&M.push(tn.configure(null===(d=this.options)||void 0===d?void 0:d.history)),!1!==this.options.horizontalRule&&M.push(tr.configure(null===(p=this.options)||void 0===p?void 0:p.horizontalRule)),!1!==this.options.italic&&M.push(ta.configure(null===(m=this.options)||void 0===m?void 0:m.italic)),!1!==this.options.listItem&&M.push(tc.configure(null===(g=this.options)||void 0===g?void 0:g.listItem)),!1!==this.options.orderedList&&M.push(tp.configure(null===(v=this.options)||void 0===v?void 0:v.orderedList)),!1!==this.options.paragraph&&M.push(tf.configure(null===(x=this.options)||void 0===x?void 0:x.paragraph)),!1!==this.options.strike&&M.push(ty.configure(null===(b=this.options)||void 0===b?void 0:b.strike)),!1!==this.options.text&&M.push(tv.configure(null===(S=this.options)||void 0===S?void 0:S.text)),M}})},69386:function(t,e,n){"use strict";function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===u(t)}n.d(e,{Z:function(){return X}});let i=1/0;function o(t){return"string"==typeof t}function s(t){return"number"==typeof t}function l(t){return"object"==typeof t}function a(t){return null!=t}function c(t){return!t.trim().length}
4function u(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}let h=t=>`Invalid value for key ${t}`,d=t=>`Pattern length exceeds max of ${t}.`,p=t=>`Missing ${t} property in key`,f=t=>`Property 'weight' in key '${t}' must be a positive integer`,m=Object.prototype.hasOwnProperty;class g{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(t=>{let n=y(t);this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(t=>{t.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function y(t){let e=null,n=null,i=null,s=1,l=null;if(o(t)||r(t))i=t,e=v(t),n=x(t);else{if(!m.call(t,"name"))throw Error(p("name"));let r=t.name;if(i=r,m.call(t,"weight")&&(s=t.weight)<=0)throw Error(f(r));e=v(r),n=x(r),l=t.getFn}return{path:e,id:n,weight:s,src:i,getFn:l}}function v(t){return r(t)?t:t.split(".")}function x(t){return r(t)?t.join("."):t}var b={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(t,e){let n=[],c=!1,h=(t,e,d)=>{if(a(t)){if(e[d]){var p,f;let m=t[e[d]];if(a(m)){if(d===e.length-1&&(o(m)||s(m)||!0===(p=m)||!1===p||l(f=p)&&null!==f&&"[object Boolean]"==u(p)))n.push(null==m?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-i?"-0":e}(m));else if(r(m)){c=!0;for(let t=0,n=m.length;t<n;t+=1)h(m[t],e,d+1)}else e.length&&h(m,e,d+1)}}else n.push(t)}};return h(t,o(e)?e.split("."):e,0),c?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};let k=/[^ ]+/g;class w{constructor({getFn:t=b.getFn,fieldNormWeight:e=b.fieldNormWeight}={}){this.norm=function(t=1,e=3){let n=new Map,r=Math.pow(10,e);return{get(e){let i=e.match(k).length;if(n.has(i))return n.get(i);let o=parseFloat(Math.round(1/Math.pow(i,.5*t)*r)/r);return n.set(i,o),o},clear(){n.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((t,e)=>{this._keysMap[t.id]=e})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,o(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){let e=this.size();o(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e<n;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!a(t)||c(t))return;let n={v:t,i:e,n:this.norm.get(t)};this.records.push(n)}_addObject(t,e){let n={i:e,$:{}};this.keys.forEach((e,i)=>{let s=e.getFn?e.getFn(t):this.getFn(t,e.path);if(a(s)){if(r(s)){let t=[],e=[{nestedArrIndex:-1,value:s}];for(;e.length;){let{nestedArrIndex:n,value:i}=e.pop();if(a(i)){if(o(i)&&!c(i)){let e={v:i,i:n,n:this.norm.get(i)};t.push(e)}else r(i)&&i.forEach((t,n)=>{e.push({nestedArrIndex:n,value:t})})}}n.$[i]=t}else if(o(s)&&!c(s)){let t={v:s,n:this.norm.get(s)};n.$[i]=t}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function S(t,e,{getFn:n=b.getFn,fieldNormWeight:r=b.fieldNormWeight}={}){let i=new w({getFn:n,fieldNormWeight:r});return i.setKeys(t.map(y)),i.setSources(e),i.create(),i}function M(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:i=b.distance,ignoreLocation:o=b.ignoreLocation}={}){let s=e/t.length;if(o)return s;let l=Math.abs(r-n);return i?s+l/i:l?1:s}class C{constructor(t,{location:e=b.location,threshold:n=b.threshold,distance:r=b.distance,includeMatches:i=b.includeMatches,findAllMatches:o=b.findAllMatches,minMatchCharLength:s=b.minMatchCharLength,isCaseSensitive:l=b.isCaseSensitive,ignoreLocation:a=b.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:l,ignoreLocation:a},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;let c=(t,e)=>{this.chunks.push({pattern:t,alphabet:function(t){let e={};for(let n=0,r=t.length;n<r;n+=1){let i=t.charAt(n);e[i]=(e[i]||0)|1<<r-n-1}return e}(t),startIndex:e})},u=this.pattern.length;if(u>32){let t=0,e=u%32,n=u-e;for(;t<n;)c(this.pattern.substr(t,32),t),t+=32;if(e){let t=u-32;c(this.pattern.substr(t),t)}}else c(this.pattern,0)}searchIn(t){let{isCaseSensitive:e,includeMatches:n}=this.options;
4if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return n&&(e.indices=[[0,t.length-1]]),e}let{location:r,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:l,ignoreLocation:a}=this.options,c=[],u=0,h=!1;this.chunks.forEach(({pattern:e,alphabet:p,startIndex:f})=>{let{isMatch:m,score:g,indices:y}=function(t,e,n,{location:r=b.location,distance:i=b.distance,threshold:o=b.threshold,findAllMatches:s=b.findAllMatches,minMatchCharLength:l=b.minMatchCharLength,includeMatches:a=b.includeMatches,ignoreLocation:c=b.ignoreLocation}={}){let u;if(e.length>32)throw Error(d(32));let h=e.length,p=t.length,f=Math.max(0,Math.min(r,p)),m=o,g=f,y=l>1||a,v=y?Array(p):[];for(;(u=t.indexOf(e,g))>-1;)if(m=Math.min(M(e,{currentLocation:u,expectedLocation:f,distance:i,ignoreLocation:c}),m),g=u+h,y){let t=0;for(;t<h;)v[u+t]=1,t+=1}g=-1;let x=[],k=1,w=h+p,S=1<<h-1;for(let r=0;r<h;r+=1){let o=0,l=w;for(;o<l;)M(e,{errors:r,currentLocation:f+l,expectedLocation:f,distance:i,ignoreLocation:c})<=m?o=l:w=l,l=Math.floor((w-o)/2+
4o);w=l;let a=Math.max(1,f-l+1),u=s?p:Math.min(f+l,p)+h,d=Array(u+2);d[u+1]=(1<<r)-1;for(let o=u;o>=a;o-=1){let s=o-1,l=n[t.charAt(s)];if(y&&(v[s]=+!!l),d[o]=(d[o+1]<<1|1)&l,r&&(d[o]|=(x[o+1]|x[o])<<1|1|x[o+1]),d[o]&S&&(k=M(e,{errors:r,currentLocation:s,expectedLocation:f,distance:i,ignoreLocation:c}))<=m){if(m=k,(g=s)<=f)break;a=Math.max(1,2*f-g)}}if(M(e,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:c})>m)break;x=d}let C={isMatch:g>=0,score:Math.max(.001,k)};if(y){let t=function(t=[],e=b.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let s=t.length;o<s;o+=1){let s=t[o];s&&-1===r?r=o:s||-1===r||((i=o-1)-r+1>=e&&n.push([r,i]),r=-1)}return t[o-1]&&o-r>=e&&n.push([r,o-1]),n}(v,l);t.length?a&&(C.indices=t):C.isMatch=!1}return C}(t,e,p,{location:r+f,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:l,includeMatches:n,ignoreLocation:a});m&&(h=!0),u+=g,m&&y&&(c=[...c,...y])});let p={isMatch:h,score:h?u/this.chunks.length:1};return h&&n&&(p.indices=c),p}}class T{constructor(t){this.pattern=t}static isMultiMatch(t){return E(t,this.multiRegex)}static isSingleMatch(t){return E(t,this.singleRegex)}search(){}}function E(t,e){let n=t.match(e);return n?n[1]:null}class R extends T{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){let e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class A extends T{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){let e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class I extends T{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){let e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class O extends T{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){let e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class j extends T{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){let e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class L extends T{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){let e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class z extends T{constructor(t,{location:e=b.location,threshold:n=b.threshold,distance:r=b.distance,includeMatches:i=b.includeMatches,findAllMatches:o=b.findAllMatches,minMatchCharLength:s=b.minMatchCharLength,isCaseSensitive:l=b.isCaseSensitive,ignoreLocation:a=b.ignoreLocation}={}){super(t),this._bitapSearch=new C(t,{location:e,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:l,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class P extends T{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,n=0,r=[],i=this.pattern.length;for(;(e=t.indexOf(this.pattern,n))>-1;)n=e+i,r.push([e,n-1]);let o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}let H=[R,P,I,O,L,j,A,z],N=H.length,_=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,D=new Set([z.type,P.type]);class B{constructor(t,{isCaseSensitive:e=b.isCaseSensitive,includeMatches:n=b.includeMatches,minMatchCharLength:r=b.minMatchCharLength,ignoreLocation:i=b.ignoreLocation,findAllMatches:o=b.findAllMatches,location:s=b.location,threshold:l=b.threshold,distance:a=b.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:n,minMatchCharLength:r,findAllMatches:o,ignoreLocation:i,location:s,threshold:l,distance:a},this.pattern=e?t:t.toLowerCase(),this.query=function(t,e={}){return t.split("|").map(t=>{let n=t.trim().split(_).filter(t=>t&&!!t.trim()),r=[];for(let t=0,i=n.length;t<i;t+=1){let i=n[t],o=!1,s=-1;for(;!o&&++s<N;){let t=H[s],n=t.isMultiMatch(i);n&&(r.push(new t(n,e)),o=!0)}if(!o)for(s=-1;++s<N;){let t=H[s],n=t.isSingleMatch(i);if(n){r.push(new t(n,e));break}}}return r})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){let e=this.query;if(!e)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r}=this.options;t=r?t:t.toLowerCase();let i=0,o=[],s=0;for(let r=0,l=e.length;r<l;r+=1){let l=e[r];o.length=0,i=0;for(let e=0,r=l.length;e<r;e+=1){let r=l[e],{isMatch:a,indices:c,score:u}=r.search(t);if(a){if(i+=1,s+=u,n){let t=r.constructor.type;D.has(t)?o=[...o,...c]:o.push(c)}}else{s=0,i=0,o.length=0;break}}if(i){let t={isMatch:!0,score:s/i};return n&&(t.indices=o),t}}return{isMatch:!1,score:1}}}let F=[];function $(t,e){for(let n=0,r=F.length;n<r;n+=1){let r=F[n];if(r.condition(t,e))return new r(t,e)}return new C(t,e)}let W={AND:"$and",OR:"$or"},J={PATH:"$path",PATTERN:"$val"},q=t=>!!(t[W.AND]||t[W.OR]),V=t=>!!t[J.PATH],U=t=>!r(t)&&l(t)&&!q(t),K=t=>({[W.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Y(t,e,{auto:n=!0}={}){let i=t=>{let s=Object.keys(t),l=V(t);if(!l&&s.length>1&&!q(t))return i(K(t));if(U(t)){let r=l?t[J.PATH]:s[0],i=l?t[J.PATTERN]:t[r];if(!o(i))throw Error(h(r));let a={keyId:x(r),pattern:i};return n&&(a.searcher=$(i,e)),a}let a={children:[],operator:s[0]};
4return s.forEach(e=>{let n=t[e];r(n)&&n.forEach(t=>{a.children.push(i(t))})}),a};return q(t)||(t=K(t)),i(t)}function G(t,e){let n=t.matches;e.matches=[],a(n)&&n.forEach(t=>{if(!a(t.indices)||!t.indices.length)return;let{indices:n,value:r}=t,i={indices:n,value:r};t.key&&(i.key=t.key.src),t.idx>-1&&(i.refIndex=t.idx),e.matches.push(i)})}function Z(t,e){e.score=t.score}class X{constructor(t,e={},n){this.options={...b,...e},this.options.useExtendedSearch,this._keyStore=new g(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof w))throw Error("Incorrect 'index' type");this._myIndex=e||S(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){a(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){let e=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,r-=1,e.push(i))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:i,sortFn:l,ignoreFieldNorm:a}=this.options,c=o(t)?o(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return!function(t,{ignoreFieldNorm:e=b.ignoreFieldNorm}){t.forEach(t=>{let n=1;t.matches.forEach(({key:t,norm:r,score:i})=>{let o=t?t.weight:null;n*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(e?1:r))}),t.score=n})}(c,{ignoreFieldNorm:a}),i&&c.sort(l),s(e)&&e>-1&&(c=c.slice(0,e)),function(t,e,{includeMatches:n=b.includeMatches,includeScore:r=b.includeScore}={}){let i=[];return n&&i.push(G),r&&i.push(Z),t.map(t=>{let{idx:n}=t,r={item:e[n],refIndex:n};return i.length&&i.forEach(e=>{e(t,r)}),r})}(c,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(t){let e=$(t,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:t,i:n,n:i})=>{if(!a(t))return;let{isMatch:o,score:s,indices:l}=e.searchIn(t);o&&r.push({item:t,idx:n,matches:[{score:s,value:t,norm:i,indices:l}]})}),r}_searchLogical(t){let e=Y(t,this.options),n=(t,e,r)=>{if(!t.children){let{keyId:n,searcher:i}=t,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:i});return o&&o.length?[{idx:r,item:e,matches:o}]:[]}let i=[];for(let o=0,s=t.children.length;o<s;o+=1){let s=n(t.children[o],e,r);if(s.length)i.push(...s);else if(t.operator===W.AND)return[]}return i},r=this._myIndex.records,i={},o=[];return r.forEach(({$:t,i:r})=>{if(a(t)){let s=n(e,t,r);s.length&&(i[r]||(i[r]={idx:r,item:t,matches:[]},o.push(i[r])),s.forEach(({matches:t})=>{i[r].matches.push(...t)}))}}),o}_searchObjectList(t){let e=$(t,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:t,i:r})=>{if(!a(t))return;let o=[];n.forEach((n,r)=>{o.push(...this._findMatches({key:n,value:t[r],searcher:e}))}),o.length&&i.push({idx:r,item:t,matches:o})}),i}_findMatches({key:t,value:e,searcher:n}){if(!a(e))return[];let i=[];if(r(e))e.forEach(({v:e,i:r,n:o})=>{if(!a(e))return;let{isMatch:s,score:l,indices:c}=n.searchIn(e);s&&i.push({score:l,key:t,value:e,idx:r,norm:o,indices:c})});else{let{v:r,n:o}=e,{isMatch:s,score:l,indices:a}=n.searchIn(r);s&&i.push({score:l,key:t,value:r,norm:o,indices:a})}return i}}X.version="7.0.0",X.createIndex=S,X.parseIndex=function(t,{getFn:e=b.getFn,fieldNormWeight:n=b.fieldNormWeight}={}){let{keys:r,records:i}=t,o=new w({getFn:e,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(i),o},X.config=b,X.parseQuery=Y,function(...t){F.push(...t)}(B)},93513:function(t,e,n){"use strict";n.d(e,{Uy:function(){return W}});var r,i=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),s=Symbol.for("immer-state");function l(t,...e){throw Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var a=Object.getPrototypeOf;function c(t){return!!t&&!!t[s]}function u(t){return!!t&&(d(t)||Array.isArray(t)||!!t[o]||!!t.constructor?.[o]||y(t)||v(t))}var h=Object.prototype.constructor.toString();function d(t){if(!t||"object"!=typeof t)return!1;let e=a(t);if(null===e)return!0;let n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===h}function p(t,e){0===f(t)?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function f(t){let e=t[s];return e?e.type_:Array.isArray(t)?1:y(t)?2:v(t)?3:0}function m(t,e){return 2===f(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function g(t,e,n){let r=f(t);2===r?t.set(e,n):3===r?t.add(n):t[e]=n}function y(t){return t instanceof Map}function v(t){return t instanceof Set}function x(t){return t.copy_||t.base_}function b(t,e){if(y(t))return new Map(t);if(v(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);if(!e&&d(t))return a(t)?{...t}:Object.assign(Object.create(null),t);let n=Object.getOwnPropertyDescriptors(t);delete n[s];let r=Reflect.ownKeys(n);for(let e=0;e<r.length;e++){let i=r[e],o=n[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(a(t),n)}function k(t,e=!1){return S(t)||c(t)||!u(t)||(f(t)>1&&(t.set=t.add=t.clear=t.delete=w),Object.freeze(t),e&&Object.entries(t).forEach(([t,e])=>k(e,!0))),t}function w(){l(2)}function S(t){return Object.isFrozen(t)}var M={};function C(t){let e=M[t];return e||l(0,t),e}function T(t,e){e&&(C("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function E(t){R(t),t.drafts_.forEach(I),t.drafts_=null}function R(t){t===r&&(r=t.parent_)}function A(t){return r={drafts_:[],parent_:r,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function I(t){let e=t[s];0===e.type_||1===e.type_?e.revoke_():e.revoked_=!0}function O(t,e){e.unfinalizedDrafts_=e.drafts_.length;let n=e.drafts_[0];return void 0!==t&&t!==n?(n[s].modified_&&(E(e),l(4)),u(t)&&(t=j(e,t),e.parent_||z(e,t)),e.patches_&&C("Patches").generateReplacementPatches_(n[s].base_,t,e.patches_,e.inversePatches_)):t=j(e,n,[]),E(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==i?t:void 0}function j(t,e,n){if(S(e))return e;
4let r=e[s];if(!r)return p(e,(i,o)=>L(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return z(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;let e=r.copy_,i=e,o=!1;3===r.type_&&(i=new Set(e),e.clear(),o=!0),p(i,(i,s)=>L(t,r,e,i,s,n,o)),z(t,e,!1),n&&t.patches_&&C("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function L(t,e,n,r,i,o,s){if(c(i)){let s=j(t,i,o&&e&&3!==e.type_&&!m(e.assigned_,r)?o.concat(r):void 0);if(g(n,r,s),!c(s))return;t.canAutoFreeze_=!1}else s&&n.add(i);if(u(i)&&!S(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;j(t,i),(!e||!e.scope_.parent_)&&"symbol"!=typeof r&&Object.prototype.propertyIsEnumerable.call(n,r)&&z(t,i)}}function z(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&k(e,n)}var P={get(t,e){if(e===s)return t;let n=x(t);if(!m(n,e))return function(t,e,n){let r=_(e,n);return r?"value"in r?r.value:r.get?.call(t.draft_):void 0}(t,n,e);let r=n[e];return t.finalized_||!u(r)?r:r===N(t.base_,e)?(B(t),t.copy_[e]=F(r,t)):r},has:(t,e)=>e in x(t),ownKeys:t=>Reflect.ownKeys(x(t)),set(t,e,n){let r=_(x(t),e);if(r?.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){let r=N(x(t),e),i=r?.[s];if(i&&i.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if((n===r?0!==n||1/n==1/r:n!=n&&r!=r)&&(void 0!==n||m(t.base_,e)))return!0;B(t),D(t)}return!!(t.copy_[e]===n&&(void 0!==n||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e]))||(t.copy_[e]=n,t.assigned_[e]=!0,!0)},deleteProperty:(t,e)=>(void 0!==N(t.base_,e)||e in t.base_?(t.assigned_[e]=!1,B(t),D(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0),getOwnPropertyDescriptor(t,e){let n=x(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.type_||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty(){l(11)},getPrototypeOf:t=>a(t.base_),setPrototypeOf(){l(12)}},H={};function N(t,e){let n=t[s];return(n?x(n):t)[e]}function _(t,e){if(!(e in t))return;let n=a(t);for(;n;){let t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=a(n)}}function D(t){!t.modified_&&(t.modified_=!0,t.parent_&&D(t.parent_))}function B(t){t.copy_||(t.copy_=b(t.base_,t.scope_.immer_.useStrictShallowCopy_))}function F(t,e){let n=y(t)?C("MapSet").proxyMap_(t,e):v(t)?C("MapSet").proxySet_(t,e):function(t,e){let n=Array.isArray(t),i={type_:n?1:0,scope_:e?e.scope_:r,modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=i,s=P;n&&(o=[i],s=H);let{revoke:l,proxy:a}=Proxy.revocable(o,s);return i.draft_=a,i.revoke_=l,a}(t,e);return(e?e.scope_:r).drafts_.push(n),n}p(P,(t,e)=>{H[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),H.deleteProperty=function(t,e){return H.set.call(this,t,e,void 0)},H.set=function(t,e,n){return P.set.call(this,t[0],e,n,t[0])};var $=new class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,e,n)=>{let r;if("function"==typeof t&&"function"!=typeof e){let n=e;e=t;let r=this;return function(t=n,...i){return r.produce(t,t=>e.call(this,t,...i))}}if("function"!=typeof e&&l(6),void 0!==n&&"function"!=typeof n&&l(7),u(t)){let i=A(this),o=F(t,void 0),s=!0;try{r=e(o),s=!1}finally{s?E(i):R(i)}return T(i,n),O(r,i)}if(t&&"object"==typeof t)l(1,t);else{if(void 0===(r=e(t))&&(r=t),r===i&&(r=void 0),this.autoFreeze_&&k(r,!0),n){let e=[],i=[];C("Patches").generateReplacementPatches_(t,r,e,i),n(e,i)}return r}},this.produceWithPatches=(t,e)=>{let n,r;return"function"==typeof t?(e,...n)=>this.produceWithPatches(e,e=>t(e,...n)):[this.produce(t,e,(t,e)=>{n=t,r=e}),n,r]},"boolean"==typeof t?.autoFreeze&&this.setAutoFreeze(t.autoFreeze),"boolean"==typeof t?.useStrictShallowCopy&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){var e;u(t)||l(8),c(t)&&(c(e=t)||l(10,e),t=function t(e){let n;if(!u(e)||S(e))return e;let r=e[s];if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=b(e,r.scope_.immer_.useStrictShallowCopy_)}else n=b(e,!0);return p(n,(e,r)=>{g(n,e,t(r))}),r&&(r.finalized_=!1),n}(e));let n=A(this),r=F(t,void 0);return r[s].isManual_=!0,R(n),r}finishDraft(t,e){let n=t&&t[s];n&&n.isManual_||l(9);let{scope_:r}=n;return T(r,e),O(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){let r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));let r=C("Patches").applyPatches_;return c(t)?r(t,e):this.produce(t,t=>r(t,e))}},W=$.produce;$.produceWithPatches.bind($),$.setAutoFreeze.bind($),$.setUseStrictShallowCopy.bind($),$.applyPatches.bind($),$.createDraft.bind($),$.finishDraft.bind($)},25804:function(t,e,n){"use strict";n.d(e,{Ig:function(){return b},MI:function(){return x},N0:function(){return E},NE:function(){return s},QK:function(){return w},U9:function(){return I},X0:function(){return T},Y_:function(){return g},_M:function(){return p},al:function(){return a},cR:function(){return u},mD:function(){return C},nw:function(){return O},o:function(){return y},rr:function(){return c},uJ:function(){return L},uo:function(){return M},xb:function(){return k},ym:function(){return j}});var r=n(16560),i=n(12806),o=n(2376);let s=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function l(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("backward",t):!(n.parentOffset>0))?n:null}let a=(t,e,n)=>{let s=l(t,n);if(!s)return!1;let a=f(s);if(!a){let n=s.blockRange(),i=n&&(0,r.k9)(n);return null!=i&&(e&&e(t.tr.lift(n,i).scrollIntoView()),!0)}let c=a.nodeBefore;if(!c.type.spec.isolating&&R(t,a,e))return!0;
4if(0==s.parent.content.size&&(d(c,"end")||o.qv.isSelectable(c))){let n=(0,r.dR)(t.doc,s.before(),s.after(),i.p2.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(d(c,"end")?o.Y1.findFrom(r.doc.resolve(r.mapping.map(a.pos,-1)),-1):o.qv.create(r.doc,a.pos-c.nodeSize)),e(r.scrollIntoView())}return!0}}return!!c.isAtom&&a.depth==s.depth-1&&(e&&e(t.tr.delete(a.pos-c.nodeSize,a.pos).scrollIntoView()),!0)},c=(t,e,n)=>{let r=l(t,n);if(!r)return!1;let i=f(r);return!!i&&h(t,i,e)},u=(t,e,n)=>{let r=m(t,n);if(!r)return!1;let i=v(r);return!!i&&h(t,i,e)};function h(t,e,n){let s=e.nodeBefore,l=e.pos-1;for(;!s.isTextblock;l--){if(s.type.spec.isolating)return!1;let t=s.lastChild;if(!t)return!1;s=t}let a=e.nodeAfter,c=e.pos+1;for(;!a.isTextblock;c++){if(a.type.spec.isolating)return!1;let t=a.firstChild;if(!t)return!1;a=t}let u=(0,r.dR)(t.doc,l,c,i.p2.empty);if(!u||u.from!=l||u instanceof r.Pu&&u.slice.size>=c-l)return!1;if(n){let e=t.tr.step(u);e.setSelection(o.Bs.create(e.doc,l)),n(e.scrollIntoView())}return!0}function d(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let p=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=f(r)}let l=s&&s.nodeBefore;return!!(l&&o.qv.isSelectable(l))&&(e&&e(t.tr.setSelection(o.qv.create(t.doc,s.pos-l.nodeSize)).scrollIntoView()),!0)};function f(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function m(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("forward",t):!(n.parentOffset<n.parent.content.size))?n:null}let g=(t,e,n)=>{let s=m(t,n);if(!s)return!1;let l=v(s);if(!l)return!1;let a=l.nodeAfter;if(R(t,l,e))return!0;if(0==s.parent.content.size&&(d(a,"start")||o.qv.isSelectable(a))){let n=(0,r.dR)(t.doc,s.before(),s.after(),i.p2.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(d(a,"start")?o.Y1.findFrom(r.doc.resolve(r.mapping.map(l.pos)),1):o.qv.create(r.doc,r.mapping.map(l.pos))),e(r.scrollIntoView())}return!0}}return!!a.isAtom&&l.depth==s.depth-1&&(e&&e(t.tr.delete(l.pos,l.pos+a.nodeSize).scrollIntoView()),!0)},y=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;s=v(r)}let l=s&&s.nodeAfter;return!!(l&&o.qv.isSelectable(l))&&(e&&e(t.tr.setSelection(o.qv.create(t.doc,s.pos)).scrollIntoView()),!0)};function v(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}let x=(t,e)=>{let n=t.selection,i=n instanceof o.qv,s;if(i){if(n.node.isTextblock||!(0,r.Mn)(t.doc,n.from))return!1;s=n.from}else if(null==(s=(0,r.GJ)(t.doc,n.from,-1)))return!1;if(e){let n=t.tr.join(s);i&&n.setSelection(o.qv.create(n.doc,s-t.doc.resolve(s).nodeBefore.nodeSize)),e(n.scrollIntoView())}return!0},b=(t,e)=>{let n=t.selection,i;if(n instanceof o.qv){if(n.node.isTextblock||!(0,r.Mn)(t.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.GJ)(t.doc,n.to,1)))return!1;return e&&e(t.tr.join(i).scrollIntoView()),!0},k=(t,e)=>{let{$from:n,$to:i}=t.selection,o=n.blockRange(i),s=o&&(0,r.k9)(o);return null!=s&&(e&&e(t.tr.lift(o,s).scrollIntoView()),!0)},w=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!!(n.parent.type.spec.code&&n.sameParent(r))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)};function S(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let M=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),l=S(i.contentMatchAt(s));if(!l||!i.canReplaceWith(s,s,l))return!1;if(e){let r=n.after(),i=t.tr.replaceWith(r,r,l.createAndFill());i.setSelection(o.Y1.near(i.doc.resolve(r),1)),e(i.scrollIntoView())}return!0},C=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof o.C1||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=S(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=t.tr.insert(n,s.createAndFill());l.setSelection(o.Bs.create(l.doc,n+1)),e(l.scrollIntoView())}return!0},T=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.Ax)(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),o=i&&(0,r.k9)(i);return null!=o&&(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)},E=(t,e)=>{let{$from:n,to:r}=t.selection,i,s=n.sharedDepth(r);return 0!=s&&(i=n.before(s),e&&e(t.tr.setSelection(o.qv.create(t.doc,i))),!0)};function R(t,e,n){let s,l,a,c=e.nodeBefore,u=e.nodeAfter,h,p;if(c.type.spec.isolating||u.type.spec.isolating)return!1;if(s=e.nodeBefore,l=e.nodeAfter,a=e.index(),s&&l&&s.type.compatibleContent(l.type)&&(!s.content.size&&e.parent.canReplace(a-1,a)?(n&&n(t.tr.delete(e.pos-s.nodeSize,e.pos).scrollIntoView()),!0):!!(e.parent.canReplace(a,a+1)&&(l.isTextblock||(0,r.Mn)(t.doc,e.pos)))&&(n&&n(t.tr.clearIncompatible(e.pos,s.type,s.contentMatchAt(s.childCount)).join(e.pos).scrollIntoView()),!0)))return!0;let f=e.parent.canReplace(e.index(),e.index()+1);if(f&&(h=(p=c.contentMatchAt(c.childCount)).findWrapping(u.type))&&p.matchType(h[0]||u.type).validEnd){if(n){let o=e.pos+u.nodeSize,s=i.HY.empty;for(let t=h.length-1;t>=0;t--)s=i.HY.from(h[t].create(null,s));s=i.HY.from(c.copy(s));let l=t.tr.step(new r.FC(e.pos-1,o,e.pos,o,new i.p2(s,1,0),h.length,!0)),a=o+2*h.length;(0,r.Mn)(l.doc,a)&&l.join(a),n(l.scrollIntoView())}return!0}let m=o.Y1.findFrom(e,1),g=m&&m.$from.blockRange(m.$to),y=g&&(0,r.k9)(g);if(null!=y&&y>=e.depth)return n&&n(t.tr.lift(g,y).scrollIntoView()),!0;if(f&&d(u,"start",!0)&&d(c,"end")){let o=c,s=[];for(;s.push(o),!o.isTextblock;)o=o.lastChild;let l=u,a=1;for(;!l.isTextblock;l=l.firstChild)a++;
4if(o.canReplace(o.childCount,o.childCount,l.content)){if(n){let o=i.HY.empty;for(let t=s.length-1;t>=0;t--)o=i.HY.from(s[t].copy(o));n(t.tr.step(new r.FC(e.pos-s.length,e.pos+u.nodeSize,e.pos+a,e.pos+u.nodeSize-a,new i.p2(o,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function A(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return!!i.node(s).isTextblock&&(n&&n(e.tr.setSelection(o.Bs.create(e.doc,t<0?i.start(s):i.end(s)))),!0)}}let I=A(-1),O=A(1);function j(t,e=null){return function(n,i){let{$from:o,$to:s}=n.selection,l=o.blockRange(s),a=l&&(0,r.nd)(l,t,e);return!!a&&(i&&i(n.tr.wrap(l,a).scrollIntoView()),!0)}}function L(t,e=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(o,s,(r,o)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(t,e))){if(r.type==t)i=!0;else{let e=n.doc.resolve(o),r=e.index();i=e.parent.canReplaceWith(r,r+1,t)}}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];i.setBlockType(o,s,t,e)}r(i.scrollIntoView())}return!0}}function z(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let P=z(s,a,p),H=z(s,g,y),N={Enter:z(w,C,T,(t,e)=>{let{$from:n,$to:i}=t.selection;if(t.selection instanceof o.qv&&t.selection.node.isBlock)return!!(n.parentOffset&&(0,r.Ax)(t.doc,n.pos))&&(e&&e(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(e){let s=i.parentOffset==i.parent.content.size,l=t.tr;(t.selection instanceof o.Bs||t.selection instanceof o.C1)&&l.deleteSelection();let a=0==n.depth?null:S(n.node(-1).contentMatchAt(n.indexAfter(-1))),c,u=c?[c]:s&&a?[{type:a}]:void 0,h=(0,r.Ax)(l.doc,l.mapping.map(n.pos),1,u);if(!u&&!h&&(0,r.Ax)(l.doc,l.mapping.map(n.pos),1,a?[{type:a}]:void 0)&&(a&&(u=[{type:a}]),h=!0),h&&(l.split(l.mapping.map(n.pos),1,u),!s&&!n.parentOffset&&n.parent.type!=a)){let t=l.mapping.map(n.before()),e=l.doc.resolve(t);a&&n.node(-1).canReplaceWith(e.index(),e.index()+1,a)&&l.setNodeMarkup(l.mapping.map(n.before()),a)}e(l.scrollIntoView())}return!0}),"Mod-Enter":M,Backspace:P,"Mod-Backspace":P,"Shift-Backspace":P,Delete:H,"Mod-Delete":H,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new o.C1(t.doc))),!0)},_={"Ctrl-h":N.Backspace,"Alt-Backspace":N["Mod-Backspace"],"Ctrl-d":N.Delete,"Ctrl-Alt-Backspace":N["Mod-Delete"],"Alt-Delete":N["Mod-Delete"],"Alt-d":N["Mod-Delete"],"Ctrl-a":I,"Ctrl-e":O};for(let t in N)_[t]=N[t];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},82696:function(t,e,n){"use strict";n.d(e,{$:function(){return p},h:function(){return d}});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=0;l<10;l++)r[48+l]=r[96+l]=String(l);for(var l=1;l<=24;l++)r[l+111]="F"+l;for(var l=65;l<=90;l++)r[l]=String.fromCharCode(l+32),i[l]=String.fromCharCode(l);for(var a in r)i.hasOwnProperty(a)||(i[a]=r[a]);var c=n(2376);let u="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function h(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function d(t){return new c.Sy({props:{handleKeyDown:p(t)}})}function p(t){let e=function(t){let e=Object.create(null);for(let n in t)e[function(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t<o.length-1;t++){let s=o[t];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))u?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+s)}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}(n)]=t[n];return e}(t);return function(t,n){var l;let a=("Esc"==(l=!(o&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||s&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?i:r)[n.keyCode]||n.key||"Unidentified")&&(l="Escape"),"Del"==l&&(l="Delete"),"Left"==l&&(l="ArrowLeft"),"Up"==l&&(l="ArrowUp"),"Right"==l&&(l="ArrowRight"),"Down"==l&&(l="ArrowDown"),l),
vendor: 6,482 bytes, line 4
4c,u=e[h(a,n)];if(u&&u(t.state,t.dispatch,t))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=e[h(a,n,!1)];if(r&&r(t.state,t.dispatch,t))return!0}if((n.shiftKey||n.altKey||n.metaKey||a.charCodeAt(0)>127)&&(c=r[n.keyCode])&&c!=a){let r=e[h(c,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}},12806:function(t,e,n){"use strict";function r(t){this.content=t}n.d(e,{aw:function(){return D},PW:function(){return U},HY:function(){return i},vc:function(){return a},ZU:function(){return H},NB:function(){return S},Ts:function(){return k},e4:function(){return c},V_:function(){return N},p2:function(){return u}}),r.prototype={constructor:r,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return -1},get:function(t){var e=this.find(t);return -1==e?void 0:this.content[e+1]},update:function(t,e,n){var i=n&&n!=t?this.remove(n):this,o=i.find(t),s=i.content.slice();return -1==o?s.push(n||t,e):(s[o+1]=e,n&&(s[o]=n)),new r(s)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new r(n)},addToStart:function(t,e){return new r([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new r(n)},addBefore:function(t,e,n){var i=this.remove(e),o=i.content.slice(),s=i.find(t);return o.splice(-1==s?o.length:s,0,e,n),new r(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=r.from(t)).size?new r(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=r.from(t)).size?new r(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=r.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};class i{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;e<t.length;e++)this.size+=t[e].nodeSize}nodesBetween(t,e,n,r=0,i){for(let o=0,s=0;s<e;o++){let l=this.content[o],a=s+l.nodeSize;if(a>t&&!1!==n(l,r+s,i||null,o)&&l.content.size){let i=s+1;l.nodesBetween(Math.max(0,t-i),Math.min(l.content.size,e-i),n,r+i)}s=a}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",o=!0;return this.nodesBetween(t,e,(s,l)=>{let a=s.isText?s.text.slice(Math.max(t,l)-l,e-l):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&a||s.isTextblock)&&n&&(o?o=!1:i+=n),i+=a},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);o<t.content.length;o++)r.push(t.content[o]);return new i(r,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let i=0,o=0;o<e;i++){let s=this.content[i],l=o+s.nodeSize;l>t&&((o<t||l>e)&&(s=s.isText?s.cut(Math.max(0,t-o),Math.min(s.text.length,e-o)):s.cut(Math.max(0,t-o-1),Math.min(s.content.size,e-o-1))),n.push(s),r+=s.nodeSize),o=l}return new i(n,r)}cutByIndex(t,e){return t==e?i.empty:0==t&&e==this.content.length?this:new i(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new i(r,o)}addToStart(t){return new i([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new i(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,e=0){return function t(e,n,r){for(let i=0;;i++){if(i==e.childCount||i==n.childCount)return e.childCount==n.childCount?null:r;let o=e.child(i),s=n.child(i);if(o==s){r+=o.nodeSize;continue}if(!o.sameMarkup(s))return r;if(o.isText&&o.text!=s.text){for(let t=0;o.text[t]==s.text[t];t++)r++;return r}if(o.content.size||s.content.size){let e=t(o.content,s.content,r+1);if(null!=e)return e}r+=o.nodeSize}}(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return function t(e,n,r,i){for(let o=e.childCount,s=n.childCount;;){if(0==o||0==s)return o==s?null:{a:r,b:i};let l=e.child(--o),a=n.child(--s),c=l.nodeSize;if(l==a){r-=c,i-=c;continue}if(!l.sameMarkup(a))return{a:r,b:i};if(l.isText&&l.text!=a.text){let t=0,e=Math.min(l.text.length,a.text.length);for(;t<e&&l.text[l.text.length-t-1]==a.text[a.text.length-t-1];)t++,r--,i--;return{a:r,b:i}}if(l.content.size||a.content.size){let e=t(l.content,a.content,r-1,i-1);if(e)return e}r-=c,i-=c}}(this,t,e,n)}findIndex(t,e=-1){if(0==t)return s(0,t);if(t==this.size)return s(this.content.length,t);if(t>this.size||t<0)throw RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t){if(i==t||e>0)return s(n+1,i);return s(n,r)}r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return i.empty;if(!Array.isArray(e))throw RangeError("Invalid input for Fragment.fromJSON");return new i(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return i.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new i(e||t,n)}static from(t){if(!t)return i.empty;if(t instanceof i)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new i([t],t.nodeSize);throw RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}i.empty=new i([],0);let o={index:0,offset:0};function s(t,e){return o.index=t,o.offset=e,o}function l(t,e){if(t===e)return!0;
vendor: 6,790 bytes, line 4
4if(!(t&&"object"==typeof t)||!(e&&"object"==typeof e))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!l(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!l(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class a{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&l(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw RangeError(`There is no mark type ${e.type} in this schema`);return n.create(e.attrs)}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return a.none;if(t instanceof a)return[t];let e=t.slice();return e.sort((t,e)=>t.type.rank-e.type.rank),e}}a.none=[];class c extends Error{}class u{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=function t(e,n,r,i){let{index:o,offset:s}=e.findIndex(n),l=e.maybeChild(o);if(s==n||l.isText)return i&&!i.canReplace(o,o,r)?null:e.cut(0,n).append(r).append(e.cut(n));let a=t(l.content,n-s-1,r);return a&&e.replaceChild(o,l.copy(a))}(this.content,t+this.openStart,e);return n&&new u(n,this.openStart,this.openEnd)}removeBetween(t,e){return new u(function t(e,n,r){let{index:i,offset:o}=e.findIndex(n),s=e.maybeChild(i),{index:l,offset:a}=e.findIndex(r);if(o==n||s.isText){if(a!=r&&!e.child(l).isText)throw RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(r))}if(i!=l)throw RangeError("Removing non-flat range");return e.replaceChild(i,s.copy(t(s.content,n-o-1,r-o-1)))}(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return u.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new u(i.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new u(t,n,r)}}function h(t,e){if(!e.type.compatibleContent(t.type))throw new c("Cannot join "+e.type.name+" onto "+t.type.name)}function d(t,e,n){let r=t.node(n);return h(r,e.node(n)),r}function p(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function f(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(p(t.nodeAfter,r),o++));for(let t=o;t<s;t++)p(i.child(t),r);e&&e.depth==n&&e.textOffset&&p(e.nodeBefore,r)}function m(t,e){return t.type.checkContent(e),t.copy(e)}function g(t,e,n){let r=[];return f(null,t,n,r),t.depth>n&&p(m(d(t,e,n+1),g(t,e,n+1)),r),f(e,null,n,r),new i(r)}u.empty=new u(i.empty,0,0);class y{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e<t;e++)r+=n.child(e).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return a.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new k(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let e=t;;){let{index:t,offset:o}=e.content.findIndex(i),s=i-o;if(n.push(e,t,r+o),!s||(e=e.child(t)).isText)break;
4i=s-1,r+=o+1}return new y(e,n,i)}static resolveCached(t,e){for(let n=0;n<v.length;n++){let r=v[n];if(r.pos==e&&r.doc==t)return r}let n=v[x]=y.resolve(t,e);return x=(x+1)%b,n}}let v=[],x=0,b=12;class k{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let w=Object.create(null);class S{constructor(t,e,n,r=a.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||i.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&l(this.attrs,e||t.defaultAttrs||w)&&a.sameSet(this.marks,n||a.none)}copy(t=null){return t==this.content?this:new S(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new S(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return u.empty;let r=this.resolve(t),i=this.resolve(e),o=n?0:r.sharedDepth(e),s=r.start(o);return new u(r.node(o).content.cut(r.pos-s,i.pos-s),r.depth-o,i.depth-o)}replace(t,e,n){return function(t,e,n){if(n.openStart>t.depth)throw new c("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new c("Inconsistent open depths");return function t(e,n,r,o){let s=e.index(o),l=e.node(o);if(s==n.index(o)&&o<e.depth-r.openStart){let i=t(e,n,r,o+1);return l.copy(l.content.replaceChild(s,i))}if(!r.content.size)return m(l,g(e,n,o));if(r.openStart||r.openEnd||e.depth!=o||n.depth!=o){let{start:t,end:s}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let t=n-1;t>=0;t--)r=e.node(t).copy(i.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(r,e);return m(l,function t(e,n,r,o,s){let l=e.depth>s&&d(e,n,s+1),a=o.depth>s&&d(r,o,s+1),c=[];return f(null,e,s,c),l&&a&&n.index(s)==r.index(s)?(h(l,a),p(m(l,t(e,n,r,o,s+1)),c)):(l&&p(m(l,g(e,n,s+1)),c),f(n,r,s,c),a&&p(m(a,g(r,o,s+1)),c)),f(o,null,s,c),new i(c)}(e,t,s,n,o))}{let t=e.parent,i=t.content;return m(t,i.cut(0,e.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(t,e,n,0)}(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(!(e=e.maybeChild(n)))return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return y.resolveCached(this,t)}resolveNoCache(t){return y.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,t=>(n.isInSet(t.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);
4let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),C(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=i.empty,r=0,o=n.childCount){let s=this.contentMatchAt(t).matchFragment(n,r,o),l=s&&s.matchFragment(this.content,e);if(!l||!l.validEnd)return!1;for(let t=r;t<o;t++)if(!this.type.allowsMarks(n.child(t).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(t).matchType(n),o=i&&i.matchFragment(this.content,e);return!!o&&o.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=a.none;for(let e=0;e<this.marks.length;e++)t=this.marks[e].addToSet(t);if(!a.sameSet(t,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(t=>t.toJSON())),t}static fromJSON(t,e){if(!e)throw RangeError("Invalid input for Node.fromJSON");let n=null;if(e.marks){if(!Array.isArray(e.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=i.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)}}S.prototype.text=void 0;class M extends S{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):C(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new M(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new M(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function C(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class T{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){var n;let r,i=new E(t,e);if(null==i.next)return T.empty;let o=function t(e){let n=[];do n.push(function(e){let n=[];do n.push(function(e){let n=function(e){if(e.eat("(")){let n=t(e);return e.eat(")")||e.err("Missing closing paren"),n}if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=(function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let t in n){let r=n[t];r.groups.indexOf(e)>-1&&i.push(r)}return 0==i.length&&t.err("No node type or group '"+e+"' found"),i})(e,e.next).map(t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}}(e);for(;;)if(e.eat("+"))n={type:"plus",expr:n};else if(e.eat("*"))n={type:"star",expr:n};else if(e.eat("?"))n={type:"opt",expr:n};else if(e.eat("{"))n=function(t,e){let n=R(t),r=n;return t.eat(",")&&(r="}"!=t.next?R(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}(e,n);else break;return n}(e));while(e.next&&")"!=e.next&&"|"!=e.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(e));while(e.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let s=(n=function(t){let e=[[]];return i(function t(e,o){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(t(n,o)),[]);if("seq"==e.type)for(let r=0;;r++){let s=t(e.exprs[r],o);if(r==e.exprs.length-1)return s;i(s,o=n())}else if("star"==e.type){let s=n();return r(o,s),i(t(e.expr,s),s),[r(s)]}else if("plus"==e.type){let s=n();return i(t(e.expr,o),s),i(t(e.expr,s),s),[r(s)]}else if("opt"==e.type)return[r(o)].concat(t(e.expr,o));else if("range"==e.type){let s=o;for(let r=0;r<e.min;r++){let r=n();i(t(e.expr,s),r),s=r}if(-1==e.max)i(t(e.expr,s),s);else for(let o=e.min;o<e.max;o++){let o=n();r(s,o),i(t(e.expr,s),o),s=o}return[r(s)]}else if("name"==e.type)return[r(o,void 0,e.value)];else throw Error("Unknown expr type")}(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach(t=>t.to=e)}}(o),r=Object.create(null),function t(e){let i=[];e.forEach(t=>{n[t].forEach(({term:t,to:e})=>{let r;if(t){for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);
vendor: 5,927 bytes, line 4
4I(n,e).forEach(e=>{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)})}})});let o=r[e.join(",")]=new T(e.indexOf(n.length-1)>-1);for(let e=0;e<i.length;e++){let n=i[e][1].sort(A);o.next.push({type:i[e][0],next:r[n.join(",")]||t(n)})}return o}(I(n,0)));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,o=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,i),s}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!(e.isText||e.hasRequiredAttrs()))return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function o(s,l){let a=s.matchFragment(t,n);if(a&&(!e||a.validEnd))return i.from(l.map(t=>t.createAndFill()));for(let t=0;t<s.next.length;t++){let{type:e,next:n}=s.next[t];if(!(e.isText||e.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let t=o(n,l.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<i.next.length;t++){let{type:o,next:s}=i.next[t];o.isLeaf||o.hasRequiredAttrs()||o.name in e||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),e[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return!function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n<e.next.length;n++)r+=(n?", ":"")+e.next[n].type.name+"->"+t.indexOf(e.next[n].next);return r}).join("\n")}}T.empty=new T(!0);class E{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw SyntaxError(t+" (in content expression '"+this.string+"')")}}function R(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function A(t,e){return e-t}function I(t,e){let n=[];return function e(r){let i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(let t=0;t<i.length;t++){let{term:r,to:o}=i[t];r||-1!=n.indexOf(o)||e(o)}}(e),n.sort(A)}function O(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function j(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(void 0===i){let e=t[r];if(e.hasDefault)i=e.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function L(t){let e=Object.create(null);if(t)for(let n in t)e[n]=new P(t[n]);return e}class z{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=L(n.attrs),this.defaultAttrs=O(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==T.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:j(this.attrs,t)}create(t=null,e,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new S(this,this.computeAttrs(t),i.from(e),a.setFrom(n))}createChecked(t=null,e,n){return e=i.from(e),this.checkContent(e),new S(this,this.computeAttrs(t),e,a.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=i.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),o=r&&r.fillBefore(i.empty,!0);return o?new S(this,t,e.append(o),a.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e<t.childCount;e++)if(!this.allowsMarks(t.child(e).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){let e;if(null==this.markSet)return t;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:a.none:t}static compile(t,e){let n=Object.create(null);t.forEach((t,r)=>n[t]=new z(t,e,r));let r=e.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");
4if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class P{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class H{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=L(r.attrs),this.excluded=null;let i=O(this.attrs);this.instance=i?new a(this,i):null}create(t=null){return!t&&this.instance?this.instance:new a(this,j(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach((t,i)=>n[t]=new H(t,r++,e,i)),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}excludes(t){return this.excluded.indexOf(t)>-1}}class N{constructor(t){this.cached=Object.create(null);let e=this.spec={};for(let n in t)e[n]=t[n];e.nodes=r.from(t.nodes),e.marks=r.from(t.marks||{}),this.nodes=z.compile(this.spec.nodes,this),this.marks=H.compile(this.spec.marks,this);let n=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],r=e.spec.content||"",i=e.spec.marks;e.contentMatch=n[r]||(n[r]=T.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.markSet="_"==i?null:i?_(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:_(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else if(t instanceof z){if(t.schema!=this)throw RangeError("Node type from different schema used ("+t.name+")")}else throw RangeError("Invalid node type: "+t);return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new M(n,n.defaultAttrs,t,a.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return S.fromJSON(this,t)}markFromJSON(t){return a.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw RangeError("Unknown node type: "+t);return e}}function _(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let e in t.marks){let r=t.marks[e];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class D{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach(t=>{null!=t.tag?this.tags.push(t):null!=t.style&&this.styles.push(t)}),this.normalizeLists=!this.tags.some(e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)})}parse(t,e={}){let n=new q(this,e,!1);return n.addAll(t,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new q(this,e,!0);return n.addAll(t,e.from,e.to),u.maxOpen(n.finish())}matchTag(t,e,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){var r;let n=this.tags[i];if(r=n.tag,(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,r)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(0==o.indexOf(t)&&(!r.context||n.matchesContext(r.context))&&(!(o.length>t.length)||61==o.charCodeAt(t.length)&&o.slice(t.length+1)==e)){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let e in t.marks){let r=t.marks[e].spec.parseDOM;r&&r.forEach(t=>{n(t=V(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)})}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach(t=>
4{n(t=V(t)),t.node||t.ignore||t.mark||(t.node=e)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new D(t,D.schemaRules(t)))}}let B={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},F={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},$={ol:!0,ul:!0};function W(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class J{constructor(t,e,n,r,i,o,s){this.type=t,this.attrs=e,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=a.none,this.stashMarks=[],this.match=o||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(i.from(t));if(e)this.match=this.type.contentMatch.matchFragment(e);else{let e=this.type.contentMatch,n;return(n=e.findWra
4pping(t.type))?(this.match=e,n):null}}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t=this.content[this.content.length-1],e;t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))&&(t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=t.withText(t.text.slice(0,t.text.length-e[0].length)))}let e=i.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,n=this.pendingMarks;e<n.length;e++){let r=n[e];(this.type?this.type.allowsMarkType(r.type):function(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=t=>{o.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e||0>o.indexOf(i)&&s(i))return!0}};if(s(i.contentMatch))return!0}}(r.type,t))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!B.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class q{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0;let r=e.topNode,i,o=W(null,e.preserveWhitespace,0)|(n?4:0);i=r?new J(r.type,r.attrs,a.none,a.none,!0,e.topMatch||r.type.contentMatch,o):n?new J(null,null,a.none,a.none,!0,null,o):new J(t.schema.topNodeType,null,a.none,a.none,!0,null,o),this.nodes=[i],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){3==t.nodeType?this.addTextNode(t):1==t.nodeType&&this.addElement(t)}withStyleRules(t,e){let n=t.getAttribute("style");if(!n)return e();let r=this.readStyles(function(t){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=e.exec(t);)r.push(n[1],n[2].trim());return r}(n));if(!r)return;let[i,o]=r,s=this.top;for(let t=0;t<o.length;t++)this.removePendingMark(o[t],s);for(let t=0;t<i.length;t++)this.addPendingMark(i[t]);e();for(let t=0;t<i.length;t++)this.removePendingMark(i[t],s);for(let t=0;t<o.length;t++)this.addPendingMark(o[t])}
4addTextNode(t){let e=t.nodeValue,n=this.top;if(2&n.options||n.inlineContext(t)||/[^ \t\r\n\u000c]/.test(e)){if(1&n.options)e=2&n.options?e.replace(/\r\n?/g,"\n"):e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=t.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)}addElement(t,e){let n=t.nodeName.toLowerCase(),r;$.hasOwnProperty(n)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&$.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let i=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(r=this.parser.matchTag(t,this,e));if(i?i.ignore:F.hasOwnProperty(n))this.findInside(t),this.ignoreFallback(t);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(t=i.skip);let e,r=this.top,o=this.needsBlock;if(B.hasOwnProperty(n))r.content.length&&r.content[0].isInline&&this.open&&(this.open--,r=this.top),e=!0,r.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}i&&i.skip?this.addAll(t):this.withStyleRules(t,()=>this.addAll(t)),e&&this.sync(r),this.needsBlock=o}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,!1===i.consuming?r:void 0)})}leafFallback(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))}ignoreFallback(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(t){let e=a.none,n=a.none;for(let r=0;r<t.length;r+=2)for(let i;;){let o=this.parser.matchStyle(t[r],t[r+1],this,i);if(!o)break;if(o.ignore)return null;if(o.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(t=>{o.clearMark(t)&&(n=t.addToSet(n))}):e=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(e),!1===o.consuming)i=o;else break}return[e,n]}addElementByRule(t,e,n){let r,i,o;e.node?(i=this.parser.schema.nodes[e.node]).isLeaf?this.insertNode(i.create(e.attrs))||this.leafFallback(t):r=this.enter(i,e.attrs||null,e.preserveWhitespace):(o=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(o));let s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(t=>this.insertNode(t));else{let n=t;"string"==typeof e.contentElement?n=t.querySelector(e.contentElement):"function"==typeof e.contentElement?n=e.contentElement(t):e.contentElement&&(n=e.contentElement),this.findAround(t,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,o&&this.removePendingMark(o,s)}addAll(t,e,n){let r=e||0;for(let i=e?t.childNodes[e]:t.firstChild,o=null==n?null:t.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(i);this.findAtPoint(t,r)}findPlace(t){let e,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(t);if(o&&(!e||e.length>o.length)&&(e=o,n=i,!o.length)||i.solid)break}if(!e)return!1;this.sync(n);for(let t=0;t<e.length;t++)this.enterInner(e[t],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(t)){this.closeExtra();let e=this.top;e.applyPending(t.type),e.match&&(e.match=e.match.matchType(t.type));let n=e.activeMarks;for(let r=0;r<t.marks.length;r++)(!e.type||e.type.allowsMarkType(t.marks[r].type))&&(n=t.marks[r].addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n){let r=this.findPlace(t.create(e));return r&&this.enterInner(t,e,!0,n),r}enterInner(t,e=null,n=!1,r){this.closeExtra();let i=this.top;i.applyPending(t),i.match=i.match&&i.match.matchType(t);let o=W(t,r,i.options);4&i.options&&0==i.content.length&&(o|=4),this.nodes.push(new J(t,e,i.activeMarks,i.pendingMarks,n,null,o)),this.open++}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)&&e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(t,s)=>{for(;t>=0;t--){let l=e[t];if(""==l){if(t==e.length-1||0==t)continue;for(;s>=i;s--)if(o(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!t||t.name!=l&&-1==t.groups.indexOf(l))return!1;s--}}return!0};return o(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;
4if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(t){let e=function(t,e){for(let n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,e){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let e=r.popFromStashMark(t);e&&r.type&&r.type.allowsMarkType(e.type)&&(r.activeMarks=e.addToSet(r.activeMarks))}if(r==e)break}}}function V(t){let e={};for(let n in t)e[n]=t[n];return e}class U{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=Y(e).createDocumentFragment());let r=n,i=[];return t.forEach(t=>{if(i.length||t.marks.length){let n=0,o=0;for(;n<i.length&&o<t.marks.length;){let e=t.marks[o];if(!this.marks[e.type.name]){o++;continue}if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<t.marks.length;){let n=t.marks[o++],s=this.serializeMark(n,t.isInline,e);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))}),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=U.renderSpec(Y(e),this.nodes[t.type.name](t));if(r){if(t.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&U.renderSpec(Y(n),r(t,e))}static renderSpec(t,e,n=null){let r;if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let i=e[0],o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s=n?t.createElementNS(n,i):t.createElement(i),l=e[1],a=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)){for(let t in a=2,l)if(null!=l[t]){let e=t.indexOf(" ");e>0?s.setAttributeNS(t.slice(0,e),t.slice(e+1),l[t]):s.setAttribute(t,l[t])}}for(let i=a;i<e.length;i++){let o=e[i];if(0===o){if(i<e.length-1||i>a)throw RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:e,contentDOM:i}=U.renderSpec(t,o,n);if(s.appendChild(e),i){if(r)throw RangeError("Multiple content holes");r=i}}}return{dom:s,contentDOM:r}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new U(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=K(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return K(t.marks)}}function K(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Y(t){return t.document||window.document}},53833:function(t,e,n){"use strict";n.d(e,{IB:function(){return s},KI:function(){return o},bw:function(){return l}});var r=n(16560),i=n(12806);function o(t,e=null){return function(n,o){let{$from:s,$to:l}=n.selection,a=s.blockRange(l),c=!1,u=a;if(!a)return!1;if(a.depth>=2&&s.node(a.depth-1).type.compatibleContent(t)&&0==a.startIndex){if(0==s.index(a.depth-1))return!1;let t=n.doc.resolve(a.start-2);u=new i.Ts(t,t,a.depth),a.endIndex<a.parent.childCount&&(a=new i.Ts(s,n.doc.resolve(l.end(a.depth)),a.depth)),c=!0}let h=(0,r.nd)(u,t,e,a);return!!h&&(o&&o((function(t,e,n,o,s){let l=i.HY.empty;for(let t=n.length-1;t>=0;t--)l=i.HY.from(n[t].type.create(n[t].attrs,l));t.step(new r.FC(e.start-(o?2:0),e.end,e.start,e.end,new i.p2(l,0,0),n.length,!0));let a=0;for(let t=0;t<n.length;t++)n[t].type==s&&(a=t+1);let c=n.length-a,u=e.start+n.length-(o?2:0),h=e.parent;for(let n=e.startIndex,i=e.endIndex,o=!0;n<i;n++,o=!1)!o&&(0,r.Ax)(t.doc,u,c)&&(t.split(u,c),u+=2*c),u+=h.child(n).nodeSize;return t})(n.tr,a,h,c,t).scrollIntoView()),!0)}}function s(t){return function(e,n){let{$from:o,$to:s}=e.selection,l=o.blockRange(s,e=>e.childCount>0&&e.firstChild.type==t);return!!l&&(!n||(o.node(l.depth-1).type==t?function(t,e,n,o){let s=t.tr,l=o.end,a=o.$to.end(o.depth);l<a&&(s.step(new r.FC(l-1,a,l,a,new i.p2(i.HY.from(n.create(null,o.parent.copy())),1,0),1,!0)),o=new i.Ts(s.doc.resolve(o.$from.pos),s.doc.resolve(a),o.depth));let c=(0,r.k9)(o);if(null==c)return!1;s.lift(o,c);let u=s.mapping.map(l,-1)-1;return(0,r.Mn)(s.doc,u)&&s.join(u),e(s.scrollIntoView()),!0}(e,n,t,l):function(t,e,n){let o=t.tr,s=n.parent;for(let t=n.end,e=n.endIndex-1,r=n.startIndex;e>r;e--)t-=s.child(e).nodeSize,o.delete(t-1,t+1);
4let l=o.doc.resolve(n.start),a=l.nodeAfter;if(o.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,u=n.endIndex==s.childCount,h=l.node(-1),d=l.index(-1);if(!h.canReplace(d+(c?0:1),d+1,a.content.append(u?i.HY.empty:i.HY.from(s))))return!1;let p=l.pos,f=p+a.nodeSize;return o.step(new r.FC(p-(c?1:0),f+(u?1:0),p+1,f-1,new i.p2((c?i.HY.empty:i.HY.from(s.copy(i.HY.empty))).append(u?i.HY.empty:i.HY.from(s.copy(i.HY.empty))),c?0:1,u?0:1),c?0:1)),e(o.scrollIntoView()),!0}(e,n,l)))}}function l(t){return function(e,n){let{$from:o,$to:s}=e.selection,l=o.blockRange(s,e=>e.childCount>0&&e.firstChild.type==t);if(!l)return!1;let a=l.startIndex;if(0==a)return!1;let c=l.parent,u=c.child(a-1);if(u.type!=t)return!1;if(n){let o=u.lastChild&&u.lastChild.type==c.type,s=i.HY.from(o?t.create():null),a=new i.p2(i.HY.from(t.create(null,i.HY.from(c.type.create(null,s)))),o?3:1,0),h=l.start,d=l.end;n(e.tr.step(new r.FC(h-(o?3:1),d,h,d,a,1,!0)).scrollIntoView())}return!0}}},2376:function(t,e,n){"use strict";n.d(e,{Bs:function(){return u},C1:function(){return f},H$:function(){return E},Sy:function(){return M},Y1:function(){return s},qv:function(){return d},yy:function(){return S}});var r=n(12806),i=n(16560);let o=Object.create(null);class s{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new l(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=r.p2.empty){let n=e.content.lastChild,i=null;for(let t=0;t<e.openEnd;t++)i=n,n=n.lastChild;let o=t.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:c}=s[l],u=t.mapping.slice(o);t.replaceRange(u.map(a.pos),u.map(c.pos),l?r.p2.empty:e),0==l&&y(t,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],l=t.mapping.slice(n),a=l.map(o.pos),c=l.map(s.pos);i?t.deleteRange(a,c):(t.replaceRangeWith(a,c,e),y(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new u(t):g(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let r=t.depth-1;r>=0;r--){let i=e<0?g(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):g(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(i)return i}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new f(t.node(0))}static atStart(t){return g(t,t,0,0,1)||new f(t)}static atEnd(t){return g(t,t,t.content.size,t.childCount,-1)||new f(t)}static fromJSON(t,e){if(!e||!e.type)throw RangeError("Invalid input for Selection.fromJSON");let n=o[e.type];if(!n)throw RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in o)throw RangeError("Duplicate use of selection JSON ID "+t);return o[t]=e,e.prototype.jsonID=t,e}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class l{constructor(t,e){this.$from=t,this.$to=e}}let a=!1;function c(t){a||t.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class u extends s{constructor(t,e=t){c(t),c(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=t.resolve(e.map(this.anchor));return new u(r.parent.inlineContent?r:n,n)}replace(t,e=r.p2.empty){if(super.replace(t,e),e==r.p2.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof u&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new h(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new u(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if((!n||r)&&(n=r>=0?1:-1),!e.parent.inlineContent){let t=s.findFrom(e,n,!0)||s.findFrom(e,-n,!0);if(!t)return s.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r?t=e:(t=(s.findFrom(t,-n,!0)||s.findFrom(t,n,!0)).$anchor).pos<e.pos==r<0||(t=e)),new u(t,e)}}s.jsonID("text",u);class h{constructor(t,e){this.anchor=t,this.head=e}map(t){return new h(t.map(this.anchor),t.map(this.head))}resolve(t){return u.between(t.resolve(this.anchor),t.resolve(this.head))}}class d extends s{constructor(t){let e=t.nodeAfter;super(t,t.node(0).resolve(t.pos+e.nodeSize)),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),i=t.resolve(r);return n?s.near(i):new d(i)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(t){return t instanceof d&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new d(t.resolve(e.anchor))}static create(t,e){return new d(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}d.prototype.visible=!1,s.jsonID("node",d);class p{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new h(n,n):new p(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&d.isSelectable(n)?new d(e):s.near(e)}}class f extends s{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}
4replace(t,e=r.p2.empty){if(e==r.p2.empty){t.delete(0,t.doc.content.size);let e=s.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new f(t)}map(t){return new f(t)}eq(t){return t instanceof f}getBookmark(){return m}}s.jsonID("all",f);let m={map(){return this},resolve:t=>new f(t)};function g(t,e,n,r,i,o=!1){if(e.inlineContent)return u.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let r=e.child(s);if(r.isAtom){if(!o&&d.isSelectable(r))return d.create(t,n-(i<0?r.nodeSize:0))}else{let e=g(t,r,n+i,i<0?r.childCount:0,i,o);if(e)return e}n+=r.nodeSize*i}return null}function y(t,e,n){let r,o=t.steps.length-1;if(o<e)return;let l=t.steps[o];(l instanceof i.Pu||l instanceof i.FC)&&(t.mapping.maps[o].forEach((t,e,n,i)=>{null==r&&(r=i)}),t.setSelection(s.near(t.doc.resolve(r),n)))}class v extends i.wx{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let i=this.storedMarks;if(!i){let t=this.doc.resolve(e);i=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function x(t,e){return e&&t?t.bind(e):t}class b{constructor(t,e,n){this.name=t,this.init=x(e.init,n),this.apply=x(e.apply,n)}}let k=[new b("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new b("selection",{init:(t,e)=>t.selection||s.atStart(e.doc),apply:t=>t.selection}),new b("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new b("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class w{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=k.slice(),e&&e.forEach(t=>{if(this.pluginsByKey[t.key])throw RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new b(t.key,t.spec.state,t))})}}class S{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let l=r?r[o].n:0,a=r?r[o].state:this,c=l<e.length&&s.spec.appendTransaction.call(s,l?e.slice(l):e,a,n);
4if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<o?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:e.length})}}if(!i)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let e=new S(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];e[i.name]=i.apply(t,this[i.name],this,e)}return e}get tr(){return new v(this)}static create(t){let e=new w(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new S(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new w(this.schema,t.plugins),n=e.fields,r=new S(e);for(let e=0;e<n.length;e++){let i=n[e].name;r[i]=this.hasOwnProperty(i)?this[i]:n[e].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map(t=>t.toJSON())),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],i=r.spec.state;i&&i.toJSON&&(e[n]=i.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw RangeError("Required config field 'schema' missing");let i=new w(t.schema,t.plugins),o=new S(i);return i.fields.forEach(i=>{if("doc"==i.name)o.doc=r.NB.fromJSON(t.schema,e.doc);else if("selection"==i.name)o.selection=s.fromJSON(o.doc,e.selection);else if("storedMarks"==i.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],l=s.spec.state;if(s.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,r)){o[i.name]=l.fromJSON.call(s,t,e[r],o);return}}o[i.name]=i.init(t,o)}}),o}}class M{constructor(t){this.spec=t,this.props={},t.props&&function t(e,n,r){for(let i in e){let o=e[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=t(o,n,{})),r[i]=o}return r}(t.props,this,this.props),this.key=t.key?t.key.key:T("plugin")}getState(t){return t[this.key]}}let C=Object.create(null);function T(t){return t in C?t+"$"+ ++C[t]:(C[t]=0,t+"$")}class E{constructor(t="key"){this.key=T(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},16560:function(t,e,n){"use strict";n.d(e,{Ax:function(){return k},FC:function(){return g},GJ:function(){return M},Mn:function(){return w},Pu:function(){return m},dR:function(){return T},k9:function(){return v},nd:function(){return x},nj:function(){return C},vs:function(){return s},wx:function(){return N}});var r=n(12806);class i{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class o{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&o.empty)return o.empty}recover(t){let e=0,n=65535&t;if(!this.inverted)for(let t=0;t<n;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*n]+e+(t-(65535&t))/65536}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>t)break;let c=this.ranges[l+o],u=this.ranges[l+s],h=a+c;if(t<=h){let o=c?t==a?-1:t==h?1:e:e,s=a+r+(o<0?0:u);if(n)return s;let d=t==(e<0?a:h)?null:l/3+(t-a)*65536,p=t==a?2:t==h?1:4;return(e<0?t!=a:t!=h)&&(p|=8),new i(s,p,d)}r+=u-c}return n?t+r:new i(t+r,0,null)}touches(t,e){let n=0,r=65535&e,i=this.inverted?2:1,o=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let s=this.ranges[e]-(this.inverted?n:0);if(s>t)break;let l=this.ranges[e+i];if(t<=s+l&&e==3*r)return!0;n+=this.ranges[e+o]-l}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),l=o+(this.inverted?0:i),a=this.ranges[r+e],c=this.ranges[r+n];t(s,s+a,l,l+c),i+=c-a}}invert(){return new o(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?o.empty:new o(t<0?[0,-t,0]:[0,0,t])}}o.empty=new o([]);class s{constructor(t=[],e,n=0,r=t.length){this.maps=t,this.mirror=e,this.from=n,this.to=r}slice(t=0,e=this.maps.length){return new s(this.maps,this.mirror,t,e)}copy(){return new s(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)}appendMapping(t){for(let e=0,n=this.maps.length;e<t.maps.length;e++){let r=t.getMirror(e);this.appendMap(t.maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror){for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new s;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this.maps[n].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this.maps[n].mapResult(t,e);if(null!=i.recover){let e=this.getMirror(n);if(null!=e&&e>n&&e<this.to){n=e,t=this.maps[e].recover(i.recover);continue}}r|=i.delInfo,t=i.pos}return n?t:new i(t,r,null)}}let l=Object.create(null);class a{getMap(){return o.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=l[e.stepType];if(!n)throw RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in l)throw RangeError("Duplicate use of step JSON ID "+t);return l[t]=e,e.prototype.jsonID=t,e}}class c{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new c(t,null)}static fail(t){return new c(null,t)}
vendor: 7,174 bytes, line 4
4static fromReplace(t,e,n,i){try{return c.ok(t.replace(e,n,i))}catch(t){if(t instanceof r.e4)return c.fail(t.message);throw t}}}function u(t,e,n){let i=[];for(let r=0;r<t.childCount;r++){let o=t.child(r);o.content.size&&(o=o.copy(u(o.content,e,o))),o.isInline&&(o=e(o,n,r)),i.push(o)}return r.HY.fromArray(i)}class h extends a{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=t.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new r.p2(u(e.content,(t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t,i),e.openStart,e.openEnd);return c.fromReplace(t,this.from,this.to,o)}invert(){return new d(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new h(e.pos,n.pos,this.mark)}merge(t){return t instanceof h&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new h(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new h(e.from,e.to,t.markFromJSON(e.mark))}}a.jsonID("addMark",h);class d extends a{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new r.p2(u(e.content,t=>t.mark(this.mark.removeFromSet(t.marks)),t),e.openStart,e.openEnd);return c.fromReplace(t,this.from,this.to,n)}invert(){return new h(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new d(e.pos,n.pos,this.mark)}merge(t){return t instanceof d&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new d(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new d(e.from,e.to,t.markFromJSON(e.mark))}}a.jsonID("removeMark",d);class p extends a{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return c.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return c.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;n<e.marks.length;n++)if(!e.marks[n].isInSet(t))return new p(this.pos,e.marks[n]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new p(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new p(e.pos,t.markFromJSON(e.mark))}}a.jsonID("addNodeMark",p);class f extends a{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return c.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return c.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new p(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new f(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new f(e.pos,t.markFromJSON(e.mark))}}a.jsonID("removeNodeMark",f);class m extends a{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&y(t,this.from,this.to)?c.fail("Structure replace would overwrite content"):c.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new o([this.from,this.to-this.from,this.slice.size])}invert(t){return new m(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deletedAcross&&n.deletedAcross?null:new m(e.pos,Math.max(e.pos,n.pos),this.slice)}merge(t){if(!(t instanceof m)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?r.p2.empty:new r.p2(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new m(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?r.p2.empty:new r.p2(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new m(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new m(e.from,e.to,r.p2.fromJSON(t,e.slice),!!e.structure)}}a.jsonID("replace",m);class g extends a{constructor(t,e,n,r,i,o,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(t){if(this.structure&&(y(t,this.from,this.gapFrom)||y(t,this.gapTo,this.to)))return c.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return c.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?c.fromReplace(t,this.from,this.to,n):c.fail("Content does not fit in gap")}getMap(){return new o([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new g(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||i>n.pos?null:new g(e.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new g(e.from,e.to,e.gapFrom,e.gapTo,r.p2.fromJSON(t,e.slice),e.insert,!!e.structure)}}function y(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>
40&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let t=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,i--}}return!1}function v(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),i=t.$from.index(n),o=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(i,o,e))return n;if(0==n||r.type.spec.isolating||!((0==i||r.canReplace(i,r.childCount))&&(o==r.childCount||r.canReplace(0,o))))break}return null}function x(t,e,n=null,r=t){let i=function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}(t,e),o=i&&function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let t=r;l&&t<i;t++)l=l.matchType(n.child(t).type);return l&&l.validEnd?s:null}(r,e);return o?i.map(b).concat({type:e,attrs:n}).concat(o.map(b)):null}function b(t){return{type:t,attrs:null}}function k(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let t=i.depth-1,e=n-2;t>o;t--,e--){let n=i.node(t),o=i.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),l=r&&r[e+1];l&&(s=s.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[e]||n;if(!n.canReplace(o+1,n.childCount)||!a.type.validContent(s))return!1}let l=i.indexAfter(o),a=r&&r[0];return i.node(o).canReplaceWith(l,l,a?a.type:i.node(o+1).type)}function w(t,e){let n=t.resolve(e),r=n.index();return S(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function S(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function M(t,e,n=-1){let r=t.resolve(e);for(let t=r.depth;;t--){let i,o,s=r.index(t);if(t==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(t+1),s++,o=r.node(t).maybeChild(s)):(i=r.node(t).maybeChild(s-1),o=r.node(t+1)),i&&!i.isTextblock&&S(i,o)&&r.node(t).canReplace(s,s+1))return e;if(0==t)break;e=n<0?r.before(t):r.after(t)}}function C(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let t=0;t<n.openStart;t++)i=i.firstChild.content;for(let t=1;t<=(0==n.openStart&&n.size?2:1);t++)for(let e=r.depth;e>=0;e--){let n=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,o=r.index(e)+(n>0?1:0),s=r.node(e),l=!1;if(1==t)l=s.canReplace(o,o,i);else{let t=s.contentMatchAt(o).findWrapping(i.firstChild.type);l=t&&s.canReplaceWith(o,o,t[0])}if(l)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}function T(t,e,n=e,i=r.p2.empty){if(e==n&&!i.size)return null;let o=t.resolve(e),s=t.resolve(n);return E(o,s,i)?new m(e,n,i):new R(o,s,i).fit()}function E(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}a.jsonID("replaceAround",g);class R{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=r.HY.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;let o=this.placed,s=n.depth,l=i.depth;for(;s&&l&&1==o.childCount;)o=o.firstChild.content,s--,l--;let a=new r.p2(o,s,l);return t>-1?new g(n.pos,t,this.$to.pos,this.$to.end(),a,e):a.size||n.pos!=this.$to.pos?new m(n.pos,i.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<t;n++){let i=e.firstChild;if(e.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){t=n;break}e=i.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t=null,i=(n?(t=O(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let o=this.depth;o>=0;o--){let{type:s,match:l}=this.frontier[o],a,c=null;if(1==e&&(i?l.matchType(i.type)||(c=l.fillBefore(r.HY.from(i),!1)):t&&s.compatibleContent(t.type)))return{sliceDepth:n,frontierDepth:o,parent:t,inject:c};
4if(2==e&&i&&(a=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:o,parent:t,wrap:a};if(t&&l.matchType(t.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=O(t,e);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.p2(t,e+1,Math.max(n,i.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=O(t,e);if(i.childCount<=1&&e>0){let o=t.size-e<=e+i.size;this.unplaced=new r.p2(A(t,e-1,1),e-1,o?e-1:n)}else this.unplaced=new r.p2(A(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:i,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let t=0;t<o.length;t++)this.openFrontierNode(o[t]);let s=this.unplaced,l=n?n.content:s.content,a=s.openStart-t,c=0,u=[],{match:h,type:d}=this.frontier[e];if(i){for(let t=0;t<i.childCount;t++)u.push(i.child(t));h=h.matchFragment(i)}let p=l.size+t-(s.content.size-s.openEnd);for(;c<l.childCount;){let t=l.child(c),e=h.matchType(t.type);if(!e)break;(++c>1||0==a||t.content.size)&&(h=e,u.push(function t(e,n,i){if(n<=0)return e;let o=e.content;return n>1&&(o=o.replaceChild(0,t(o.firstChild,n-1,1==o.childCount?i-1:0))),n>0&&(o=e.type.contentMatch.fillBefore(o).append(o),i<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.HY.empty,!0)))),e.copy(o)}(t.mark(d.allowedMarks(t.marks)),1==c?a:0,c==l.childCount?p:-1)))}let f=c==l.childCount;f||(p=-1),this.placed=I(this.placed,e,r.HY.from(u)),this.frontier[e].match=h,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=l;t<p;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=f?0==t?r.p2.empty:new r.p2(A(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new r.p2(A(s.content,t,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let t=this.frontier[this.depth],e;if(!t.type.isTextblock||!j(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){e:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],i=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),o=j(t,e,r,n,i);if(o){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],i=j(t,n,r,e,!0);if(!i||i.childCount)continue e}return{depth:e,fit:o,move:i?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=I(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=I(this.placed,this.depth,r.HY.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(r.HY.empty,!0);t.childCount&&(this.placed=I(this.placed,this.frontier.length,t))}}function A(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(A(t.firstChild.content,e-1,n)))}function I(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(I(t.lastChild.content,e-1,n)))}function O(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function j(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let l=r.fillBefore(o.content,!0,s);return l&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,o.content,s)?l:null}function L(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let r=t.start(i);if(r<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(r==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==r-1)&&n.push(i)}return n}class z extends a{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return c.fail("No node at attribute step's position");let n=Object.create(null);for(let t in e.attrs)n[t]=e.attrs[t];n[this.attr]=this.value;let i=e.type.create(n,null,e.marks);return c.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(i),0,e.isLeaf?0:1))}getMap(){return o.empty}invert(t){return new z(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new z(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new z(e.pos,e.attr,e.value)}}a.jsonID("attr",z);class P extends a{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let n in t.attrs)e[n]=t.attrs[n];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return c.ok(n)}getMap(){return o.empty}invert(t){return new P(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new P(e.attr,e.value)}}a.jsonID("docAttr",P);
4let H=class extends Error{};(H=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n}).prototype=Object.create(Error.prototype),H.prototype.constructor=H,H.prototype.name="TransformError";class N{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new s}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new H(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=r.p2.empty){let i=T(this.doc,t,e,n);return i&&this.step(i),this}replaceWith(t,e,n){return this.replace(t,e,new r.p2(r.HY.from(n),0,0))}delete(t,e){return this.replace(t,e,r.p2.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return!function(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),s=t.doc.resolve(n);if(E(o,s,i))return t.step(new m(e,n,i));let l=L(o,t.doc.resolve(n));0==l[l.length-1]&&l.pop();let a=-(o.depth+1);l.unshift(a);for(let t=o.depth,e=o.pos-1;t>0;t--,e--){let n=o.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(t)>-1?a=t:o.before(t)==e&&l.splice(1,0,-t)}let c=l.indexOf(a),u=[],h=i.openStart;for(let t=i.content,e=0;;e++){let n=t.firstChild;if(u.push(n),e==i.openStart)break;t=n.content}for(let t=h-1;t>=0;t--){var d;let e=u[t],n=(d=e.type).spec.defining||d.spec.definingForContent;if(n&&!e.sameMarkup(o.node(Math.abs(a)-1)))h=t;else if(n||!e.type.isTextblock)break}for(let e=i.openStart;e>=0;e--){let a=(e+h+1)%(i.openStart+1),d=u[a];if(d)for(let e=0;e<l.length;e++){let u=l[(e+c)%l.length],h=!0;u<0&&(h=!1,u=-u);let p=o.node(u-1),f=o.index(u-1);if(p.canReplaceWith(f,f,d.type,d.marks))return t.replace(o.before(u),h?s.after(u):n,new r.p2(function t(e,n,i,o,s){if(n<i){let r=e.firstChild;e=e.replaceChild(0,r.copy(t(r.content,n+1,i,o,r)))}if(n>o){let t=s.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.HY.empty,!0))}return e}(i.content,0,i.openStart,a),a,i.openEnd))}}let p=t.steps.length;for(let r=l.length-1;r>=0&&(t.replace(e,n,i),!(t.steps.length>p));r--){let t=l[r];t<0||(e=o.before(t),n=s.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return!function(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let r=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e<r.node(t).childCount)break}return null}(t.doc,e,i.type);null!=r&&(e=n=r)}t.replaceRange(e,n,new r.p2(r.HY.from(i),0,0))}(this,t,e,n),this}deleteRange(t,e){return!function(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),o=L(r,i);for(let e=0;e<o.length;e++){let n=o[e],s=e==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return t.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return t.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o)return t.delete(r.before(o),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return!function(t,e,n){let{$from:i,$to:o,depth:s}=e,l=i.before(s+1),a=o.after(s+1),c=l,u=a,h=r.HY.empty,d=0;for(let t=s,e=!1;t>n;t--)e||i.index(t)>0?(e=!0,h=r.HY.from(i.node(t).copy(h)),d++):c--;let p=r.HY.empty,f=0;for(let t=s,e=!1;t>n;t--)e||o.after(t+1)<o.end(t)?(e=!0,p=r.HY.from(o.node(t).copy(p)),f++):u++;t.step(new g(c,u,l,a,new r.p2(h.append(p),d,f),h.size-d,!0))}(this,t,e),this}join(t,e=1){return!function(t,e,n){let i=new m(e-n,e+n,r.p2.empty,!0);t.step(i)}(this,t,e),this}wrap(t,e){return!function(t,e,n){let i=r.HY.empty;for(let t=n.length-1;t>=0;t--){if(i.size){let e=n[t].type.contentMatch.matchFragment(i);if(!e||!e.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.HY.from(n[t].type.create(n[t].attrs,i))}let o=e.start,s=e.end;t.step(new g(o,s,o,s,new r.p2(i,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,i=null){return!function(t,e,n,i,o){if(!i.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(e,n)=>{var l,a;let c,u;if(e.isTextblock&&!e.hasMarkup(i,o)&&(l=t.doc,a=t.mapping.slice(s).map(n),u=(c=l.resolve(a)).index(),c.parent.canReplaceWith(u,u+1,i))){t.clearIncompatible(t.mapping.slice(s).map(n,1),i);let l=t.mapping.slice(s),a=l.map(n,1),c=l.map(n+e.nodeSize,1);return t.step(new g(a,c,a+1,c-1,new r.p2(r.HY.from(i.create(o,null,e.marks)),0,0),1,!0)),!1}})}(this,t,e,n,i),this}setNodeMarkup(t,e,n=null,i){return!function(t,e,n,i,o){let s=t.doc.nodeAt(e);if(!s)throw RangeError("No node at given position");n||(n=s.type);let l=n.create(i,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,l);if(!n.validContent(s.content))throw RangeError("Invalid content for node type "+n.name);t.step(new g(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new r.p2(r.HY.from(l),0,0),1,!0))}(this,t,e,n,i),this}setNodeAttribute(t,e,n){return this.step(new z(t,e,n)),this}setDocAttribute(t,e){return this.step(new P(t,e)),this}addNodeMark(t,e){return this.step(new p(t,e)),this}
4removeNodeMark(t,e){if(!(e instanceof r.vc)){let n=this.doc.nodeAt(t);if(!n)throw RangeError("No node at position "+t);if(!(e=e.isInSet(n.marks)))return this}return this.step(new f(t,e)),this}split(t,e=1,n){return!function(t,e,n=1,i){let o=t.doc.resolve(e),s=r.HY.empty,l=r.HY.empty;for(let t=o.depth,e=o.depth-n,a=n-1;t>e;t--,a--){s=r.HY.from(o.node(t).copy(s));let e=i&&i[a];l=r.HY.from(e?e.type.create(e.attrs,l):o.node(t).copy(l))}t.step(new m(e,e,new r.p2(s.append(l),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){var r;let i,o,s,l;return r=this,s=[],l=[],r.doc.nodesBetween(t,e,(r,a,c)=>{if(!r.isInline)return;let u=r.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){let c=Math.max(a,t),p=Math.min(a+r.nodeSize,e),f=n.addToSet(u);for(let t=0;t<u.length;t++)u[t].isInSet(f)||(i&&i.to==c&&i.mark.eq(u[t])?i.to=p:s.push(i=new d(c,p,u[t])));o&&o.to==c?o.to=p:l.push(o=new h(c,p,n))}}),s.forEach(t=>r.step(t)),l.forEach(t=>r.step(t)),this}removeMark(t,e,n){var i;let o,s;return i=this,o=[],s=0,i.doc.nodesBetween(t,e,(i,l)=>{if(!i.isInline)return;s++;let a=null;if(n instanceof r.ZU){let t=i.marks,e;for(;e=n.isInSet(t);)(a||(a=[])).push(e),t=e.removeFromSet(t)}else n?n.isInSet(i.marks)&&(a=[n]):a=i.marks;if(a&&a.length){let n=Math.min(l+i.nodeSize,e);for(let e=0;e<a.length;e++){let r=a[e],i;for(let t=0;t<o.length;t++){let e=o[t];e.step==s-1&&r.eq(o[t].style)&&(i=e)}i?(i.to=n,i.step=s):o.push({style:r,from:Math.max(l,t),to:n,step:s})}}}),o.forEach(t=>i.step(new d(t.from,t.to,t.style))),this}clearIncompatible(t,e,n){return!function(t,e,n,i=n.contentMatch){let o=t.doc.nodeAt(e),s=[],l=e+1;for(let e=0;e<o.childCount;e++){let a=o.child(e),c=l+a.nodeSize,u=i.matchType(a.type);if(u){i=u;for(let e=0;e<a.marks.length;e++)n.allowsMarkType(a.marks[e].type)||t.step(new d(l,c,a.marks[e]));if(a.isText&&!n.spec.code){let t,e=/\r?\n|\r/g,i;for(;t=e.exec(a.text);)i||(i=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(a.marks))),0,0)),s.push(new m(l+t.index,l+t.index+t[0].length,i))}}else s.push(new m(l,c,r.p2.empty));l=c}if(!i.validEnd){let e=i.fillBefore(r.HY.empty,!0);t.replace(l,l,new r.p2(e,0,0))}for(let e=s.length-1;e>=0;e--)t.step(s[e])}(this,t,e,n),this}}},26246:function(t,e,n){"use strict";n.d(e,{Mr:function(){return e9},OO:function(){return ez}});var r,i=n(67294),o=n(73935);function s(t,e){return n=>t(e(n))}function l(t,e){return e(t)}function a(...t){return t}function c(t){t()}function u(t){return void 0!==t}function h(){}function d(t){t(2)}function p(t){return t(4)}function f(t,e){return t(1,t=>e(0,t))}function m(t,e){let n=t(1,t=>{n(),e(t)});return n}function g(){let t=[];return(e,n)=>{switch(e){case 2:t.splice(0,t.length);return;case 1:return t.push(n),()=>{let e=t.indexOf(n);e>-1&&t.splice(e,1)};case 0:t.slice().forEach(t=>{t(n)});return;default:throw Error(`unrecognized action ${e}`)}}}function y(t){let e=t,n=g();return(t,r)=>{switch(t){case 1:r(e);break;case 0:e=r;break;case 4:return e}return n(t,r)}}function v(t){var e;return f(t,e=g()),e}function x(t,e){var n;return f(t,n=y(e)),n}function b(t,...e){let n=function(...t){return e=>t.reduceRight(l,e)}(...e);return(e,r)=>{switch(e){case 1:return t(1,n(r));case 2:d(t);return}}}function k(t,e){return t===e}function w(t=k){let e;return n=>r=>{t(e,r)||(e=r,n(r))}}function S(t){return e=>n=>{t(n)&&e(n)}}function M(t){return e=>s(e,t)}function C(t){return e=>()=>e(t)}function T(t,e){return n=>r=>n(e=t(e,r))}function E(t){return e=>n=>{t>0?t--:e(n)}}function R(t){let e,n=null;return r=>i=>{n=i,e||(e=setTimeout(()=>{e=void 0,r(n)},t))}}function A(t){let e,n;return r=>i=>{e=i,n&&clearTimeout(n),n=setTimeout(()=>{r(e)},t)}}function I(...t){let e=Array(t.length),n=0,r=null,i=Math.pow(2,t.length)-1;return t.forEach((t,o)=>{let s=Math.pow(2,o);t(1,t=>{let l=n;n|=s,e[o]=t,l!==i&&n===i&&r&&(r(),r=null)})}),t=>o=>{let s=()=>t([o].concat(e));n===i?s():r=s}}function O(...t){return function(e,n){switch(e){case 1:return function(...t){return()=>{t.map(c)}}(...t.map(t=>t(1,n)));case 2:return;default:throw Error(`unrecognized action ${e}`)}}}function j(t,e=k){return b(t,w(e))}function L(...t){let e=g(),n=Array(t.length),r=0,i=Math.pow(2,t.length)-1;return t.forEach((t,o)=>{let s=Math.pow(2,o);t(1,t=>{n[o]=t,(r|=s)===i&&e(0,n)})}),function(t,o){switch(t){case 1:return r===i&&o(n),e(1,o);case 2:return d(e);default:throw Error(`unrecognized action ${t}`)}}}function z(t,e=[],{singleton:n}={singleton:!0}){return{id:P(),constructor:t,dependencies:e,singleton:n}}let P=()=>Symbol(),H="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function N(t,e,n){let r=Object.keys(e.required||{}),o=Object.keys(e.optional||{}),s=Object.keys(e.methods||{}),l=Object.keys(e.events||{}),a=i.createContext({});function c(t,n){for(let i of(t.propsReady&&(0,t.propsReady)(0,!1),r))(0,t[e.required[i]])(0,n[i]);for(let r of o)r in n&&(0,t[e.optional[r]])(0,n[r]);t.propsReady&&(0,t.propsReady)(0,!0)}return{Component:i.forwardRef((u,p)=>{var f;let{children:m,...g}=u,[y]=i.useState(()=>{var e;return c(e=function(t){let e=new Map,n=({id:t,constructor:r,dependencies:i,singleton:o})=>{if(o&&e.has(t))return e.get(t);let s=r(i.map(t=>n(t)));return o&&e.set(t,s),s};return n(t)}(t),g),e}),[v]=i.useState(()=>{var t;return t=y,l.reduce((n,r)=>(n[r]=function(t){let e,n;let r=()=>e&&e();return function(i,o){switch(i){case 1:if(!o)return r(),h;if(n===o)return;return r(),n=o,e=t(1,o);case 2:r(),n=null;return;default:throw Error(`unrecognized action ${i}`)}}}(t[e.events[r]]),n),{})});return H(()=>{for(let t of l)t in g&&(0,v[t])(1,g[t]);return()=>{Object.values(v).map(d)}},[g,v,y]),H(()=>{c(y,g)}),i.useImperativeHandle(p,(f=s.reduce((t,n)=>(t[n]=t=>{(0,y[e.methods[n]])(0,t)},t),{}),()=>f)),i.createElement(a.Provider,{value:y},n?i.createElement(n,function(t,e){let n={},r={},i=0,o=t.length;for(;i<o;)r[t[i]]=1,i+=1;for(let t in e)r.hasOwnProperty(t)||(n[t]=e[t]);return n}([...r,...o,...l],g),m):m)}),usePublisher:t=>{var e;return i.useCallback((e=i.useContext(a)[t],t=>{e(0,t)}),[t])},useEmitterValue:i.version.startsWith("18")?t=>{let e=i.useContext(a)[t],n=i.useCallback(t=>e(1,t),[e]);return i.useSyncExternalStore(n,()=>p(e),()=>p(e))}:t=>{let e=i.useContext(a)[t],[n,r]=i.useState(()=>p(e));return H(()=>e(1,t=>{t!==n&&r(()=>t)}),[e,n]),n},useEmitter:(t,e)=>{let n=i.useContext(a)[t];H(()=>n(1,e),[e,n])}}}let _="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;var D=((r=D||{})[r.DEBUG=0]="DEBUG",r[r.INFO=1]="INFO",r[r.WARN=2]="WARN",r[r.ERROR=3]="ERROR",r);let B={0:"debug",1:"log",2:"warn",3:"error"},F=()=>"undefined"==typeof globalThis?window:globalThis,$=z(()=>{let t=y(3);return{log:y((e,n,r=1)=>{var i;r>=(null!=(i=F().VIRTUOSO_LOG_LEVEL)?i:p(t))&&console[B[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",e,n)}),logLevel:t}},[],{singleton:!0});function W(t,e=!0){let n=i.useRef(null),r=t=>{};if("undefined"!=typeof ResizeObserver){let o=i.useMemo(()=>new ResizeObserver(e=>{requestAnimationFrame(()=>{let n=e[0].target;null!==n.offsetParent&&t(n)})}),[t]);r=t=>{t&&e?(o.observe(t),n.current=t):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function J(t,e=!0){return W(t,e).callbackRef}function q(t,e,n,r,o,s,l){return W(i.useCallback(n=>{var i;let a=function(t,e,n,r){let i=t.length;if(0===i)return null;let o=[];for(let s=0;s<i;s++){let i=t.item(s);if(!i||void 0===i.dataset.index)continue;let l=parseInt(i.dataset.index),a=parseFloat(i.dataset.knownSize),c=e(i,n);if(0===c&&r("Zero-sized element, this should not happen",{child:i},D.ERROR),c===a)continue;let u=o[o.length-1];0===o.length||u.size!==c||u.endIndex!==l-1?o.push({startIndex:l,endIndex:l,size:c}):o[o.length-1].endIndex++}return o}(n.children,e,"offsetHeight",o),c=n.parentElement;for(;!c.dataset.virtuosoScroller;)c=c.parentElement;let u="window"===c.lastElementChild.dataset.viewportType;r({scrollTop:Math.max(l?l.scrollTop:u?window.pageYOffset||document.documentElement.scrollTop:c.scrollTop,0),scrollHeight:l?l.scrollHeight:u?document.documentElement.scrollHeight:c.scrollHeight,viewportHe
4ight:l?l.offsetHeight:u?window.innerHeight:c.offsetHeight}),null==s||s(("normal"===(i=getComputedStyle(n).rowGap)||(null==i?void 0:i.endsWith("px"))||o("row-gap was not resolved to pixel value correctly",i,D.WARN),"normal"===i)?0:parseInt(null!=i?i:"0",10)),null!==a&&t(a)},[t,e,o,s,l,r]),n)}function V(t,e){return Math.round(t.getBoundingClientRect()[e])}function U(t,e){return 1.01>Math.abs(t-e)}function K(t,e,n,r=h,s){let l=i.useRef(null),a=i.useRef(null),c=i.useRef(null),u=i.useCallback(n=>{let r=n.target,i=r===window||r===document,s=i?window.pageYOffset||document.documentElement.scrollTop:r.scrollTop,l=i?document.documentElement.scrollHeight:r.scrollHeight,u=i?window.innerHeight:r.offsetHeight,h=()=>{t({scrollTop:Math.max(s,0),scrollHeight:l,viewportHeight:u})};n.suppressFlushSync?h():o.flushSync(h),null!==a.current&&(s===a.current||s<=0||s===l-u)&&(a.current=null,e(!0),c.current&&(clearTimeout(c.current),c.current=null))},[t,e]);return i.useEffect(()=>{let t=s||l.current;return r(s||l.current),u({target:t,suppressFlushSync:!0}),t.addEventListener("scroll",u,{passive:!0}),()=>{r(null),t.removeEventListener("scroll",u)}},[l,u,n,r,s]),{scrollerRef:l,scrollByCallback:function(t){l.current.scrollBy(t)},scrollToCallback:function(n){let r,i,o;let s=l.current;if(!s||"offsetHeight"in s&&0===s.offsetHeight)return;let u="smooth"===n.behavior;s===window?(i=Math.max(V(document.documentElement,"height"),document.documentElement.scrollHeight),r=window.innerHeight,o=document.documentElement.scrollTop):(i=s.scrollHeight,r=V(s,"height"),o=s.scrollTop);let h=i-r;if(n.top=Math.ceil(Math.max(Math.min(h,n.top),0)),U(r,i)||n.top===o){t({scrollTop:o,scrollHeight:i,viewportHeight:r}),u&&e(!0);return}u?(a.current=n.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,a.current=null,e(!0)},1e3)):a.current=null,s.scrollTo(n)}}}let Y=z(()=>{let t=g(),e=g(),n=y(0),r=g(),i=y(0),o=g(),s=g(),l=y(0),a=y(0),c=y(0),u=y(0),h=g(),d=g(),p=y(!1);return f(b(t,M(({scrollTop:t})=>t)),e),f(b(t,M(({scrollHeight:t})=>t)),s),f(e,i),{scrollContainerState:t,scrollTop:e,viewportHeight:o,headerHeight:l,fixedHeaderHeight:a,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:h,scrollBy:d,statefulScrollTop:i,deviation:n,scrollingInProgress:p}},[],{singleton:!0}),G={lvl:0};function Z(t,e,n,r=G,i=G){return{k:t,v:e,lvl:n,l:r,r:i}}function X(t){return t===G}function Q(t,e){return X(t)?void 0:e===t.k?t.v:e<t.k?Q(t.l,e):Q(t.r,e)}function tt(t,e,n="k"){if(X(t))return[-1/0,void 0];if(Number(t[n])===e)return[t.k,t.v];if(Number(t[n])<e){let r=tt(t.r,e,n);return r[0]===-1/0?[t.k,t.v]:r}return tt(t.l,e,n)}function te(t,e,n){return X(t)?Z(e,n,1):e===t.k?tr(t,{k:e,v:n}):e<t.k?ta(tc(tr(t,{l:te(t.l,e,n)}))):ta(tc(tr(t,{r:te(t.r,e,n)})))}function tn(t){return X(t)?[]:[...tn(t.l),{k:t.k,v:t.v},...tn(t.r)]}function tr(t,e){return Z(void 0!==e.k?e.k:t.k,void 0!==e.v?e.v:t.v,void 0!==e.lvl?e.lvl:t.lvl,void 0!==e.l?e.l:t.l,void 0!==e.r?e.r:t.r)}function ti(t){return X(t)||t.lvl>t.r.lvl}function to(t){let{l:e,r:n,lvl:r}=t;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(ti(e))return tc(tr(t,{lvl:r-1}));if(!X(e)&&!X(e.r))return tr(e.r,{l:tr(e,{r:e.r.l}),r:tr(t,{l:e.r.r,lvl:r-1}),lvl:r});throw Error("Unexpected empty nodes")}if(ti(t))return ta(tr(t,{lvl:r-1}));if(X(n)||X(n.l))throw Error("Unexpected empty nodes");{let e=n.l,i=ti(e)?n.lvl-1:n.lvl;return tr(e,{l:tr(t,{r:e.l,lvl:r-1}),r:ta(tr(n,{l:e.r,lvl:i})),lvl:e.lvl+1})}}function ts(t,e,n){if(X(t))return[];let r=tt(t,e)[0];return tl(function t(e,n,r){if(X(e))return[];let{k:i,v:o,l:s,r:l}=e,a=[];return i>n&&(a=a.concat(t(s,n,r))),i>=n&&i<=r&&a.push({k:i,v:o}),i<=r&&(a=a.concat(t(l,n,r))),a}(t,r,n),({k:t,v:e})=>({index:t,value:e}))}function tl(t,e){let n=t.length;if(0===n)return[];let{index:r,value:i}=e(t[0]),o=[];for(let s=1;s<n;s++){let{index:n,value:l}=e(t[s]);o.push({start:r,end:n-1,value:i}),r=n,i=l}return o.push({start:r,end:1/0,value:i}),o}function ta(t){let{r:e,lvl:n}=t;return X(e)||X(e.r)||e.lvl!==n||e.r.lvl!==n?t:tr(e,{l:tr(t,{r:e.l}),lvl:n+1})}function tc(t){let{l:e}=t;return X(e)||e.lvl!==t.lvl?t:tr(e,{r:tr(t,{l:e.r})})}function tu(t,e,n,r=0){let i=t.length-1;for(;r<=i;){let o=Math.floor((r+i)/2),s=n(t[o],e);if(0===s)return o;if(-1===s){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}
4throw Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}let th=z(()=>({recalcInProgress:y(!1)}),[],{singleton:!0});function td(t,e){let n=0,r=0;for(;n<t;)n+=e[r+1]-e[r]-1,r++;return r-(n===t?0:1)}function tp({index:t},e){return e===t?0:e<t?-1:1}function tf({offset:t},e){return e===t?0:e<t?-1:1}function tm(t){return{index:t.index,value:t}}function tg(t,e,n,r){let i=t,o=0,s=0,l=0,a=0;if(0!==e){a=tu(i,e-1,tp),l=i[a].offset;let t=tt(n,e-1);o=t[0],s=t[1],i.length&&i[a].size===tt(n,e)[1]&&(a-=1),i=i.slice(0,a+1)}else i=[];for(let{start:t,value:a}of ts(n,e,1/0)){let e=t-o,n=e*s+l+e*r;i.push({offset:n,size:a,index:t}),o=t,l=n,s=a}return{offsetTree:i,lastIndex:o,lastOffset:l,lastSize:s}}function ty(t,[e,n,r,i]){e.length>0&&r("received item sizes",e,D.DEBUG);let o=t.sizeTree,s=o,l=0;if(n.length>0&&X(o)&&2===e.length){let t=e[0].size,r=e[1].size;s=n.reduce((e,n)=>te(te(e,n,t),n+1,r),s)}else[s,l]=function(t,e){let n=X(t)?0:1/0;for(let r of e){let{size:e,startIndex:i,endIndex:o}=r;if(n=Math.min(n,i),X(t)){t=te(t,0,e);continue}let s=ts(t,i-1,o+1);if(s.some(function(t){let{size:e,startIndex:n,endIndex:r}=t;return t=>t.start===n&&(t.end===r||t.end===1/0)&&t.value===e}(r)))continue;let l=!1,a=!1;for(let{start:n,end:r,value:i}of s)l?(o>=n||e===i)&&(t=function t(e,n){if(X(e))return G;let{k:r,l:i,r:o}=e;if(n===r){if(X(i))return o;if(X(o))return i;{let[t,n]=function t(e){return X(e.r)?[e.k,e.v]:t(e.r)}(i);return to(tr(e,{k:t,v:n,l:function t(e){return X(e.r)?e.l:to(tr(e,{r:t(e.r)}))}(i)}))}}return n<r?to(tr(e,{l:t(i,n)})):to(tr(e,{r:t(o,n)}))}(t,n)):(a=i!==e,l=!0),r>o&&o>=n&&i!==e&&(t=te(t,o+1,i));a&&(t=te(t,i,e))}return[t,n]}(s,e);if(s===o)return t;let{offsetTree:a,lastIndex:c,lastSize:u,lastOffset:h}=tg(t.offsetTree,l,s,i);return{sizeTree:s,offsetTree:a,lastIndex:c,lastOffset:h,lastSize:u,groupOffsetTree:n.reduce((t,e)=>te(t,e,tv(e,a,i)),G),groupIndices:n}}function tv(t,e,n){if(0===e.length)return 0;let{offset:r,index:i,size:o}=e[tu(e,t,tp)],s=t-i,l=o*s+(s-1)*n+r;return l>0?l+n:l}function tx(t,e,n){if(void 0!==t.groupIndex)return e.groupIndices[t.groupIndex]+1;{let r=tb("LAST"===t.index?n:t.index,e);return Math.max(0,r,Math.min(n,r))}}function tb(t,e){if(!tk(e))return t;let n=0;for(;e.groupIndices[n]<=t+n;)n++;return t+n}function tk(t){return!X(t.groupOffsetTree)}let tw={offsetHeight:"height",offsetWidth:"width"},tS=z(([{log:t},{recalcInProgress:e}])=>{let n=g(),r=g(),i=x(r,0),o=g(),s=g(),l=y(0),a=y([]),c=y(void 0),u=y(void 0),h=y((t,e)=>V(t,tw[e])),d=y(void 0),m=y(0),k={offsetTree:[],sizeTree:G,groupOffsetTree:G,lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},C=x(b(n,I(a,t,m),T(ty,k),w()),k),E=x(b(a,w(),T((t,e)=>({prev:t.current,current:e}),{prev:[],current:[]}),M(({prev:t})=>t)),[]);f(b(a,S(t=>t.length>0),I(C,m),M(([t,e,n])=>{let r=t.reduce((t,r,i)=>te(t,r,tv(r,e.offsetTree,n)||i),G);return{...e,groupIndices:t,groupOffsetTree:r}})),C),f(b(r,I(C),S(([t,{lastIndex:e}])=>t<e),M(([t,{lastIndex:e,lastSize:n}])=>[{startIndex:t,endIndex:e,size:n}])),n),f(c,u);let R=x(b(c,M(t=>void 0===t)),!0);f(b(u,S(t=>void 0!==t&&X(p(C).sizeTree)),M(t=>[{startIndex:0,endIndex:0,size:t}])),n);let A=v(b(n,I(C),T(({sizes:t},[e,n])=>({changed:n!==t,sizes:n}),{changed:!1,sizes:k}),M(t=>t.changed)));b(l,T((t,e)=>({diff:t.prev-e,prev:e}),{diff:0,prev:0}),M(t=>t.diff))(1,t=>{let{groupIndices:n}=p(C);if(t>0)e(0,!0),o(0,t+td(t,n));else if(t<0){let e=p(E);e.length>0&&(t-=td(-t,e)),s(0,t)}}),b(l,I(t))(1,([t,e])=>{t<0&&e("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},D.ERROR)});let O=v(o);f(b(o,I(C),M(([t,e])=>{let n=e.groupIndices.length>0,r=[],i=e.lastSize;if(n){let n=Q(e.sizeTree,0),o=0,s=0;for(;o<t;){let t=e.groupIndices[s],l=e.groupIndices.length===s+1?1/0:e.groupIndices[s+1]-t-1;r.push({startIndex:t,endIndex:t,size:n}),r.push({startIndex:t+1,endIndex:t+1+l-1,size:i}),s++,o+=l+1}let l=tn(e.sizeTree);return o!==t&&l.shift(),l.reduce((e,{k:n,v:r})=>{let i=e.ranges;return 0!==e.prevSize&&(i=[...e.ranges,{startIndex:e.prevIndex,endIndex:n+t-1,size:e.prevSize}]),{ranges:i,prevIndex:n+t,prevSize:r}},{ranges:r,prevIndex:t,prevSize:0}).ranges}return tn(e.sizeTree).reduce((e,{k:n,v:r})=>({ranges:[...e.ranges,{startIndex:e.prevIndex,endIndex:n+t-1,size:e.prevSize}],prevIndex:n+t,prevSize:r}),{ranges:[],prevIndex:0,prevSize:i}).ranges})),n);let j=v(b(s,I(C,m),M(([t,{offsetTree:e},n])=>tv(-t,e,n))));return f(b(s,I(C,m),M(([t,e,n])=>{if(e.groupIndices.length>0){if(X(e.sizeTree))return e;let r=G,i=p(E),o=0,s=0,l=0;for(;o<-t;){l=i[s];let t=i[s+1]-l-1;s++,o+=t+1}return r=tn(e.sizeTree).reduce((e,{k:n,v:r})=>te(e,Math.max(0,n+t),r),r),o!==-t&&(r=te(r,0,Q(e.sizeTree,l)),r=te(r,1,tt(e.sizeTree,-t+1)[1])),{...e,sizeTree:r,...tg(e.offsetTree,0,r,n)}}{let r=tn(e.sizeTree).reduce((e,{k:n,v:r})=>te(e,Math.max(0,n+t),r),G);return{...e,sizeTree:r,...tg(e.offsetTree,0,r,n)}}})),C),{data:d,totalCount:r,sizeRanges:n,groupIndices:a,defaultItemSize:u,fixedItemSize:c,unshiftWith:o,shiftWith:s,shiftWithOffset:j,beforeUnshiftWith:O,firstItemIndex:l,gap:m,sizes:C,listRefresh:A,statefulTotalCount:i,trackItemSizes:R,itemSize:h}},a($,th),{singleton:!0}),tM="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function tC(t){let e="number"==typeof t?{index:t}:t;return e.align||(e.align="start"),e.behavior&&tM||(e.behavior="auto"),e.offset||(e.offset=0),e}let tT=z(([{sizes:t,totalCount:e,listRefresh:n,gap:r}
4,{scrollingInProgress:i,viewportHeight:o,scrollTo:s,smoothScrollTargetReached:l,headerHeight:a,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:h},{log:d}])=>{let p=g(),v=g(),x=y(0),k=null,w=null,S=null;function C(){k&&(k(),k=null),S&&(S(),S=null),w&&(clearTimeout(w),w=null),i(0,!1)}return f(b(p,I(t,o,e,x,a,c,d),I(r,u,h),M(([[t,e,r,o,s,a,c,u],h,d,f])=>{let g=tC(t),{align:y,behavior:x,offset:M}=g,T=o-1,E=tx(g,e,T),R=tv(E,e.offsetTree,h)+a;"end"===y?(R+=d+tt(e.sizeTree,E)[1]-r+f,E===T&&(R+=c)):"center"===y?R+=(d+tt(e.sizeTree,E)[1]-r+f)/2:R-=s,M&&(R+=M);let A=e=>{C(),e?(u("retrying to scroll to",{location:t},D.DEBUG),p(0,t)):(v(0,!0),u("list did not change, scroll successful",{},D.DEBUG))};if(C(),"smooth"===x){let t=!1;S=n(1,e=>{t=t||e}),k=m(l,()=>{A(t)})}else k=m(b(n,t=>{let e=setTimeout(()=>{t(!1)},150);return n=>{n&&(t(!0),clearTimeout(e))}}),A);return w=setTimeout(()=>{C()},1200),i(0,!0),u("scrolling from index to",{index:E,top:R,behavior:x},D.DEBUG),{top:R,behavior:x}})),s),{scrollToIndex:p,scrollTargetReached:v,topListHeight:x}},a(tS,Y,$),{singleton:!0}),tE="down",tR={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},tA=z(([{scrollContainerState:t,scrollTop:e,viewportHeight:n,headerHeight:r,footerHeight:i,scrollBy:o}])=>{let s=y(!1),l=y(!0),a=g(),c=g(),u=y(4),h=y(0),d=x(b(O(b(j(e),E(1),C(!0)),b(j(e),E(1),C(!1),A(100))),w()),!1),m=x(b(O(b(o,C(!0)),b(o,C(!1),A(200))),w()),!1);f(b(L(j(e),j(h)),M(([t,e])=>t<=e),w()),l),f(b(l,R(50)),c);let k=v(b(L(t,j(n),j(r),j(i),j(u)),T((t,[{scrollTop:e,scrollHeight:n},r,i,o,s])=>{let l={viewportHeight:r,scrollTop:e,scrollHeight:n};if(e+r-n>-s){let n,r;return e>t.state.scrollTop?(n="SCROLLED_DOWN",r=t.state.scrollTop-e):(n="SIZE_DECREASED",r=t.state.scrollTop-e||t.scrollTopDelta),{atBottom:!0,state:l,atBottomBecause:n,scrollTopDelta:r}}return{atBottom:!1,notAtBottomBecause:l.scrollHeight>t.state.scrollHeight?"SIZE_INCREASED":r<t.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":e<t.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:l}},tR),w((t,e)=>t&&t.atBottom===e.atBottom))),z=x(b(t,T((t,{scrollTop:e,scrollHeight:n,viewportHeight:r})=>{if(U(t.scrollHeight,n))return{scrollTop:e,scrollHeight:n,jump:0,changed:!1};{let i=n-(e+r)<1;return t.scrollTop!==e&&i?{scrollHeight:n,scrollTop:e,jump:t.scrollTop-e,changed:!0}:{scrollHeight:n,scrollTop:e,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),S(t=>t.changed),M(t=>t.jump)),0);f(b(k,M(t=>t.atBottom)),s),f(b(s,R(50)),a);let P=y(tE);f(b(t,M(({scrollTop:t})=>t),w(),T((t,e)=>p(m)?{direction:t.direction,prevScrollTop:e}:{direction:e<t.prevScrollTop?"up":tE,prevScrollTop:e},{direction:tE,prevScrollTop:0}),M(t=>t.direction)),P),f(b(t,R(50),C("none")),P);let H=y(0);return f(b(d,S(t=>!t),C(0)),H),f(b(e,R(100),I(d),S(([t,e])=>!!e),T(([t,e],[n])=>[e,n],[0,0]),M(([t,e])=>e-t)),H),{isScrolling:d,isAtTop:l,isAtBottom:s,atBottomState:k,atTopStateChange:c,atBottomStateChange:a,scrollDirection:P,atBottomThreshold:u,atTopThreshold:h,scrollVelocity:H,lastJumpDueToItemResize:z}},a(Y)),tI=z(([{log:t}])=>{let e=y(!1),n=v(b(e,S(t=>t),w()));return e(1,e=>{e&&p(t)("props updated",{},D.DEBUG)}),{propsReady:e,didMount:n}},a($),{singleton:!0});function tO(t,e){0==t?e():requestAnimationFrame(()=>tO(t-1,e))}function tj(t,e){return"number"==typeof t?t:"LAST"===t.index?e-1:t.index}let tL=z(([{sizes:t,listRefresh:e,defaultItemSize:n},{scrollTop:r},{scrollToIndex:i,scrollTargetReached:o},{didMount:s}])=>{let l=y(!0),a=y(0),c=y(!0);return f(b(s,I(a),S(([t,e])=>!!e),C(!1)),l),f(b(s,I(a),S(([t,e])=>!!e),C(!1)),c),b(L(e,s),I(l,t,n,c),S(([[,t],e,{sizeTree:n},r,i])=>t&&(!X(n)||u(r))&&!e&&!i),I(a))(1,([,t])=>{m(o,()=>{c(0,!0)}),tO(3,()=>{m(r,()=>{l(0,!0)}),i(0,t)})}),{scrolledToInitialItem:l,initialTopMostItemIndex:a,initialItemFinalLocationReached:c}},a(tS,Y,tT,tI),{singleton:!0});function tz(t){return!!t&&("smooth"===t?"smooth":"auto")}let tP=(t,e)=>"function"==typeof t?tz(t(e)):e&&tz(t),tH=z(([{totalCount:t,listRefresh:e},{isAtBottom:n,atBottomState:r},{scrollToIndex:i},{scrolledToInitialItem:o},{propsReady:s,didMount:l},{log:a},{scrollingInProgress:c}])=>{let u=y(!1),h=g(),d=null;function f(t){i(0,{index:"LAST",align:"end",behavior:t})}function v(t){setTimeout(m(r,e=>{!t||e.atBottom||"SIZE_INCREASED"!==e.notAtBottomBecause||d||(p(a)("scrolling to bottom due to increased size",{},D.DEBUG),f("auto"))}),100)}return b(L(b(j(t),E(1)),l),I(j(u),n,o,c),M(([[t,e],n,r,i,o])=>{let s=e&&i,l="auto";return s&&(l=tP(n,r||o),s=s&&!!l),{totalCount:t,shouldFollow:s,followOutputBehavior:l}}),S(({shouldFollow:t})=>t))(1,({totalCount:t,followOutputBehavior:n})=>{d&&(d(),d=null),d=m(e,()=>{p(a)("following output to ",{totalCount:t},D.DEBUG),f(n),d=null})}),b(L(j(u),t,s),S(([t,,e])=>t&&e),T(({value:t},[,e])=>({refreshed:t===e,value:e}),{refreshed:!1,value:0}),S(({refreshed:t})=>t),I(u,t))(1,([,t])=>{p(o)&&v(!1!==t)}),h(1,()=>{v(!1!==p(u))}),L(j(u),r)(1,([t,e])=>{t&&!e.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===e.notAtBottomBecause&&f("auto")}),{followOutput:u,autoscrollToBottom:h}},a(tS,tA,tT,tL,tI,$,Y));function tN(t){return t.reduce((t,e)=>(t.groupIndices.push(t.totalCount),t.totalCount+=e+1,t),{totalCount:0,groupIndices:[]})}let t_=z(([{totalCount:t,groupIndices:e,sizes:n},{scrollTop:r,headerHeight:i}])=>{let o=g(),s=g(),l=v(b(o,M(tN)));return f(b(l,M(t=>t.totalCount)),t),f(b(l,M(t=>t.groupIndices)),e),f(b(L(r,n,i),S(([t,e])=>tk(e)),M(([t,e,n])=>tt(e.groupOffsetTree,Math.max(t-n,0),"v")[0]),w(),M(t=>[t])),s),{groupCounts:o,topItemsIndexes:s}},a(tS,Y));function tD(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}function tB(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}let tF="bottom",t$="none";function tW(t,e,n){return"number"==typeof t?"up"===n&&"top"===e||n===tE&&e===tF?t:0:"up"===n?"top"===e?t.main:t.reverse:e===tF?t.main:t.reverse}function tJ(t,e){return"number"==typeof t?t:t[e]||0}
4let tq=z(([{scrollTop:t,viewportHeight:e,deviation:n,headerHeight:r,fixedHeaderHeight:i}])=>{let o=g(),s=y(0),l=y(0),a=y(0),c=x(b(L(j(t),j(e),j(r),j(o,tD),j(a),j(s),j(i),j(n),j(l)),M(([t,e,n,[r,i],o,s,l,a,c])=>{let u=t-a,h=Math.max(n-u,0),d=t$,p=tJ(c,"top"),f=tJ(c,tF);return(r-=a,r+=n+l,i+=n+l,r>t+(s+l)-p&&(d="up"),(i-=a)<t-h+e+f&&(d=tE),d!==t$)?[Math.max(u-n-tW(o,"top",d)-p,0),u-h-l+e+tW(o,tF,d)+f]:null}),S(t=>null!=t),w(tD)),[0,0]);return{listBoundary:o,overscan:a,topListHeight:s,increaseViewportBy:l,visibleRange:c}},a(Y),{singleton:!0}),tV={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function tU(t,e,n){let r;if(0===t.length)return[];if(!tk(e))return t.map(t=>({...t,index:t.index+n,originalIndex:t.index}));let i=t[0].index,o=t[t.length-1].index,s=[],l=ts(e.groupOffsetTree,i,o),a=0;for(let i of t){let t;(!r||r.end<i.index)&&(r=l.shift(),a=e.groupIndices.indexOf(r.start)),t=i.index===r.start?{type:"group",index:a}:{index:i.index-(a+1)+n,groupIndex:a},s.push({...t,size:i.size,offset:i.offset,originalIndex:i.index,data:i.data})}return s}function tK(t,e,n,r,i,o){let{lastSize:s,lastOffset:l,lastIndex:a}=i,c=0,u=0;if(t.length>0){c=t[0].offset;let e=t[t.length-1];u=e.offset+e.size}let h=n-a,d=c,p=l+h*s+(h-1)*r-u;return{items:tU(t,i,o),topItems:tU(e,i,o),topListHeight:e.reduce((t,e)=>e.size+t,0),offsetTop:c,offsetBottom:p,top:d,bottom:u,totalCount:n,firstItemIndex:o}}function tY(t,e,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(let e of n.groupIndices){if(e-s>=t)break;s++}let l=t+s,a=tj(e,l);return tK(Array.from({length:l}).map((t,e)=>({index:e+a,size:0,offset:0,data:o[e+a]})),[],l,i,n,r)}let tG=z(([{sizes:t,totalCount:e,data:n,firstItemIndex:r,gap:i},o,{visibleRange:s,listBoundary:l,topListHeight:a},{scrolledToInitialItem:c,initialTopMostItemIndex:h},{topListHeight:d},m,{didMount:k},{recalcInProgress:C}])=>{let T=y([]),E=y(0),A=g();f(o.topItemsIndexes,T);let O=x(b(L(k,C,j(s,tD),j(e),j(t),j(h),c,j(T),j(r),j(i),n),S(([t,e,,n,,,,,,,r])=>{let i=r&&r.length!==n;return t&&!e&&!i}),M(([,,[t,e],n,r,i,o,s,l,a,c])=>{var u;let{sizeTree:h,offsetTree:d}=r,f=p(E);if(0===n)return{...tV,totalCount:n};if(0===t&&0===e)return 0===f?{...tV,totalCount:n}:tY(f,i,r,l,a,c||[]);if(X(h))return f>0?null:tK(function(t,e,n){if(tk(e)){let r=tb(t,e);return[{index:tt(e.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}(tj(i,n),r,c),[],n,a,r,l);let m=[];if(s.length>0){let t=s[0],e=s[s.length-1],n=0;for(let r of ts(h,t,e)){let i=r.value,o=Math.max(r.start,t),s=Math.min(r.end,e);for(let t=o;t<=s;t++)m.push({index:t,size:i,offset:n,data:c&&c[t]}),n+=i}}if(!o)return tK([],m,n,a,r,l);let g=s.length>0?s[s.length-1]+1:0,y=function(t,e,n,r=0){return r>0&&(e=Math.max(e,t[tu(t,r,tp)].offset)),tl(function(t,e,n,r){let i=tu(t,e,r),o=tu(t,n,r,i);return t.slice(i,o+1)}(t,e,n,tf),tm)}(d,t,e,g);if(0===y.length)return null;let v=n-1;return tK(((n=>{for(let r of y){let i=r.value,o=i.offset,s=r.start,l=i.size;if(i.offset<t){let e=(s+=Math.floor((t-i.offset+a)/(l+a)))-r.start;o+=e*l+e*a}s<g&&(o+=(g-s)*l,s=g);let u=Math.min(r.end,v);for(let t=s;t<=u&&!(o>=e);t++)n.push({index:t,size:l,offset:o,data:c&&c[t]}),o+=l+a}})(u=[]),u),m,n,a,r,l)}),S(t=>null!==t),w()),tV);f(b(n,S(u),M(t=>null==t?void 0:t.length)),e),f(b(O,M(t=>t.topListHeight)),d),f(d,a),f(b(O,M(t=>[t.top,t.bottom])),l),f(b(O,M(t=>t.items)),A);let z=v(b(O,S(({items:t})=>t.length>0),I(e,n),S(([{items:t},e])=>t[t.length-1].originalIndex===e-1),M(([,t,e])=>[t-1,e]),w(tD),M(([t])=>t))),P=v(b(O,R(200),S(({items:t,topItems:e})=>t.length>0&&t[0].originalIndex===e.length),M(({items:t})=>t[0].index),w())),H=v(b(O,S(({items:t})=>t.length>0),M(({items:t})=>{let e=0,n=t.length-1;for(;"group"===t[e].type&&e<n;)e++;for(;"group"===t[n].type&&n>e;)n--;return{startIndex:t[e].index,endIndex:t[n].index}}),w(tB)));return{listState:O,topItemsIndexes:T,endReached:z,startReached:P,rangeChanged:H,itemsRendered:A,initialItemCount:E,...m}},a(tS,t_,tq,tL,tT,tA,tI,th),{singleton:!0}),tZ=z(([{sizes:t,firstItemIndex:e,data:n,gap:r}
4,{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:l}])=>(f(b(l,I(o),S(([,t])=>0!==t),I(i,t,e,r,n),M(([[,t],e,n,r,i,o=[]])=>tY(t,e,n,r,i,o))),s),{}),a(tS,tL,tG,tI),{singleton:!0}),tX=z(([{scrollVelocity:t}])=>{let e=y(!1),n=g(),r=y(!1);return f(b(t,I(r,e,n),S(([t,e])=>!!e),M(([t,e,n,r])=>{let{exit:i,enter:o}=e;if(n){if(i(t,r))return!1}else if(o(t,r))return!0;return n}),w()),e),b(L(e,t,n),I(r))(1,([[t,e,n],r])=>t&&r&&r.change&&r.change(e,n)),{isSeeking:e,scrollSeekConfiguration:r,scrollVelocity:t,scrollSeekRangeChanged:n}},a(tA),{singleton:!0}),tQ=z(([{topItemsIndexes:t}])=>{let e=y(0);return f(b(e,S(t=>t>0),M(t=>Array.from({length:t}).map((t,e)=>e))),t),{topItemCount:e}},a(tG)),t0=z(([{footerHeight:t,headerHeight:e,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:i}])=>{let o=g(),s=x(b(L(t,r,e,n,i),M(([t,e,n,r,i])=>t+e+n+r+i.offsetBottom+i.bottom)),0);return f(j(s),o),{totalListHeight:s,totalListHeightChanged:o}},a(Y,tG),{singleton:!0});function t1(t){let e,n=!1;return()=>(n||(n=!0,e=t()),e)}let t2=t1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),t4=z(([{scrollBy:t,scrollTop:e,deviation:n,scrollingInProgress:r},{isScrolling:i,isAtBottom:o,scrollDirection:s,lastJumpDueToItemResize:l},{listState:a},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:h,gap:d},{log:p},{recalcInProgress:m}])=>{let g=v(b(a,I(l),T(([,t,e,n],[{items:r,totalCount:i,bottom:o,offsetBottom:s},l])=>{let a=o+s,c=0;return e===i&&t.length>0&&r.length>0&&!(0===r[0].originalIndex&&0===t[0].originalIndex)&&0!=(c=a-n)&&(c+=l),[c,r,i,a]},[0,[],0,0]),S(([t])=>0!==t),I(e,s,r,o,p,m),S(([,t,e,n,,,r])=>!r&&!n&&0!==t&&"up"===e),M(([[t],,,,,e])=>(e("Upward scrolling compensation",{amount:t},D.DEBUG),t))));function y(e){e>0?(t(0,{top:-e,behavior:"auto"}),n(0,0)):(n(0,0),t(0,{top:-e,behavior:"auto"}))}return b(g,I(n,i))(1,([t,e,r])=>{r&&t2()?n(0,e-t):y(-t)}),b(L(x(i,!1),n,m),S(([t,e,n])=>!t&&!n&&0!==e),M(([t,e])=>e),R(1))(1,y),f(b(u,M(t=>({top:-t}))),t),b(c,I(h,d),M(([t,{lastSize:e,groupIndices:n,sizeTree:r},i])=>{if(0===n.length)return t*(e+i);{let o=0,s=Q(r,0),l=0,a=0;for(;l<t;){l++,o+=s;let r=n.length===a+1?1/0:n[a+1]-n[a]-1;l+r>t&&(o-=s,r=t-l+1),l+=r,o+=r*(e+i),a++}return o}}))(1,e=>{n(0,e),requestAnimationFrame(()=>{t(0,{top:e}),requestAnimationFrame(()=>{n(0,0),m(0,!1)})})}),{deviation:n}},a(Y,tA,tG,tS,$,th)),t3=z(([{didMount:t},{scrollTo:e},{listState:n}])=>{let r=y(0);return b(t,I(r),S(([,t])=>0!==t),M(([,t])=>({top:t})))(1,t=>{m(b(n,E(1),S(t=>t.items.length>1)),()=>{requestAnimationFrame(()=>{e(0,t)})})}),{initialScrollTop:r}},a(tI,Y,tG),{singleton:!0}),t5=z(([{viewportHeight:t},{totalListHeight:e}])=>{let n=y(!1),r=x(b(L(n,t,e),S(([t])=>t),M(([,t,e])=>Math.max(0,t-e)),R(0),w()),0);return{alignToBottom:n,paddingTopAddition:r}},a(Y,t0),{singleton:!0}),t6=z(([{scrollTo:t,scrollContainerState:e}])=>{let n=g(),r=g(),i=g(),o=y(!1),s=y(void 0);return f(b(L(n,r),M(([{viewportHeight:t,scrollTop:e,scrollHeight:n},{offsetTop:r}])=>({scrollTop:Math.max(0,e-r),scrollHeight:n,viewportHeight:t}))),e),f(b(t,I(r),M(([t,{offsetTop:e}])=>({...t,top:t.top+e}))),i),{useWindowScroll:o,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:i}},a(Y)),t8=({itemTop:t,itemBottom:e,viewportTop:n,viewportBottom:r,locationParams:{behavior:i,align:o,...s}})=>t<n?{...s,behavior:i,align:null!=o?o:"start"}:e>r?{...s,behavior:i,align:null!=o?o:"end"}:null,t7=z(([{sizes:t,totalCount:e,gap:n},{scrollTop:r,viewportHeight:i,headerHeight:o,fixedHeaderHeight:s,fixedFooterHeight:l,scrollingInProgress:a},{scrollToIndex:c}])=>{let u=g();return f(b(u,I(t,i,e,o,s,l,r),I(n),M(([[t,e,n,r,i,o,s,l],c])=>{let{done:u,behavior:h,align:d,calculateViewLocation:f=t8,...g}=t,y=tx(t,e,r-1),v=tv(y,e.offsetTree,c)+i+o,x=v+tt(e.sizeTree,y)[1],k=f({itemTop:v,itemBottom:x,viewportTop:l+o,viewportBottom:l+n-s,locationParams:{behavior:h,align:d,...g}});return k?u&&m(b(a,S(t=>!1===t),E(p(a)?1:2)),u):u&&u(),k}),S(t=>null!==t)),c),{scrollIntoView:u}},a(tS,Y,tT,tG,$),{singleton:!0}),t9=z(([{sizes:t,sizeRanges:e},{scrollTop:n}
4,{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:l}])=>{let a=g(),c=y(void 0),h=y(null),d=y(null);return f(s,h),f(l,d),b(a,I(t,n,o,h,d))(1,([t,e,n,r,i,o])=>{let s=tn(e.sizeTree).map(({k:t,v:e},n,r)=>{let i=r[n+1];return{startIndex:t,endIndex:i?i.k-1:1/0,size:e}});r&&null!==i&&null!==o&&(n=i.scrollTop-o.offsetTop),t({ranges:s,scrollTop:n})}),f(b(c,S(u),M(et)),r),f(b(i,I(c),S(([,t])=>void 0!==t),w(),M(([,t])=>t.ranges)),e),{getState:a,restoreStateFrom:c}},a(tS,Y,tL,tI,t6));function et(t){return{offset:t.scrollTop,index:0,align:"start"}}let ee=z(([t,e,n,r,i,o,s,l,a,c])=>({...t,...e,...n,...r,...i,...o,...s,...l,...a,...c}),a(tq,tZ,tI,tX,t0,t3,t5,t6,t7,$)),en=z(([{totalCount:t,sizeRanges:e,fixedItemSize:n,defaultItemSize:r,trackItemSizes:i,itemSize:o,data:s,firstItemIndex:l,groupIndices:a,statefulTotalCount:c,gap:u,sizes:h},{initialTopMostItemIndex:d,scrolledToInitialItem:p,initialItemFinalLocationReached:m},g,y,v,{listState:x,topItemsIndexes:k,...w},{scrollToIndex:S},C,{topItemCount:T},{groupCounts:E},R])=>(f(w.rangeChanged,R.scrollSeekRangeChanged),f(b(R.windowViewportRect,M(t=>t.visibleHeight)),g.viewportHeight),{totalCount:t,data:s,firstItemIndex:l,sizeRanges:e,initialTopMostItemIndex:d,scrolledToInitialItem:p,initialItemFinalLocationReached:m,topItemsIndexes:k,topItemCount:T,groupCounts:E,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:x,scrollToIndex:S,trackItemSizes:i,itemSize:o,groupIndices:a,...w,...R,...g,sizes:h,...y}),a(tS,tL,Y,t9,tH,tG,tT,t4,tQ,t_,ee)),er="-webkit-sticky",ei="sticky",eo=t1(()=>{if("undefined"==typeof document)return ei;let t=document.createElement("div");return t.style.position=er,t.style.position===er?er:ei});function es(t,e){let n=i.useRef(null),r=i.useCallback(r=>{let i,o;if(null===r||!r.offsetParent)return;let s=r.getBoundingClientRect(),l=s.width;if(e){let t=e.getBoundingClientRect(),n=s.top-t.top;i=t.height-Math.max(0,n),o=n+e.scrollTop}else i=window.innerHeight-Math.max(0,s.top),o=s.top+window.pageYOffset;n.current={offsetTop:o,visibleHeight:i,visibleWidth:l},t(n.current)},[t,e]),{callbackRef:o,ref:s}=W(r),l=i.useCallback(()=>{r(s.current)},[r,s]);return i.useEffect(()=>{if(!e)return window.addEventListener("scroll",l),window.addEventListener("resize",l),()=>{window.removeEventListener("scroll",l),window.removeEventListener("resize",l)};{e.addEventListener("scroll",l);let t=new ResizeObserver(()=>{requestAnimationFrame(l)});return t.observe(e),()=>{e.removeEventListener("scroll",l),t.unobserve(e)}}},[l,e]),o}let el=i.createContext(void 0),ea=i.createContext(void 0);function ec(t){return t}let eu=z(()=>{let t=y(t=>`Item ${t}`),e=y(null),n=y(t=>`Group ${t}`),r=y({}),i=y(ec),o=y("div"),s=y(h),l=(t,e=null)=>x(b(r,M(e=>e[t]),w()),e);return{context:e,itemContent:t,groupContent:n,components:r,computeItemKey:i,headerFooterTag:o,scrollerRef:s,FooterComponent:l("Footer"),HeaderComponent:l("Header"),TopItemListComponent:l("TopItemList"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),GroupComponent:l("Group","div"),ScrollerComponent:l("Scroller","div"),EmptyPlaceholder:l("EmptyPlaceholder"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder")}}),eh=z(([t,e])=>({...t,...e}),a(en,eu)),ed=({height:t})=>i.createElement("div",{style:{height:t}}),ep={position:eo(),zIndex:1,overflowAnchor:"none"},ef={overflowAnchor:"none"},em=i.memo(function({showTopList:t=!1}){let e=eI("listState"),n=eA("sizeRanges"),r=eI("useWindowScroll"),o=eI("customScrollParent"),s=eA("windowScrollContainerState"),l=eA("scrollContainerState"),a=eI("itemContent"),c=eI("context"),u=eI("groupContent"),d=eI("trackItemSizes"),{callbackRef:p}=q(n,eI("itemSize"),d,t?h:o||r?s:l,eI("log"),eA("gap"),o),[f,m]=i.useState(0);eO("deviation",t=>{f!==t&&m(t)});let g=eI("EmptyPlaceholder"),y=eI("ScrollSeekPlaceholder")||ed,v=eI("ListComponent"),x=eI("ItemComponent"),b=eI("GroupComponent"),k=eI("computeItemKey"),w=eI("isSeeking"),S=eI("groupIndices").length>0,M=eI("alignToBottom"),C=eI("initialItemFinalLocationReached"),T=t?{}:{boxSizing:"border-box",paddingTop:e.offsetTop,paddingBottom:e.offsetBottom,marginTop:0!==f?f:M?"auto":0,...C?{}:{visibility:"hidden"}};return!t&&0===e.totalCount&&g?i.createElement(g,ex(g,c)):i.createElement(v,{...ex(v,c),ref:p,style:T,"data-test-id":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?e.topItems:e.items).map(t=>{let n=t.originalIndex,r=k(n+e.firstItemIndex,t.data,c);return w?i.createElement(y,{...ex(y,c),key:r,index:t.index,height:t.size,type:t.type||"item",..."group"===t.type?{}:{groupIndex:t.groupIndex}}):"group"===t.type?i.createElement(b,{...ex(b,c),key:r,"data-index":n,"data-known-size":t.size,"data-item-index":t.index,style:ep},u(t.index,c)):i.createElement(x,{...ex(x,c),...eb(x,t.data),key:r,"data-index":n,"data-known-size":t.size,"data-item-index":t.index,"data-item-group-index":t.groupIndex,style:ef},S?a(t.index,t.groupIndex,t.data,c):a(t.index,t.data,c))}
4))}),eg={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ey=t=>({width:"100%",height:"100%",position:"absolute",top:0,...t?{display:"flex",flexDirection:"column"}:{}}),ev={width:"100%",position:eo(),top:0,zIndex:1};function ex(t,e){if("string"!=typeof t)return{context:e}}function eb(t,e){return{item:"string"==typeof t?void 0:e}}let ek=i.memo(function(){let t=eI("HeaderComponent"),e=eA("headerHeight"),n=eI("headerFooterTag"),r=J(t=>e(V(t,"height"))),o=eI("context");return t?i.createElement(n,{ref:r},i.createElement(t,ex(t,o))):null}),ew=i.memo(function(){let t=eI("FooterComponent"),e=eA("footerHeight"),n=eI("headerFooterTag"),r=J(t=>e(V(t,"height"))),o=eI("context");return t?i.createElement(n,{ref:r},i.createElement(t,ex(t,o))):null});function eS({usePublisher:t,useEmitter:e,useEmitterValue:n}){return i.memo(function({style:r,children:o,...s}){let l=t("scrollContainerState"),a=n("ScrollerComponent"),c=t("smoothScrollTargetReached"),u=n("scrollerRef"),h=n("context"),{scrollerRef:d,scrollByCallback:p,scrollToCallback:f}=K(l,c,a,u);return e("scrollTo",f),e("scrollBy",p),i.createElement(a,{ref:d,style:{...eg,...r},"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...s,...ex(a,h)},o)})}function eM({usePublisher:t,useEmitter:e,useEmitterValue:n}){return i.memo(function({style:r,children:o,...s}){let l=t("windowScrollContainerState"),a=n("ScrollerComponent"),c=t("smoothScrollTargetReached"),u=n("totalListHeight"),d=n("deviation"),p=n("customScrollParent"),f=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:y}=K(l,c,a,h,p);return _(()=>(m.current=p||window,()=>{m.current=null}),[m,p]),e("windowScrollTo",y),e("scrollBy",g),i.createElement(a,{style:{position:"relative",...r,...0!==u?{height:u+d}:{}},"data-virtuoso-scroller":!0,...s,...ex(a,f)},o)})}let eC=({children:t})=>{let e=i.useContext(el),n=eA("viewportHeight"),r=eA("fixedItemHeight"),o=eI("alignToBottom"),l=J(s(n,t=>V(t,"height")));return i.useEffect(()=>{e&&(n(e.viewportHeight),r(e.itemHeight))},[e,n,r]),i.createElement("div",{style:ey(o),ref:l,"data-viewport-type":"element"},t)},eT=({children:t})=>{let e=i.useContext(el),n=eA("windowViewportRect"),r=eA("fixedItemHeight"),o=es(n,eI("customScrollParent")),s=eI("alignToBottom");return i.useEffect(()=>{e&&(r(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,r]),i.createElement("div",{ref:o,style:ey(s),"data-viewport-type":"window"},t)},eE=({children:t})=>{let e=eI("TopItemListComponent")||"div",n=eI("headerHeight"),r={...ev,marginTop:`${n}px`},o=eI("context");return i.createElement(e,{style:r,...ex(e,o)},t)},{Component:eR,usePublisher:eA,useEmitterValue:eI,useEmitter:eO}=N(eh,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},i.memo(function(t){let e=eI("useWindowScroll"),n=eI("topItemsIndexes").length>0,r=eI("customScrollParent"),o=r||e?eL:ej,s=r||e?eT:eC;return i.createElement(o,{...t},n&&i.createElement(eE,null,i.createElement(em,{showTopList:!0})),i.createElement(s,null,i.createElement(ek,null),i.createElement(em,null),i.createElement(ew,null)))})),ej=eS({usePublisher:eA,useEmitterValue:eI,useEmitter:eO}),eL=eM({usePublisher:eA,useEmitterValue:eI,useEmitter:eO}),ez=eR,eP={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},eH={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:eN,ceil:e_,floor:eD,min:eB,max:eF}=Math;function e$(t,e,n){return Array.from({length:e-t+1}).map((e,r)=>{let i=null===n?null:n[r+t];return{index:r+t,data:i}})}function eW(t,e){return t&&t.column===e.column&&t.row===e.row}function eJ(t,e){return t&&t.width===e.width&&t.height===e.height}let eq=z(([{overscan:t,visibleRange:e,listBoundary:n}
4,{scrollTop:r,viewportHeight:i,scrollBy:o,scrollTo:s,smoothScrollTargetReached:l,scrollContainerState:a,footerHeight:c,headerHeight:u},h,d,{propsReady:p,didMount:k},{windowViewportRect:T,useWindowScroll:A,customScrollParent:O,windowScrollContainerState:z,windowScrollTo:P},H])=>{let N=y(0),_=y(0),D=y(eP),B=y({height:0,width:0}),F=y({height:0,width:0}),$=g(),W=g(),J=y(0),q=y(null),V=y({row:0,column:0}),U=g(),K=g(),Y=y(!1),G=y(0),Z=y(!0),X=y(!1);b(k,I(G),S(([t,e])=>!!e))(1,()=>{Z(0,!1),_(0,0)}),b(L(k,Z,F,B,G,X),S(([t,e,n,r,,i])=>t&&!e&&0!==n.height&&0!==r.height&&!i))(1,([,,,,t])=>{X(0,!0),tO(1,()=>{$(0,t)}),m(b(r),()=>{n(0,[0,0]),Z(0,!0)})}),f(b(K,S(t=>null!=t&&t.scrollTop>0),C(0)),_),b(k,I(K),S(([,t])=>null!=t))(1,([,t])=>{t&&(B(0,t.viewport),F(0,null==t?void 0:t.item),V(0,t.gap),t.scrollTop>0&&(Y(0,!0),m(b(r,E(1)),t=>{Y(0,!1)}),s(0,{top:t.scrollTop})))}),f(b(B,M(({height:t})=>t)),i),f(b(L(j(B,eJ),j(F,eJ),j(V,(t,e)=>t&&t.column===e.column&&t.row===e.row),j(r)),M(([t,e,n,r])=>({viewport:t,item:e,gap:n,scrollTop:r}))),U),f(b(L(j(N),e,j(V,eW),j(F,eJ),j(B,eJ),j(q),j(_),j(Y),j(Z),j(G)),S(([,,,,,,,t])=>!t),M(([t,[e,n],r,i,o,s,l,,a,c])=>{let u,h;let{row:d,column:p}=r,{height:f,width:m}=i,{width:g}=o;if(0===l&&(0===t||0===g))return eP;if(0===m){var y;let e=tj(c,t),n=0===e?Math.max(l-1,0):e;return y=e$(e,n,s),{...eH,items:y}}let v=eK(g,m,p);a?0===e&&0===n&&l>0?(u=0,h=l-1):(u=v*eD((e+d)/(f+d)),h=eB(t-1,eF(h=v*e_((n+d)/(f+d))-1,v-1)),u=eB(h,eF(0,u))):(u=0,h=-1);let x=e$(u,h,s),{top:b,bottom:k}=eV(o,r,i,x),w=e_(t/v);return{items:x,offsetTop:b,offsetBottom:w*f+(w-1)*d-k,top:b,bottom:k,itemHeight:f,itemWidth:m}})),D),f(b(q,S(t=>null!==t),M(t=>t.length)),N),f(b(L(B,F,D,V),S(([t,e,{items:n}])=>n.length>0&&0!==e.height&&0!==t.height),M(([t,e,{items:n},r])=>{let{top:i,bottom:o}=eV(t,r,e,n);return[i,o]}),w(tD)),n);let Q=y(!1);f(b(r,I(Q),M(([t,e])=>e||0!==t)),Q);let tt=v(b(j(D),S(({items:t})=>t.length>0),I(N,Q),S(([{items:t},e,n])=>n&&t[t.length-1].index===e-1),M(([,t])=>t-1),w())),te=v(b(j(D),S(({items:t})=>t.length>0&&0===t[0].index),C(0),w())),tn=v(b(j(D),I(Y),S(([{items:t},e])=>t.length>0&&!e),M(([{items:t}])=>({startIndex:t[0].index,endIndex:t[t.length-1].index})),w(tB),R(0)));f(tn,d.scrollSeekRangeChanged),f(b($,I(B,F,N,V),M(([t,e,n,r,i])=>{let o=tC(t),{align:s,behavior:l,offset:a}=o,c=o.index;"LAST"===c&&(c=r-1);let u=eU(e,i,n,c=eF(0,c,eB(r-1,c)));return"end"===s?u=eN(u-e.height+n.height):"center"===s&&(u=eN(u-e.height/2+n.height/2)),a&&(u+=a),{top:u,behavior:l}})),s);let tr=x(b(D,M(t=>t.offsetBottom+t.bottom)),0);return f(b(T,M(t=>({width:t.visibleWidth,height:t.visibleHeight}))),B),{data:q,totalCount:N,viewportDimensions:B,itemDimensions:F,scrollTop:r,scrollHeight:W,overscan:t,scrollBy:o,scrollTo:s,scrollToIndex:$,smoothScrollTargetReached:l,windowViewportRect:T,windowScrollTo:P,useWindowScroll:A,customScrollParent:O,windowScrollContainerState:z,deviation:J,scrollContainerState:a,footerHeight:c,headerHeight:u,initialItemCount:_,gap:V,restoreStateFrom:K,...d,initialTopMostItemIndex:G,gridState:D,totalListHeight:tr,...h,startReached:te,endReached:tt,rangeChanged:tn,stateChanged:U,propsReady:p,stateRestoreInProgress:Y,...H}},a(tq,Y,tA,tX,tI,t6,$));function eV(t,e,n,r){let{height:i}=n;return void 0===i||0===r.length?{top:0,bottom:0}:{top:eU(t,e,n,r[0].index),bottom:eU(t,e,n,r[r.length-1].index)+i}}function eU(t,e,n,r){let i=eD(r/eK(t.width,n.width,e.column)),o=i*n.height+eF(0,i-1)*e.row;return o>0?o+e.row:o}function eK(t,e,n){return eF(1,eD((t+n)/(eD(e)+n)))}let eY=z(()=>{let t=y(t=>`Item ${t}`),e=y({}),n=y(null),r=y("virtuoso-grid-item"),i=y("virtuoso-grid-list"),o=y(ec),s=y("div"),l=y(h),a=(t,n=null)=>x(b(e,M(e=>e[t]),w()),n);return{context:n,itemContent:t,components:e,computeItemKey:o,itemClassName:r,listClassName:i,headerFooterTag:s,scrollerRef:l,FooterComponent:a("Footer"),HeaderComponent:a("Header"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),ScrollerComponent:a("Scroller","div"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder","div")}}),eG=z(([t,e])=>({...t,...e}),a(eq,eY)),eZ=i.memo(function(){let t=e3("gridState"),e=e3("listClassName"),n=e3("itemClassName"),r=e3("itemContent"),o=e3("computeItemKey"),s=e3("isSeeking"),l=e4("scrollHeight"),a=e3("ItemComponent"),c=e3("ListComponent"),u=e3("ScrollSeekPlaceholder"),h=e3("context"),d=e4("itemDimensions"),p=e4("gap"),f=e3("log"),m=e3("stateRestoreInProgress"),g=J(t=>{l(t.parentElement.parentElement.scrollHeight);let e=t.firstChild;if(e){let{width:t,height:n}=e.getBoundingClientRect();d({width:t,height:n})}p({row:e7("row-gap",getComputedStyle(t).rowGap,f),column:e7("column-gap",getComputedStyle(t).columnGap,f)})});return m?null:i.createElement(c,{ref:g,className:e,...ex(c,h),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-test-id":"virtuoso-item-list"},t.items.map(e=>{let l=o(e.index,e.data,h);return s?i.createElement(u,{key:l,...ex(u,h),index:e.index,height:t.itemHeight,width:t.itemWidth}):i.createElement(a,{...ex(a,h),className:n,"data-index":e.index,key:l},r(e.index,e.data,h))}))}),eX=i.memo(function(){let t=e3("HeaderComponent"),e=e4("headerHeight"),n=e3("headerFooterTag"),r=J(t=>e(V(t,"height"))),o=e3("context");return t?i.createElement(n,{ref:r},i.createElement(t,ex(t,o))):null}),eQ=i.memo(function(){let t=e3("FooterComponent"),e=e4("footerHeight"),n=e3("headerFooterTag"),r=J(t=>e(V(t,"height"))),o=e3("context");return t?i.createElement(n,{ref:r},i.createElement(t,ex(t,o))):null}),e0=({children:t})=>{let e=i.useContext(ea),n=e4("itemDimensions"),r=e4("viewportDimensions"),o=J(t=>{r(t.getBoundingClientRect())});return i.useEffect(()=>
4{e&&(r({height:e.viewportHeight,width:e.viewportWidth}),n({height:e.itemHeight,width:e.itemWidth}))},[e,r,n]),i.createElement("div",{style:ey(!1),ref:o},t)},e1=({children:t})=>{let e=i.useContext(ea),n=e4("windowViewportRect"),r=e4("itemDimensions"),o=es(n,e3("customScrollParent"));return i.useEffect(()=>{e&&(r({height:e.itemHeight,width:e.itemWidth}),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,n,r]),i.createElement("div",{ref:o,style:ey(!1)},t)},{Component:e2,usePublisher:e4,useEmitterValue:e3,useEmitter:e5}=N(eG,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},i.memo(function({...t}){let e=e3("useWindowScroll"),n=e3("customScrollParent"),r=n||e?e8:e6,o=n||e?e1:e0;return i.createElement(r,{...t},i.createElement(o,null,i.createElement(eX,null),i.createElement(eZ,null),i.createElement(eQ,null)))})),e6=eS({usePublisher:e4,useEmitterValue:e3,useEmitter:e5}),e8=eM({usePublisher:e4,useEmitterValue:e3,useEmitter:e5});function e7(t,e,n){return("normal"===e||(null==e?void 0:e.endsWith("px"))||n(`${t} was not resolved to pixel value correctly`,e,D.WARN),"normal"===e)?0:parseInt(null!=e?e:"0",10)}let e9=e2,nt=z(()=>{let t=y(t=>i.createElement("td",null,"Item $",t)),e=y(null),n=y(null),r=y(null),o=y({}),s=y(ec),l=y(h),a=(t,e=null)=>x(b(o,M(e=>e[t]),w()),e);return{context:e,itemContent:t,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:l,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}),ne=z(([t,e])=>({...t,...e}),a(en,nt)),nn=({height:t})=>i.createElement("tr",null,i.createElement("td",{style:{height:t}})),nr=({height:t})=>i.createElement("tr",null,i.createElement("td",{style:{height:t,padding:0,border:0}})),ni={overflowAnchor:"none"},no=i.memo(function(){let t=nu("listState"),e=nc("sizeRanges"),n=nu("useWindowScroll"),r=nu("customScrollParent"),o=nc("windowScrollContainerState"),s=nc("scrollContainerState"),l=nu("itemContent"),a=nu("trackItemSizes"),{callbackRef:c,ref:u}=q(e,nu("itemSize"),a,r||n?o:s,nu("log"),void 0,r),[h,d]=i.useState(0);nh("deviation",t=>{h!==t&&(u.current.style.marginTop=`${t}px`,d(t))});let p=nu("EmptyPlaceholder"),f=nu("ScrollSeekPlaceholder")||nn,m=nu("FillerRow")||nr,g=nu("TableBodyComponent"),y=nu("TableRowComponent"),v=nu("computeItemKey"),x=nu("isSeeking"),b=nu("paddingTopAddition"),k=nu("firstItemIndex"),w=nu("statefulTotalCount"),S=nu("context");if(0===w&&p)return i.createElement(p,ex(p,S));let M=t.offsetTop+b+h,C=t.offsetBottom,T=M>0?i.createElement(m,{height:M,key:"padding-top",context:S}):null,E=C>0?i.createElement(m,{height:C,key:"padding-bottom",context:S}):null,R=t.items.map(t=>{let e=t.originalIndex,n=v(e+k,t.data,S);return x?i.createElement(f,{...ex(f,S),key:n,index:t.index,height:t.size,type:t.type||"item"}):i.createElement(y,{...ex(y,S),...eb(y,t.data),key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,style:ni},l(t.index,t.data,S))});return i.createElement(g,{ref:c,"data-test-id":"virtuoso-item-list",...ex(g,S)},[T,...R,E])}),ns=({children:t})=>
4{let e=i.useContext(el),n=nc("viewportHeight"),r=nc("fixedItemHeight"),o=J(s(n,t=>V(t,"height")));return i.useEffect(()=>{e&&(n(e.viewportHeight),r(e.itemHeight))},[e,n,r]),i.createElement("div",{style:ey(!1),ref:o,"data-viewport-type":"element"},t)},nl=({children:t})=>{let e=i.useContext(el),n=nc("windowViewportRect"),r=nc("fixedItemHeight"),o=es(n,nu("customScrollParent"));return i.useEffect(()=>{e&&(r(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,r]),i.createElement("div",{ref:o,style:ey(!1),"data-viewport-type":"window"},t)},{Component:na,usePublisher:nc,useEmitterValue:nu,useEmitter:nh}=N(ne,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},i.memo(function(t){let e=nu("useWindowScroll"),n=nu("customScrollParent"),r=nc("fixedHeaderHeight"),o=nc("fixedFooterHeight"),l=nu("fixedHeaderContent"),a=nu("fixedFooterContent"),c=nu("context"),u=J(s(r,t=>V(t,"height"))),h=J(s(o,t=>V(t,"height"))),d=n||e?np:nd,p=n||e?nl:ns,f=nu("TableComponent"),m=nu("TableHeadComponent"),g=nu("TableFooterComponent"),y=l?i.createElement(m,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:u,...ex(m,c)},l()):null,v=a?i.createElement(g,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:h,...ex(g,c)},a()):null;return i.createElement(d,{...t},i.createElement(p,null,i.createElement(f,{style:{borderSpacing:0,overflowAnchor:"none"},...ex(f,c)},[y,i.createElement(no,{key:"TableBody"}),v])))})),nd=eS({usePublisher:nc,useEmitterValue:nu,useEmitter:nh}),np=eM({usePublisher:nc,useEmitterValue:nu,useEmitter:nh})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.