PageSourceSearch

https://www.ruuby.com/_next/static/chunks/3426-a782f9cf5bda56c9.js

js ruuby.com collected 2026-10-02 14:34:23 UTC 360,594 bytes, 192 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3426],{8384:function(e,t,n){n.d(t,{R:function(){return i}});var r=new Map;function i(e){if(r.has(e))return r.get(e);var t=o(e);return r.set(e,t),t}var o=function(){var e=null;try{e=document.createElement("canvas").getContext("2d")}catch(e){}return e?(e.font=Math.floor(12.5)+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=40,e.canvas.height=25,function(t){e.clearRect(0,0,40,25),e.fillStyle="#FF0000",e.fillText(t,0,22),e.fillStyle="#0000FF",e.fillText(t,20,22);for(var n=e.getImageData(0,0,20,25).data,r=n.length,i=0;i<r&&!n[i+3];i+=4);if(i>=r)return!1;var o=20+i/4%20,l=Math.floor(i/4/20),s=e.getImageData(o,l,1,1).data;return n[i]===s[0]&&n[i+2]===s[2]&&!(e.measureText(t).width>=20)}):function(){return!1}}()},66648:function(e,t,n){n.d(t,{default:function(){return i.a}});var r=n(55601),i=n.n(r)},38173:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return v}});let r=n(99920),i=n(41452),o=n(57437),l=i._(n(2265)),s=r._(n(54887)),a=r._(n(28321)),u=n(80497),c=n(7103),d=n(93938);n(72301);let h=n(60291),p=r._(n(21241)),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function m(e,t,n,r,i,o,l){let s=null==e?void 0:e.src;e&&e["data-loaded-src"]!==s&&(e["data-loaded-src"]=s,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}}))}function D(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let g=(0,l.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:i,height:s,width:a,decoding:u,className:c,style:d,fetchPriority:h,placeholder:p,loading:f,unoptimized:g,fill:y,onLoadRef:v,onLoadingCompleteRef:b,setBlurComplete:w,setShowAltText:C,sizesInput:k,onLoad:F,onError:E,...x}=e;return(0,o.jsx)("img",{...x,...D(h),loading:f,width:a,height:s,decoding:u,"data-nimg":y?"fill":"1",className:c,style:d,sizes:i,srcSet:r,src:n,ref:(0,l.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&m(e,p,v,b,w,g,k))},[n,p,v,b,w,E,g,k,t]),onLoad:e=>{m(e.currentTarget,p,v,b,w,g,k)},onError:e=>{C(!0),"empty"!==p&&w(!0),E&&E(e)}})});function y(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...D(n.fetchPriority)};return t&&s.default.preload?(s.default.preload(n.src,r),null):(0,o.jsx)(a.default,{children:(0,o.jsx)("link",{rel:"preload",href:n.srcSet?void 0:n.src,...r},"__nimg-"+n.src+n.srcSet+n.sizes)})}let v=(0,l.forwardRef)((e,t)=>{let n=(0,l.useContext)(h.RouterContext),r=(0,l.useContext)(d.ImageConfigContext),i=(0,l.useMemo)(()=>{let e=f||r||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[r]),{onLoad:s,onLoadingComplete:a}=e,m=(0,l.useRef)(s);(0,l.useEffect)(()=>{m.current=s},[s]);let D=(0,l.useRef)(a);(0,l.useEffect)(()=>{D.current=a},[a]);let[v,b]=(0,l.useState)(!1),[w,C]=(0,l.useState)(!1),{props:k,meta:F}=(0,u.getImgProps)(e,{defaultLoader:p.default,imgConf:i,blurComplete:v,showAltText:w});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g,{...k,unoptimized:F.unoptimized,placeholder:F.placeholder,fill:F.fill,onLoadRef:m,onLoadingCompleteRef:D,setBlurComplete:b,setShowAltText:C,sizesInput:e.sizes,ref:t}),F.priority?(0,o.jsx)(y,{isAppRouter:!n,imgAttributes:k}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82901:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return r}});let r=n(99920)._(n(2265)).default.createContext({})},40687:function(e,t){function n(e){let{ampFirst:t=!1,hybrid:n=!1,hasQuery:r=!1}=void 0===e?{}:e;return t||n&&r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return n}})},80497:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return s}}),n(72301);let r=n(51564),i=n(7103);function o(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function s(e,t){var n;let s,a,u,{src:c,sizes:d,unoptimized:h=!1,priority:p=!1,loading:f,className:m,quality:D,width:g,height:y,fill:v=!1,style:b,overri
1deSrc:w,onLoad:C,onLoadingComplete:k,placeholder:F="empty",blurDataURL:E,fetchPriority:x,layout:A,objectFit:S,objectPosition:M,lazyBoundary:T,lazyRoot:B,...O}=e,{imgConf:L,showAltText:N,blurComplete:R,defaultLoader:I}=t,$=L||i.imageConfigDefault;if("allSizes"in $)s=$;else{let e=[...$.deviceSizes,...$.imageSizes].sort((e,t)=>e-t),t=$.deviceSizes.sort((e,t)=>e-t);s={...$,allSizes:e,deviceSizes:t}}if(void 0===I)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let z=O.loader||I;delete O.loader,delete O.srcSet;let H="__next_img_default"in z;if(H){if("custom"===s.loader)throw Error('Image with src "'+c+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=z;z=t=>{let{config:n,...r}=t;return e(r)}}if(A){"fill"===A&&(v=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[A];e&&(b={...b,...e});let t={responsive:"100vw",fill:"100vw"}[A];t&&!d&&(d=t)}let j="",P=l(g),_=l(y);if("object"==typeof(n=c)&&(o(n)||void 0!==n.src)){let e=o(c)?c.default:c;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(a=e.blurWidth,u=e.blurHeight,E=E||e.blurDataURL,j=e.src,!v){if(P||_){if(P&&!_){let t=P/e.width;_=Math.round(e.height*t)}else if(!P&&_){let t=_/e.height;P=Math.round(e.width*t)}}else P=e.width,_=e.height}}let W=!p&&("lazy"===f||void 0===f);(!(c="string"==typeof c?c:j)||c.startsWith("data:")||c.startsWith("blob:"))&&(h=!0,W=!1),s.unoptimized&&(h=!0),H&&c.endsWith(".svg")&&!s.dangerouslyAllowSVG&&(h=!0),p&&(x="high");let q=l(D),J=Object.assign(v?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:S,objectPosition:M}:{},N?{}:{color:"transparent"},b),U=R||"empty"===F?null:"blur"===F?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:P,heightInt:_,blurWidth:a,blurHeight:u,blurDataURL:E||"",objectFit:J.objectFit})+'")':'url("'+F+'")',Y=U?{backgroundSize:J.objectFit||"cover",backgroundPosition:J.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:U}:{},K=function(e){let{config:t,src:n,unoptimized:r,width:i,quality:o,sizes:l,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:a,kind:u}=function(e,t,n){let{deviceSizes:r,allSizes:i}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:i,kind:"w"}}return"number"!=typeof t?{widths:r,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))],kind:"x"}}(t,i,l),c=a.length-1;return{sizes:l||"w"!==u?l:"100vw",srcSet:a.map((e,r)=>s({config:t,src:n,quality:o,width:e})+" "+("w"===u?e:r+1)+u).join(", "),src:s({config:t,src:n,quality:o,width:a[c]})}}({config:s,src:c,unoptimized:h,width:P,quality:q,sizes:d,loader:z});return{props:{...O,loading:W?"lazy":f,fetchPriority:x,width:P,height:_,decoding:"async",className:m,style:{...J,...Y},sizes:K.sizes,srcSet:K.srcSet,src:w||K.src},meta:{unoptimized:h,priority:p,placeholder:F,fill:v}}}},28321:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return m},defaultHead:function(){return d}});let r=n(99920),i=n(41452),o=n(57437),l=i._(n(2265)),s=r._(n(65960)),a=n(82901),u=n(36590),c=n(40687);function d(e){void 0===e&&(e=!1);let t=[(0,o.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,o.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function h(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>
1"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}n(72301);let p=["name","httpEquiv","charSet","itemProp"];function f(e,t){let{inAmpMode:n}=t;return e.reduce(h,[]).reverse().concat(d(n).reverse()).filter(function(){let e=new Set,t=new Set,n=new Set,r={};return i=>{let o=!0,l=!1;if(i.key&&"number"!=typeof i.key&&i.key.indexOf("$")>0){l=!0;let t=i.key.slice(i.key.indexOf("$")+1);e.has(t)?o=!1:e.add(t)}switch(i.type){case"title":case"base":t.has(i.type)?o=!1:t.add(i.type);break;case"meta":for(let e=0,t=p.length;e<t;e++){let t=p[e];if(i.props.hasOwnProperty(t)){if("charSet"===t)n.has(t)?o=!1:n.add(t);else{let e=i.props[t],n=r[t]||new Set;("name"!==t||!l)&&n.has(e)?o=!1:(n.add(e),r[t]=n)}}}}return o}}()).reverse().map((e,t)=>{let r=e.key||t;if(!n&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,l.default.cloneElement(e,t)}return l.default.cloneElement(e,{key:r})})}let m=function(e){let{children:t}=e,n=(0,l.useContext)(a.AmpStateContext),r=(0,l.useContext)(u.HeadManagerContext);return(0,o.jsx)(s.default,{reduceComponentsToState:f,headManager:r,inAmpMode:(0,c.isInAmpMode)(n),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},51564:function(e,t){function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:i,blurDataURL:o,objectFit:l}=e,s=r?40*r:t,a=i?40*i:n,u=s&&a?"viewBox='0 0 "+s+" "+a+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+u+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(u?"none":"contain"===l?"xMidYMid":"cover"===l?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+o+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},93938:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return o}});let r=n(99920)._(n(2265)),i=n(7103),o=r.default.createContext(i.imageConfigDefault)},7103:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return r}});let n=["default","imgix","cloudinary","akamai","custom"],r={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}},55601:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return a},getImageProps:function(){return s}});let r=n(99920),i=n(80497),o=n(38173),l=r._(n(21241));function s(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let a=o.Image},21241:function(e,t){function n(e){let{config:t,src:n,width:r,quality:i}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(i||75)+"&dpl=dpl_9ne3X6PTMAjF9HsPjBmGPdW4VomS"}
1Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},65960:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(2265),i="undefined"==typeof window,o=i?()=>{}:r.useLayoutEffect,l=i?()=>{}:r.useEffect;function s(e){let{headManager:t,reduceComponentsToState:n}=e;function s(){if(t&&t.mountedInstances){let i=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(i,e))}}if(i){var a;null==t||null==(a=t.mountedInstances)||a.add(e.children),s()}return o(()=>{var n;return null==t||null==(n=t.mountedInstances)||n.add(e.children),()=>{var n;null==t||null==(n=t.mountedInstances)||n.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=s),()=>{t&&(t._pendingUpdate=s)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},16763:function(e,t,n){n.d(t,{ZP:function(){return eG}});var r,i,o=n(23950),l=n(22988),s=n(2265),a="data-focus-lock",u="data-focus-lock-disabled",c=n(28215),d={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},h=n(15411),p=(0,h.s)({},function(e){return{target:e.target,currentTarget:e.currentTarget}}),f=(0,h.s)(),m=(0,h.s)(),D=(0,h._)({async:!0,ssr:"undefined"!=typeof document}),g=(0,s.createContext)(void 0),y=[],v=(0,s.forwardRef)(function(e,t){var n,r=(0,s.useState)(),i=r[0],o=r[1],h=(0,s.useRef)(),m=(0,s.useRef)(!1),v=(0,s.useRef)(null),b=(0,s.useState)({})[1],w=e.children,C=e.disabled,k=void 0!==C&&C,F=e.noFocusGuards,E=void 0!==F&&F,x=e.persistentFocus,A=e.crossFrame,S=e.autoFocus,M=(e.allowTextSelection,e.group),T=e.className,B=e.whiteList,O=e.hasPositiveIndices,L=e.shards,N=void 0===L?y:L,R=e.as,I=e.lockProps,$=e.sideCar,z=e.returnFocus,H=void 0!==z&&z,j=e.focusOptions,P=e.onActivation,_=e.onDeactivation,W=(0,s.useState)({})[0],q=(0,s.useCallback)(function(e){var t=e.captureFocusRestore;if(!v.current){var n,r=null==(n=document)?void 0:n.activeElement;v.current=r,r!==document.body&&(v.current=t(r))}h.current&&P&&P(h.current),m.current=!0,b()},[P]),J=(0,s.useCallback)(function(){m.current=!1,_&&_(h.current),b()},[_]),U=(0,s.useCallback)(function(e){var t=v.current;if(t){var n=("function"==typeof t?t():t)||document.body,r="function"==typeof H?H(n):H;if(r){var i="object"==typeof r?r:void 0;v.current=null,e?Promise.resolve().then(function(){return n.focus(i)}):n.focus(i)}}},[H]),Y=(0,s.useCallback)(function(e){m.current&&p.useMedium(e)},[]),K=f.useMedium,V=(0,s.useCallback)(function(e){h.current!==e&&(h.current=e,o(e))},[]),Z=(0,l.Z)(((n={})[u]=k&&"disabled",n[a]=M,n),void 0===I?{}:I),G=!0!==E,X=G&&"tail"!==E,Q=(0,c.q)([t,V]),ee=(0,s.useMemo)(function(){return{observed:h,shards:N,enabled:!k,get active(){return m.current}}},[k,m,N,h]);return s.createElement(s.Fragment,null,G&&[s.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:k?-1:0,style:d}),O?s.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:k?-1:1,style:d}):null],!k&&s.createElement($,{id:W,sideCar:D,observed:i,disabled:k,persistentFocus:void 0!==x&&x,crossFrame:void 0===A||A,autoFocus:void 0===S||S,whiteList:B,shards:N,onActivation:q,onDeactivation:J,returnFocus:U,focusOptions:j,noFocusGuards:E}),s.createElement(void 0===R?"div":R,(0,l.Z)({ref:Q},Z,{className:T,onBlur:K,onFocus:Y}),s.createElement(g.Provider,{value:ee},w)),X&&s.createElement("div",{"data-focus-guard":!0,tabIndex:k?-1:0,style:d}))});v.propTypes={};var b=n(79431);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var C=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},k=function(e){return Array.isArray(e)?e:[e]},F=function(e){return Array.isArray(e)?e[0]:e},E=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!!t&&!!t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility"))},x=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},A=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},S=function(e,t){var n,r=e.get(t);if(void 0!==r)return r;var i=(n=S.bind(void 0,e),!t||A(t)||!E(t)&&!t.hasAttribute("inert")&&n(x(t)));return e.set(t,i),i},M=function(e,t){var n,r=e.get(t);if(void 0!==r)return r;var i=(n=M.bind(void 0,e),!t||!!A(t)||!!L(t)&&n(x(t)));return e.set(t,i),i},T=function(e){return e.dataset},B=function(e){return"INPUT"===e.tagName},O=function(e){return B(e)&&"radio"===e.type},L=function(e){return![!0,"true",""].includes(e.getAttribute("data-no-autofocus"))},N=function(e){var t;return!!(e&&(null===(t=T(e))||void 0===t?void 0:t.focusGuard))},R=function(e){return!N(e)},I=function(e){return!!e},$=function(e,t){var n=Math.max(0,e.tabIndex),r=Math.max(0,t.tabIndex),i=n-r,o=e.index-t.index;if(i){if(!n)return 1;if(!r)return -1}return i||o},z=function(e,t,n){return C(e).map(function(e,t){var r=e.tabIndex<0&&!e.hasAttribute("tabindex")?0:e.tabIndex;return{node:e,index:t,tabIndex:n&&-1===r?(e.dataset||{}).focusGuard?0:-1:r}}).filter(function(e){return!t||e.tabIndex>=0}).sort($)},H="button:enabled,select:enabled,textarea:enabled,input:enabled,a[href],area[href],summary,iframe,object,embed,audio[controls],video[controls],[tabindex],[contenteditable],[autofocus]",j="".concat(H,", [data-focus-guard]"),P=function(e,t){return C((e.shadowRoot||e).children).reduce(function(e,n){return e.concat(n.matches(t?j:H)?[n]:[],P(n))},[])},_=function(e,t){var n;return e instanceof HTMLIFrameElement&&(null===(n=e.contentDocument)||void 0===n?void 0:n.body)?W([e.contentDocument.body],t):[e]},W=function(e,t){return e.reduce(function(e,n){var r,i=P(n,t),o=(r=[]).concat.apply(r,i.map(function(e){return _(e,t)}));return e.concat(o,n.parentNode?C(n.parentNode.querySelectorAll(H)).filter(function(e){return e===n}):[])},[])},q=function(e,t){return C(e).filter(function(e){return S(t,e)}).filter(function(e){return!((B(e)||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))})},J=function(e,t){return void 0===t&&(t=new Map),C(e).filter(function(e){return M(t,e)})},U=function(e,t,n){return z(q(W(e,n),t),!0,n)},Y=function(e,t){return z(q(W(e),t),!1)},K=function(e,t){return e.shadowRoot?K(e.shadowRoot,t):!!(void 0!==Object.getPrototypeOf(e).contains&&Object.getPrototypeOf(e).contains.call(e,t))||C(e.children).some(function(e){var n;if(e instanceof HTMLIFrameElement){var r=null===(n=e.contentDocument)||void 0===n?void 0:n.body;return!!r&&K(r,t)}return K(e,t)})},V=function(e){try{return e()}catch(e){return}},Z=function(e){if(void 0===e&&(e=document),e&&e.activeElement){var t=e.activeElement;return t.shadowRoot?Z(t.shadowRoot):t instanceof HTMLIFrameElement&&V(function(){return t.contentWindow.document})?Z(t.contentWindow.document):t}},G=function(e){void 0===e&&(e=document);var t=Z(e);return!!t&&C(e.querySelectorAll("[".concat("data-no-focus-lock","]"))).some(function(e){return K(e,t)})},X=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(e,n){return!t.has(n)})},Q=function(e){return e.parentNode?Q(e.parentNode):e}
1,ee=function(e){return k(e).filter(Boolean).reduce(function(e,t){var n=t.getAttribute(a);return e.push.apply(e,n?X(C(Q(t).querySelectorAll("[".concat(a,'="').concat(n,'"]:not([').concat(u,'="disabled"])')))):[t]),e},[])},et=function(e,t){return void 0===t&&(t=Z(F(e).ownerDocument)),!!t&&(!t.dataset||!t.dataset.focusGuard)&&ee(e).some(function(e){var n;return K(e,t)||(n=t,!!C(e.querySelectorAll("iframe")).some(function(e){return e===n}))})},en=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},er=function(e,t){return O(e)&&e.name&&t.filter(O).filter(function(t){return t.name===e.name}).filter(function(e){return e.checked})[0]||e},ei=function(e){var t=new Set;return e.forEach(function(n){return t.add(er(n,e))}),e.filter(function(e){return t.has(e)})},eo=function(e){return e[0]&&e.length>1?er(e[0],e):e[0]},el=function(e,t){return e.indexOf(er(t,e))},es="NEW_FOCUS",ea=function(e,t,n,r,i){var o=e.length,l=e[0],s=e[o-1],a=N(r);if(!(r&&e.indexOf(r)>=0)){var u=void 0!==r?n.indexOf(r):-1,c=i?n.indexOf(i):u,d=i?e.indexOf(i):-1;if(-1===u)return -1!==d?d:es;if(-1===d)return es;var h=u-c,p=n.indexOf(l),f=n.indexOf(s),m=ei(n),D=void 0!==r?m.indexOf(r):-1,g=i?m.indexOf(i):D,y=m.filter(function(e){return e.tabIndex>=0}),v=void 0!==r?y.indexOf(r):-1,b=i?y.indexOf(i):v;if(!h&&d>=0||0===t.length)return d;var w=el(e,t[0]),C=el(e,t[t.length-1]);if(u<=p&&a&&Math.abs(h)>1)return C;if(u>=f&&a&&Math.abs(h)>1)return w;if(h&&Math.abs(v>=0&&b>=0?b-v:g-D)>1)return d;if(u<=p)return C;if(u>f)return w;if(h)return Math.abs(h)>1?d:(o+d+h)%o}},eu=function(e,t,n){var r=J(e.map(function(e){return e.node}).filter(function(e){var t,r=null===(t=T(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==r&&"false"!==r||n.indexOf(e)>=0}));return r&&r.length?eo(r):eo(J(t))},ec=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&ec(e.parentNode.host||e.parentNode,t),t},ed=function(e,t){for(var n=ec(e),r=ec(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},eh=function(e,t,n){var r=k(e),i=k(t),o=r[0],l=!1;return i.filter(Boolean).forEach(function(e){l=ed(l||e,e)||l,n.filter(Boolean).forEach(function(e){var t=ed(o,e);t&&(l=!l||K(t,l)?t:ed(t,l))})}),l},ep=function(e,t){return e.reduce(function(e,n){return e.concat(q(C(n.querySelectorAll("[".concat("data-autofocus-inside","]"))).map(function(e){return W([e])}).reduce(function(e,t){return e.concat(t)},[]),t))},[])},ef=function(e,t){var n=new Map;return t.forEach(function(e){return n.set(e.node,e)}),e.map(function(e){return n.get(e)}).filter(I)},em=function(e,t){var n=Z(k(e).length>0?document:F(e).ownerDocument),r=ee(e).filter(R),i=eh(n||e,e,r),o=new Map,l=Y(r,o),s=l.filter(function(e){return R(e.node)});if(s[0]){var a=Y([i],o).map(function(e){return e.node}),u=ef(a,s),c=u.map(function(e){return e.node}),d=u.filter(function(e){return e.tabIndex>=0}).map(function(e){return e.node}),h=ea(c,d,a,n,t);if(h===es){var p=eu(l,d,ep(r,o))||eu(l,c,ep(r,o));return p?{node:p}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===h?h:u[h]}},eD=0,eg=!1,ey=function(e,t,n){void 0===n&&(n={});var r=em(e,t);if(!eg&&r){if(eD>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),eg=!0,setTimeout(function(){eg=!1},1);return}eD++,en(r.node,n.focusOptions),eD--}};function ev(e){if(!e)return null;if("undefined"==typeof WeakRef)return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(null==t?void 0:t.deref())||null}}var eb=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:ev(n),parent:ev(n.parentElement),left:ev(n.previousElementSibling),right:ev(n.nextElementSibling)}),n=n.parentElement;return{element:ev(e),stack:t,ownerDocument:e.ownerDocument}},ew=function(e){if(e)for(var t,n,r,i,o,l=e.stack,s=e.ownerDocument,a=new Map,u=0;u<l.length;u++){var c=l[u],d=null===(t=c.parent)||void 0===t?void 0:t.call(c);if(d&&s.contains(d)){for(var h=null===(n=c.left)||void 0===n?void 0:n.call(c),p=c.current(),f=d.contains(p)?p:void 0,m=null===(r=c.right)||void 0===r?void 0:r.call(c),D=U([d],a),g=null!==(o=null!==(i=null!=f?f:null==h?void 0:h.nextElementSibling)&&void 0!==i?i:m)&&void 0!==o?o:h;g;){for(var y=0;y<D.length;y++){var v=D[y];if(null==g?void 0:g.contains(v.node))return v.node}g=g.nextElementSibling}if(D.length)return D[0].node}}},eC=function(e){var t=eb(e);return function(){return ew(t)}},ek=function(e){var t=ee(e).filter(R),n=z(W([eh(e,e,t)],!0),!0,!0),r=W(t,!1);return n.map(function(e){var t=e.node;return{node:t,index:e.index,lockItem:r.indexOf(t)>=0,guard:N(t)}})},eF=function(e,t,n){if(!e||!t)return console.error("no element or scope given"),{};var r=k(t);if(r.every(function(t){return!K(t,e)}))return console.error("Active element is not contained in the scope"),{};var i=n?U(r,new Map):Y(r,new Map),o=i.findIndex(function(t){return t.node===e});if(-1!==o)return{prev:i[o-1],next:i[o+1],first:i[0],last:i[i.length-1]}},eE=function(e,t){var n=t?U(k(e),new Map):Y(k(e),new Map);return{first:n[0],last:n[n.length-1]}},ex=function(e,t,n){void 0===t&&(t={});var r,i=(r=t,Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},r)),o=eF(e,i.scope,i.onlyTabbable);if(o){var l=n(o,i.cycle);l&&en(l.node,i.focusOptions)}},eA=function(e,t,n){var r,i=eE(e,null===(r=t.onlyTabbable)||void 0===r||r)[n];i&&en(i.node,t.focusOptions)};function eS(e){setTimeout(e,1)}var eM=function(e){return e&&"current"in e?e.current:e},eT=function(){return document&&document.activeElement===document.body},eB=null,eO=null,eL=function(){return null},eN=null,eR=!1,eI=!1,e$=function(e,t){eN={observerNode:e,portaledElement:t}};function ez(e,t,n,r){var i=null,o=e;do{var l=r[o];if(l.guard)l.node.dataset.focusAutoGuard&&(i=l);else if(l.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var eH=function(e){return Y(e,new Map)},ej=function(){var e=!1;
1if(eB){var t=eB,n=t.observed,r=t.persistentFocus,i=t.autoFocus,o=t.shards,l=t.crossFrame,s=t.focusOptions,a=t.noFocusGuards,u=n||eN&&eN.portaledElement;if(eT()&&eO&&eO!==document.body&&(!document.body.contains(eO)||!eH([(h=eO).parentNode]).some(function(e){return e.node===h}))){var c=eL();c&&c.focus()}var d=document&&document.activeElement;if(u){var h,p=[u].concat(o.map(eM).filter(Boolean));if((!d||(eB.whiteList||function(){return!0})(d))&&(r||function(){if(!(l?!!eR:"meanwhile"===eR)||!a||!eO||eI)return!1;var e=eH(p),t=e.findIndex(function(e){return e.node===eO});return 0===t||t===e.length-1}()||!(eT()||G())||!eO&&i)&&(u&&!(et(p)||d&&p.some(function(e){return function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))}(d,e,e)})||eN&&eN.portaledElement===d)&&(document&&!eO&&d&&!i?(d.blur&&d.blur(),document.body.focus()):(e=ey(p,eO,{focusOptions:s}),eN={})),(eO=document&&document.activeElement)!==document.body&&(eL=eC(eO)),eR=!1),document&&d!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var f=document&&document.activeElement,m=ek(p),D=m.map(function(e){return e.node}).indexOf(f);D>-1&&(m.filter(function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard}).forEach(function(e){return e.node.removeAttribute("tabIndex")}),ez(D,m.length,1,m),ez(D,-1,-1,m))}}}return e},eP=function(e){ej()&&e&&(e.stopPropagation(),e.preventDefault())},e_=function(){return eS(ej)},eW=function(){eI=!0},eq=function(){eI=!1,eR="just",eS(function(){eR="meanwhile"})},eJ=function(){document.addEventListener("focusin",eP),document.addEventListener("focusout",e_),window.addEventListener("focus",eW),window.addEventListener("blur",eq)},eU=function(){document.removeEventListener("focusin",eP),document.removeEventListener("focusout",e_),window.removeEventListener("focus",eW),window.removeEventListener("blur",eq)},eY={moveFocusInside:ey,focusInside:et,focusNextElement:function(e,t){void 0===t&&(t={}),ex(e,t,function(e,t){var n=e.next,r=e.first;return n||t&&r})},focusPrevElement:function(e,t){void 0===t&&(t={}),ex(e,t,function(e,t){var n=e.prev,r=e.last;return n||t&&r})},focusFirstElement:function(e,t){void 0===t&&(t={}),eA(e,t,"first")},focusLastElement:function(e,t){void 0===t&&(t={}),eA(e,t,"last")},captureFocusRestore:eC};p.assignSyncMedium(function(e){var t=e.target,n=e.currentTarget;n.contains(t)||e$(n,t)}),f.assignMedium(e_),m.assignMedium(function(e){return e(eY)});var eK=(r=function(e){return e.filter(function(e){return!e.disabled})},i=function(e){var t=e.slice(-1)[0];t&&!eB&&eJ();var n=eB,r=n&&t&&t.id===n.id;eB=t,!n||r||(n.onDeactivation(),e.filter(function(e){return e.id===n.id}).length||n.returnFocus(!t)),t?(eO=null,r&&n.observed===t.observed||t.onActivation(eY),ej(!0),eS(ej)):(eU(),eO=null)},function(e){var t,n,o,l,a=[];function u(){i(l=r(a.map(function(e){return e.props})))}var c=function(t){function n(){return t.apply(this,arguments)||this}(0,b.Z)(n,t),n.peek=function(){return l};var r=n.prototype;return r.componentDidMount=function(){a.push(this),u()},r.componentDidUpdate=function(){u()},r.componentWillUnmount=function(){var e=a.indexOf(this);a.splice(e,1),u()},r.render=function(){return s.createElement(e,this.props)},n}(s.PureComponent);return t="displayName",n="SideEffect("+(e.displayName||e.name||"Component")+")",(o=function(e,t){if("object"!=w(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=w(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==w(o)?o:o+"")in c)?Object.defineProperty(c,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):c[t]=n,c})(function(){return null}),eV=(0,s.forwardRef)(function(e,t){return s.createElement(v,(0,l.Z)({sideCar:eK,ref:t},e))}),eZ=v.propTypes||{};eZ.sideCar,(0,o.Z)(eZ,["sideCar"]),eV.propTypes={};var eG=eV},86454:function(e,t,n){n.d(t,{Z:function(){return _}});var r,i,o=n(11735),l=n(2265),s="right-scroll-bar-position",a="width-before-scroll-bar",u=n(28215),c=(0,n(15411)._)(),d=function(){},h=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:d}),i=r[0],s=r[1],a=e.forwardProps,h=e.children,p=e.className,f=e.removeScrollBar,m=e.enabled,D=e.shards,g=e.sideCar,y=e.noRelative,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,C=e.as,k=e.gapMode,F=(0,o._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=(0,u.q)([n,t]),x=(0,o.pi)((0,o.pi)({},F),i);return l.createElement(l.Fragment,null,m&&l.createElement(g,{sideCar:c,removeScrollBar:f,shards:D,noRelative:y,noIsolation:v,inert:b,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:k}),a?l.cloneElement(l.Children.only(h),(0,o.pi)((0,o.pi)({},x),{ref:E})):l.createElement(void 0===C?"div":C,(0,o.pi)({},x,{className:p,ref:E}),h))});h.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},h.classNames={fullWidth:a,zeroRight:s};var p=function(e){var t=e.sideCar,n=(0,o._T)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return l.createElement(r,(0,o.pi)({},n))};
1p.isSideCarExport=!0;var f=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=i||n.nc;return t&&e.setAttribute("nonce",t),e}())){var o,l;(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),l=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(l)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},m=function(){var e=f();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},D=function(){var e=m();return function(t){return e(t.styles,t.dynamic),null}},g={left:0,top:0,right:0,gap:0},y=function(e){return parseInt(e||"",10)||0},v=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[y(n),y(r),y(i)]},b=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return g;var t=v(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},w=D(),C="data-scroll-locked",k=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,u=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(u,"px ").concat(r,";\n  }\n  body[").concat(C,"] {\n    overflow: hidden ").concat(r,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n    padding-left: ".concat(i,"px;\n    padding-top: ").concat(o,"px;\n    padding-right: ").concat(l,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(u,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(s," {\n    right: ").concat(u,"px ").concat(r,";\n  }\n  \n  .").concat(a," {\n    margin-right: ").concat(u,"px ").concat(r,";\n  }\n  \n  .").concat(s," .").concat(s," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(a," .").concat(a," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(C,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(u,"px;\n  }\n")},F=function(){var e=parseInt(document.body.getAttribute(C)||"0",10);return isFinite(e)?e:0},E=function(){l.useEffect(function(){return document.body.setAttribute(C,(F()+1).toString()),function(){var e=F()-1;e<=0?document.body.removeAttribute(C):document.body.setAttribute(C,e.toString())}},[])},x=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;E();var o=l.useMemo(function(){return b(i)},[i]);return l.createElement(w,{styles:k(o,!t,i,n?"":"!important")})},A=!1;if("undefined"!=typeof window)try{var S=Object.defineProperty({},"passive",{get:function(){return A=!0,!0}});window.addEventListener("test",S,S),window.removeEventListener("test",S,S)}catch(e){A=!1}var M=!!A&&{passive:!1},T=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},B=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),O(e,r)){var i=L(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},O=function(e,t){return"v"===e?T(t,"overflowY"):T(t,"overflowX")},L=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},N=function(e,t,n,r,i){var o,l=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),s=l*r,a=n.target,u=t.contains(a),c=!1,d=s>0,h=0,p=0;do{if(!a)break;var f=L(e,a),m=f[0],D=f[1]-f[2]-l*m;(m||D)&&O(e,a)&&(h+=D,p+=m);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return d&&(i&&1>Math.abs(h)||!i&&s>h)?c=!0:!d&&(i&&1>Math.abs(p)||!i&&-s>p)&&(c=!0),c},R=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},I=function(e){return[e.deltaX,e.deltaY]},$=function(e){return e&&"current"in e?e.current:e},z=0,H=[],j=(r=function(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),i=l.useState(z++)[0],s=l.useState(D)[0],a=l.useRef(e);l.useEffect(function(){a.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,o.ev)([e.lockRef.current],(e.shards||[]).map($),!0).filter(
1Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=l.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var i,o=R(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-o[0],u="deltaY"in e?e.deltaY:l[1]-o[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var h=window.getSelection(),p=h&&h.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var f=B(d,c);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=B(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=i),!i)return!0;var m=r.current||i;return N(m,t,e,"h"===m?s:u,!0)},[]),c=l.useCallback(function(e){if(H.length&&H[H.length-1]===s){var n="deltaY"in e?I(e):R(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var i=(a.current.shards||[]).map($).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?u(e,i[0]):!a.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),d=l.useCallback(function(e,n,r,i){var o={name:e,delta:n,target:r,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),h=l.useCallback(function(e){n.current=R(e),r.current=void 0},[]),p=l.useCallback(function(t){d(t.type,I(t),t.target,u(t,e.lockRef.current))},[]),f=l.useCallback(function(t){d(t.type,R(t),t.target,u(t,e.lockRef.current))},[]);l.useEffect(function(){return H.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,M),document.addEventListener("touchmove",c,M),document.addEventListener("touchstart",h,M),function(){H=H.filter(function(e){return e!==s}),document.removeEventListener("wheel",c,M),document.removeEventListener("touchmove",c,M),document.removeEventListener("touchstart",h,M)}},[]);var m=e.removeScrollBar,g=e.inert;return l.createElement(l.Fragment,null,g?l.createElement(s,{styles:"\n  .block-interactivity-".concat(i," {pointer-events: none;}\n  .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,m?l.createElement(x,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},c.useMedium(r),p),P=l.forwardRef(function(e,t){return l.createElement(h,(0,o.pi)({},e,{ref:t,sideCar:j}))});P.classNames=h.classNames;var _=P},8462:function(e,t,n){n.d(t,{Eu:function(){return d},MM:function(){return c},e3:function(){return s},et:function(){return h},iZ:function(){return a},mD:function(){return u},sY:function(){return p}});var r=n(2265);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){var r,i;r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}let l=["component"],s="paragraph",a="ordered_list",u="bullet_list",c="image",d="table",h="link";function p(e,t={}){if("object"==typeof e&&"doc"===e.type&&Array.isArray(e.content)){let n=t.blokResolvers,i=void 0===n?{}:n,s=t.defaultBlokResolver,a=void 0===s?function(){return null}:s,u=t.nodeResolvers,c=t.markResolvers,d=t.textResolver,h=void 0===d?function(e){return e}:d,p=o(o({},y),void 0===u?{}:u),f=o(o({},v),void 0===c?{}:c),m=0,D=function(e){return r.isValidElement(e)?r.cloneElement(e,{key:m++}):e},g=function(e){let t=e?e.map(b).filter(function(e){return null!=e}):null;return Array.isArray(t)&&0===t.length?null:t},b=function(e){if("blok"===e.type)return e.attrs.body.map(function(e){let t=e.component,n=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,l),r=i[t];return D(r?r(n):a(t,n))});{var t;let n;if("text"===e.type)n=h(e.text);else{let t=p[e.type];n=t?D(t(g(e.content),e.attrs)):null}return(null!==(t=e.marks)&&void 0!==t?t:[]).reduceRight(function(e,t){let n=f[t.type];return n?D(n(e,t.attrs)):e},n)}};return g(e.content)}if("string"==typeof e){let n=t.defaultStringResolver,r=t.textResolver;return(void 0===n?function(e){return e}:n)((void 0===r?function(e){return e}:r)(e))}return null}let f=function(e){return function(t){return null!=t?r.createElement(e,null,t):null}},m=function(e){return function(){return r.createElement(e)}},D=function(e){return function(t,n){let i={},o={};return 1!==n.colspan&&(i.colspan=n.colspan),1!==n.rowspan&&(i.rowspan=n.rowspan),n.backgroundColor&&(o.backgroundColor=n.backgroundColor),Array.isArray(n.colwidth)&&(1===n.colwidth.length?o.width=n.colwidth[0]+"px":i["data-colwidth"]=n.colwidth.join(",")),Object.keys(o).length>0&&(i.style=o),r.createElement(e,i,t)}},g=function(e){return function(t){return r.createElement(e,null,t)}},y={heading:function(e,t){return r.createElement(`h${t.level}`,null,e)},code_block:function(e,t){let n={className:t.class},i=r.createElement("code",n,e);return r.createElement("pre",null,i)},[c]:function(e,t){return r.createElement("img",t,e)},[s]:f("p"),blockquote:f("blockquote"),[a]:f("ol"),[u]:f("ul"),list_item:f("li"),horizontal_rule:m("hr"),hard_break:m("br"),emoji:function(e,t){if(!t)return null;let n={"data-type":"emoji","data-name":t.name,emoji:t.emoji};if(t.emoji||!t.fallbackImage)return r.createElement("span",n,t.emoji);{let e={src:t.fallbackImage,draggable:"false",loading:"lazy",align:"absmiddle",alt:t.name},i=r.createElement("img",e);return r.createElement("span",n,i)}},[d]:f("table"),tableRow:f("tr"),tableHeader:D("th"),tableCell:D("td")},v={[h]:function(e,t){let n=t?{href:"email"===t.linktype?`mailto:${t.href}`:t.href,target:t.target}:{};return r.createElement("a",n,e)},styled:function(e,t){let n=t?{className:t.class}:{};return r.createElement("span",n,e)},bold:g("b"),italic:g("i"),strike:g("s"),underline:g("u"),code:g("code"),subscript:g("sub"),superscript:g("sup"),highlight:function(e,t){let n=t?{style:{backgroundColor:t.color}}:{};return r.createElement("span",n,e)},textStyle:function(e,t){let n=t?.color?{style:{color:t.color}}:{};return r.createElement("span",n,e)},anchor:function(e,t){let n=t?{id:t.id}:{};return r.createElement("span",n,e)}}},28215:function(e,t,n){n.d(t,{q:function(){return s}});var r=n(2265);function i(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,l=ne
1w WeakMap;function s(e,t){var n,s,a,u=(n=t||null,s=function(t){return e.forEach(function(e){return i(e,t)})},(a=(0,r.useState)(function(){return{value:n,callback:s,facade:{get current(){return a.value},set current(value){var e=a.value;e!==value&&(a.value=value,a.callback(value,e))}}}})[0]).callback=s,a.facade);return o(function(){var t=l.get(u);if(t){var n=new Set(t),r=new Set(e),o=u.current;n.forEach(function(e){r.has(e)||i(e,null)}),r.forEach(function(e){n.has(e)||i(e,o)})}l.set(u,e)},[e]),u}},15411:function(e,t,n){n.d(t,{_:function(){return s},s:function(){return l}});var r=n(11735);function i(e){return e}function o(e,t){void 0===t&&(t=i);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},l=function(){return Promise.resolve().then(o)};l(),n={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),n}}}}}function l(e,t){return void 0===t&&(t=i),o(e,t)}function s(e){void 0===e&&(e={});var t=o(null);return t.options=(0,r.pi)({async:!0,ssr:!1},e),t}},22988:function(e,t,n){n.d(t,{Z:function(){return r}});function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}},79431:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(35806);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.Z)(e,t)}},23950:function(e,t,n){n.d(t,{Z:function(){return r}});function r(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}},35806:function(e,t,n){n.d(t,{Z:function(){return r}});function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}},70017:function(e,t,n){n.d(t,{LF:function(){return l},MB:function(){return s},pp:function(){return a}});let r=!1,i=[],o=e=>new Promise((t,n)=>{if(typeof window>"u"){n(Error("Cannot load Storyblok bridge: window is undefined (server-side environment)"));return}if(window.storyblokRegisterEvent=e=>{if(!window.location.search.includes("_storyblok")){console.warn("You are not in Draft Mode or in the Visual Editor.");return}r?e():i.push(e)},document.getElementById("storyblok-javascript-bridge")){t(void 0);return}let o=document.createElement("script");o.async=!0,o.src=e,o.id="storyblok-javascript-bridge",o.onerror=e=>n(e),o.onload=e=>{i.forEach(e=>e()),r=!0,t(e)},document.getElementsByTagName("head")[0].appendChild(o)}),l=e=>{if("object"!=typeof e||typeof e._editable>"u")return{};try{let t=JSON.parse(e._editable.replace(/^<!--#storyblok#/,"").replace(/-->$/,""));return t?{"data-blok-c":JSON.stringify(t),"data-blok-uid":`${t.id}-${t.uid}`}:{}}catch{return{}}},s=(e,t,n={})=>{var r;let i=!(typeof window>"u")&&"u">typeof window.storyblokRegisterEvent,o=new URL(null==(r=window.location)?void 0:r.href).searchParams.get("_storyblok");if(!(!i||!(null!==o&&+o===e))){if(!e){console.warn("Story ID is not defined. Please provide a valid ID.");return}window.storyblokRegisterEvent(()=>{new window.StoryblokBridge(n).on(["input","published","change"],n=>{var r;n&&("input"===n.action&&(null==(r=n.story)?void 0:r.id)===e?t(n.story):("change"===n.action||"published"===n.action)&&n.storyId===e&&window.location.reload())})})}},a=()=>o("https://app.storyblok.com/f/storyblok-v2-latest.js")},938:function(e,t,n){n.d(t,{X:function(){return i},f:function(){return r}}),globalThis.storyCache=globalThis.storyCache||new Map;let r=e=>"number"!=typeof(null==e?void 0:e.id)?null:String(e.id),i=e=>{let t=r(e);if(!t)return e;let n=globalThis.storyCache.get(t);return globalThis.storyCache.delete(t),n?{...e,...n}:e}},50418:function(e,t,n){let r,i;n.d(t,{LF:function(){return iw.LF}});let o=new Map,l=e=>o.has(e)?o.get(e):(console.error(`Component ${e} doesn't exist.`),!1),s=()=>!1,a=()=>null;var u,c=n(57437),d=n(2265);let h=(0,d.forwardRef)(({blok:e,...t},n)=>{if(!e)return console.error("Please provide a 'blok' property to the StoryblokComponent"),(0,c.jsx)("div",{children:"Please provide a blok property to the StoryblokServerComponent"});let r=l(e.component);if(r)return(0,c.jsx)(r,{ref:n,blok:e,...t});if(s()){let n=a();return n?(0,c.jsx)(n,{blok:e,...t}):(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)("p",{children:["Component could not be found for blok"," ",(0,c.jsx)("strong",{children:e.component}),"! Is it configured correctly?"]})})}return(0,c.jsx)("div",{})});h.displayName="StoryblokServerComponent";var p=n(29572),f=n(57870),m=n(82804);let D="textStyle",g=/^\s*([-+*])\s$/,y=p.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:e}){return["ul",(0,p.P1)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>"list"!==e.type||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(D)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}
1,addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=(0,p.S0)({find:g,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,p.S0)({find:g,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(D),editor:this.editor})),[e]}}),v=(e,t,n)=>{let{selection:r}=e;if(!r.empty)return null;let{$from:i}=r;if(!i.parent.isTextblock||i.parentOffset!==i.parent.content.size)return null;let o=-1;for(let e=i.depth;e>0;e-=1)if(i.node(e).type.name===t){o=e;break}if(o<0)return null;let l=i.node(o),s=i.index(o);if(s+1>=l.childCount)return null;let a=l.child(s+1);if(!n.includes(a.type.name))return null;let u=e.schema.nodes[t],c=!1;if(a.forEach(e=>{e.type===u&&e.childCount>1&&(c=!0)}),!c)return null;let d=e.doc.resolve(i.after()).nodeAfter;if(!d||!n.includes(d.type.name))return null;let h=[];return(d.forEach(e=>{h.push(e)}),0===h.length)?null:{listItemDepth:o,nestedList:d,nestedListPos:i.after(),insertPos:i.after(o),items:h}},b=(e,t,n,r)=>{let i=v(e,n,r);if(!i)return!1;let{selection:o}=e,{nestedList:l,nestedListPos:s,insertPos:a,items:u}=i,c=e.tr;c.delete(s,s+l.nodeSize);let d=c.mapping.map(a);return c.insert(d,f.HY.from(u)),c.setSelection(o.map(c.doc,c.mapping)),t&&t(c),!0},w=(e,t,n)=>b(e.state,e.view.dispatch,t,n),C=(e,t)=>p.hj.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>w(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),k=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],F="abcdefghijklmnopqrstuvwxyz",E=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function x(e){let t=e,n="";for(let[e,r]of k)for(;t>=e;)n+=r,t-=e;return n}function A(e){return x(e).toUpperCase()}function S(e){let t=e.toLowerCase(),n=0,r=0;for(;n<t.length;){let e=!1;for(let[i,o]of k)if(t.startsWith(o,n)){r+=i,n+=o.length,e=!0;break}if(!e)return 0}return r}function M(e){if(e<=26)return F[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;return t<0?F[n]:F[t]+F[n]}function T(e){if(!(!e||/^\d+$/.test(e))){if(function(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=S(e);return!(t<=0)&&(e===e.toLowerCase()?x(t):A(t))===e}(e))return e===e.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(e))return"a";if(/^[A-Z]{1,2}$/.test(e))return"A"}}function B(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=T(e);if("i"===t||"I"===t)return S(e);if("a"===t||"A"===t){let t=function(e){let t=e.toLowerCase();return 1===t.length?t.charCodeAt(0)-97+1:2===t.length?(t.charCodeAt(0)-97+1)*26+(t.charCodeAt(1)-97)+1:0}(e);return t>0?t:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}let O=p.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,p.P1)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n,r;if("list_item"!==e.type)return[];let i=null!==(n=t.parseBlockChildren)&&void 0!==n?n:t.parseChildren,o=[];if(e.tokens&&e.tokens.length>0){if(function(e){var t,n;let r=null===(t=e.tokens)||void 0===t?void 0:t[0];return!!(e.text&&(null===(n=e.tokens)||void 0===n?void 0:n.length)===1&&(null==r?void 0:r.type)==="list"&&r.ordered&&r.raw===e.text)}(e))return{type:"listItem",content:[{type:"paragraph",content:(r=e.text||"",t.tokenizeInline?t.parseInline(t.tokenizeInline(r)):t.parseInline([{type:"text",raw:r,text:r}]))}]};if(e.tokens.some(e=>"paragraph"===e.type))o=i(e.tokens);else{let n=e.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(o=[{type:"paragraph",content:t.parseInline(n.tokens)}],e.tokens.length>1){let t=i(e.tokens.slice(1));o.push(...t)}}else o=i(e.tokens)}}return 0===o.length&&(o=[{type:"paragraph",content:[]}]),{type:"listItem",content:o}},renderMarkdown:(e,t,n)=>(0,p.wm)(e,t,e=>{if("bulletList"===e.parentType)return"- ";if("orderedList"===e.parentType){var t,n;let r=(null===(t=e.meta)||void 0===t||null===(t=t.parentAttrs)||void 0===t?void 0:t.start)||1;return function(e,t,n=". "){let r=t+1;if(!e||"1"===e)return`${r}${n}`;switch(e){case"a":return`${M(r)}
1${n}`;case"A":return`${M(r).toUpperCase()}${n}`;case"i":return`${x(r)}${n}`;case"I":return`${A(r)}${n}`;default:return`${r}${n}`}}(null===(n=e.meta)||void 0===n||null===(n=n.parentAttrs)||void 0===n?void 0:n.type,r-1+(e.index||0),". ")}return"- "},n,{alignNestedToPrefix:(null==n?void 0:n.parentType)==="orderedList"}),addExtensions(){return[C(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),L=(e,t)=>{let{$from:n}=t.selection,r=(0,p.jo)(e,t.schema),i=n.depth,o=n.pos,l=null;for(;i>0&&null===l;)n.node(i).type===r?l=i:(i-=1,o-=1);return null===l?null:{$pos:t.doc.resolve(o),depth:l}},N=(e,t)=>{let n=L(e,t);if(!n)return!1;let[,r]=(0,p.NY)(t,e,n.$pos.pos+4);return r},R=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),o=e.doc.resolve(i).node();return!!(o&&n.includes(o.type.name))},I=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!(0,p.Ig)(e.state,t)&&R(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let o=i.at(-1);if(!o)return!1;let l=e.state.doc.resolve(r.start()+o.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},l.end()).joinForward().run()}if(!(0,p.Ig)(e.state,t)||!(0,p.Sz)(e.state))return!1;let{$from:r}=e.state.selection,i=r.depth-1;return r.node(i).type===e.schema.nodes[t]&&0===r.index(i)&&e.chain().liftListItem(t).run()},$=(e,t)=>{let n=N(e,t),r=L(e,t);return!!r&&!!n&&n>r.depth},z=(e,t)=>{let n=N(e,t),r=L(e,t);return!!r&&!!n&&n<r.depth},H=(e,t)=>{if(!(0,p.Ig)(e.state,t)||!(0,p.rI)(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!(!n.empty&&r.sameParent(i))&&($(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():z(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward())},j=(e,t,n)=>{let{state:r}=e,{selection:i}=r;if(!i.empty)return!1;let{$from:o}=i;if(0!==o.parentOffset||!o.parent.isTextblock||(0,p.Ig)(r,t))return!1;let l=(0,p.nt)(o);
1if(!l||!n.includes(l.type.name))return!1;let s=l.lastChild;if(!s||s.type.name!==t)return!1;let a=o.parent;if(!s.canReplace(s.childCount,s.childCount,f.HY.from(a)))return!1;let u=o.before(),c=o.after(),d=u-2;return e.commands.command(({tr:e,dispatch:t})=>(t&&(e.delete(u,c).insert(d,f.HY.from(a)),e.setSelection(m.Bs.create(e.doc,d+1)),e.scrollIntoView()),!0))},P=p.hj.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&H(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&H(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&I(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&I(e,n,r)&&(t=!0)}),t},Tab:({editor:e})=>{for(let{itemName:t,wrapperNames:n}of this.options.listTypes)if(void 0!==e.state.schema.nodes[t]&&j(e,t,n))return!0;return!1}}}}),_=RegExp(`^(\\s*)(${E})([.)])\\s+(.*)$`),W=/^\s/,q={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/},J=RegExp(`^(${E})([.)])\\s+(.+)$`),U="textStyle",Y=/^(\d+)\.\s$/;function K(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}let V=p.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:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>{let t=e.getAttribute("type");if(t)return t;let n=e.getAttribute("style");if(n){let e=K(n);if(e)return e}let r=e.querySelector("li");if(r){let e=r.getAttribute("style");if(e){let t=K(e);if(t)return t}}return null}}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,type:n,...r}=e,i=(0,p.P1)(this.options.HTMLAttributes,r);return 1!==t&&(i.start=t),n&&"1"!==n&&(i.type=n),["ol",i,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if("list"!==e.type||!e.ordered)return[];let n=e.start||1,r=e.typeMarker,i=e.items?e.items.map(e=>{if("list_item"!==e.type)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if("paragraph"===e.type||"list"===e.type||"blockquote"===e.type||"code"===e.type)n.push(...t.parseChildren([e]));else if("text"===e.type&&e.tokens){let r=t.parseChildren([e]);n.push({type:"paragraph",content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}}):[],o={};return(1!==n&&(o.start=n),r&&(o.type=r),Object.keys(o).length>0)?{type:"orderedList",attrs:o,content:i}:{type:"orderedList",content:i}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(e,t,n)=>{var r,i;let o=e.split("\n"),[l,s]=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],o=i.match(_);if(!o)break;let[,l,s,a,u]=o,c=l.length,d=parseInt(s,10),h=isNaN(d)?T(s):void 0,p=isNaN(d)?B(s):d,f=[u],m=n+1,D=[i],g=!1;for(;m<e.length;){let t=e[m];if(t.match(_))break;if(""===t.trim())D.push(t),f.push(""),g=!0,m+=1;else if(t.match(W)){let e=t.length-t.trimStart().length,n=c+s.length+1;D.push(t),f.push(t.slice(Math.min(e,n))),m+=1}else{if(g||function(e){return Object.values(q).some(t=>t.test(e))}(t))break;D.push(t),f.push(t),m+=1}}t.push({indent:c,number:p,type:h,content:f.join("\n").trim(),contentLines:f,raw:D.join("\n")}),r=m,n=m}return[t,r]}(o);if(0===l.length)return;let a=function e(t,n,r){let i=[],o=0;for(;o<t.length;){let l=t[o];if(l.indent===n){let{paragraphLines:s,blockLines:a}=function(e){let t=[],n=[],r=!1;
1return e.forEach(e=>{if(r){n.push(e);return}if(""===e.trim()||t.length>0&&function(e){let t=e.trimStart();return q.bulletItem.test(t)||_.test(t.trimStart())||q.heading.test(t)||q.thematicBreak.test(t)&&!t.startsWith("-")||/^>\s?/.test(t)||q.codeFence.test(t)||q.blockMath.test(t)}(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}(l.contentLines),u=s.join("\n").trim(),c=[];u&&c.push({type:"paragraph",raw:u,tokens:r.inlineTokens(u)});let d=a.join("\n").trim();if(d){let e=r.blockTokens(d);c.push(...e)}let h=o+1,p=[];for(;h<t.length&&t[h].indent>n;)p.push(t[h]),h+=1;if(p.length>0){let t=e(p,Math.min(...p.map(e=>e.indent)),r);c.push({type:"list",ordered:!0,start:p[0].number,typeMarker:p[0].type,items:t,raw:p.map(e=>e.raw).join("\n")})}i.push({type:"list_item",raw:l.raw,tokens:c}),o=h}else o+=1}return i}(l,l[0].indent,n);if(0!==a.length)return{type:"list",ordered:!0,start:(null===(r=l[0])||void 0===r?void 0:r.number)||1,typeMarker:null===(i=l[0])||void 0===i?void 0:i.type,items:a,raw:o.slice(0,s).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(U)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins:()=>[new m.Sy({props:{handlePaste:(e,t)=>
1{var n,r;let i=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");if(null==i?void 0:i.trim())return!1;let o=null===(r=t.clipboardData)||void 0===r?void 0:r.getData("text/plain");if(!o)return!1;let l=function(e){let t=e.split("\n").filter(e=>e.trim().length>0);if(0===t.length)return null;let n=[];for(let e of t){let t=e.trim().match(J);if(!t)return null;n.push({marker:t[1],content:t[3]})}return!function(e){var t;if(0===e.length)return!1;let n=null!==(t=T(e[0]))&&void 0!==t?t:"numeric",r=B(e[0]);if(r<1)return!1;for(let t=0;t<e.length;t++){let i=function(e,t){if("numeric"===e)return String(t);switch(e){case"a":return M(t);case"A":return M(t).toUpperCase();case"i":return x(t);case"I":return A(t);default:return String(t)}}(n,r+t);if(e[t]!==i)return!1}return!0}(n.map(e=>e.marker))?null:{type:"orderedList",attrs:function(e){let{type:t,start:n}={type:T(e),start:B(e)},r={};return t&&(r.type=t),1!==n&&(r.start=n),r}(n[0].marker),content:n.map(e=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:e.content}]}]}))}}(o);if(!l)return!1;try{let t=e.state.schema.nodeFromJSON(l),n=e.state.tr.replaceSelectionWith(t);return e.dispatch(n),!0}catch{return!1}}}})],addInputRules(){let e=(e,t)=>(!t.attrs.type||"1"===t.attrs.type)&&t.childCount+t.attrs.start===+e[1],t=(0,p.S0)({find:Y,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,p.S0)({find:Y,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(U)}),joinPredicate:e,editor:this.editor})),[t]}}),Z=/^\s*(\[([( |x])?\])\s$/,G=(e,t,n)=>{var r;return(null==n||null===(r=n.checkboxLabel)||void 0===r?void 0:r.call(n,e,t))||`Task item checkbox for ${e.textContent||"empty task item"}`},X=p.NB.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return""===t||"true"===t},renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:e=>{var t;return null!==(t=e.querySelector("div"))&&void 0!==t?t:e}}]},renderHTML({node:e,HTMLAttributes:t}){return["li",(0,p.P1)(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let r=`- [${(null===(n=e.attrs)||void 0===n?void 0:n.checked)?"x":" "}] `;return(0,p.wm)(e,t,r)},addExtensions(){return this.options.nested?[C(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement("li"),o=document.createElement("label"),l=document.createElement("span"),s=document.createElement("input"),a=document.createElement("div");l.style.cssText="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";let u=e=>{let t=G(e,e.attrs.checked,this.options.a11y);s.setAttribute("aria-label",t),l.textContent=t};u(e),o.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",e=>e.preventDefault()),s.addEventListener("change",t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&"function"==typeof n&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if("number"!=typeof t)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...null==r?void 0:r.attrs,checked:i}),!0}).run(),r.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked)}
1),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,o.append(s,l),i.append(o,a),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let c=new Set(Object.keys(t));return{dom:i,contentDOM:a,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,u(e);let t=r.extensionManager.attributes,n=(0,p.m7)(e,t),o=new Set(Object.keys(n)),l=this.options.HTMLAttributes;return c.forEach(e=>{o.has(e)||(e in l?i.setAttribute(e,l[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{null==t?e in l?i.setAttribute(e,l[e]):i.removeAttribute(e):i.setAttribute(e,t)}),c=o,!0}}}},addInputRules(){return[(0,p.S0)({find:Z,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),Q=p.NB.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",(0,p.P1)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=null===(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))||void 0===t?void 0:t.index;return void 0!==n?n:-1},tokenize(e,t,n){let r=e=>{let t=(0,p.NI)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(t){let r={type:"taskList",raw:t.raw,items:t.items},i=e.slice(t.raw.length);return i.trim()?[r,...n.blockTokens(i)]:[r]}return n.blockTokens(e)},i=(0,p.NI)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});p.hj.create({name:"listKit",addExtensions(){let e=[];return!1!==this.options.bulletList&&e.push(y.configure(this.options.bulletList)),!1!==this.options.listItem&&e.push(O.configure(this.options.listItem)),!1!==this.options.listKeymap&&e.push(P.configure(this.options.listKeymap)),!1!==this.options.orderedList&&e.push(V.configure(this.options.orderedList)),!1!==this.options.taskItem&&e.push(X.configure(this.options.taskItem)),!1!==this.options.taskList&&e.push(Q.configure(this.options.taskList)),e}});var ee=n(3078);class et extends m.Y1{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return et.valid(n)?new et(n):m.Y1.near(n)}content(){return f.p2.empty}eq(e){return e instanceof et&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new et(e.resolve(t.pos))}getBookmark(){return new en(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||er(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||er(e.type))return!0;
1if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&et.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let l=e.doc.resolve(r);if(et.valid(l))return l}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!m.qv.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue e}break}i=o,r+=t;let l=e.doc.resolve(r);if(et.valid(l))return l}return null}}}et.prototype.visible=!1,et.findFrom=et.findGapCursorFrom,m.Y1.jsonID("gapcursor",et);class en{constructor(e){this.pos=e}map(e){return new en(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return et.valid(t)?new et(t):m.Y1.near(t)}}function er(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function ei(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let o=e.selection,l=t>0?o.$to:o.$from,s=o.empty;if(o instanceof m.Bs){if(!i.endOfTextblock(n)||0==l.depth)return!1;s=!1,l=e.doc.resolve(t>0?l.after():l.before())}let a=et.findGapCursorFrom(l,t,s);return!!a&&(r&&r(e.tr.setSelection(new et(a))),!0)}}(0,ee.$)({ArrowLeft:ei("horiz",-1),ArrowRight:ei("horiz",1),ArrowUp:ei("vert",-1),ArrowDown:ei("vert",1)});let eo=(e,t)=>{let n=t.view.domAtPos(e).node,r=n.nodeType===Node.ELEMENT_NODE?n:n.parentElement;return!!r&&null!==r.offsetParent},el=(e,t,n)=>{for(let r=e.depth;r>0;r-=1){let i=e.node(r),o=t(i),l=eo(e.start(r),n);if(o&&l)return{pos:r>0?e.before(r):0,start:e.start(r),depth:r,node:i}}},es=(e,t)=>{let{state:n,view:r,extensionManager:i}=e,{schema:o,selection:l}=n,{empty:s,$anchor:a}=l,u=!!i.extensions.find(e=>"gapCursor"===e.name);if(!s||a.parent.type!==o.nodes.detailsSummary||!u||"right"===t&&a.parentOffset!==a.parent.nodeSize-2)return!1;let c=(0,p.Kk)(e=>e.type===o.nodes.details)(l);if(!c)return!1;let d=(0,p.N2)(c.node,e=>e.type===o.nodes.detailsContent);if(!d.length||eo(c.start+d[0].pos+1,e))return!1;let h=n.doc.resolve(c.pos+c.node.nodeSize),f=et.findFrom(h,1,!1);if(!f)return!1;let{tr:m}=n,D=new et(f);return m.setSelection(D),m.scrollIntoView(),r.dispatch(m),!0},ea=p.NB.create({name:"details",content:"detailsSummary detailsContent",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,addOptions:()=>({persist:!1,openClassName:"is-open",HTMLAttributes:{},renderToggleButton:({element:e,isOpen:t})=>{e.setAttribute("aria-label",t?"Collapse details content":"Expand details content")}}),addAttributes(){return this.options.persist?{open:{default:!1,parseHTML:e=>e.hasAttribute("open"),renderHTML:({open:e})=>e?{open:""}:{}}}:[]},parseHTML:()=>[{tag:"details"}],renderHTML({HTMLAttributes:e}){return["details",(0,p.P1)(this.options.HTMLAttributes,e),0]},...(0,p.pK)({nodeName:"details",content:"block"}),addNodeView(){return({editor:e,getPos:t,node:n,HTMLAttributes:r})=>{let i=document.createElement("div");Object.entries((0,p.P1)(this.options.HTMLAttributes,r,{"data-type":this.name})).forEach(([e,t])=>i.setAttribute(e,t));let o=document.createElement("button");o.type="button";let l=e=>{this.options.renderToggleButton({element:o,...e})};i.append(o);let s=document.createElement("div");i.append(s);let a=e=>{let{setToValue:t,node:r=n}=e||{};if(void 0!==t){if(t){if(i.classList.contains(this.options.openClassName))return;i.classList.add(this.options.openClassName)}else{if(!i.classList.contains(this.options.openClassName))return;i.classList.remove(this.options.openClassName)}}else i.classList.toggle(this.options.openClassName);l({isOpen:i.classList.contains(this.options.openClassName),node:r});let o=new Event("toggleDetailsContent"),a=s.querySelector(':scope > div[data-type="detailsContent"]');null==a||a.dispatchEvent(o)};return l({isOpen:!!n.attrs.open,node:n}),n.attrs.open&&setTimeout(()=>a()),o.addEventListener("click",()=>{if(a(),!this.options.persist){e.commands.focus(void 0,{scrollIntoView:!1});return}if(e.isEditable&&"function"==typeof t){let{from:n,to:r}=e.state.selection;e.chain().command(({tr:e})=>{let n=t();if("number"!=typeof n)return!1;let r=e.doc.nodeAt(n);return(null==r?void 0:r.type)===this.type&&(e.setNodeMarkup(n,void 0,{open:!r.attrs.open}),!0)}).setTextSelection({from:n,to:r}).focus(void 0,{scrollIntoView:!1}).run()}}),{dom:i,contentDOM:s,ignoreMutation(e){if("selection"===e.type)return!1;let t=e.target,n=i.contains(t);return o.contains(t)||!n||i===t},update:e=>e.type===this.type&&(void 0!==e.attrs.open?a({setToValue:e.attrs.open,node:e}):l({isOpen:i.classList.contains(this.options.openClassName),node:e}),!0)}}},addCommands(){return{setDetails:()=>({state:e,chain:t})=>{var n;let{schema:r,selection:i}=e,{$from:o,$to:l}=i,s=o.blockRange(l);if(!s)return!1;let a=e.doc.slice(s.start,s.end);if(!r.nodes.detailsContent.contentMatch.matchFragment(a.content))return!1;let u=(null===(n=a.toJSON())||void 0===n?void 0:n.content)||[];return t().insertContentAt({from:s.start,to:s.end},{type:this.name,content:[{type:"detailsSummary"},{type:"detailsContent",content:u}]}).setTextSelection(s.start+2).run()},unsetDetails:()=>({state:e,chain:t})=>{let{selection:n,schema:r}=e,i=(0,p.Kk)(e=>e.type===this.type)(n);if(!i)return!1;let o=(0,p.N2)(i.node,e=>e.type===r.nodes.detailsSummary),l=(0,p.N2)(i.node,e=>e.type===r.nodes.detailsContent);if(!o.length||!l.length)return!1;let s=o[0],a=l[0],u=i.pos,c=e.doc.resolve(u),d={from:u,to:u+i.node.nodeSize},h=a.node.content.toJSON()||[],f=c.parent.type.contentMatch.defaultType,m=[null==f?void 0:f.create(null,s.node.content).toJSON(),...h];return t().insertContentAt(d,m).setTextSelection(u+1).run()}}},addKeyboardShortcuts(){return{Backspace:()=>{let{schema:e,selection:t}=this.editor.state,{empty:n,$anchor:r}=t;return!!n&&r.parent.type===e.nodes.detailsSummary&&(0!==r.parentOffset?this.editor.commands.command(({tr:e})=>{let t=r.pos-1,n=r.pos;return e.delete(t,n),!0}):this.editor.commands.unsetDetails())},Enter:({editor:e})=>{let{state:t,view:n}=e,{schema:r,selection:i}=t,{$head:o}=i;if(o.parent.type!==r.nodes.detailsSummary)return!1;let l=eo(o.after()+1,e),s=l?t.doc.nodeAt(o.after()):o.node(-2);if(!s)return!1;let a=l?0:o.indexAfter(-1),u=(0,p.Jx)(s.contentMatchAt(a));if(!u||!s.canReplaceWith(a,a,u))return!1;let c=u.createAndFill();if(!c)return!1;let d=l?o.after()+1:o.after(-1),h=t.tr.replaceWith(d,d,c),f=h.doc.resolve(d),D=m.Y1.near(f,1);return h.setSelection(D),h.scrollIntoView(),n.dispatch(h),!0},ArrowRight:({editor:e})=>es(e,"right"),ArrowDown:({editor:e})=>es(e,"down")}},addProseMirrorPlugins(){return[new m.Sy({key:new m.H$("detailsSelection"),appendTransaction:(e,t,n)=>{let{editor:r,type:i}=this;if(r.view.composing||!e.some(e=>e.selectionSet)||!t.selection.empty||!n.selection.empty||!(0,p.zh)(n,i.name))return;let{$from:o}=n.selection;if(eo(o.pos,r))return;let l=el(o,e=>e.type===i,r);if(!l)return;let s=(0,p.N2)(l.node,e=>e.type===n.schema.nodes.detailsSummary);if(!s.length)return;let a=s[0],u=(t.selection.from<n.selection.from?"forward":"backward")=="forward"?l.start+a.pos:l.pos+a.pos+a.node.nodeSize,c=m.Bs.create(n.doc,u);return n.tr.setSelection(c)}})]}}),eu=p.NB.create({name:"detailsContent",content:"block+",defining:!0,selectable:!1,addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({HTMLAttributes:e}){return["div",(0,p.P1)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement("div");return Object.entries((0,p.P1)(this.options.HTMLAttributes,e,{"data-type":this.name,hidden:"hidden"}
1)).forEach(([e,n])=>t.setAttribute(e,n)),t.addEventListener("toggleDetailsContent",()=>{t.toggleAttribute("hidden")}),{dom:t,contentDOM:t,ignoreMutation:e=>"selection"!==e.type&&(!t.contains(e.target)||t===e.target),update:e=>e.type===this.type}}},addKeyboardShortcuts(){return{Enter:({editor:e})=>{let{state:t,view:n}=e,{selection:r}=t,{$from:i,empty:o}=r,l=(0,p.Kk)(e=>e.type===this.type)(r);if(!o||!l||!l.node.childCount)return!1;let s=i.index(l.depth),{childCount:a}=l.node;if(a!==s+1)return!1;let u=l.node.type.contentMatch.defaultType,c=null==u?void 0:u.createAndFill();if(!c)return!1;let d=t.doc.resolve(l.pos+1),h=a-1,f=l.node.child(h),D=d.posAtIndex(h,l.depth);if(!f.eq(c))return!1;let g=i.node(-3);if(!g)return!1;let y=i.indexAfter(-3),v=(0,p.Jx)(g.contentMatchAt(y));if(!v||!g.canReplaceWith(y,y,v))return!1;let b=v.createAndFill();if(!b)return!1;let{tr:w}=t,C=i.after(-2);w.replaceWith(C,C,b);let k=w.doc.resolve(C),F=m.Y1.near(k,1);w.setSelection(F);let E=D+f.nodeSize;return w.delete(D,E),w.scrollIntoView(),n.dispatch(w),!0}}},...(0,p.pK)({nodeName:"detailsContent"})}),ec=p.NB.create({name:"detailsSummary",content:"text*",defining:!0,selectable:!1,isolating:!0,addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"summary"}],renderHTML({HTMLAttributes:e}){return["summary",(0,p.P1)(this.options.HTMLAttributes,e),0]},...(0,p.pK)({nodeName:"detailsSummary",content:"inline"})});var ed=n(16277),eh=n(42639);if("undefined"!=typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),i=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},i=(n,r)=>(10==t&&(t=0),e[t++]=n,e[t++]=r)}var ep=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,o=r+1,l=i+1;for(let e=1;o<this.width&&this.map[t+e]==n;e++)o++;for(let e=1;l<this.height&&this.map[t+this.width*e]==n;e++)l++;return{left:r,top:i,right:o,bottom:l}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:o,bottom:l}=this.findCell(e);return"horiz"==t?(n<0?0==r:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?0==o:l==this.height)?null:this.map[r+this.width*(n<0?o-1:l)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:o}=this.findCell(e),{left:l,right:s,top:a,bottom:u}=this.findCell(t);return{left:Math.min(n,l),top:Math.min(i,a),right:Math.max(r,s),bottom:Math.max(o,u)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let o=r*this.width+i,l=this.map[o];!n[l]&&(n[l]=!0,i==e.left&&i&&this.map[o-1]==l||r==e.top&&r&&this.map[o-this.width]==l||t.push(l))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let o=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?o-1:this.map[n]}i=o}}static get(e){return r(e)||i(e,function(e){if("table"!=e.type.spec.tableRole)throw RangeError("Not a table node: "+e.type.name);let t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),o=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(o+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);o+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(e),n=e.childCount,r=[],i=0,o=null,l=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let s=0,a=0;s<n;s++){let u=e.child(s);a++;for(let e=0;;e++){for(;i<r.length&&0!=r[i];)i++;if(e==u.childCount)break;let c=u.child(e),{colspan:d,rowspan:h,colwidth:p}=c.attrs;for(let e=0;e<h;e++){if(e+s>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:a,n:h-e});break}let u=i+e*t;for(let e=0;e<d;e++){0==r[u+e]?r[u+e]=a:(o||(o=[])).push({type:"collision",row:s,pos:a,n:d-e});let n=p&&p[e];if(n){let r=(u+e)%t*2,i=l[r];null==i||i!=n&&1==l[r+1]?(l[r]=n,l[r+1]=1):i==n&&l[r+1]++}}}i+=d,a+=c.nodeSize}let c=(s+1)*t,d=0;for(;i<c;)0==r[i++]&&d++;d&&(o||(o=[])).push({type:"missing",row:s,n:d}),a++}(0===t||0===n)&&(o||(o=[])).push({type:"zero_sized"});let s=new ep(t,n,r,o),a=!1;for(let e=0;!a&&e<l.length;e+=2)null!=l[e]&&l[e+1]<n&&(a=!0);return a&&function(e,t,n){e.problems||(e.problems=[]);let r={};for(let i=0;i<e.map.length;i++){let o=e.map[i];if(r[o])continue;r[o]=!0;let l=n.nodeAt(o);if(!l)throw RangeError(`No cell with offset ${o} found`);let s=null,a=l.attrs;for(let n=0;n<a.colspan;n++){let r=t[(i+n)%e.width*2];null==r||a.colwidth&&a.colwidth[n]==r||((s||(s=function(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}(a)))[n]=r)}s&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:s})}}(s,l,e),s}(e))}};function ef(e){let t=e.cached.tableNodeTypes;
1if(!t)for(let n in t=e.cached.tableNodeTypes={},e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}return t}let em=new m.H$("selectingCells");function eD(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function eg(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function ey(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;let n=eD(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function ev(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function eb(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function ew(e,t,n){let r=e.node(-1),i=ep.get(r),o=e.start(-1),l=i.nextCell(e.pos-o,t,n);return null==l?null:e.node(0).resolve(o+l)}function eC(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function ek(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}var eF=class e extends m.Y1{constructor(e,t=e){let n=e.node(-1),r=ep.get(n),i=e.start(-1),o=r.rectBetween(e.pos-i,t.pos-i),l=e.node(0),s=r.cellsInRect(o).filter(e=>e!=t.pos-i);s.unshift(t.pos-i);let a=s.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new m.xm(l.resolve(r),l.resolve(r+t.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(ev(r)&&ev(i)&&eb(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return m.Bs.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=ep.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},o=[];for(let n=r.top;n<r.bottom;n++){let l=[];for(let o=n*t.width+r.left,s=r.left;s<r.right;s++,o++){let n=t.map[o];if(i[n])continue;i[n]=!0;let s=t.findCell(n),a=e.nodeAt(n);if(!a)throw RangeError(`No cell with offset ${n} found`);let u=r.left-s.left,c=s.right-r.right;if(u>0||c>0){let e=a.attrs;if(u>0&&(e=eC(e,0,u)),c>0&&(e=eC(e,e.colspan-c,c)),s.left<r.left){if(!(a=a.type.createAndFill(e)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else a=a.type.create(e,a.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...a.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};a=s.top<r.top?a.type.createAndFill(e):a.type.create(e,a.content)}l.push(a)}o.push(e.child(n).copy(f.HY.from(l)))}let l=this.isColSelection()&&this.isRowSelection()?e:o;return new f.p2(f.HY.from(l),1,1)}replace(e,t=f.p2.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:l}=r[i],s=e.mapping.slice(n);e.replace(s.map(o.pos),s.map(l.pos),i?f.p2.empty:t)}let i=m.Y1.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new f.p2(f.HY.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=ep.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);return!(Math.min(e,t)>0)&&Math.max(e+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=ep.get(r),o=t.start(-1),l=i.findCell(t.pos-o),s=i.findCell(n.pos-o),a=t.node(0);return l.top<=s.top?(l.top>0&&(t=a.resolve(o+i.map[l.left])),s.bottom<i.height&&(n=a.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(n=a.resolve(o+i.map[s.left])),l.bottom<i.height&&(t=a.resolve(o+i.map[i.width*(i.height-1)+l.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=ep.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);return!(Math.min(r,i)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.colspan,i+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=ep.get(r),o=t.start(-1),l=i.findCell(t.pos-o),s=i.findCell(n.pos-o),a=t.node(0);
1return l.left<=s.left?(l.left>0&&(t=a.resolve(o+i.map[l.top*i.width])),s.right<i.width&&(n=a.resolve(o+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(n=a.resolve(o+i.map[s.top*i.width])),l.right<i.width&&(t=a.resolve(o+i.map[i.width*(l.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new eE(this.$anchorCell.pos,this.$headCell.pos)}};eF.prototype.visible=!1,m.Y1.jsonID("cell",eF);var eE=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&eb(t,n)?new eF(t,n):m.Y1.near(n,1)}};function ex(e){if(!(e.selection instanceof eF))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(ed.p.node(n,n+e.nodeSize,{class:"selectedCell"}))}),ed.EH.create(e.doc,t)}let eA=new m.H$("fix-tables");function eS(e,t){let n;let r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let i,o;let l=ep.get(t);if(!l.problems)return r;r||(r=e.tr);let s=[];for(let e=0;e<l.height;e++)s.push(0);for(let e=0;e<l.problems.length;e++){let i=l.problems[e];if("collision"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;let o=e.attrs;for(let e=0;e<o.rowspan;e++)s[i.row+e]+=i.n;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,eC(o,o.colspan-i.n,i.n))}else if("missing"==i.type)s[i.row]+=i.n;else if("overlong_rowspan"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-i.n})}else if("colwidth mismatch"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,colwidth:i.colwidth})}else if("zero_sized"==i.type){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}for(let e=0;e<s.length;e++)s[e]&&(null==i&&(i=e),o=e);for(let a=0,u=n+1;a<l.height;a++){let n=t.child(a),l=u+n.nodeSize,c=s[a];if(c>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let s=[];for(let n=0;n<c;n++){let n=ef(e.schema)[t].createAndFill();n&&s.push(n)}let d=(0==a||i==a-1)&&o==a?u+1:l-1;r.insert(r.mapping.map(d),s)}u=l}return r.setMeta(eA,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,i){let o=t.childCount,l=n.childCount;t:for(let s=0,a=0;s<l;s++){let l=n.child(s);for(let e=a,n=Math.min(o,s+3);e<n;e++)if(t.child(e)==l){a=e+1,r+=l.nodeSize;continue t}i(l,r),a<o&&t.child(a).sameMarkup(l)?e(t.child(a),l,r+1,i):l.nodesBetween(0,l.content.size,i,r+1),r+=l.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function eM(e){let t=e.selection,n=ey(e),r=n.node(-1),i=n.start(-1),o=ep.get(r);return{...t instanceof eF?o.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):o.findCell(n.pos-i),tableStart:i,map:o,table:r}}function eT(e,{map:t,tableStart:n,table:r},i){let o=i>0?-1:0;(function(e,t,n){let r=ef(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0})(t,r,i+o)&&(o=0==i||i==t.width?null:0);for(let l=0;l<t.height;l++){let s=l*t.width+i;if(i>0&&i<t.width&&t.map[s-1]==t.map[s]){let o=t.map[s],a=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,ek(a.attrs,i-t.colCount(o))),l+=a.attrs.rowspan-1}else{let a=null==o?ef(r.type.schema).cell:r.nodeAt(t.map[s+o]).type,u=t.positionAt(l,i,r);e.insert(e.mapping.map(n+u),a.createAndFill())}}return e}function eB(e,{map:t,tableStart:n,table:r},i){let o=n;for(let e=0;e<i;e++)o+=r.child(e).nodeSize;let l=[],s=i>0?-1:0;(function(e,t,n){var r;let i=ef(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if((null===(r=t.nodeAt(e.map[o+n*e.width]))||void 0===r?void 0:r.type)!=i)return!1;return!0})(t,r,i+s)&&(s=0==i||i==t.height?null:0);for(let o=0,u=t.width*i;o<t.width;o++,u++)if(i>0&&i<t.height&&t.map[u]==t.map[u-t.width]){let i=t.map[u],l=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...l,rowspan:l.rowspan+1}),o+=l.colspan-1}else{var a;
1let e=null==s?ef(r.type.schema).cell:null===(a=r.nodeAt(t.map[u+s*t.width]))||void 0===a?void 0:a.type,n=null==e?void 0:e.createAndFill();n&&l.push(n)}return e.insert(o,ef(r.type.schema).row.create(null,l)),e}function eO(e){let t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function eL(e,t){let n=e.selection;if(!(n instanceof eF)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=eM(e),{map:i}=r;if(function({width:e,height:t,map:n},r){let i=r.top*e+r.left,o=i,l=(r.bottom-1)*e+r.left,s=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[o]==n[o-1]||r.right<e&&n[s]==n[s+1])return!0;o+=e,s+=e}for(let o=r.left;o<r.right;o++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[l]==n[l+e])return!0;i++,l++}return!1}(i,r))return!1;if(t){let n,o;let l=e.tr,s={},a=f.HY.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let u=i.map[e*i.width+t],c=r.table.nodeAt(u);if(!s[u]&&c){if(s[u]=!0,null==n)n=u,o=c;else{eO(c)||(a=a.append(c.content));let e=l.mapping.map(u+r.tableStart);l.delete(e,e+c.nodeSize)}}}if(null==n||null==o)return!0;if(l.setNodeMarkup(n+r.tableStart,null,{...ek(o.attrs,o.attrs.colspan,r.right-r.left-o.attrs.colspan),rowspan:r.bottom-r.top}),a.size>0){let e=n+1+o.content.size,t=eO(o)?n+1:e;l.replaceWith(t+r.tableStart,e+r.tableStart,a)}l.setSelection(new eF(l.doc.resolve(n+r.tableStart))),t(l)}return!0}function eN(e,t){var n;let r=ef(e.schema);return(n=({node:e})=>r[e.type.spec.tableRole],(e,t)=>{let r,i;let o=e.selection;if(o instanceof eF){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;r=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{var l;if(!(r=function(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(o.$from)))return!1;i=null===(l=eD(o.$from))||void 0===l?void 0:l.pos}if(null==r||null==i||1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(t){let l,s=r.attrs,a=[],u=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});let c=eM(e),d=e.tr;for(let e=0;e<c.right-c.left;e++)a.push(u?{...s,colwidth:u&&u[e]?[u[e]]:null}:s);for(let e=c.top;e<c.bottom;e++){let t=c.map.positionAt(e,c.left,c.table);e==c.top&&(t+=r.nodeSize);for(let i=c.left,o=0;i<c.right;i++,o++)(i!=c.left||e!=c.top)&&d.insert(l=d.mapping.map(t+c.tableStart,1),n({node:r,row:e,col:i}).createAndFill(a[o]))}d.setNodeMarkup(i,n({node:r,row:c.top,col:c.left}),a[0]),o instanceof eF&&d.setSelection(new eF(d.doc.resolve(o.$anchorCell.pos),l?d.doc.resolve(l):void 0)),t(d)}return!0})(e,t)}function eR(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function eI(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(t,n){if(!eg(t))return!1;if(n){let r=ef(t.schema),i=eM(t),o=t.tr,l=i.map.cellsInRect("column"==e?{left:i.left,top:0,right:i.right,bottom:i.map.height}:"row"==e?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=l.map(e=>i.table.nodeAt(e));for(let e=0;e<l.length;e++)s[e].type==r.header_cell&&o.setNodeMarkup(i.tableStart+l[e],r.cell,s[e].attrs);if(0===o.steps.length)for(let e=0;e<l.length;e++)o.setNodeMarkup(i.tableStart+l[e],r.header_cell,s[e].attrs);n(o)}return!0}:function(t,n){if(!eg(t))return!1;if(n){let r=ef(t.schema),i=eM(t),o=t.tr,l=eR("row",i,r),s=eR("column",i,r),a=("column"===e?l:"row"===e&&s)?1:0,u="column"==e?{left:0,top:a,right:1,bottom:i.map.height}:"row"==e?{left:a,top:0,right:i.map.width,bottom:1}:i,c="column"==e?s?r.cell:r.header_cell:"row"==e?l?r.cell:r.header_cell:r.cell;i.map.cellsInRect(u).forEach(e=>{let t=e+i.tableStart,n=o.doc.nodeAt(t);n&&o.setNodeMarkup(t,c,n.attrs)}),n(o)}return!0}}eI("row",{useDeprecatedLogic:!0}),eI("column",{useDeprecatedLogic:!0});let e$=eI("cell",{useDeprecatedLogic:!0});function ez(e){return function(t,n){if(!eg(t))return!1;let r=function(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(ey(t),e);if(null==r)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(m.Bs.between(e,e.node(0).resolve(e.pos+e.nodeAfter.nodeSize))).scrollIntoView())}return!0}}function eH(e,t){let n=e.selection;if(!(n instanceof eF))return!1;if(t){let r=e.tr,i=ef(e.schema).cell.createAndFill().content;
1n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new f.p2(i,0,0))}),r.docChanged&&t(r)}return!0}function ej(e,t){let n=e.createAndFill();return new eh.wx(n).replace(0,n.content.size,t).doc}function eP(e,t,n,r,i,o,l,s){if(0==l||l==t.height)return!1;let a=!1;for(let u=i;u<o;u++){let i=l*t.width+u,o=t.map[i];if(t.map[i-t.width]==o){a=!0;let i=n.nodeAt(o),{top:c,left:d}=t.findCell(o);e.setNodeMarkup(e.mapping.slice(s).map(o+r),null,{...i.attrs,rowspan:l-c}),e.insert(e.mapping.slice(s).map(t.positionAt(l,d,n)),i.type.createAndFill({...i.attrs,rowspan:c+i.attrs.rowspan-l})),u+=i.attrs.colspan-1}}return a}function e_(e,t,n,r,i,o,l,s){if(0==l||l==t.width)return!1;let a=!1;for(let u=i;u<o;u++){let i=u*t.width+l,o=t.map[i];if(t.map[i-1]==o){a=!0;let i=n.nodeAt(o),c=t.colCount(o),d=e.mapping.slice(s).map(o+r);e.setNodeMarkup(d,null,eC(i.attrs,l-c,i.attrs.colspan-(l-c))),e.insert(d+i.nodeSize,i.type.createAndFill(eC(i.attrs,0,l-c))),u+=i.attrs.rowspan-1}}return a}function eW(e,t,n,r,i){let o=n?e.doc.nodeAt(n-1):e.doc;if(!o)throw Error("No table found");let l=ep.get(o),{top:s,left:a}=r,u=a+i.width,c=s+i.height,d=e.tr,h=0;function p(){if(!(o=n?d.doc.nodeAt(n-1):d.doc))throw Error("No table found");l=ep.get(o),h=d.mapping.maps.length}(function(e,t,n,r,i,o,l){let s,a;let u=ef(e.doc.type.schema);if(i>t.width)for(let o=0,l=0;o<t.height;o++){let c;let d=n.child(o);l+=d.nodeSize;let h=[];c=null==d.lastChild||d.lastChild.type==u.cell?s||(s=u.cell.createAndFill()):a||(a=u.header_cell.createAndFill());for(let e=t.width;e<i;e++)h.push(c);e.insert(e.mapping.slice(0).map(l-1+r),h)}if(o>t.height){let l=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==u.header_cell;l.push(i?a||(a=u.header_cell.createAndFill()):s||(s=u.cell.createAndFill()))}let c=u.row.create(null,f.HY.from(l)),d=[];for(let e=t.height;e<o;e++)d.push(c);e.insert(e.mapping.slice(0).map(r+n.nodeSize-2),d)}return!!(s||a)})(d,l,o,n,u,c,0)&&p(),eP(d,l,o,n,a,u,s,h)&&p(),eP(d,l,o,n,a,u,c,h)&&p(),e_(d,l,o,n,s,c,a,h)&&p(),e_(d,l,o,n,s,c,u,h)&&p();for(let e=s;e<c;e++){let t=l.positionAt(e,a,o),r=l.positionAt(e,u,o);d.replace(d.mapping.slice(h).map(t+n),d.mapping.slice(h).map(r+n),new f.p2(i.rows[e-s],0,0))}p(),d.setSelection(new eF(d.doc.resolve(n+l.positionAt(s,a,o)),d.doc.resolve(n+l.positionAt(c-1,u-1,o)))),t(d)}let eq=(0,ee.$)({ArrowLeft:eU("horiz",-1),ArrowRight:eU("horiz",1),ArrowUp:eU("vert",-1),ArrowDown:eU("vert",1),"Shift-ArrowLeft":eY("horiz",-1),"Shift-ArrowRight":eY("horiz",1),"Shift-ArrowUp":eY("vert",-1),"Shift-ArrowDown":eY("vert",1),Backspace:eH,"Mod-Backspace":eH,Delete:eH,"Mod-Delete":eH});function eJ(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function eU(e,t){return(n,r,i)=>{if(!i)return!1;let o=n.selection;if(o instanceof eF)return eJ(n,r,m.Y1.near(o.$headCell,t));if("horiz"!=e&&!o.empty)return!1;let l=eG(i,e,t);if(null==l)return!1;if("horiz"==e)return eJ(n,r,m.Y1.near(n.doc.resolve(o.head+t),t));{let i;let o=n.doc.resolve(l),s=ew(o,e,t);return i=s?m.Y1.near(s,1):t<0?m.Y1.near(n.doc.resolve(o.before(-1)),-1):m.Y1.near(n.doc.resolve(o.after(-1)),1),eJ(n,r,i)}}}function eY(e,t){return(n,r,i)=>{let o;if(!i)return!1;let l=n.selection;if(l instanceof eF)o=l;else{let r=eG(i,e,t);if(null==r)return!1;o=new eF(n.doc.resolve(r))}let s=ew(o.$headCell,e,t);return!!s&&eJ(n,r,new eF(o.$anchorCell,s))}}function eK(e,t){let n=eD(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new eF(n))),!0)}function eV(e,t,n){if(!eg(e.state))return!1;let r=function(e){if(0===e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;let i=t.child(0),o=i.type.spec.tableRole,l=i.type.schema,s=[];if("row"==o)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,o=e?0:Math.max(0,n-1),a=e<t.childCount-1?0:Math.max(0,r-1);(o||a)&&(i=ej(ef(l).row,new f.p2(i,o,a)).content),s.push(i)}else{if("cell"!=o&&"header_cell"!=o)return null;s.push(n||r?ej(ef(l).row,new f.p2(t,n,r)).content:t)}return function(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:o}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+o}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(f.HY.empty),n[i]<r){let o=ef(e).cell.createAndFill(),l=[];for(let e=n[i];e<r;e++)l.push(o);t[i]=t[i].append(f.HY.from(l))}return{height:t.length,width:r,rows:t}}
1(l,s)}(n),i=e.state.selection;if(i instanceof eF){r||(r={width:1,height:1,rows:[f.HY.from(ej(ef(e.state.schema).cell,n))]});let t=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),l=ep.get(t).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=function({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let o=n[e],l=[];for(let n=t[e]||0,i=0;n<r;i++){let s=o.child(i%o.childCount);n+s.attrs.colspan>r&&(s=s.type.createChecked(eC(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),l.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}i.push(f.HY.from(l))}n=i,e=r}if(t!=i){let e=[];for(let r=0,o=0;r<i;r++,o++){let l=[],s=n[o%t];for(let e=0;e<s.childCount;e++){let t=s.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),l.push(t)}e.push(f.HY.from(l))}n=e,t=i}return{width:e,height:t,rows:n}}(r,l.right-l.left,l.bottom-l.top),eW(e.state,e.dispatch,o,l,r),!0}if(!r)return!1;{let t=ey(e.state),n=t.start(-1);return eW(e.state,e.dispatch,n,ep.get(t.node(-1)).findCell(t.pos-n),r),!0}}function eZ(e,t){var n;let r;if(0!=t.button||t.ctrlKey||t.metaKey)return;let i=eX(e,t.target);if(t.shiftKey&&e.state.selection instanceof eF)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=eD(e.state.selection.$anchor))&&(null===(n=eQ(e,t))||void 0===n?void 0:n.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(t,n){let r=eQ(e,n),i=null==em.getState(e.state);if(!r||!eb(t,r)){if(!i)return;r=t}let o=new eF(t,r);if(i||!e.state.selection.eq(o)){let n=e.state.tr.setSelection(o);i&&n.setMeta(em,t.pos),e.dispatch(n)}}function l(){e.root.removeEventListener("mouseup",l),e.root.removeEventListener("dragstart",l),e.root.removeEventListener("mousemove",s),null!=em.getState(e.state)&&e.dispatch(e.state.tr.setMeta(em,-1))}function s(n){let r;let s=em.getState(e.state);if(null!=s)r=e.state.doc.resolve(s);else if(eX(e,n.target)!=i&&!(r=eQ(e,t)))return l();r&&o(r,n)}e.root.addEventListener("mouseup",l),e.root.addEventListener("dragstart",l),e.root.addEventListener("mousemove",s)}function eG(e,t,n){if(!(e.state.selection instanceof m.Bs))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))break;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){let o=r.before(i),l="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?o:null}}return null}function eX(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function eQ(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&eD(e.state.doc.resolve(r))||eD(e.state.doc.resolve(i))}var e0=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),e1(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,e1(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function e1(e,t,n,r,i,o){let l=0,s=!0,a=t.firstChild,u=e.firstChild;if(u){for(let e=0,n=0;e<u.childCount;e++){let{colspan:c,colwidth:d}=u.child(e).attrs;for(let e=0;e<c;e++,n++){let u=i==n?o:d&&d[e],c=u?u+"px":"";if(l+=u||r,u||(s=!1),a)a.style.width!=c&&(a.style.width=c),a=a.nextSibling;else{let e=document.createElement("col");e.style.width=c,t.appendChild(e)}}}for(;a;){var c;let e=a.nextSibling;null===(c=a.parentNode)||void 0===c||c.removeChild(a),a=e}s?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}let e2=new m.H$("tableColumnResizing");var e3=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=t.getMeta(e2);if(n&&null!=n.setHandle)return new e(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new e(this.activeHandle,n.setDragging);if(this.activeHandle>-1&&t.docChanged){let n=t.mapping.map(this.activeHandle,-1);return ev(t.doc.resolve(n))||(n=-1),new e(n,this.dragging)}return this}};function e8(e,t,n,r){let i=e.posAtCoords({left:t.clientX+("right"==n?-r:r),top:t.clientY});if(!i)return -1;let{pos:o}=i,l=eD(e.state.doc.resolve(o));if(!l)return -1;if("right"==n)return l.pos;let s=ep.get(l.node(-1)),a=l.start(-1),u=s.map.indexOf(l.pos-a);return u%s.width==0?-1:a+s.map[u-1]}function e4(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function e6(e,t){e.dispatch(e.state.tr.setMeta(e2,{setHandle:t}))}function e5(e,t,n,r){let i=e.state.doc.resolve(t),o=i.node(-1),l=i.start(-1),s=ep.get(o).colCount(i.pos-l)+i.nodeAfter.attrs.colspan-1,a=e.domAtPos(i.start(-1)).node;for(;a&&"TABLE"!=a.nodeName;)a=a.parentNode;a&&e1(o,a.firstChild,a,r,s,n)}function e7(e){return"left"===e||"right"===e||"center"===e?e:null}function e9(){return{default:null,parseHTML:e=>(function(e){let t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return e7(t||n)})(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function te(e){let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):function(e){var t;let n=e.parentElement,r=e.closest("table");if(!n||!r)return null;let i=Array.from(n.children).indexOf(e),o=null===(t=r.querySelectorAll("colgroup > col")[i])||void 0===t?void 0:t.getAttribute("width");return o?[parseInt(o,10)]:null}(e)}let tt=/[ \t\r\n\f]+/g;function tn(e){var t;return!(e.children.length>0)&&""===(null!==(t=e.textContent)&&void 0!==t?t:"").replace(tt,"")}function tr(e){let t=e.createAndFill();if(!t)throw Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}let ti=p.NB.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:te},align:e9()}),tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>!!tn(e)&&{},getContent:(e,t)=>
1tr(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",(0,p.P1)(this.options.HTMLAttributes,e),0]}}),to=p.NB.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:te},align:e9()}),tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>!!tn(e)&&{},getContent:(e,t)=>tr(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",(0,p.P1)(this.options.HTMLAttributes,e),0]}}),tl=p.NB.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",(0,p.P1)(this.options.HTMLAttributes,e),0]}});function ts(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function ta(e,t,n,r,i,o){let l=0,s=!0,a=t.firstChild,u=e.firstChild;if(null!==u)for(let e=0,n=0;e<u.childCount;e+=1){let{colspan:c,colwidth:d}=u.child(e).attrs;for(let e=0;e<c;e+=1,n+=1){let u=i===n?o:d&&d[e],c=u?`${u}px`:"";if(l+=u||r,u||(s=!1),a){if(a.style.width!==c){let[e,t]=ts(r,u);a.style.setProperty(e,t)}a=a.nextSibling}else{let e=document.createElement("col"),[n,i]=ts(r,u);e.style.setProperty(n,i),t.appendChild(e)}}}for(;a;){var c;let e=a.nextSibling;null===(c=a.parentNode)||void 0===c||c.removeChild(a),a=e}let d=e.attrs.style&&"string"==typeof e.attrs.style&&/\bwidth\s*:/i.test(e.attrs.style);s&&!d?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}var tu=class{constructor(e,t,n,r={}){for(let[n,i]of(this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),Object.entries(r)))null!=i&&("style"===n?this.table.style.cssText=String(i):this.table.setAttribute(n,String(i)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ta(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type===this.node.type&&(this.node=e,ta(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!!n&&!r&&("attributes"===e.type||"childList"===e.type||"characterData"===e.type)}};function tc(e,t){return t?e.createChecked(null,t):e.createAndFill()}let td=({editor:e})=>{let{selection:t}=e.state;if(!(t instanceof eF))return!1;let n=0,r=(0,p.qv)(t.ranges[0].$from,e=>"table"===e.type.name);return null==r||r.node.descendants(e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)}),n===t.ranges.length&&(e.commands.deleteTable(),!0)};function th(e,t){let n=e.mapping.map(t),r=(0,p.qv)(e.selection.$from,e=>"table"===e.type.name);if((null==r?void 0:r.pos)===n)return;let i=e.doc.nodeAt(n);if(!i)return;let o=n+i.nodeSize-1;e.setSelection(m.Bs.near(e.doc.resolve(o),-1))}let tp=p.NB.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:tu,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:i}=function(e,t,n,r){let i=0,o=!0,l=[],s=e.firstChild;if(!s)return{};for(let e=0,n=0;e<s.childCount;e+=1){let{colspan:r,colwidth:a}=s.child(e).attrs;for(let e=0;e<r;e+=1,n+=1){let r=void 0===n?void 0:a&&a[e];i+=r||t,r||(o=!1);let[s,u]=ts(t,r);l.push(["col",{style:`${s}: ${u}`}])}}return{colgroup:["colgroup",{},...l],tableWidth:o?`${i}px`:"",tableMinWidth:o?"":`${i}px`}}(e,this.options.cellMinWidth),o=t.style,l=["table",(0,p.P1)(this.options.HTMLAttributes,t,{style:o||(r?`width: ${r}`:`min-width: ${i}`)}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(e,t)=>{let n=[],r=Array.isArray(e.align)?e.align:[];if(e.header){let i=[];e.header.forEach((e,n)=>{var o;let l=e7(null!==(o=r[n])&&void 0!==o?o:e.align);i.push(t.createNode("tableHeader",l?{align:l}:{},[{type:"paragraph",content:t.parseInline(e.tokens)}
1]))}),n.push(t.createNode("tableRow",{},i))}return e.rows&&e.rows.forEach(e=>{let i=[];e.forEach((e,n)=>{var o;let l=e7(null!==(o=r[n])&&void 0!==o?o:e.align);i.push(t.createNode("tableCell",l?{align:l}:{},[{type:"paragraph",content:t.parseInline(e.tokens)}]))}),n.push(t.createNode("tableRow",{},i))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>(function(e,t,n={}){var r;let i=null!==(r=n.cellLineSeparator)&&void 0!==r?r:"\x1f";if(!e||!e.content||0===e.content.length)return"";let o=[];e.content.forEach(e=>{let n=[];e.content&&e.content.forEach(e=>{var r;let o=((e.content&&Array.isArray(e.content)&&e.content.length>1?e.content.map(e=>t.renderChildren(e)).join(i):e.content?t.renderChildren(e.content):"").split(i).join("\n").replace(/[ \t]*\r?\n[ \t]*/g,"<br>")||"").replace(/\s+/g," ").trim(),l="tableHeader"===e.type,s=e7(null==(r=e.attrs)?void 0:r.align);n.push({text:o,isHeader:l,align:s})}),o.push(n)});let l=o.reduce((e,t)=>Math.max(e,t.length),0);if(0===l)return"";let s=Array.from({length:l}).fill(0);o.forEach(e=>{for(let n=0;n<l;n+=1){var t;let r=((null===(t=e[n])||void 0===t?void 0:t.text)||"").length;r>s[n]&&(s[n]=r),s[n]<3&&(s[n]=3)}});let a=(e,t)=>e+" ".repeat(Math.max(0,t-e.length)),u=o[0],c=u.some(e=>e.isHeader),d=Array.from({length:l}).fill(null);o.forEach(e=>{for(let n=0;n<l;n+=1){var t;!d[n]&&(null===(t=e[n])||void 0===t?void 0:t.align)&&(d[n]=e[n].align)}});let h="\n",p=Array.from({length:l}).map((e,t)=>c&&u[t]&&u[t].text||"");return h+=`| ${p.map((e,t)=>a(e,s[t])).join(" | ")} |
2| ${s.map((e,t)=>{let n=Math.max(3,e),r=d[t];return"left"===r?`:${"-".repeat(n)}`:"right"===r?`${"-".repeat(n)}:`:"center"===r?`:${"-".repeat(n)}:`:"-".repeat(n)}).join(" | ")} |
3`,(c?o.slice(1):o).forEach(e=>{h+=`| ${Array.from({length:l}).fill(0).map((t,n)=>a(e[n]&&e[n].text||"",s[n])).join(" | ")} |
4`}),h})(e,t),markdownTokenizer:{name:"table",level:"block",start:e=>{let t=e.split("\n");if(t.length<2)return -1;let n=t[1];return/^[ \t|:]*-[ \t|:-]*$/.test(n)&&n.includes("|")&&t[0].includes("|")?0:-1},tokenize(e,t,n){let r=e.indexOf("\n\n"),i=r>=0?e.slice(0,r):e,o=i.split("\n");if(o.length<2)return;let l=o[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(l)||!l.includes("|"))return;let s=i.split("\n").map(e=>e.includes("|")&&e.includes("`")?function(e){let t="",n=0;for(;n<e.length;){if("\\"===e[n]&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if("`"!==e[n]){t+=e[n++];continue}let r=0;for(;n+r<e.length&&"`"===e[n+r];)r+=1;let i=n+r,o=!1;for(;i<e.length;){if("`"!==e[i]){i+=1;continue}let l=0;for(;i+l<e.length&&"`"===e[i+l];)l+=1;if(l===r){let l=e.slice(n+r,i);t+=e.slice(n,n+r)+l.replace(/\\\||\|/g,e=>"|"===e?"\\|":e)+e.slice(i,i+r),n=i+r,o=!0;break}i+=l}o||(t+=e.slice(n,n+r),n+=r)}return t}(e):e).join("\n");if(s===i)return;let a=n.blockTokens(s)[0];if((null==a?void 0:a.type)!=="table"||!a.raw)return;let u=a.raw.split("\n").length,c=e.split("\n").slice(0,u).join("\n");return{...a,raw:c}}},addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:o})=>{let l=function(e,t,n,r,i){let o=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}(e),l=[],s=[];for(let e=0;e<n;e+=1){let e=tc(o.cell,void 0);if(e&&s.push(e),r){let e=tc(o.header_cell,void 0);e&&l.push(e)}}let a=[];for(let e=0;e<t;e+=1)a.push(o.row.createChecked(null,r&&0===e?l:s));return o.table.createChecked(null,a)}(o.schema,e,t,n);if(i){let e=r.selection.from+1;r.replaceSelectionWith(l).scrollIntoView().setSelection(m.Bs.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>(function(e,t){if(!eg(e))return!1;if(t){let n=eM(e);t(eT(e.tr,n,n.left))}return!0})(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>(function(e,t){if(!eg(e))return!1;if(t){let n=eM(e);t(eT(e.tr,n,n.right))}return!0})(e,t),deleteColumn:()=>({state:e,dispatch:t})=>{let n=(0,p.qv)(e.selection.$from,e=>"table"===e.type.name);return function(e,t){if(!eg(e))return!1;if(t){let n=eM(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;!function(e,{map:t,table:n,tableStart:r},i){let o=e.mapping.maps.length;for(let l=0;l<t.height;){let s=l*t.width+i,a=t.map[s],u=n.nodeAt(a),c=u.attrs;if(i>0&&t.map[s-1]==a||i<t.width-1&&t.map[s+1]==a)e.setNodeMarkup(e.mapping.slice(o).map(r+a),null,eC(c,i-t.colCount(a)));else{let t=e.mapping.slice(o).map(r+a);e.delete(t,t+u.nodeSize)}l+=c.rowspan}
4}(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=ep.get(e)}t(r)}return!0}(e,t&&(e=>{n&&th(e,n.pos),t(e)}))},addRowBefore:()=>({state:e,dispatch:t})=>(function(e,t){if(!eg(e))return!1;if(t){let n=eM(e);t(eB(e.tr,n,n.top))}return!0})(e,t),addRowAfter:()=>({state:e,dispatch:t})=>(function(e,t){if(!eg(e))return!1;if(t){let n=eM(e);t(eB(e.tr,n,n.bottom))}return!0})(e,t),deleteRow:()=>({state:e,dispatch:t})=>{let n=(0,p.qv)(e.selection.$from,e=>"table"===e.type.name);return function(e,t){if(!eg(e))return!1;if(t){let n=eM(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;!function(e,{map:t,table:n,tableStart:r},i){let o=0;for(let e=0;e<i;e++)o+=n.child(e).nodeSize;let l=o+n.child(i).nodeSize,s=e.mapping.maps.length;e.delete(o+r,l+r);let a=new Set;for(let o=0,l=i*t.width;o<t.width;o++,l++){let u=t.map[l];if(!a.has(u)){if(a.add(u),i>0&&u==t.map[l-t.width]){let t=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(s).map(u+r),null,{...t,rowspan:t.rowspan-1}),o+=t.colspan-1}else if(i<t.height&&u==t.map[l+t.width]){let l=n.nodeAt(u),a=l.attrs,c=l.type.create({...a,rowspan:l.attrs.rowspan-1},l.content),d=t.positionAt(i+1,o,n);e.insert(e.mapping.slice(s).map(r+d),c),o+=a.colspan-1}}}}(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=ep.get(n.table)}t(r)}return!0}(e,t&&(e=>{n&&th(e,n.pos),t(e)}))},deleteTable:()=>({state:e,dispatch:t})=>(function(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1})(e,t),mergeCells:()=>({state:e,dispatch:t})=>eL(e,t),splitCell:()=>({state:e,dispatch:t})=>eN(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>eI("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>eI("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>e$(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>!!eL(e,t)||eN(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>(function(n,r){if(!eg(n))return!1;let i=ey(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let o=n.tr;n.selection instanceof eF?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&o.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(o)}return!0})(n,r),goToNextCell:()=>({state:e,dispatch:t})=>ez(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>ez(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&eS(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=eF.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:td,"Mod-Backspace":td,Delete:td,"Mod-Delete":td}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[function({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=e0,lastColumnResizable:i=!0}={}){let o=new m.Sy({key:e2,state:{init(e,t){var i;let l=null===(i=o.spec)||void 0===i||null===(i=i.props)||void 0===i?void 0:i.nodeViews,s=ef(t.schema).table.name;return r&&l&&(l[s]=(e,t)=>new r(e,n,t)),new e3(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{let t=e2.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r){if(!e.editable)return;let i=e2.getState(e.state);if(i&&!i.dragging){let o=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),l=-1;if(o){let{left:r,right:i}=o.getBoundingClientRect();t.clientX-r<=n?l=e8(e,t,"left",n):i-t.clientX<=n&&(l=e8(e,t,"right",n))}if(l!=i.activeHandle){if(!r&&-1!==l){let t=e.state.doc.resolve(l),n=t.node(-1),r=ep.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}e6(e,l)}}}(t,n,e,i)},mouseleave:e=>{!function(e){if(!e.editable)return;let t=e2.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&e6(e,-1)}(e)},mousedown:(e,r)=>{!function(e,t,n,r){var i;if(!e.editable)return;let o=null!==(i=e.dom.ownerDocument.defaultView)&&void 0!==i?i:window,l=e2.getState(e.state);if(!l||-1==l.activeHandle||l.dragging)return;let s=e.state.doc.nodeAt(l.activeHandle),a=function(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let o=e.domAtPos(t),l=o.node.childNodes[o.offset].offsetWidth,s=n;if(r)for(let e=0;e<n;e++)r[e]&&(l-=r[e],s--);return l/s}(e,l.activeHandle,s.attrs);function u(t){o.removeEventListener("mouseup",u),o.removeEventListener("mousemove",c);let r=e2.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){let r=e.state.doc.resolve(t),i=r.no
4de(-1),o=ep.get(i),l=r.start(-1),s=o.colCount(r.pos-l)+r.nodeAfter.attrs.colspan-1,a=e.state.tr;for(let e=0;e<o.height;e++){let t=e*o.width+s;if(e&&o.map[t]==o.map[t-o.width])continue;let r=o.map[t],u=i.nodeAt(r).attrs,c=1==u.colspan?0:s-o.colCount(r);if(u.colwidth&&u.colwidth[c]==n)continue;let d=u.colwidth?u.colwidth.slice():Array(u.colspan).fill(0);d[c]=n,a.setNodeMarkup(l+r,null,{...u,colwidth:d})}a.docChanged&&e.dispatch(a)}(e,r.activeHandle,e4(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(e2,{setDragging:null})))}function c(t){if(!t.which)return u(t);let i=e2.getState(e.state);if(i&&i.dragging){let o=e4(i.dragging,t,n);e5(e,i.activeHandle,o,r)}}e.dispatch(e.state.tr.setMeta(e2,{setDragging:{startX:t.clientX,startWidth:a}})),e5(e,l.activeHandle,a,r),o.addEventListener("mouseup",u),o.addEventListener("mousemove",c),t.preventDefault()}(e,r,t,n)}},decorations:e=>{let t=e2.getState(e);if(t&&t.activeHandle>-1)return function(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return ed.EH.empty;let o=ep.get(i),l=r.start(-1),s=o.colCount(r.pos-l)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<o.height;t++){let r=s+t*o.width;if((s==o.width-1||o.map[r]!=o.map[r+1])&&(0==t||o.map[r]!=o.map[r-o.width])){var a;let t=o.map[r],s=l+t+i.nodeAt(t).nodeSize-1,u=document.createElement("div");u.className="column-resize-handle",(null===(a=e2.getState(e))||void 0===a?void 0:a.dragging)&&n.push(ed.p.node(l+t,l+t+i.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),n.push(ed.p.widget(s,u))}}return ed.EH.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],function({allowTableNodeSelection:e=!1}={}){return new m.Sy({key:em,state:{init:()=>null,apply(e,t){let n=e.getMeta(em);if(null!=n)return -1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:ex,handleDOMEvents:{mousedown:eZ},createSelectionBetween:e=>null!=em.getState(e.state)?e.state.selection:null,handleTripleClick:eK,handleKeyDown:eq,handlePaste:eV},appendTransaction:(t,n,r)=>(function(e,t,n){let r,i;let o=(t||e).selection,l=(t||e).doc;if(o instanceof m.qv&&(i=o.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=eF.create(l,o.from);else if("row"==i){let e=l.resolve(o.from+1);r=eF.rowSelection(e,e)}else if(!n){let e=ep.get(o.node),t=o.from+1,n=t+e.map[e.width*e.height-1];r=eF.create(l,t+1,n)}}else o instanceof m.Bs&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}(o)?r=m.Bs.create(l,o.from):o instanceof m.Bs&&function({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}(o)&&(r=m.Bs.create(l,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t})(r,eS(r,n),e)})}({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){let e=this.options.resizable&&this.editor.isEditable,t=this.options.View;return e||!t?null:({node:e,view:n,HTMLAttributes:r})=>{let i=(0,p.P1)(this.options.HTMLAttributes,r);return new t(e,this.options.cellMinWidth,n,i)}},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:(0,p.nU)((0,p.Nl)(e,"tableRole",t))}}});p.hj.create({name:"tableKit",addExtensions(){let e=[];return!1!==this.options.table&&e.push(tp.configure(this.options.table)),!1!==this.options.tableCell&&e.push(ti.configure(this.options.tableCell)),!1!==this.options.tableHeader&&e.push(to.configure(this.options.tableHeader)),!1!==this.options.tableRow&&e.push(tl.configure(this.options.tableRow)),e}});let tf=new WeakSet,tm=new WeakSet;function tD(e){return tf.add(e),e}function tg(e){return Array.isArray(e)&&tf.has(e)}let ty=(e,t)=>(function(e,t){if("slot"===e)return 0;if(e instanceof Function){let n=e(t);return!Array.isArray(n)||tg(n)||tm.has(n)?n:tD(n)}let{children:n,...r}=null!=t?t:{};if("svg"===e)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");if(Array.isArray(n)){if(tg(n))return tD([e,r,n]);if(0===n.length)return tD([e,r]);let t=function e(t){return t.flatMap(t=>null==t?[]:Array.isArray(t)&&tm.has(t)&&!tg(t)?e(t):[t])}(n);return 0===t.length?tD([e,r]):tD([e,r,...t])}return null!=n?tD([e,r,n]):tD([e,r])})(e,t),tv=(e,t)=>
4{var n;let{state:r}=e,{selection:i}=r;if(!i.empty)return!1;let{$from:o}=i;if(0!==o.parentOffset)return!1;let l=o.depth-1;if(l<0)return!1;let s=o.node(l),a=o.index(l);if(0===a)return!1;if(s.type===t)return e.commands.lift(t.name);let u=s.child(a-1);if(u.type!==t||!(null===(n=u.lastChild)||void 0===n?void 0:n.isTextblock))return!1;let c=o.before()-1-1;return e.commands.command(({tr:e,dispatch:t})=>{if(!t)return!0;let n=o.parent.content,r=new f.p2(n,0,0);return e.replace(c,o.after(),r),e.setSelection(m.Bs.create(e.doc,c+n.size)),e.scrollIntoView(),t(e),!0})},tb=/^\s*>\s$/,tw=p.NB.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return ty("blockquote",{...(0,p.P1)(this.options.HTMLAttributes,e),children:ty("slot",{})})},parseMarkdown:(e,t)=>{var n;let r=null!==(n=t.parseBlockChildren)&&void 0!==n?n:t.parseChildren;return t.createNode("blockquote",void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=[];return e.content.forEach((e,r)=>{var i,o;let l=(null!==(i=null===(o=t.renderChild)||void 0===o?void 0:o.call(t,e,r))&&void 0!==i?i:t.renderChildren([e])).split("\n").map(e=>""===e.trim()?">":`> ${e}`);n.push(l.join("\n"))}),n.join(`
5>
6`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>tv(this.editor,this.type)}},addInputRules(){return[(0,p.S0)({find:tb,type:this.type})]}}),tC=/^```([a-z]+)?[\s\n]$/,tk=/^~~~([a-z]+)?[\s\n]$/,tF=p.NB.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;return n&&[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",(0,p.P1)(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,r;return(null===(n=e.raw)||void 0===n?void 0:n.startsWith("```"))===!1&&(null===(r=e.raw)||void 0===r?void 0:r.startsWith("~~~"))===!1&&"indented"!==e.codeBlockStyle?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r=(null===(n=e.attrs)||void 0===n?void 0:n.language)||"";return e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join("\n"):`\`\`\`${r}
7
8\`\`\``},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!==(t=this.options.tabSize)&&void 0!==t?t:4,{state:r}=e,{selection:i}=r,{$from:o,empty:l}=i;if(o.parent.type!==this.type)return!1;let s=" ".repeat(n);return l?e.commands.insertContent(s):e.commands.command(({tr:e})=>{let{from:t,to:n}=i,o=r.doc.textBetween(t,n,"\n","\n").split("\n").map(e=>s+e).join("\n");return e.replaceWith(t,n,r.schema.text(o)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!==(t=this.options.tabSize)&&void 0!==t?t:4,{state:r}=e,{selection:i}=r,{$from:o,empty:l}=i;return o.parent.type===this.type&&(l?e.commands.command(({tr:e})=>{var t;let{pos:i}=o,l=o.start(),s=o.end(),a=r.doc.textBetween(l,s,"\n","\n").split("\n"),u=0,c=0,d=i-l;for(let e=0;e<a.length;e+=1){if(c+a[e].length>=d){u=e;break}c+=a[e].length+1}let h=Math.min(((null===(t=a[u].match(/^ */))||void 0===t?void 0:t[0])||"").length,n);if(0===h)return!0;let p=l;for(let e=0;e<u;e+=1)p+=a[e].length+1;return e.delete(p,p+h),i-p<=h&&e.setSelection(m.Bs.create(e.doc,p)),!0}):e.commands.command(({tr:e})=>{let{from:t,to:o}=i,l=r.doc.textBetween(t,o,"\n","\n").split("\n").map(e=>{var t;let r=Math.min(((null===(t=e.match(/^ */))||void 0===t?void 0:t[0])||"").length,n);return e.slice(r)}).join("\n");
8return e.replaceWith(t,o,r.schema.text(l)),!0}))},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,l=r.parent.textContent.endsWith("\n\n");return!!o&&!!l&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type||0!==r.parentOffset)return!1;let o=r.before();return!(o>0)&&e.commands.insertDefaultBlock({pos:o})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let l=i.after();return void 0!==l&&(r.nodeAt(l)?e.commands.command(({tr:e})=>(e.setSelection(m.Y1.near(r.resolve(l))),!0)):e.commands.exitCode())}}},addInputRules(){return[(0,p.zK)({find:tC,type:this.type,getAttributes:e=>({language:e[1]})}
8),(0,p.zK)({find:tk,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new m.Sy({key:new m.H$("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.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:l,schema:s}=e.state,a=s.text(n.replace(/\r\n?/g,"\n"));return l.replaceSelectionWith(this.type.create({language:o},a)),l.selection.$from.parent.type!==this.type&&l.setSelection(m.Bs.near(l.doc.resolve(Math.max(0,l.selection.from-2)))),l.setMeta("paste",!0),e.dispatch(l),!0}}})]}}),tE=p.NB.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n\n"):""});var tx=n(91789);let tA=p.NB.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,p.P1)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",renderMarkdown:()=>`  
9`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:l}=r.extensionManager,s=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&s&&o){let t=s.filter(e=>l.includes(e.type.name));e.ensureMarks(t)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),tS=p.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(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,(0,p.P1)(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(null===(n=e.attrs)||void 0===n?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>(0,p.zK)({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}}
9)\\s$`),type:this.type,getAttributes:{level:e}}))}}),tM=p.NB.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",(0,p.P1)(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!(0,p.FZ)(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,i=e();return(0,p.EG)(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(m.Bs.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(m.qv.create(t.doc,n.pos)):t.setSelection(m.Bs.create(t.doc,n.pos));else{let i=e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,o=null==i?void 0:i.create();o&&(t.insert(r,o),t.setSelection(m.Bs.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,p.x2)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
9ype})]}}),tT=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,tB=p.NB.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",(0,p.P1)(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,r,i,o,l;let s=null!==(t=null===(n=e.attrs)||void 0===n?void 0:n.src)&&void 0!==t?t:"",a=null!==(r=null===(i=e.attrs)||void 0===i?void 0:i.alt)&&void 0!==r?r:"",u=null!==(o=null===(l=e.attrs)||void 0===l?void 0:l.title)&&void 0!==o?o:"";return u?`![${a}](${s} "${u}")`:`![${a}](${s})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||"undefined"==typeof document)return null;let{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize,i=new Set(["src","width","height"]);return({node:o,getPos:l,HTMLAttributes:s,editor:a})=>{let u=document.createElement("img");u.draggable=!1;let c=(0,p.P1)(this.options.HTMLAttributes,s);Object.entries(c).forEach(([e,t])=>{if(null!=t)switch(e){case"src":case"width":case"height":break;default:u.setAttribute(e,t)}}),null!==c.src&&(u.src=c.src);let d={...s},h=e=>{if("string"==typeof e&&""!==e){u.getAttribute("src")!==e&&(u.src=e);return}u.hasAttribute("src")&&u.removeAttribute("src"),""!==u.src&&(u.src="")};h(s.src);let f=new p.fy({element:u,editor:a,node:o,getPos:l,onResize:(e,t)=>
9{u.style.width=`${e}px`,u.style.height=`${t}px`},onCommit:(e,t)=>{let n=l();void 0!==n&&this.editor.chain().setNodeSelection(n).updateAttributes(this.name,{width:e,height:t}).run()},onUpdate:e=>{if(e.type!==o.type)return!1;let t=a.extensionManager.attributes.filter(t=>t.type===e.type.name),n=(0,p.m7)(e,t);return Object.keys(d).forEach(e=>{i.has(e)||e in n||u.removeAttribute(e)}),Object.entries(n).forEach(([e,t])=>{i.has(e)||(null!=t?u.setAttribute(e,t):u.removeAttribute(e))}),h(n.src),d=n,!0},options:{directions:e,min:{width:t,height:n},preserveAspectRatio:!0===r}}),m=f.dom,D=()=>{m.style.visibility="",m.style.pointerEvents=""};return m.style.visibility="hidden",m.style.pointerEvents="none",u.complete&&u.naturalWidth>0?D():(u.onload=D,u.onerror=D),f}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[(0,p.x2)({find:tT,type:this.type,getAttributes:e=>{let[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),tO="&nbsp;",tL=p.NB.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,p.P1)(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(1===n.length&&"image"===n[0].type)return t.parseChildren([n[0]]);let r=t.parseInline(n);return 1===n.length&&"text"===n[0].type&&(n[0].raw===tO||n[0].text===tO||"\xa0"===n[0].raw||"\xa0"===n[0].text)&&1===r.length&&"text"===r[0].type&&(r[0].text===tO||"\xa0"===r[0].text)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return"";let r=Array.isArray(e.content)?e.content:[];if(0===r.length){var i,o;let e=Array.isArray(null==n||null===(i=n.previousNode)||void 0===i?void 0:i.content)?n.previousNode.content:[];return(null==n||null===(o=n.previousNode)||void 0===o?void 0:o.type)==="paragraph"&&0===e.length?tO:""}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),tN=p.NB.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),tR=p.hj.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:null}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{let t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>!!this.options.alignments.includes(e)&&this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).some(e=>e),unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).some(e=>e),toggleTextAlign:e=>({editor:t,commands:n})=>!!this.options.alignments.includes(e)&&(t.isActive({textAlign:e})?n.unsetTextAlign():n.setTextAlign(e))}},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")}}}),tI=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,t$=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,tz=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,tH=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,tj=p.vc.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return ty("strong",{...(0,p.P1)(this.options.HTMLAttributes,e),children:ty("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}}
9,addInputRules(){return[(0,p.Cf)({find:tI,type:this.type}),(0,p.Cf)({find:tz,type:this.type})]},addPasteRules(){return[(0,p.K9)({find:t$,type:this.type}),(0,p.K9)({find:tH,type:this.type})]}}),tP=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&"`"===e[t.index-1]?null:{index:t.index,text:t[0],replaceWith:t[1]}},t_=e=>{let t;let n=/`([^`]+)`(?!`)/g,r=[];for(;null!==(t=n.exec(e));)t.index>0&&"`"===e[t.index-1]||r.push({index:t.index,text:t[0],replaceWith:t[1]});return r},tW=p.vc.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,p.P1)(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,p.Cf)({find:tP,type:this.type})]},addPasteRules(){return[(0,p.K9)({find:t_,type:this.type})]}}),tq=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,tJ=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,tU=p.vc.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||(0,p.$c)(e,"background-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",(0,p.P1)(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark("highlight",t.parseInline(e.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:e=>e.indexOf("=="),tokenize(e,t,n){let r=/^(==)([^=]+)(==)/.exec(e);if(r){let e=r[2].trim(),t=n.inlineTokens(e);return{type:"highlight",raw:r[0],text:e,tokens:t}}}},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[(0,p.Cf)({find:tq,type:this.type})]},addPasteRules(){return[(0,p.K9)({find:tJ,type:this.type})]}}),tY=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,tK=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,tV=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,tZ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,tG=p.vc.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",(0,p.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,p.Cf)({find:tY,type:this.type}
9),(0,p.Cf)({find:tV,type:this.type})]},addPasteRules(){return[(0,p.K9)({find:tK,type:this.type}),(0,p.K9)({find:tZ,type:this.type})]}}),tX="numeric",tQ="ascii",t0="alpha",t1="asciinumeric",t2="alphanumeric",t3="domain",t8="emoji",t4="whitespace";function t6(e,t,n){for(let r in t[tX]&&(t[t1]=!0,t[t2]=!0),t[tQ]&&(t[t1]=!0,t[t0]=!0),t[t1]&&(t[t2]=!0),t[t0]&&(t[t2]=!0),t[t2]&&(t[t3]=!0),t[t8]&&(t[t3]=!0),t){let t=(r in n||(n[r]=[]),n[r]);0>t.indexOf(e)&&t.push(e)}}function t5(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}t5.groups={},t5.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t<this.jr.length;t++){let n=this.jr[t][0],r=this.jr[t][1];if(r&&n.test(e))return r}return this.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||t5.groups,t&&t.j?i=t:(i=new t5(t),n&&r&&t6(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,o=e.length;if(!o)return i;for(let t=0;t<o-1;t++)i=i.tt(e[t]);return i.tt(e[o-1],t,n,r)},tt(e,t,n,r){if(r=r||t5.groups,t&&t.j)return this.j[e]=t,t;let i,o=this.go(e);return o?(Object.assign((i=new t5).j,o.j),i.jr.push.apply(i.jr,o.jr),i.jd=o.jd,i.t=o.t):i=new t5,t&&(r&&(i.t&&"string"==typeof i.t?t6(t,Object.assign(function(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(i.t,r),n),r):n&&t6(t,n,r)),i.t=t),this.j[e]=i,i}};let t7=(e,t,n,r,i)=>e.ta(t,n,r,i),t9=(e,t,n,r,i)=>e.tr(t,n,r,i),ne=(e,t,n,r,i)=>e.ts(t,n,r,i),nt=(e,t,n,r,i)=>e.tt(t,n,r,i),nn="WORD",nr="UWORD",ni="ASCIINUMERICAL",no="ALPHANUMERICAL",nl="LOCALHOST",ns="UTLD",na="SCHEME",nu="SLASH_SCHEME",nc="OPENBRACE",nd="CLOSEBRACE",nh="OPENBRACKET",np="CLOSEBRACKET",nf="OPENPAREN",nm="CLOSEPAREN",nD="OPENANGLEBRACKET",ng="CLOSEANGLEBRACKET",ny="FULLWIDTHLEFTPAREN",nv="FULLWIDTHRIGHTPAREN",nb="LEFTCORNERBRACKET",nw="RIGHTCORNERBRACKET",nC="LEFTWHITECORNERBRACKET",nk="RIGHTWHITECORNERBRACKET",nF="FULLWIDTHLESSTHAN",nE="FULLWIDTHGREATERTHAN",nx="AMPERSAND",nA="APOSTROPHE",nS="ASTERISK",nM="BACKSLASH",nT="BACKTICK",nB="CARET",nO="COLON",nL="COMMA",nN="DOLLAR",nR="EQUALS",nI="EXCLAMATION",n$="HYPHEN",nz="PERCENT",nH="PIPE",nj="PLUS",nP="POUND",n_="QUERY",nW="QUOTE",nq="FULLWIDTHMIDDLEDOT",nJ="SEMI",nU="SLASH",nY="TILDE",nK="UNDERSCORE",nV="EMOJI";var nZ=Object.freeze({__proto__:null,ALPHANUMERICAL:no,AMPERSAND:nx,APOSTROPHE:nA,ASCIINUMERICAL:ni,ASTERISK:nS,AT:"AT",BACKSLASH:nM,BACKTICK:nT,CARET:nB,CLOSEANGLEBRACKET:ng,CLOSEBRACE:nd,CLOSEBRACKET:np,CLOSEPAREN:nm,COLON:nO,COMMA:nL,DOLLAR:nN,DOT:"DOT",EMOJI:nV,EQUALS:nR,EXCLAMATION:nI,FULLWIDTHGREATERTHAN:nE,FULLWIDTHLEFTPAREN:ny,FULLWIDTHLESSTHAN:nF,FULLWIDTHMIDDLEDOT:nq,FULLWIDTHRIGHTPAREN:nv,HYPHEN:n$,LEFTCORNERBRACKET:nb,LEFTWHITECORNERBRACKET:nC,LOCALHOST:nl,NL:"NL",NUM:"NUM",OPENANGLEBRACKET:nD,OPENBRACE:nc,OPENBRACKET:nh,OPENPAREN:nf,PERCENT:nz,PIPE:nH,PLUS:nj,POUND:nP,QUERY:n_,QUOTE:nW,RIGHTCORNERBRACKET:nw,RIGHTWHITECORNERBRACKET:nk,SCHEME:na,SEMI:nJ,SLASH:nU,SLASH_SCHEME:nu,SYM:"SYM",TILDE:nY,TLD:"TLD",UNDERSCORE:nK,UTLD:ns,UWORD:nr,WORD:nn,WS:"WS"});let nG=/[a-z]/,nX=/\p{L}/u,nQ=/\p{Emoji}/u,n0=/\d/,n1=/\s/,n2=null,n3=null;function n8(e,t){let n=function(e){let t=[],n=e.length,r=0;for(;r<n;){let i,o=e.charCodeAt(r),l=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(l),r+=l.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],o=0,l=0;for(;l<r;){let s=e,a=null,u=0,c=null,d=-1,h=-1;for(;
9l<r&&(a=s.go(n[l]));)(s=a).accepts()?(d=0,h=0,c=s):d>=0&&(d+=n[l].length,h++),u+=n[l].length,o+=n[l].length,l++;o-=d,l-=h,u-=d,i.push({t:c.t,v:t.slice(o-u,o),s:o-u,e:o})}return i}function n4(e,t,n,r,i){let o;let l=t.length;for(let n=0;n<l-1;n++){let l=t[n];e.j[l]?o=e.j[l]:((o=new t5(r)).jr=i.slice(),e.j[l]=o),e=o}return(o=new t5(n)).jr=i.slice(),e.j[t[l-1]]=o,o}function n6(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;"0123456789".indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}let n5={defaultProtocol:"http",events:null,format:n9,formatHref:n9,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function n7(e,t=null){let n=Object.assign({},n5);e&&(n=Object.assign(n,e instanceof n7?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function n9(e){return e}function re(e,t){this.t="token",this.v=e,this.tk=t}function rt(e,t){class n extends re{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}n7.prototype={o:n5,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:n5[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},re.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=n5.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",t,this),r=e.get("tagName",t,this),i=this.toFormattedString(e),o={},l=e.get("className",t,this),s=e.get("target",t,this),a=e.get("rel",t,this),u=e.getObj("attributes",t,this),c=e.getObj("events",t,this);return o.href=n,l&&(o.class=l),s&&(o.target=s),a&&(o.rel=a),u&&Object.assign(o,u),{tagName:r,attributes:o,content:i,eventListeners:c}}};let rn=rt("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),rr=rt("text"),ri=rt("nl"),ro=rt("url",{isLink:!0,toHref(e=n5.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==nl&&e[1].t===nO}}),rl=e=>new t5(e);function rs(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let ra="undefined"!=typeof console&&console&&console.warn||(()=>{}),ru={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function rc(e,t=!1){if(ru.initialized&&ra(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
101. Must only contain digits, lowercase ASCII letters or "-"
112. Cannot start or end with "-"
123. "-" cannot repeat`);ru.customSchemes.push([e,t])}function rd(e){return ru.initialized||function(){ru.scanner=function(e=[]){let t={};t5.groups=t;let n=new t5;null==n2&&(n2=n6("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
12ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==n3&&(n3=n6("ελ1υ2бг1ел3дети4ею2католик6ом3мÐ
12ºÐ´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")),nt(n,"'",nA),nt(n,"{",nc),nt(n,"}",nd),nt(n,"[",nh),nt(n,"]",np),nt(n,"(",nf),nt(n,")",nm),nt(n,"<",nD),nt(n,">",ng),nt(n,"(",ny),nt(n,")",nv),nt(n,"「",nb),nt(n,"」",nw),nt(n,"『",nC),nt(n,"』",nk),nt(n,"<",nF),nt(n,">",nE),nt(n,"&",nx),nt(n,"*",nS),nt(n,"@","AT"),nt(n,"`",nT),nt(n,"^",nB),nt(n,":",nO),nt(n,",",nL),nt(n,"$",nN),nt(n,".","DOT"),nt(n,"=",nR),nt(n,"!",nI),nt(n,"-",n$),nt(n,"%",nz),nt(n,"|",nH),nt(n,"+",nj),nt(n,"#",nP),nt(n,"?",n_),nt(n,'"',nW),nt(n,"/",nU),nt(n,";",nJ),nt(n,"~",nY),nt(n,"_",nK),nt(n,"\\",nM),nt(n,"・",nq);let r=t9(n,n0,"NUM",{[tX]:!0});t9(r,n0,r);let i=t9(r,nG,ni,{[t1]:!0}),o=t9(r,nX,no,{[t2]:!0}),l=t9(n,nG,nn,{[tQ]:!0});t9(l,n0,i),t9(l,nG,l),t9(i,n0,i),t9(i,nG,i);let s=t9(n,nX,nr,{[t0]:!0});t9(s,nG),t9(s,n0,o),t9(s,nX,s),t9(o,n0,o),t9(o,nG),t9(o,nX,o);let a=nt(n,"\n","NL",{[t4]:!0}),u=nt(n,"\r","WS",{[t4]:!0}),c=t9(n,n1,"WS",{[t4]:!0});nt(n,"",c),nt(u,"\n",a),nt(u,"",c),t9(u,n1,c),nt(c,"\r"),nt(c,"\n"),t9(c,n1,c),nt(c,"",c);let d=t9(n,nQ,nV,{[t8]:!0});nt(d,"#"),t9(d,nQ,d),nt(d,"️",d);let h=nt(d,"‍");nt(h,"#"),t9(h,nQ,d);let p=[[nG,l],[n0,i]],f=[[nG,null],[nX,s],[n0,o]];for(let e=0;e<n2.length;e++)n4(n,n2[e],"TLD",nn,p);for(let e=0;e<n3.length;e++)n4(n,n3[e],ns,nr,f);t6("TLD",{tld:!0,ascii:!0},t),t6(ns,{utld:!0,alpha:!0},t),n4(n,"file",na,nn,p),n4(n,"mailto",na,nn,p),n4(n,"http",nu,nn,p),n4(n,"https",nu,nn,p),n4(n,"ftp",nu,nn,p),n4(n,"ftps",nu,nn,p),t6(na,{scheme:!0,ascii:!0},t),t6(nu,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?i[t3]=!0:nG.test(r)?n0.test(r)?i[t1]=!0:i[tQ]=!0:i[tX]=!0,ne(n,r,r,i)}return ne(n,"localhost",nl,{ascii:!0}),n.jd=new t5("SYM"),{start:n,tokens:Object.assign({groups:t},nZ)}}(ru.customSchemes);for(let e=0;e<ru.tokenQueue.length;e++)ru.tokenQueue[e][1]({scanner:ru.scanner});ru.parser=function({groups:e}){let t=e.domain.concat([nx,nS,"AT",nM,nT,nB,nN,nR,n$,"NUM",nz,nH,nj,nP,nU,"SYM",nY,nK]),n=[nA,nO,nL,"DOT",nI,nz,n_,nW,nJ,nD,ng,nc,nd,np,nh,nf,nm,ny,nv,nb,nw,nC,nk,nF,nE],r=[nx,nA,nS,nM,nT,nB,nN,nR,n$,nc,nd,nz,nH,nj,nP,n_,nU,"SYM",nY,nK],i=rl(),o=nt(i,nY);t7(o,r,o),t7(o,e.domain,o);let l=rl(),s=rl(),a=rl();t7(i,e.domain,l),t7(i,e.scheme,s),t7(i,e.slashscheme,a),t7(l,r,o),t7(l,e.domain,l);let u=nt(l,"AT");nt(o,"AT",u),nt(s,"AT",u),nt(a,"AT",u);let c=nt(o,"DOT");t7(c,r,o),t7(c,e.domain,o);let d=rl();t7(u,e.domain,d),t7(d,e.domain,d);let h=nt(d,"DOT");t7(h,e.domain,d);let p=rl(rn);t7(h,e.tld,p),t7(h,e.utld,p),nt(u,nl,p);let f=nt(d,n$);nt(f,n$,f),t7(f,e.domain,d),t7(p,e.domain,d),nt(p,"DOT",h),nt(p,n$,f);let m=nt(l,n$),D=nt(l,"DOT");nt(m,n$,m),t7(m,e.domain,l),t7(D,r,o),t7(D,e.domain,l);let g=rl(ro);t7(D,e.tld,g),t7(D,e.utld,g),t7(g,e.domain,l),t7(g,r,o),nt(g,"DOT",D),nt(g,n$,m),nt(g,"AT",u);let y=nt(g,nO),v=rl(ro);t7(y,e.numeric,v);let b=rl(ro),w=rl();t7(b,t,b),t7(b,n,w),t7(w,t,b),t7(w,n,w),nt(g,nU,b),nt(v,nU,b);
12let C=nt(s,nO),k=nt(a,nO),F=nt(k,nU),E=nt(F,nU);t7(s,e.domain,l),nt(s,"DOT",D),nt(s,n$,m),t7(a,e.domain,l),nt(a,"DOT",D),nt(a,n$,m),t7(C,e.domain,b),nt(C,nU,b),nt(C,n_,b),t7(E,e.domain,b),t7(E,t,b),nt(E,nU,b);let x=[[nc,nd],[nh,np],[nf,nm],[nD,ng],[ny,nv],[nb,nw],[nC,nk],[nF,nE]];for(let e=0;e<x.length;e++){let[r,i]=x[e],o=nt(b,r);nt(w,r,o);let l=rl(ro);t7(o,t,l);let s=rl();t7(o,n,s),nt(o,i,b),t7(l,t,l),t7(l,n,s),t7(s,t,l),t7(s,n,s),nt(l,i,b),nt(s,i,b)}return nt(i,nl,g),nt(i,"NL",ri),{start:i,tokens:nZ}}(ru.scanner.tokens);for(let e=0;e<ru.pluginQueue.length;e++)ru.pluginQueue[e][1]({scanner:ru.scanner,parser:ru.parser});ru.initialized=!0}(),function(e,t,n){let r=n.length,i=0,o=[],l=[];for(;i<r;){let s=e,a=null,u=null,c=0,d=null,h=-1;for(;i<r&&!(a=s.go(n[i].t));)l.push(n[i++]);for(;i<r&&(u=a||s.go(n[i].t));)a=null,(s=u).accepts()?(h=0,d=s):h>=0&&h++,i++,c++;if(h<0)(i-=c)<r&&(l.push(n[i]),i++);else{l.length>0&&(o.push(rs(rr,t,l)),l=[]),i-=h,c-=h;let e=d.t,r=n.slice(i-c,i);o.push(rs(e,t,r))}}return l.length>0&&o.push(rs(rr,t,l)),o}(ru.parser.start,e,n8(ru.scanner.start,e))}function rh(e,t=null,n=null){if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new n7(n),i=rd(e),o=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&o.push(n.toFormattedObject(r))}return o}rd.scan=n8;let rp="[\0- \xa0 ᠎ -\u2029  ]",rf=new RegExp(rp),rm=RegExp(`${rp}$`),rD=RegExp(rp,"g"),rg=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,ry=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function rv(e,t){let n=0;for(let r=t-1;r>=0&&"\\"===e[r];r-=1)n+=1;return n%2==1}function rb(e,t,n){var r,i;let[,o,l]=t;return!((t.index?e[t.index-1]:void 0)==="!"||rv(e,null!==(r=t.index)&&void 0!==r?r:0)||function(e,t){let n=0,r=0;for(;r<t;){if("`"!==e[r]||0===n&&rv(e,r)){r+=1;continue}let i=0;for(;r<t&&"`"===e[r];)i+=1,r+=1;0===n?n=i:i===n&&(n=0)}return n>0}(e,null!==(i=t.index)&&void 0!==i?i:0))&&!!o.trim()&&n(l)}function rw(e){var t,n;let[r,i,o,,l,s,a]=e,u=null!==(t=null!=l?l:s)&&void 0!==t?t:a;return{index:null!==(n=e.index)&&void 0!==n?n:0,text:r,replaceWith:i,data:{href:o,title:u||null,markdown:!0}}}function rC(e){var t,n,r;return{href:null===(t=e.data)||void 0===t?void 0:t.href,title:null!==(n=null===(r=e.data)||void 0===r?void 0:r.title)&&void 0!==n?n:null}}function rk(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(rD,"").match(RegExp(`^(?:(?:${n.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}let rF=p.vc.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if("string"==typeof e){rc(e);return}rc(e.scheme,e.optionalSlashes)})},onDestroy(){t5.groups={},ru.scanner=null,ru.parser=null,ru.tokenQueue=[],ru.pluginQueue=[],ru.customSchemes=[],ru.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!rk(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){var e,t,n;return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:null!==(e=this.options.HTMLAttributes.target)&&void 0!==e?e:null},rel:{default:null!==(t=this.options.HTMLAttributes.rel)&&void 0!==t?t:null},class:{default:null!==(n=this.options.HTMLAttributes.class)&&void 0!==n?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!(t&&this.options.isAllowedUri(t,{defaultValidate:e=>!!rk(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!rk(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,p.P1)(this.options.HTMLAttributes,e),0]:["a",(0,p.P1)(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,o;let l=null!==(n=null===(r=e.attrs)||void 0===r?void 0:r.href)&&void 0!==n?n:"",s=null!==(i=null===(o=e.attrs)||void 0===o?void 0:o.title)&&void 0!==i?i:"",a=t.renderChildren(e);return s?`[${a}](${l} "${s}")`:`[${a}](${l})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return!!this.options.isAllowedUri(n,{defaultValidate:e=>!!rk(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return(!n||!!this.options.isAllowedUri(n,{defaultValidate:e=>!!rk(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[function(e){let t=(0,p.Cf)({find:t=>{let n=rg.exec(t);return n&&rb(t,n,e.isAllowedHref)?rw(n):null},type:e.type,getAttributes:rC});return new p.VK({find:t.find,handler:e=>{let n=t.handler(e);return null!==n&&e.state.tr.steps.length&&e.state.tr.setMeta("preventAutolink",!0),n}})}
12({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!rk(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let e=e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options;rh(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!rk(e,n),protocols:n,defaultProtocol:r})).forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t};return this.options.markdownLinks?[function(e){let t=(0,p.K9)({find:t=>{var n,r;let i=[];for(let n of t.matchAll(ry))rb(t,n,e.isAllowedHref)&&i.push(rw(n));let o=(null!==(n=null===(r=e.findPlainUrls)||void 0===r?void 0:r.call(e,t))&&void 0!==n?n:[]).filter(e=>!i.some(t=>t.index<e.index+e.text.length&&e.index<t.index+t.text.length));return[...i,...o]},type:e.type,getAttributes:rC});return new p.hD({find:t.find,handler:e=>{var n;let r=t.handler(e);return null!==r&&e.state.tr.steps.length&&(null===(n=e.match.data)||void 0===n?void 0:n.markdown)&&e.state.tr.setMeta("preventAutolink",!0),r}})}({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!rk(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[(0,p.K9)({find:e,type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){var e,t,n;let r=[],{protocols:i,defaultProtocol:o}=this.options;return this.options.autolink&&r.push((e={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!rk(e,i),protocols:i,defaultProtocol:o}),shouldAutoLink:this.options.shouldAutoLink},new m.Sy({key:new m.H$("autolink"),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),o=t.some(e=>e.getMeta("preventAutolink"));if(!i||o)return;let{tr:l}=r,s=(0,p.XP)(n.doc,[...t]);if((0,p.QC)(s).forEach(({newRange:t})=>{let n,i;let o=(0,p.b5)(r.doc,t,e=>e.isTextblock);if(o.length>1)n=o[0],i=r.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ");else if(o.length){let e=r.doc.textBetween(t.from,t.to," "," ");if(!rm.test(e))return;n=o[0],i=r.doc.textBetween(n.pos,t.to,void 0," ")}if(n&&i){let t=i.split(rf).filter(Boolean);if(t.length<=0)return!1;let o=t[t.length-1],s=n.pos+i.lastIndexOf(o);if(!o)return!1;let a=rd(o).map(t=>t.toObject(e.defaultProtocol));if(!(1===a.length?a[0].isLink:3===a.length&&!!a[1].isLink&&["()","[]"].includes(a[0].value+a[2].value)))return!1;a.filter(e=>e.isLink).map(e=>({...e,from:s+e.start+1,to:s+e.end+1})).filter(e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{(0,p.tI)(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||l.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),l.steps.length)return l}}))),r.push((t={type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection},new m.Sy({key:new m.H$("handleClickLink"),props:{handleClick:(e,n,r)=>{if(0!==r.button||!e.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let e=r.target;if(!e)return!1;let n=t.editor.view.dom;(i=e.closest("a"))&&!n.contains(i)&&(i=null)}if(!i)return!1;let o=!1;if(t.enableClickSelection&&(o=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){var l,s;let n=(0,p.u9)(e.state,t.type.name),r=null!==(l=i.href)&&void 0!==l?l:n.href,a=null!==(s=i.target)&&void 0!==s?s:n.target;r&&(window.open(r,a),o=!0)}return o}}}))),this.options.linkOnPaste&&r.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink},new m.Sy({key:new m.H$("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{shouldAutoLink:i}=n,{state:o}=e,{selection:l}=o,{empty:s}=l;if(s)return!1;let a="";r.content.forEach(e=>{a+=e.textContent});let u=rh(a,{defaultProtocol:n.defaultProtocol}).find(e=>e.isLink&&e.value===a);return!!(a&&u&&(void 0===i||i(u.value)))&&n.editor.commands.setMark(n.type,{href:u.href})}}}))),r}}),rE=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,rx=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,rA=p.vc.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",(0,p.P1)(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}}
12,addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,p.Cf)({find:rE,type:this.type})]},addPasteRules(){return[(0,p.K9)({find:rx,type:this.type})]}}),rS=p.vc.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],renderHTML({HTMLAttributes:e}){return["sub",(0,p.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),rM=p.vc.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],renderHTML({HTMLAttributes:e}){return["sup",(0,p.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),rT=(e,t=0)=>{let n=[];return!e.children.length||t>20||Array.from(e.children).forEach(e=>{"SPAN"===e.tagName?n.push(e):e.children.length&&n.push(...rT(e,t+1))}),n},rB=e=>{if(!e.children.length)return;let t=rT(e);t&&t.forEach(e=>{var t;let n=e.getAttribute("style"),r=null===(t=e.parentElement)||void 0===t||null===(t=t.closest("span"))||void 0===t?void 0:t.getAttribute("style");e.setAttribute("style",`${r};${n}`)})},rO=p.vc.create({name:"textStyle",priority:101,addOptions:()=>({HTMLAttributes:{},mergeNestedSpanStyles:!0}),parseHTML(){return[{tag:"span",consuming:!1,getAttrs:e=>!!e.hasAttribute("style")&&(this.options.mergeNestedSpanStyles&&rB(e),{})}]},renderHTML({HTMLAttributes:e}){return["span",(0,p.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleTextStyle:e=>({commands:t})=>t.toggleMark(this.name,e),removeEmptyTextStyle:()=>({tr:e})=>{let{selection:t}=e;return e.doc.nodesBetween(t.from,t.to,(t,n)=>{if(!t.isInline)return!0;t.marks.filter(e=>e.type===this.type).some(e=>Object.values(e.attrs).some(e=>!!e))||e.removeMark(n,n+t.nodeSize,this.type)}),!0}}}}),rL=p.hj.create({name:"backgroundColor",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:e=>{var t;let n=null!==(t=(0,p.$c)(e,"background-color"))&&void 0!==t?t:e.style.backgroundColor;return null==n?void 0:n.replace(/['"]+/g,"")},renderHTML:e=>e.backgroundColor?{style:`background-color: ${e.backgroundColor}`}:{}}}}]},addCommands:()=>({setBackgroundColor:e=>({chain:t})=>t().setMark("textStyle",{backgroundColor:e}).run(),unsetBackgroundColor:()=>({chain:e})=>e().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()})}),rN=p.hj.create({name:"color",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;let n=null!==(t=(0,p.$c)(e,"color"))&&void 0!==t?t:e.style.color;return null==n?void 0:n.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands:()=>({setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()})}),rR=p.hj.create({name:"fontFamily",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:e=>{var t;return null!==(t=(0,p.$c)(e,"font-family"))&&void 0!==t?t:e.style.fontFamily},renderHTML:e=>e.fontFamily?{style:`font-family: ${e.fontFamily}`}:{}}}}]},addCommands:()=>({setFontFamily:e=>({chain:t})=>t().setMark("textStyle",{fontFamily:e}).run(),unsetFontFamily:()=>({chain:e})=>e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()})}),rI=p.hj.create({name:"fontSize",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>{var t;return null!==(t=(0,p.$c)(e,"font-size"))&&void 0!==t?t:e.style.fontSize},renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands:()=>({setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()})}),r$=p.hj.create({name:"lineHeight",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>{var t;return null!==(t=(0,p.$c)(e,"line-height"))&&void 0!==t?t:e.style.lineHeight},renderHTML:e=>e.lineHeight?{style:`line-height: ${e.lineHeight}`}:{}}}}]},addCommands:()=>({setLineHeight:e=>({chain:t})=>t().setMark("textStyle",{lineHeight:e}).run(),unsetLineHeight:()=>({chain:e})=>e().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()})});p.hj.create({name:"textStyleKit",addExtensions(){let e=[];return!1!==this.options.backgroundColor&&e.push(rL.configure(this.options.backgroundColor)),!1!==this.options.color&&e.push(rN.configure(this.options.color)),!1!==this.options.fontFamily&&e.push(rR.configure(this.options.fontFamily)),!1!==this.options.fontSize&&e.push(rI.configure(this.options.fontSize)),!1!==this.options.lineHeight&&e.push(r$.configure(this.options.lineHeight)),!1!==this.options.textStyle&&e.push(rO.configure(this.options.textStyle)),e}});let rz=p.vc.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,p.P1)(this.options.HTMLAttributes,e),0]}
12,parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown:(e,t)=>`++${t.renderChildren(e)}++`,markdownTokenizer:{name:"underline",level:"inline",start:e=>e.indexOf("++"),tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function rH(e,t){return e.type===t.type&&function e(t,n){if(t===n)return!0;if(null==t||null==n)return t===n;if(typeof t!=typeof n||"object"!=typeof t||Array.isArray(t)!==Array.isArray(n))return!1;if(Array.isArray(t))return t.length===n.length&&t.every((t,r)=>e(t,n[r]));let r=Object.keys(t),i=Object.keys(n);return r.length===i.length&&r.every(r=>Object.prototype.hasOwnProperty.call(n,r)&&e(t[r],n[r]))}(e.attrs,t.attrs)}function rj(e){return"text"===e.type&&!!e.marks?.length}let rP=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],r_=(e={})=>{let{custom:t,...n}=e,r={...n,...t};return Object.keys(r).filter(e=>null!=r[e]).map(e=>`${e}="${String(r[e]).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}"`).join(" ")},rW=(e={})=>Object.keys(e).map(t=>`${t}: ${e[t]}`).join("; ");function rq(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}let rJ=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>null!=t)),rU=((u={}).URL="url",u.STORY="story",u.ASSET="asset",u.EMAIL="email",u);function rY(e={}){let{textAlign:t,class:n,id:r,style:i,...o}=e,l=[];return i&&l.push(i.endsWith(";")?i:`${i};`),t&&l.push(`text-align: ${t};`),rJ({...o,class:n,id:r,...l.length>0?{style:l.join(" ")}:{}})}function rK(e={}){let{colspan:t,rowspan:n,colwidth:r,backgroundColor:i,textAlign:o,...l}=e,s=[];return r&&s.push(`width: ${r}px;`),i&&s.push(`background-color: ${i};`),o&&s.push(`text-align: ${o};`),rJ({...l,...t>1?{colspan:t}:{},...n>1?{rowspan:n}:{},...s.length>0?{style:s.join(" ")}:{}})}let rV={a:["href","target","data-uuid","data-anchor","data-linktype"],img:["alt","src","title"],span:["class"]};function rZ(e,{allowedStyles:t}){let n=(e.getAttribute("class")||"").split(" ").filter(Boolean);if(!n.length)return[];for(let r of n.filter(e=>!t.includes(e)))console.warn(`[StoryblokRichText] - \`class\` "${r}" on \`<${e.tagName.toLowerCase()}>\` can not be transformed to rich text.`);return t.filter(e=>n.includes(e))}let rG=tR.configure({types:["heading","paragraph"]}),rX=tw.extend({renderHTML:({HTMLAttributes:e})=>["blockquote",rY(e),0]}),rQ=tL.extend({renderHTML:({HTMLAttributes:e})=>["p",rY(e),0]}),r0=tS.extend({renderHTML({node:e,HTMLAttributes:t}){let{level:n,...r}=t;return[`h${e.attrs.level}`,rY(r),0]}}),r1=tl.extend({renderHTML:({HTMLAttributes:e})=>["tr",rY(e),0]}),r2=y.extend({name:"bullet_list",addOptions(){return{...this.parent(),itemTypeName:"list_item"}},renderHTML:({HTMLAttributes:e})=>["ul",rY(e),0]}),r3=V.extend({name:"ordered_list",addAttributes:()=>({order:{default:1}}),addOptions(){return{...this.parent(),itemTypeName:"list_item"}},renderHTML:({HTMLAttributes:e})=>["ol",rY(e),0]}),r8=O.extend({name:"list_item",addOptions(){return{...this.parent(),bulletListTypeName:"bullet_list",orderedListTypeName:"ordered_list"}},renderHTML:({HTMLAttributes:e})=>["li",rY(e),0]}),r4=tF.extend({name:"code_block",addAttributes:()=>({class:{default:null}}),renderHTML({node:e,HTMLAttributes:t}){let{language:n,...r}=t,i=rY(r),o=e.attrs.language;return["pre",i,["code",o?{class:`language-${o}`}:{},0]]}}),r6=tA.extend({name:"hard_break"}),r5=tM.extend({name:"horizontal_rule"}),r7=tp.extend({renderHTML:({HTMLAttributes:e})=>["table",rY(e),0]}),r9=ti.extend({addAttributes(){return{...this.parent?.(),colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(Number):null}},backgroundColor:{default:null}}},renderHTML:({HTMLAttributes:e})=>["td",rK(e),0]}),ie=to.extend({renderHTML:({HTMLAttributes:e})=>["th",rK(e),0]}),it=tB.extend({addOptions(){return{...this.parent?.(),optimizeImages:!1}},renderHTML({HTMLAttributes:e}){let{src:t,alt:n,title:r,srcset:i,sizes:o}=e,l=t,s={};if(this.options.optimizeImages){let e=function(e,t){if(!t)return{src:e,attrs:{}};let n=0,r=0,i={},o=[];function l(e,t,n,r,i){"number"!=typeof e||e<=t||e>=n?console.warn(`[StoryblokRichText] - ${r.charAt(0).toUpperCase()+r.slice(1)} value must be a number between ${t} and ${n} (inclusive)`):i.push(`${r}(${e})`)}if("object"==typeof t){if(void 0!==t.width&&("number"==typeof t.width&&t.width>=0?(i.width=t.width,n=t.width):console.warn("[StoryblokRichText] - Width value must be a number greater than or equal to 0")),void 0!==t.height&&("number"==typeof t.height&&t.height>=0?(i.height=t.height,r=t.height):console.warn("[StoryblokRichText] - He
12ight value must be a number greater than or equal to 0")),0===t.height&&0===t.width&&(delete i.width,delete i.height,console.warn("[StoryblokRichText] - Width and height values cannot both be 0")),t.loading&&["lazy","eager"].includes(t.loading)&&(i.loading=t.loading),t.class&&(i.class=t.class),t.filters){let{filters:e}=t||{},{blur:n,brightness:r,fill:i,format:s,grayscale:a,quality:u,rotate:c}=e||{};n&&l(n,0,100,"blur",o),u&&l(u,0,100,"quality",o),r&&l(r,0,100,"brightness",o),i&&o.push(`fill(${i})`),a&&o.push("grayscale()"),c&&[0,90,180,270].includes(t.filters.rotate||0)&&o.push(`rotate(${c})`),s&&["webp","png","jpeg"].includes(s)&&o.push(`format(${s})`)}t.srcset&&(i.srcset=t.srcset.map(t=>{if("number"==typeof t)return`${e}/m/${t}x0/${o.length>0?`filters:${o.join(":")}`:""} ${t}w`;if(Array.isArray(t)&&2===t.length){let[n,r]=t;return`${e}/m/${n}x${r}/${o.length>0?`filters:${o.join(":")}`:""} ${n}w`}console.warn("[StoryblokRichText] - srcset entry must be a number or a tuple of two numbers")}).join(", ")),t.sizes&&(i.sizes=t.sizes.join(", "))}let s=`${e}/m/`;return(n>0||r>0)&&(s=`${s}${n}x${r}/`),o.length>0&&(s=`${s}filters:${o.join(":")}`),{src:s,attrs:i}}(t,this.options.optimizeImages);l=e.src,s=e.attrs}return["img",rJ({src:l,alt:n,title:r,srcset:i,sizes:o,...s})]}}),ir=tx.ZP.extend({renderHTML:({HTMLAttributes:e})=>["img",{"data-emoji":e.emoji,"data-name":e.name,src:e.fallbackImage,alt:e.alt,style:"width: 1.25em; height: 1.25em; vertical-align: text-top",draggable:"false",loading:"lazy"}]}),ii=p.NB.create({name:"blok",group:"block",atom:!0,addOptions:()=>({renderComponent:null}),addAttributes:()=>({id:{default:null},body:{default:[]}}),parseHTML:()=>[{tag:"div[data-blok]"}],renderHTML:({HTMLAttributes:e})=>(console.warn("[StoryblokRichText] - BLOK resolver is not available for vanilla usage. Configure `renderComponent` option on the blok tiptapExtension."),["span",rJ({"data-blok":JSON.stringify(e?.body?.[0]??null),"data-blok-id":e?.id,style:"display: none"})])}),io=tU.extend({addAttributes:()=>({color:{default:null}})}),il=rF.extend({addAttributes:()=>({href:{parseHTML:e=>e.getAttribute("href")},uuid:{default:null,parseHTML:e=>e.getAttribute("data-uuid")||null},anchor:{default:null,parseHTML:e=>e.getAttribute("data-anchor")||null},target:{parseHTML:e=>e.getAttribute("target")||null},linktype:{default:"url",parseHTML:e=>e.getAttribute("data-linktype")||"url"}}),renderHTML({HTMLAttributes:e}){let{href:t,rest:n}=function(e={}){let{linktype:t,href:n,anchor:r,uuid:i,custom:o,...l}=e,s=n??"";switch(t){case rU.ASSET:case rU.URL:break;case rU.EMAIL:s&&!s.startsWith("mailto:")&&(s=`mailto:${s}`);break;case rU.STORY:r&&(s=`${s}#${r}`)}return{href:s,rest:{...l,...o||{}}}}(e);return["a",rJ({...t?{href:t}:{},...n}),0]}}),is=il.extend({addAttributes(){return{...this.parent?.(),custom:{default:null,parseHTML:e=>{let t=rV.a,n=e.getAttributeNames().filter(e=>!t.includes(e)),r={};for(let t of n)r[t]=e.getAttribute(t);return Object.keys(r).length?r:null}}}}}),ia=p.vc.create({name:"anchor",addAttributes:()=>({id:{default:null}}),parseHTML:()=>[{tag:"span[id]"}],renderHTML:({HTMLAttributes:e})=>["span",{id:e.id},0]}),iu=p.vc.create({name:"styled",addAttributes(){return{class:{parseHTML:e=>{let t=rZ(e,{allowedStyles:this.options.allowedStyles||[]});return t.length?t.join(" "):null}}}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:e=>!!rZ(e,{allowedStyles:this.options.allowedStyles||[]}).length&&null}]},renderHTML({HTMLAttributes:e}){let{class:t,...n}=e;return["span",rJ({class:t,style:rW(n)||void 0}),0]}}),ic=p.vc.create({name:"textStyle",addAttributes:()=>({class:{default:null},id:{default:null},color:{default:null}}),parseHTML:()=>[{tag:"span",consuming:!1,getAttrs:e=>{let t=e.getAttribute("style");return!!(t&&/color/i.test(t))&&null}}],renderHTML({HTMLAttributes:e}){let{class:t,id:n,...r}=e;return["span",rJ({class:t,id:n,style:rW(r)||void 0}),0]}}),id=p.vc.create({name:"reporter",priority:0,addOptions:()=>({allowCustomAttributes:!1}),parseHTML(){return[{tag:"*",consuming:!1,getAttrs:e=>{let t=e.tagName.toLowerCase();if("a"===t&&this.options.allowCustomAttributes)return!1;for(let n of e.getAttributeNames().filter(e=>!(t in rV?rV[t]:[]).includes(e)))console.warn(`[StoryblokRichText] - \`${n}\` "${e.getAttribute(n)}" on \`<${t}>\` can not be transformed to rich text.`);return!1}}]}}),ih={document:tE,text:tN,paragraph:rQ,blockquote:rX,heading:r0,bulletList:r2,orderedList:r3,listItem:r8,codeBlock:r4,hardBreak:r6,horizontalRule:r5,image:it,emoji:ir,table:r7,tableRow:r1,tableCell:r9,tableHeader:ie,blok:ii,details:ea,detailsContent:eu,detailsSummary:ec,bold:tj,italic:tG,strike:rA,underline:rz,code:tW,superscript:rM,subscript:rS,highlight:io,textStyle:ic,link:il,anchor:ia,styled:iu,reporter:id,textAlign:rG};function ip(e,t={},n){let r=r_(t),i=r?`${e} ${r}`:e,o=Array.isArray(n)?n.join(""):n||"";return e?rP.includes(e)?`<${i}>`:`<${i}>${o}</${e}>`:o}function im(e,t,n){let[r,...i]=e,o={},l=i;if(l.length>0&&null!==l[0]&&void 0!==l[0]&&"object"==typeof l[0]&&!Array.isArray(l[0])&&"number"!=typeof l[0]&&(o=l[0],l=l.slice(1)),0===(l=l.filter(e=>null!=e)).length)return t(r,o);if(1===l.length&&0===l[0])return t(r,o,n);let s=l.map(e=>0===e?n:Array.isArray(e)?im(e,t,n):e);return t(r,o,1===s.length?s[0]:s)}function iD(e,t,n){let r={options:e.options||{},name:e.name,type:e.type};return"node"===t?e.config.renderHTML.call(r,{node:{attrs:n},HTMLAttributes:n}
12):e.config.renderHTML.call(r,{mark:{attrs:n},HTMLAttributes:n})}let ig=function(e,{isServerContext:t=!1}={}){return function(n){let{tiptapExtensions:r,...i}=n;return function(e={}){let t=new Map,{renderFn:n=ip,textFn:r=rq,optimizeImages:i=!1,keyedResolvers:o=!1,tiptapExtensions:l}=e,s=n!==ip,a=function(e={}){let t=e.allowCustomAttributes?is:il;return{...ih,image:it.configure({optimizeImages:e.optimizeImages||!1}),link:t,styled:iu.configure({allowedStyles:e.styleOptions?.map(e=>e.value)}),reporter:id.configure({allowCustomAttributes:e.allowCustomAttributes})}}({optimizeImages:i}),u=Object.values(l?{...a,...l}:a),c=new Map,d=new Map;for(let e of u)"node"===e.type?c.set(e.name,e):"mark"===e.type&&d.set(e.name,e);let h=(e,r={},i)=>{if(o&&e){let n=t.get(e)||0;t.set(e,n+1),r={...r,key:`${e}-${n}`}}return s&&"string"!=typeof e&&void 0!==i?n(e,r,()=>i):n(e,r,i)};function p(e){if("text"===e.type)return f(e);if("doc"===e.type)return m(e);let t=c.get(e.type);if(!t?.config?.renderHTML)return console.error("<Storyblok>",`No extension found for node type ${e.type}`),"";if(t.options?.renderComponent){let n=e.attrs?.body,r=e.attrs?.id;if(!Array.isArray(n)||0===n.length)return s?[]:"";let i=n.map(e=>t.options.renderComponent(e,r));return s?i:i.filter(e=>null!=e).join("")}if("table"===e.type&&e.content?.length){let n=[],r=[];for(let t of e.content)0===r.length&&t.content?.every(e=>"tableHeader"===e.type)?n.push(t):r.push(t);let i=iD(t,"node",e.attrs||{}),o=[];return n.length>0&&o.push(h("thead",{},n.map(m))),r.length>0&&o.push(h("tbody",{},r.map(m))),im(i,h,o)}let n=e.content?function(e){let t=[],n=0;for(;n<e.length;){let r=function(e,t){let n=e[t];if(!rj(n))return null;let r=[n],i=n.marks,o=t+1;for(;o<e.length;){let t=e[o];if(!rj(t))break;let n=i.filter(e=>t.marks.some(t=>rH(e,t)));if(0===n.length)break;i=n,r.push(t),o++}return{group:r,shared:i,endIndex:o}}(e,n);if(!r){t.push(m(e[n])),n++;continue}1===r.group.length?t.push(f(r.group[0])):t.push(function(e,t){let n=e.map(e=>f({...e,marks:function(e,t){let n=e.filter(e=>!t.some(t=>rH(t,e)));return n.length?n:void 0}(e.marks||[],t)})),r=s?n:n.join("");for(let e of t){let t=d.get(e.type);t?.config?.renderHTML&&(r=im(iD(t,"mark",e.attrs||{}),h,r))}return r}(r.group,r.shared)),n=r.endIndex}return t}(e.content):void 0;return im(iD(t,"node",e.attrs||{}),h,n)}function f(e){let{marks:n,...i}=e;if(n?.length){let e=(()=>{let e={};if(o){let n=t.get("txt")||0;t.set("txt",n+1),e.key=`txt-${n}`}return r(i.text,e)})();return n.reduce((e,t)=>{let n=d.get(t.type);return n?.config?.renderHTML?im(iD(n,"mark",t.attrs||{}),h,e):(console.error("<Storyblok>",`No extension found for node type ${t.type}`),e)},e)}let l=e.attrs||{};if(o){let e=t.get("txt")||0;t.set("txt",e+1),l.key=`txt-${e}`}return r(i.text,l)}function m(e){return"doc"===e.type?s?e.content.map(p):e.content.map(p).join(""):Array.isArray(e)?e.map(p):p(e)}return{render:m}}({...t?n:{},renderFn:d.createElement,textFn:e=>d.createElement(d.Fragment,{key:Math.random().toString(36).substring(2,15)},e),keyedResolvers:!0,...t?{}:i,tiptapExtensions:{blok:ii.configure({renderComponent:(n,r)=>{let i=r||(t?`fallback-key-${JSON.stringify(n)}`:void 0);return d.createElement(e,{blok:n,key:i})}}),...r}})}}(h,{isServerContext:!0});var iy=n(938);(0,d.forwardRef)(({story:e,...t},n)=>{if(!e)return console.error("Please provide a 'story' property to the StoryblokServerStory"),null;if("string"==typeof(e=(0,iy.X)(e)).content)try{e.content=JSON.parse(e.content)}catch(t){console.error("An error occurred while trying to parse the story content",t),e.content={}}return(0,c.jsx)(h,{ref:n,blok:e.content,...t})});var iv=n(67442);(0,d.forwardRef)(({doc:e,tiptapExtensions:t},n)=>{if(!e)return null;let{render:r}=ig({tiptapExtensions:t}),i=r(e),o=(0,iv.H$)(i);return(0,c.jsx)("div",{ref:n,children:o})});var ib=n(61975);(0,d.forwardRef)(({story:e,bridgeOptions:t,...n},r)=>{if(!e)return console.error("Please provide a 'story' property to the StoryblokServerComponent"),null;if("string"==typeof(e=(0,iy.X)(e)).content)try{e.content=JSON.parse(e.content)}catch(t){console.error("An error occurred while trying to parse the story content",t),e.content={}}return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(h,{ref:r,blok:e.content,...n}),(0,c.jsx)(ib.default,{story:e,bridgeOptions:t})]})});var iw=n(70017)},61975:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}});var r=n(70017),i=n(2265),o=n(938),l=n(67442);let s=e=>{let{story:t=null,bridgeOptions:s={}}=e;if(!(0,l.j$)())return null;let a="number"==typeof(null==t?void 0:t.id)?t.id:null;return(0,i.useEffect)(()=>{null!==a&&(async()=>{(0,l.Tn)()||await (0,r.pp)();let e=async e=>{var t;if(e)try{let{liveEditUpdateAction:t}=await n.e(8339).then(n.bind(n,28339));(0,i.startTransition)(()=>{t({story:e,pathToRevalidate:window.location.pathname})})}catch(r){console.warn("Server action not available, caching story locally:",r);let n=(0,o.f)(e);n&&(null==(t=globalThis.storyCache)||t.set(n,e))}};(0,r.MB)(a,t=>e(t),s)})()},[a,JSON.stringify(s)]),null}},67442:function(e,t,n){n.d(t,{H$:function(){return function e(t){if(Array.isArray(t))return t.map(t=>e(t));let n={allowfullscreen:"allowFullScreen",autocomplete:"autoComplete",autofocus:"autoFocus",autoplay:"autoPlay",charset
12:"charSet",class:"className",colspan:"colSpan",colwidth:"colWidth",contenteditable:"contentEditable",crossorigin:"crossOrigin",enctype:"encType",for:"htmlFor",formnovalidate:"formNoValidate",frameborder:"frameBorder",inputmode:"inputMode",marginheight:"marginHeight",marginwidth:"marginWidth",maxlength:"maxLength",minlength:"minLength",novalidate:"noValidate",playsinline:"playsInline",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",srcset:"srcSet",tabindex:"tabIndex",targetAttr:"targetattr",usemap:"useMap"},i=Object.keys(t.props).reduce((e,r)=>{let i=t.props[r];return"style"===r&&"string"==typeof i&&(i=i.split(";").reduce((e,t)=>{let[n,r]=t.split(":");return n=null==n?void 0:n.trim(),r=null==r?void 0:r.trim(),n&&r&&(e[n.replace(/-([a-z])/g,e=>e[1].toUpperCase())]=r),e},{})),e[n[r]||r]=i,e},{});i.key=t.key;let o=r.Children.map(t.props.children,t=>"string"==typeof t?t:e(t));return r.createElement(t.type,i,o)}},Tn:function(){return o},j$:function(){return s}});var r=n(2265);let i=()=>"u">typeof window,o=()=>i()&&"u">typeof window.storyblokRegisterEvent,l=()=>i()&&window.self!==window.top,s=()=>i()&&l()&&window.location.search.includes("_storyblok")},87050:function(e,t,n){n.d(t,{t:function(){return i}});var r=Object.defineProperty,i=(e,t)=>{let n={};for(var i in e)r(n,i,{get:e[i],enumerable:!0});return t||r(n,Symbol.toStringTag,{value:"Module"}),n}},4424:function(e,t){t.Z=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8
12E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},45211:function(e,t,n){let r;n.d(t,{q$:function(){return eD}});var i=n(82804),o=n(29572),l=n(16277);let s=Math.min,a=Math.max,u=Math.round,c=Math.floor,d=e=>({x:e,y:e}),h={left:"right",right:"left",bottom:"top",top:"bottom"};function p(e,t){return"function"==typeof e?e(t):e}function f(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function D(e){return"y"===e?"height":"width"}function g(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function y(e){return"x"===g(e)?"y":"x"}function v(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let b=["left","right"],w=["right","left"],C=["top","bottom"],k=["bottom","top"];function F(e){let t=f(e);return h[t]+e.slice(t.length)}function E(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function x(e,t,n){let r,{reference:i,floating:o}=e,l=g(t),s=y(t),a=D(s),u=f(t),c=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,h=i[a]/2-o[a]/2;switch(u){case"top":r={x:c,y:i.y-o.height};break;case"bottom":r={x:c,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:d};break;case"left":r={x:i.x-o.width,y:d};break;default:r={x:i.x,y:i.y}}let p=m(t);return p&&(r[s]+=h*("end"===p?1:-1)*(n&&"y"===l?-1:1)),r}async function A(e,t){var n,r,i,o,l;void 0===t&&(t={});let{x:s,y:a,platform:u,rects:c,elements:d,strategy:h}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:D="floating",altBoundary:g=!1,padding:y=0}=p(t,e),v="number"!=typeof y?{top:null!=(r=y.top)?r:0,right:null!=(i=y.right)?i:0,bottom:null!=(o=y.bottom)?o:0,left:null!=(l=y.left)?l:0}:{top:y,right:y,bottom:y,left:y},b=d[g?"floating"===D?"reference":"floating":D],w=E(await u.getClippingRect
vendor: 1,244 bytes, line 12
12({element:null==(n=await (null==u.isElement?void 0:u.isElement(b)))||n?b:b.contextElement||await (null==u.getDocumentElement?void 0:u.getDocumentElement(d.floating)),boundary:f,rootBoundary:m,strategy:h})),C="floating"===D?{x:s,y:a,width:c.floating.width,height:c.floating.height}:c.reference,k=await (null==u.getOffsetParent?void 0:u.getOffsetParent(d.floating)),F=await (null==u.isElement?void 0:u.isElement(k))&&await (null==u.getScale?void 0:u.getScale(k))||{x:1,y:1},x=E(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:C,offsetParent:k,strategy:h}):C);return{top:(w.top-x.top+v.top)/F.y,bottom:(x.bottom-w.bottom+v.bottom)/F.y,left:(w.left-x.left+v.left)/F.x,right:(x.right-w.right+v.right)/F.x}}let S=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:A},a=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=x(u,r,a),h=r,p=0,f={};for(let n=0;n<o.length;n++){let m=o[n];if(!m)continue;let{name:D,fn:g}=m,{x:y,y:v,data:b,reset:w}=await g({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:f,re
12cts:u,platform:s,elements:{reference:e,floating:t}});c=null!=y?y:c,d=null!=v?v:d,f[D]={...f[D],...b},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(u=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:c,y:d}=x(u,h,a)),n=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:f}},M=new Set(["left","top"]);async function T(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),l=f(n),s=m(n),a="y"===g(n),u=M.has(l)?-1:1,c=o&&a?-1:1,d=p(t,e),{mainAxis:h,crossAxis:D,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof y&&(D="end"===s?-1*y:y),a?{x:D*c,y:h*u}:{x:h*u,y:D*c}}function B(){return"undefined"!=typeof window}function O(e){return R(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function N(e){var t;return null==(t=(R(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function R(e){return!!B()&&(e instanceof Node||e instanceof L(e).Node)}function I(e){return!!B()&&(e instanceof Element||e instanceof L(e).Element)}function $(e){return!!B()&&(e instanceof HTMLElement||e instanceof L(e).HTMLElement)}function z(e){return!!B()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}function H(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function j(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let P=/transform|translate|scale|rotate|perspective|filter/,_=/paint|layout|strict|content/,W=e=>!!e&&"none"!==e;function q(e){let t=I(e)?Y(e):e;return W(t.transform)||W(t.translate)||W(t.scale)||W(t.rotate)||W(t.perspective)||!J()&&(W(t.backdropFilter)||W(t.filter))||P.test(t.willChange||"")||_.test(t.contain||"")}function J(){return null==r&&(r="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function U(e){return/^(html|body|#document)$/.test(O(e))}function Y(e){return L(e).getComputedStyle(e)}function K(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function V(e){if("html"===O(e))return e;let t=e.assignedSlot||e.parentNode||z(e)&&e.host||N(e);return z(t)?t.host:t}function Z(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=V(t);return U(n)?(t.ownerDocument||t).body:$(n)&&H(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=L(i);if(!o)return t.concat(i,Z(i,[],n));{let e=G(l);return t.concat(l,l.visualViewport||[],H(i)?i:[],e&&n?Z(e):[])}}function G(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X(e){let t=Y(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=$(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,s=u(n)!==o||u(r)!==l;return s&&(n=o,r=l),{width:n,height:r,$:s}}function Q(e){return I(e)?e:e.contextElement}function ee(e){let t=Q(e);if(!$(t))return d(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=X(t),l=(o?u(n.width):n.width)/r,s=(o?u(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}let et=d(0);function en(e){let t=L(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:et}function er(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),l=Q(e),s=d(1);t&&(r?I(r)&&(s=ee(r)):s=ee(e));let a=(void 0===(i=n)&&(i=!1),r&&i&&r===L(l))?en(l):d(0),u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,h=o.width/s.x,p=o.height/s.y;if(l&&r){let e=L(l),t=I(r)?L(r):r,n=e,i=G(n);for(;i&&t!==n;){let e=ee(i),t=i.getBoundingClientRect(),r=Y(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,h*=e.x,p*=e.y,u+=o,c+=l,i=G(n=L(i))}}return E({width:h,height:p,x:u,y:c})}function ei(e,t){let n=K(e).scrollLeft;return t?t.left+n:er(N(e)).left+n}function eo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ei(e,n),y:n.top+t.scrollTop}}function el(e,t,n){let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");
12let r="layoutViewport"===n,i=L(e),o=N(e),l=i.visualViewport,s=o.clientWidth,a=o.clientHeight,u=0,c=0;if(l){let e=!J()||"fixed"===t;r?e||(u=-l.offsetLeft,c=-l.offsetTop):(s=l.width,a=l.height,e&&(u=l.offsetLeft,c=l.offsetTop))}if(0>=ei(o)){let e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-r),l="stable both-edges"===getComputedStyle(o).scrollbarGutter?i/2:i;l<=25&&(s-=l)}return{width:s,height:a,x:u,y:c}}(e,n,t);else if("document"===t)r=function(e){let t=K(e),n=e.ownerDocument.body,r=a(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=a(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),o=-t.scrollLeft+ei(e),l=-t.scrollTop;return"rtl"===Y(n).direction&&(o+=a(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:o,y:l}}(N(e));else if(I(t))r=function(e,t){let n=er(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=ee(e),l=e.clientWidth*o.x;return{width:l,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=en(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return E(r)}function es(e){return"static"===Y(e).position}function ea(e,t){if(!$(e)||"fixed"===Y(e).position)return null;if(t)return t(e);let n=e.offsetParent;return N(e)===n&&(n=n.ownerDocument.body),n}function eu(e,t){var n;let r=L(e);if(j(e))return r;if(!$(e)){let t=V(e);for(;t&&!U(t);){if(I(t)&&!es(t))return t;t=V(t)}return r}let i=ea(e,t);for(;i&&(n=i,/^(table|td|th)$/.test(O(n)))&&es(i);)i=ea(i,t);return i&&U(i)&&es(i)&&!q(i)?r:i||function(e){let t=V(e);for(;$(t)&&!U(t);){if(q(t))return t;if(j(t))break;t=V(t)}return null}(e)||r}let ec=async function(e){let t=this.getOffsetParent||eu,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=$(t),i=N(t),o="fixed"===n,l=er(e,!0,o,t),s={scrollLeft:0,scrollTop:0},a=d(0);if((r||!o)&&(("body"!==O(t)||H(i))&&(s=K(t)),r)){let e=er(t,!0,o,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}!r&&i&&(a.x=ei(i));let u=!i||r||o?d(0):eo(i,s);return{x:l.left+s.scrollLeft-a.x-u.x,y:l.top+s.scrollTop-a.y-u.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ed={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,l=N(r),s=!!t&&j(t.floating);if(r===l||s&&o)return n;let a={scrollLeft:0,scrollTop:0},u=d(1),c=d(0),h=$(r);if((h||!o)&&(("body"!==O(r)||H(l))&&(a=K(r)),h)){let e=er(r);u=ee(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let p=!l||h||o?d(0):eo(l,a);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-a.scrollTop*u.y+c.y+p.y}},getDocumentElement:N,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?j(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=Z(e,[],!1).filter(e=>I(e)&&"body"!==O(e)),i=null,o="fixed"===Y(e).position,l=o?V(e):e;for(;I(l)&&!U(l);){let e=Y(l),t=q(l),n=i?i.position:o?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==l),l=V(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=el(t,o[0],i),u=l.top,c=l.right,d=l.bottom,h=l.left;for(let e=1;e<o.length;e++){let n=el(t,o[e],i);u=a(n.top,u),c=s(n.right,c),d=s(n.bottom,d),h=a(n.left,h)}return{width:c-h,height:d-u,x:h,y:u}},getOffsetParent:eu,getElementRects:ec,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=X(e);return{width:t,height:n}},getScale:ee,isElement:I,isRTL:function(e){return"rtl"===Y(e).direction}};function eh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let ep=(e,t,n)=>{let r=new Map,i=null!=n?n:{},o={...ed,...i.platform,_c:r};return S(e,t,{...i,platform:o})};function ef(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:l,startOfLine:s,$position:a}=e,u=r&&!i,c=(0,o.Ov)(n),d=RegExp(`\\s${c}$`),h=s?"^":"",p=i?"":c,f=u?RegExp(`${h}${c}.*?(?=\\s${p}|$)`,"gm"):RegExp(`${h}(?:^)?${c}[^\\s${p}]*`,"gm"),m=(null===(t=a.nodeBefore)||void 0===t?void 0:t.isText)&&a.nodeBefore.text;if(!m)return null;let D=a.pos-m.length,g=Array.from(m.matchAll(f)).pop();if(!g||void 0===g.input||void 0===g.index)return null;let y=g.input.slice(Math.max(0,g.index-1),g.index),v=RegExp(`^[${null==l?void 0:l.join("")}\0]?$`).test(y);if(null!==l&&!v)return null;let b=D+g.index,w=b+g[0].length;return(u&&d.test(m.slice(w-1,w+1))&&(g[0]+=" ",w+=1),b<a.pos&&w>=a.pos)?{range:{from:b,to:w},query:g[0].slice(n.length),text:g[0]}:null}let em=new i.H$("suggestion");function eD({pluginKey:e=em,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:u=[" "],startOfLine:d=!1,decorationTag:h="span",decorationClass:E="suggestion",decorationContent:x="",decorationEmptyClass:A="is-empty",command:S=()=>null,items:M=()=>[],minQueryLength:B=0,debounce:O=0,initialItems:R,placement:I="bottom-start",offset:$={},container:z,flip:H=!0,floatingUi:j,dismissOnOutsideClick:P=!0,render:_=()=>({}),allow:W=()=>!0,findSuggestionMatch:q=ef,shouldShow:J,shouldResetDismissed:U}){let Y=null==_?void 0:_(),K=r&&!o,V=(n,r)=>{var i,o,l,s;return i=t,o=n,l=r,s=e,l?()=>{let e=s.getState(i.state),t=null==e?void 0:e.decorationId,n=o.dom.querySelector(`[data-decoration-id="${t}"]`);return(null==n?void 0:n.getBoundingClientRect())||null}:()=>{let e=i.state.selection.$anchor.pos,{top:t,right:n,bottom:r,left:o}=i.view.coordsAtPos(e);try{return new DOMRect(o,t,n-o,r-t)}catch{return null}}},G=t=>(function({view:e,pluginKeyRef:t}){let n=e.state.tr.setMeta(t,{exit:!0});e.dispatch(n)})({view:t,pluginKeyRef:e});return new i.Sy({key:e,view:()=>(function({editor:e,pluginKey:t,items:n,renderer:r,minQueryLength:i,debounce:o,initialItems:l,placement:u,offset:d,container:h,flip:E,floatingUi:x,dism
12issOnOutsideClick:A,command:S,clientRectFor:M,dispatchExit:B}){let O;let R=function({editor:e,items:t}){let n=null,r=null,i=null,o=()=>{null!==r&&(clearTimeout(r),r=null),null==i||i(),i=null},l=e=>new Promise(t=>{i=t,r=setTimeout(()=>{r=null;let e=i;i=null,null==e||e()},e)}),s=()=>{null==n||n.abort(),o(),n=null},a=async(r,i)=>{s();let o=n=new AbortController;if(i>0&&await l(i),n!==o||o.signal.aborted)return{status:"aborted"};try{let i=await t({editor:e,query:r,signal:o.signal});if(n!==o||o.signal.aborted)return{status:"aborted"};return{status:"resolved",items:i}}catch{if(n!==o||o.signal.aborted)return{status:"aborted"};return{status:"error"}}};return{abort:s,fetch:a}}({editor:e,items:n}),I=function({placement:e,offset:t,flip:n,floatingUi:r}){var i,o,l,s,a,u;let c=[{name:"offset",options:a={mainAxis:null!==(i=t.mainAxis)&&void 0!==i?i:4,crossAxis:null!==(o=t.crossAxis)&&void 0!==o?o:0},async fn(e){var t,n;let{x:r,y:i,placement:o,middlewareData:l}=e,s=await T(e,a);return o===(null==(t=l.offset)?void 0:t.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:o}}}}];return n&&c.push((void 0===u&&(u={}),{name:"flip",options:u,async fn(e){var t,n,r,i,o;let{placement:l,middlewareData:s,rects:a,initialPlacement:c,platform:d,elements:h}=e,{mainAxis:E=!0,crossAxis:x=!0,fallbackPlacements:A,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:T=!0,...B}=p(u,e);if(null!=(t=s.arrow)&&t.alignmentOffset)return{};let O=f(l),L=g(c),N=f(c)===c,R=await (null==d.isRTL?void 0:d.isRTL(h.floating)),I=A||(N||!T?[F(c)]:function(e){let t=F(e);return[v(e),t,v(t)]}(c)),$="none"!==M;!A&&$&&I.push(...function(e,t,n,r){let i=m(e),o=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?w:b;return t?b:w;case"left":case"right":return t?C:k;default:return[]}}(f(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(v)))),o}(c,T,M,R));let z=[c,...I],H=await d.detectOverflow(e,B),j=[],P=(null==(n=s.flip)?void 0:n.overflows)||[];if(E&&j.push(H[O]),x){let e=function(e,t,n){void 0===n&&(n=!1);let r=m(e),i=y(e),o=D(i),l="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=F(l)),[l,F(l)]}(l,a,R);j.push(H[e[0]],H[e[1]])}if(P=[...P,{placement:l,overflows:j}],!j.every(e=>e<=0)){let e=((null==(r=s.flip)?void 0:r.index)||0)+1,t=z[e];if(t&&(!("alignment"===x&&L!==g(t))||P.every(e=>g(e.placement)!==L||e.overflows[0]>0)))return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(i=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(S){case"bestFit":{let e=null==(o=P.filter(e=>{if($){let t=g(e.placement);return t===L||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=c}if(l!==n)return{reset:{placement:n}}}return{}}})),(null==r||null===(l=r.middleware)||void 0===l?void 0:l.length)&&c.push(...r.middleware),{placement:e,strategy:null!==(s=null==r?void 0:r.strategy)&&void 0!==s?s:"absolute",middleware:c}}({placement:u,offset:d,flip:E,floatingUi:x});function $(e,t){var n,i,o;switch(e){case"started":null==r||null===(n=r.onStart)||void 0===n||n.call(r,t);break;case"updated":null==r||null===(i=r.onUpdate)||void 0===i||i.call(r,t);break;case"stopped":null==r||null===(o=r.onExit)||void 0===o||o.call(r,t)}}return{update:async(n,p)=>{var f,m,D,g;let y=t.getState(p),v=t.getState(n.state);if(!y||!v)return;let b=null,w=y.query!==v.query,C=y.text!==v.text,k=y.range.from!==v.range.from||y.range.to!==v.range.to;if(!y.active&&v.active)b="started";else if(y.active&&!v.active)b="stopped";else{if(!v.active||!w&&!C&&!k)return;b="updated"}let F="stopped"===b?y:v,x=n.dom.querySelector(`[data-decoration-id="${F.decorationId}"]`),T=M(n,x),z=0===i||!!F.query&&F.query.length>=i,H=("started"===b||"updated"===b)&&z;if(O={editor:e,range:F.range,query:F.query||"",text:F.text||"",items:null!=l?l:[],command:t=>S({editor:e,range:F.range,props:t}),decorationNode:x,clientRect:T,loading:H,placement:u,offset:{mainAxis:null!==(f=d.mainAxis)&&void 0!==f?f:4,crossAxis:null!==(m=d.crossAxis)&&void 0!==m?m:0},container:h,flip:E,floatingUi:I,mount:function({getReferenceRect:e,contextElement:t,config:n,container:r,dismissOnOutsideClick:i,dismiss:o}){return(l,u={})=>{let d;let h={getBoundingClientRect:()=>{var t;return null!==(t=e())&&void 0!==t?t:new DOMRect},contextElement:t},p=!1,f=!l.isConnected;f&&(function(e){if(e instanceof HTMLElement)return e;if("string"==typeof e)try{let t=document.querySelector(e);
12if(t)return t}catch{}return document.body})(r).appendChild(l),u.onPosition||(l.style.visibility="hidden",l.style.width="max-content");let m=function(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:h=!1}=r,p=Q(e),f=o||l?[...p?Z(p):[],...t?Z(t):[]]:[];f.forEach(e=>{o&&e.addEventListener("scroll",n),l&&e.addEventListener("resize",n)});let m=p&&d?function(e,t,n){let r,i=null,o=N(e);function l(){var e;clearTimeout(r),null==(e=i)||e.disconnect(),i=null}function u(n,d){void 0===n&&(n=!1),void 0===d&&(d=1),l();let h=e.getBoundingClientRect(),{left:p,top:f,width:m,height:D}=h;if(n||t(),!m||!D)return;let g=c(f),y=c(o.clientWidth-(p+m)),v={rootMargin:-g+"px "+-y+"px "+-c(o.clientHeight-(f+D))+"px "+-c(p)+"px",threshold:a(0,s(1,d))||1},b=!0;function w(t){let n=t[0].intersectionRatio;if(!eh(h,e.getBoundingClientRect()))return u();if(n!==d){if(!b)return u();n?u(!1,n):r=setTimeout(()=>{u(!1,1e-7)},1e3)}b=!1}try{i=new IntersectionObserver(w,{...v,root:o.ownerDocument})}catch(e){i=new IntersectionObserver(w,v)}i.observe(e)}let d=L(e),h=()=>u(n);return d.addEventListener("resize",h),u(!0),()=>{d.removeEventListener("resize",h),l()}}(p,n,l):null,D=-1,g=null;u&&(g=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&g&&t&&(g.unobserve(t),cancelAnimationFrame(D),D=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),p&&!h&&g.observe(p),t&&g.observe(t));let y=h?er(e):null;return h&&function t(){let r=er(e);y&&!eh(y,r)&&n(),y=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{o&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=g)||e.disconnect(),g=null,h&&cancelAnimationFrame(i)}}(h,l,()=>{ep(h,l,{placement:n.placement,strategy:n.strategy,middleware:n.middleware}).then(({x:e,y:t,placement:n,strategy:r})=>{if(u.onPosition){u.onPosition({x:e,y:t,placement:n,strategy:r});return}Object.assign(l.style,{position:r,left:`${e}px`,top:`${t}px`}),p||(p=!0,l.style.visibility="")})},u.autoUpdate);return i&&(d=e=>{let n=e.target;!(n instanceof Node)||l.contains(n)||t.contains(n)||o()},document.addEventListener("pointerdown",d,!0)),()=>{m(),d&&document.removeEventListener("pointerdown",d,!0),f&&l.remove()}}}({getReferenceRect:T,contextElement:n.dom,config:I,container:h,dismissOnOutsideClick:A,dismiss:()=>B(e.view)})},"started"===b&&(null==r||null===(D=r.onBeforeStart)||void 0===D||D.call(r,O)),"updated"===b&&(null==r||null===(g=r.onBeforeUpdate)||void 0===g||g.call(r,O)),"started"===b&&$(b,O),"started"===b||"updated"===b){if(H){$(b="updated",O={...O,items:null!=l?l:[],loading:!0});let e=await R.fetch(F.query||"",o);if("aborted"===e.status)return;let r=t.getState(n.state);if(!(null==r?void 0:r.active)){R.abort();return}O="resolved"===e.status?{...O,items:e.items,loading:!1}:{...O,loading:!1}}else R.abort(),O={...O,items:null!=l?l:[],loading:!1}}if("stopped"===b){R.abort(),$(b,O),O=void 0;return}"updated"===b&&$(b,O)},destroy:()=>{var e;R.abort(),O&&(null==r||null===(e=r.onExit)||void 0===e||e.call(r,O))}}})({editor:t,pluginKey:e,items:M,renderer:Y,minQueryLength:B,debounce:O,initialItems:R,placement:I,offset:$,container:z,flip:H,floatingUi:j,dismissOnOutsideClick:P,command:S,clientRectFor:V,dispatchExit:G}),state:function({editor:e,char:t,effectiveAllowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:o,findSuggestionMatch:l,allow:s,shouldShow:a,shouldKeepDismissed:u,pluginKey:c}){return{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}),apply(d,h,p,f){let{isEditable:m}=e,{composing:D}=e.view,{selection:g}=d,{empty:y,from:v}=g,b={...h},w=d.getMeta(c);if(w&&w.exit)return b.active=!1,b.decorationId=null,b.range={from:0,to:0},b.query=null,b.text=null,b.dismissedRange=h.active?{...h.range}:h.dismissedRange,b;if(b.composing=D,d.docChanged&&null!==b.dismissedRange&&(b.dismissedRange={from:d.mapping.map(b.dismissedRange.from),to:d.mapping.map(b.dismissedRange.to)}),m&&(y||e.view.composing)){(v<h.range.from||v>h.range.to)&&!D&&!h.composing&&(b.active=!1);let c=l({char:t,allowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:o,$position:g.$from}),p=`id_${Math.floor(4294967295*Math.random())}`;c&&s({editor:e,state:f,range:c.range,isActive:h.active})&&(!a||a({editor:e,range:c.range,query:c.query,text:c.text,transaction:d}))?(null===b.dismissedRange||u({match:c,dismissedRange:b.dismissedRange,state:f,transaction:d})||(b.dismissedRange=null),null===b.dismissedRange?(b.active=!0,b.decorationId=h.decorationId||p,b.range=c.range,b.query=c.query,b.text=c.text):b.active=!1):(c||(b.dismissedRange=null),b.active=!1)}else b.active=!1;return b.active||(b.decorationId=null,b.range={from:0,to:0},b.query=null,b.text=null),b}}
12}({editor:t,char:n,effectiveAllowSpaces:K,allowToIncludeChar:o,allowedPrefixes:u,startOfLine:d,findSuggestionMatch:q,allow:W,shouldShow:J,shouldKeepDismissed:function(e){return function({match:e,dismissedRange:t,state:n,transaction:r,editor:i,shouldResetDismissed:o,effectiveAllowSpaces:l}){return(null==o||!o({editor:i,state:n,range:t,match:e,transaction:r,allowSpaces:l}))&&(l?e.range.from===t.from:e.range.from===t.from&&!(r.docChanged&&r.steps.some(e=>{let t=e.slice;if(!(null==t?void 0:t.content))return!1;let n=t.content.textBetween(0,t.content.size,"\n");return/\s/.test(n)})))}({...e,editor:t,shouldResetDismissed:U,effectiveAllowSpaces:K})},pluginKey:e}),props:function({pluginKey:e,decorationTag:t,decorationClass:n,decorationContent:r,decorationEmptyClass:i,renderer:o,dispatchExit:s}){return{handleKeyDown(t,n){var r,i;let l=e.getState(t.state);return!!l.active&&("Escape"===n.key||"Esc"===n.key?(null==o||null===(i=o.onKeyDown)||void 0===i||i.call(o,{view:t,event:n,range:l.range}),s(t),!0):(null==o||null===(r=o.onKeyDown)||void 0===r?void 0:r.call(o,{view:t,event:n,range:l.range}))||!1)},decorations(o){let{active:s,range:a,decorationId:u,query:c}=e.getState(o);if(!s)return null;let d=!(null==c?void 0:c.length),h=[n];return d&&h.push(i),l.EH.create(o.doc,[l.p.inline(a.from,a.to,{nodeName:t,class:h.join(" "),"data-decoration-id":u||void 0,"data-decoration-content":r})])}}}({pluginKey:e,decorationTag:h,decorationClass:E,decorationContent:x,decorationEmptyClass:A,renderer:Y,dispatchExit:G})})}},74125:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(2265);/**
13 * @license lucide-react v1.49.0 - ISC
14 *
15 * This source code is licensed under the ISC license.
16 * See the LICENSE file in the root directory of this source tree.
17 */let i=e=>null==e?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=e=>{let t="",n=!1;for(let r of e){if("-"===r||"_"===r||r<=" "){n=t.length>0;continue}0===t.length?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},l=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)},s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()},a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},u=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},c=(0,r.createContext)({}),d=()=>(0,r.useContext)(c),h=(0,r.forwardRef)((e,t)=>{var n,i,o;let{color:l,size:c,width:h,height:p,strokeWidth:f,absoluteStrokeWidth:m,nonScalingStroke:D,className:g="",children:y,iconNode:v=[],icon:b={node:v,aliases:[],size:24},...w}=e,{size:C=24,strokeWidth:k=2,absoluteStrokeWidth:F=!1,nonScalingStroke:E=!1,color:x="currentColor",className:A=""}=null!==(n=d())&&void 0!==n?n:{},S=!!y||u(w),[M,T,B=[]]=/**
18 * @license lucide-react v1.49.0 - ISC
19 *
20 * This source code is licensed under the ISC license.
21 * See the LICENSE file in the root directory of this source tree.
22 */function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){var t,n,r,i,o,l,u,c,d,h,p,f,m,D,g;let y=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},v=null!==(r=y.attributeNames)&&void 0!==r?r:{},b=e=>{var t;return null!==(t=v[e])&&void 0!==t?t:e},w=null!==(o=null!==(i=e.size)&&void 0!==i?i:e.width)&&void 0!==o?o:a.width,C=null!==(u=null!==(l=e.size)&&void 0!==l?l:e.height)&&void 0!==u?u:a.height,k=null!==(c=null===(t=e.aliases)||void 0===t?void 0:t.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>"lucide-".concat(e)))&&void 0!==c?c:[],F=[...e.name?["lucide-".concat(e.name)]:[],...k],E=null!==(d=null===(n=y.className)||void 0===n?void 0:n.split(" ").filter(Boolean))&&void 0!==d?d:[],x=!1===y.includeDefaultClasses?s(...E):s("lucide",...F,...E),A=y.absoluteStrokeWidth?Number(null!==(h=y.strokeWidth)&&void 0!==h?h:a["stroke-width"])*Number(null!==(f=null!==(p=e.size)&&void 0!==p?p:e.width)&&void 0!==f?f:a.width)/Number(null!==(D=null!==(m=y.size)&&void 0!==m?m:y.width)&&void 0!==D?D:a.width):null!==(g=y.strokeWidth)&&void 0!==g?g:a["stroke-width"];return["svg",{...Object.entries(a).reduce((e,t)=>
22{let[n,r]=t;return e[b(n)]=r,e},{}),..."color"in y&&y.color&&{[b("stroke")]:y.color},..."size"in y&&null!=y.size&&{[b("width")]:y.size,[b("height")]:y.size},..."width"in y&&null!=y.width&&{[b("width")]:y.width},..."height"in y&&null!=y.height&&{[b("height")]:y.height},[b("stroke-width")]:A,...x&&{[b("class")]:x},[b("viewBox")]:"0 0 ".concat(w," ").concat(C),...!1===y.hasA11yProp?{[b("aria-hidden")]:"true"}:{},..."attributes"in y&&y.attributes},e.node.map(e=>{let[t,n,r]=e,i=y.nonScalingStroke?{[b("vector-effect")]:"non-scaling-stroke",...n}:n;return r?[t,i,r]:[t,i]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(b,{color:null!=l?l:x,width:null!==(i=null!=h?h:c)&&void 0!==i?i:C,height:null!==(o=null!=p?p:c)&&void 0!==o?o:C,strokeWidth:null!=f?f:k,absoluteStrokeWidth:null!=m?m:F,nonScalingStroke:null!=D?D:E,className:s(A,g),hasA11yProp:S,attributes:w});return(0,r.createElement)(M,{ref:t,...T},[...B.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(y)?y:[y]])});/**
23 * @license lucide-react v1.49.0 - ISC
24 *
25 * This source code is licensed under the ISC license.
26 * See the LICENSE file in the root directory of this source tree.
27 */function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o="string"==typeof e?/**
28 * @license lucide-react v1.49.0 - ISC
29 *
30 * This source code is licensed under the ISC license.
31 * See the LICENSE file in the root directory of this source tree.
32 */function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:i(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}(e,t,n):e,s=(0,r.forwardRef)((e,t)=>{let{className:n,...i}=e;return(0,r.createElement)(h,{ref:t,icon:o,className:n,...i})});return o.name&&(s.displayName=l(o.name)),s}},28869:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
33 * @license lucide-react v1.49.0 - ISC
34 *
35 * This source code is licensed under the ISC license.
36 * See the LICENSE file in the root directory of this source tree.
37 */let i={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};i.node;let o=(0,r.Z)(i)},70919:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
38 * @license lucide-react v1.49.0 - ISC
39 *
40 * This source code is licensed under the ISC license.
41 * See the LICENSE file in the root directory of this source tree.
42 */let i={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};i.node;let o=(0,r.Z)(i)},99395:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
43 * @license lucide-react v1.49.0 - ISC
44 *
45 * This source code is licensed under the ISC license.
46 * See the LICENSE file in the root directory of this source tree.
47 */let i={name:"calendar-check",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]};i.node;let o=(0,r.Z)(i)},95908:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
48 * @license lucide-react v1.49.0 - ISC
49 *
50 * This source code is licensed under the ISC license.
51 * See the LICENSE file in the root directory of this source tree.
52 */let i={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};i.node;let o=(0,r.Z)(i)},64374:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
53 * @license lucide-react v1.49.0 - ISC
54 *
55 * This source code is licensed under the ISC license.
56 * See the LICENSE file in the root directory of this source tree.
57 */let i={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};i.node;let o=(0,r.Z)(i)},74602:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
58 * @license lucide-react v1.49.0 - ISC
59 *
60 * This source code is licensed under the ISC license.
61 * See the LICENSE file in the root directory of this source tree.
62 */let i={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};i.node;let o=(0,r.Z)(i)},1172:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
63 * @license lucide-react v1.49.0 - ISC
64 *
65 * This source code is licensed under the ISC license.
66 * See the LICENSE file in the root directory of this source tree.
67 */let i={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};i.node;let o=(0,r.Z)(i)},49346:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
68 * @license lucide-react v1.49.0 - ISC
69 *
70 * This source code is licensed under the ISC license.
71 * See the LICENSE file in the root directory of this source tree.
72 */let i={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};i.node;let o=(0,r.Z)(i)},65106:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
73 * @license lucide-react v1.49.0 - ISC
74 *
75 * This source code is licensed under the ISC license.
76 * See the LICENSE file in the root directory of this source tree.
77 */let i={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};i.node;let o=(0,r.Z)(i)},25545:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
78 * @license lucide-react v1.49.0 - ISC
79 *
80 * This source code is licensed under the ISC license.
81 * See the LICENSE file in the root directory of this source tree.
82 */let i={name:"credit-card",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}],["path",{d:"M6 14h2",key:"mk7k0u"}]]};i.node;let o=(0,r.Z)(i)},43330:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
83 * @license lucide-react v1.49.0 - ISC
84 *
85 * This source code is licensed under the ISC license.
86 * See the LICENSE file in the root directory of this source tree.
87 */let i={name:"house",size:24,node:[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],aliases:["home"]};i.node;let o=(0,r.Z)(i)},41996:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
88 * @license lucide-react v1.49.0 - ISC
89 *
90 * This source code is licensed under the ISC license.
91 * See the LICENSE file in the root directory of this source tree.
92 */let i={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};i.node;let o=(0,r.Z)(i)},91663:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
93 * @license lucide-react v1.49.0 - ISC
94 *
95 * This source code is licensed under the ISC license.
96 * See the LICENSE file in the root directory of this source tree.
97 */let i={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};i.node;let o=(0,r.Z)(i)},92383:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
98 * @license lucide-react v1.49.0 - ISC
99 *
100 * This source code is licensed under the ISC license.
101 * See the LICENSE file in the root directory of this source tree.
102 */let i={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};i.node;let o=(0,r.Z)(i)},67859:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
103 * @license lucide-react v1.49.0 - ISC
104 *
105 * This source code is licensed under the ISC license.
106 * See the LICENSE file in the root directory of this source tree.
107 */let i={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};i.node;let o=(0,r.Z)(i)},45185:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
108 * @license lucide-react v1.49.0 - ISC
109 *
110 * This source code is licensed under the ISC license.
111 * See the LICENSE file in the root directory of this source tree.
112 */let i={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};i.node;let o=(0,r.Z)(i)},15085:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
113 * @license lucide-react v1.49.0 - ISC
114 *
115 * This source code is licensed under the ISC license.
116 * See the LICENSE file in the root directory of this source tree.
117 */let i={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};i.node;let o=(0,r.Z)(i)}
117,14436:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
118 * @license lucide-react v1.49.0 - ISC
119 *
120 * This source code is licensed under the ISC license.
121 * See the LICENSE file in the root directory of this source tree.
122 */let i={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};i.node;let o=(0,r.Z)(i)},89430:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
123 * @license lucide-react v1.49.0 - ISC
124 *
125 * This source code is licensed under the ISC license.
126 * See the LICENSE file in the root directory of this source tree.
127 */let i={name:"pause",size:24,node:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]};i.node;let o=(0,r.Z)(i)},71555:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
128 * @license lucide-react v1.49.0 - ISC
129 *
130 * This source code is licensed under the ISC license.
131 * See the LICENSE file in the root directory of this source tree.
132 */let i={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};i.node;let o=(0,r.Z)(i)},45925:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
133 * @license lucide-react v1.49.0 - ISC
134 *
135 * This source code is licensed under the ISC license.
136 * See the LICENSE file in the root directory of this source tree.
137 */let i={name:"phone",size:24,node:[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]};i.node;let o=(0,r.Z)(i)},53592:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
138 * @license lucide-react v1.49.0 - ISC
139 *
140 * This source code is licensed under the ISC license.
141 * See the LICENSE file in the root directory of this source tree.
142 */let i={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};i.node;let o=(0,r.Z)(i)},5388:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
143 * @license lucide-react v1.49.0 - ISC
144 *
145 * This source code is licensed under the ISC license.
146 * See the LICENSE file in the root directory of this source tree.
147 */let i={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};i.node;let o=(0,r.Z)(i)},38978:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
148 * @license lucide-react v1.49.0 - ISC
149 *
150 * This source code is licensed under the ISC license.
151 * See the LICENSE file in the root directory of this source tree.
152 */let i={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};i.node;let o=(0,r.Z)(i)},47104:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
153 * @license lucide-react v1.49.0 - ISC
154 *
155 * This source code is licensed under the ISC license.
156 * See the LICENSE file in the root directory of this source tree.
157 */let i={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};i.node;let o=(0,r.Z)(i)},10341:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
158 * @license lucide-react v1.49.0 - ISC
159 *
160 * This source code is licensed under the ISC license.
161 * See the LICENSE file in the root directory of this source tree.
162 */let i={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};i.node;let o=(0,r.Z)(i)},57360:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
163 * @license lucide-react v1.49.0 - ISC
164 *
165 * This source code is licensed under the ISC license.
166 * See the LICENSE file in the root directory of this source tree.
167 */let i={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};i.node;let o=(0,r.Z)(i)},45475:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
168 * @license lucide-react v1.49.0 - ISC
169 *
170 * This source code is licensed under the ISC license.
171 * See the LICENSE file in the root directory of this source tree.
172 */let i={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.
172172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};i.node;let o=(0,r.Z)(i)},77018:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
173 * @license lucide-react v1.49.0 - ISC
174 *
175 * This source code is licensed under the ISC license.
176 * See the LICENSE file in the root directory of this source tree.
177 */let i={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};i.node;let o=(0,r.Z)(i)},83627:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
178 * @license lucide-react v1.49.0 - ISC
179 *
180 * This source code is licensed under the ISC license.
181 * See the LICENSE file in the root directory of this source tree.
182 */let i={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};i.node;let o=(0,r.Z)(i)},870:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
183 * @license lucide-react v1.49.0 - ISC
184 *
185 * This source code is licensed under the ISC license.
186 * See the LICENSE file in the root directory of this source tree.
187 */let i={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};i.node;let o=(0,r.Z)(i)},42508:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(74125);/**
188 * @license lucide-react v1.49.0 - ISC
189 *
190 * This source code is licensed under the ISC license.
191 * See the LICENSE file in the root directory of this source tree.
192 */let i={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};i.node;let o=(0,r.Z)(i)},68612:function(e,t,n){n.d(t,{Ig:function(){return b},MI:function(){return v},N0:function(){return A},QK:function(){return C},U9:function(){return T},X0:function(){return x},Y_:function(){return D},_M:function(){return p},al:function(){return a},cR:function(){return c},mD:function(){return E},nw:function(){return B},o:function(){return g},rr:function(){return u},uJ:function(){return L},uo:function(){return F},xb:function(){return w},ym:function(){return O}});var r=n(42639),i=n(57870),o=n(82804);let l=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function s(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let a=(e,t,n)=>{let l=s(e,n);if(!l)return!1;let a=f(l);if(!a){let n=l.blockRange(),i=n&&(0,r.k9)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let u=a.nodeBefore;if(S(e,a,t,-1))return!0;if(0==l.parent.content.size&&(h(u,"end")||o.qv.isSelectable(u)))for(let n=l.depth;;n--){let s=(0,r.dR)(e.doc,l.before(n),l.after(n),i.p2.empty);if(s&&s.slice.size<s.to-s.from){if(t){let n=e.tr.step(s);n.setSelection(h(u,"end")?o.Y1.findFrom(n.doc.resolve(n.mapping.map(a.pos,-1)),-1):o.qv.create(n.doc,a.pos-u.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||l.node(n-1).childCount>1)break}return!!u.isAtom&&a.depth==l.depth-1&&(t&&t(e.tr.delete(a.pos-u.nodeSize,a.pos).scrollIntoView()),!0)},u=(e,t,n)=>{let r=s(e,n);if(!r)return!1;let i=f(r);return!!i&&d(e,i,t)},c=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let i=y(r);return!!i&&d(e,i,t)};function d(e,t,n){let l=t.nodeBefore,s=t.pos-1;for(;!l.isTextblock;s--){if(l.type.spec.isolating)return!1;let e=l.lastChild;if(!e)return!1;l=e}let a=t.nodeAfter,u=t.pos+1;for(;!a.isTextblock;u++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let c=(0,r.dR)(e.doc,s,u,i.p2.empty);if(!c||c.from!=s||c instanceof r.Pu&&c.slice.size>=u-s)return!1;if(n){let t=e.tr.step(c);t.setSelection(o.Bs.create(t.doc,s)),n(t.scrollIntoView())}return!0}function h(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;
192if(n&&1!=r.childCount)break}return!1}let p=(e,t,n)=>{let{$head:r,empty:i}=e.selection,l=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;l=f(r)}let s=l&&l.nodeBefore;return!!(s&&o.qv.isSelectable(s))&&(t&&t(e.tr.setSelection(o.qv.create(e.doc,l.pos-s.nodeSize)).scrollIntoView()),!0)};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function m(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let D=(e,t,n)=>{let l=m(e,n);if(!l)return!1;let s=y(l);if(!s)return!1;let a=s.nodeAfter;if(S(e,s,t,1))return!0;if(0==l.parent.content.size&&(h(a,"start")||o.qv.isSelectable(a))){let n=(0,r.dR)(e.doc,l.before(),l.after(),i.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(h(a,"start")?o.Y1.findFrom(r.doc.resolve(r.mapping.map(s.pos)),1):o.qv.create(r.doc,r.mapping.map(s.pos))),t(r.scrollIntoView())}return!0}}return!!a.isAtom&&s.depth==l.depth-1&&(t&&t(e.tr.delete(s.pos,s.pos+a.nodeSize).scrollIntoView()),!0)},g=(e,t,n)=>{let{$head:r,empty:i}=e.selection,l=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;l=y(r)}let s=l&&l.nodeAfter;return!!(s&&o.qv.isSelectable(s))&&(t&&t(e.tr.setSelection(o.qv.create(e.doc,l.pos)).scrollIntoView()),!0)};function y(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let v=(e,t)=>{let n=e.selection,i=n instanceof o.qv,l;if(i){if(n.node.isTextblock||!(0,r.Mn)(e.doc,n.from))return!1;l=n.from}else if(null==(l=(0,r.GJ)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(l);i&&n.setSelection(o.qv.create(n.doc,l-e.doc.resolve(l).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},b=(e,t)=>{let n=e.selection,i;if(n instanceof o.qv){if(n.node.isTextblock||!(0,r.Mn)(e.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.GJ)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},w=(e,t)=>{let{$from:n,$to:i}=e.selection,o=n.blockRange(i),l=o&&(0,r.k9)(o);return null!=l&&(t&&t(e.tr.lift(o,l).scrollIntoView()),!0)},C=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!(n.parent.type.spec.code&&n.sameParent(r))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function k(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let F=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),l=n.indexAfter(-1),s=k(i.contentMatchAt(l));if(!s||!i.canReplaceWith(l,l,s))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,s.createAndFill());i.setSelection(o.Y1.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},E=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof o.C1||r.parent.inlineContent||i.parent.inlineContent)return!1;let l=k(i.parent.contentMatchAt(i.indexAfter()));if(!l||!l.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=e.tr.insert(n,l.createAndFill());s.setSelection(o.Bs.create(s.doc,n+1)),t(s.scrollIntoView())}return!0},x=(e,t)=>{let{$cursor:n}=e.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)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),o=i&&(0,r.k9)(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},A=(e,t)=>{let{$from:n,to:r}=e.selection,i,l=n.sharedDepth(r);return 0!=l&&(i=n.before(l),t&&t(e.tr.setSelection(o.qv.create(e.doc,i))),!0)};function S(e,t,n,l){let s,a,u,c=t.nodeBefore,d=t.nodeAfter,p,f,m=c.type.spec.isolating||d.type.spec.isolating;if(!m&&(s=t.nodeBefore,a=t.nodeAfter,u=t.index(),s&&a&&s.type.compatibleContent(a.type)&&(!s.content.size&&t.parent.canReplace(u-1,u)?(n&&n(e.tr.delete(t.pos-s.nodeSize,t.pos).scrollIntoView()),!0):!!(t.parent.canReplace(u,u+1)&&(a.isTextblock||(0,r.Mn)(e.doc,t.pos)))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let D=!m&&t.parent.canReplace(t.index(),t.index()+1);if(D&&(p=(f=c.contentMatchAt(c.childCount)).findWrapping(d.type))&&f.matchType(p[0]||d.type).validEnd){if(n){let o=t.pos+d.nodeSize,l=i.HY.empty;for(let e=p.length-1;e>=0;e--)l=i.HY.from(p[e].create(null,l));l=i.HY.from(c.copy(l));let s=e.tr.step(new r.FC(t.pos-1,o,t.pos,o,new i.p2(l,1,0),p.length,!0)),a=s.doc.resolve(o+2*p.length);a.nodeAfter&&a.nodeAfter.type==c.type&&(0,r.Mn)(s.doc,a.pos)&&s.join(a.pos),n(s.scrollIntoView())}return!0}let g=d.type.spec.isolating||l>0&&m?null:o.Y1.findFrom(t,1),y=g&&g.$from.blockRange(g.$to),v=y&&(0,r.k9)(y);if(null!=v&&v>=t.depth)return n&&n(e.tr.lift(y,v).scrollIntoView()),!0;if(D&&h(d,"start",!0)&&h(c,"end")){let o=c,l=[];for(;l.push(o),!o.isTextblock;)o=o.lastChild;let s=d,a=1;for(;!s.isTextblock;s=s.firstChild)a++;
192if(o.canReplace(o.childCount,o.childCount,s.content)){if(n){let o=i.HY.empty;for(let e=l.length-1;e>=0;e--)o=i.HY.from(l[e].copy(o));n(e.tr.step(new r.FC(t.pos-l.length,t.pos+d.nodeSize,t.pos+a,t.pos+d.nodeSize-a,new i.p2(o,l.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function M(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,l=i.depth;for(;i.node(l).isInline;){if(!l)return!1;l--}return!!i.node(l).isTextblock&&(n&&n(t.tr.setSelection(o.Bs.create(t.doc,e<0?i.start(l):i.end(l)))),!0)}}let T=M(-1),B=M(1);function O(e,t=null){return function(n,i){let{$from:o,$to:l}=n.selection,s=o.blockRange(l),a=s&&(0,r.nd)(s,e,t);return!!a&&(i&&i(n.tr.wrap(s,a).scrollIntoView()),!0)}}function L(e,t=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:l}}=n.selection.ranges[r];n.doc.nodesBetween(o,l,(r,o)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t))){if(r.type==e)i=!0;else{let t=n.doc.resolve(o),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}}})}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:l}}=n.selection.ranges[r];i.setBlockType(o,l,e,t)}r(i.scrollIntoView())}return!0}}function N(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let R=N(l,a,p),I=N(l,D,g),$={Enter:N(C,E,x,(e,t)=>{if(e.selection instanceof o.qv&&e.selection.node.isBlock){let{$from:n}=e.selection;return!!(n.parentOffset&&(0,r.Ax)(e.doc,n.pos))&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0)}if(!e.selection.$from.depth)return!1;let n=e.tr;!e.selection.empty&&(e.selection instanceof o.Bs||e.selection instanceof o.C1)&&n.deleteSelection();let{$from:i}=n.selection,l=n.steps.length,s=[],a,u,c=!1,d=!1;for(let e=i.depth;;e--){if(i.node(e).isBlock){let t;c=i.end(e)==i.pos+(i.depth-e),d=i.start(e)==i.pos-(i.depth-e),u=k(i.node(e-1).contentMatchAt(i.indexAfter(e-1))),s.unshift(t||(c&&u?{type:u}:null)),a=e;break}if(1==e)return!1;s.unshift(null)}let h=i.pos,p=(0,r.Ax)(n.doc,h,s.length,s);if(p||(s[0]=u?{type:u}:null,p=(0,r.Ax)(n.doc,h,s.length,s)),!p)return!1;if(n.split(h,s.length,s),!c&&d&&i.node(a).type!=u){let e=n.mapping.slice(l),t=e.map(i.before(a)),r=n.doc.resolve(t);u&&i.node(a-1).canReplaceWith(r.index(),r.index()+1,u)&&n.setNodeMarkup(e.map(i.before(a)),u)}return t&&t(n.scrollIntoView()),!0}),"Mod-Enter":F,Backspace:R,"Mod-Backspace":R,"Shift-Backspace":R,Delete:I,"Mod-Delete":I,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new o.C1(e.doc))),!0)},z={"Ctrl-h":$.Backspace,"Alt-Backspace":$["Mod-Backspace"],"Ctrl-d":$.Delete,"Ctrl-Alt-Backspace":$["Mod-Delete"],"Alt-Delete":$["Mod-Delete"],"Alt-d":$["Mod-Delete"],"Ctrl-a":T,"Ctrl-e":B};for(let e in $)z[e]=$[e];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},3078:function(e,t,n){n.d(t,{$:function(){return f},h:function(){return p}});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),l="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),s=0;s<10;s++)r[48+s]=r[96+s]=String(s);for(var s=1;s<=24;s++)r[s+111]="F"+s;for(var s=65;s<=90;s++)r[s]=String.fromCharCode(s+32),i[s]=String.fromCharCode(s);for(var a in r)i.hasOwnProperty(a)||(i[a]=r[a]);var u=n(82804);let c="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),d="undefined"!=typeof navigator&&/Win/.test(navigator.platform);
vendor: 4,588 bytes, line 192
192function h(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function p(e){return new u.Sy({props:{handleKeyDown:f(e)}})}function f(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,o=e.split(/-(?!$)/),l=o[o.length-1];"Space"==l&&(l=" ");for(let e=0;e<o.length-1;e++){let l=o[e];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else if(/^mod$/i.test(l))c?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+l)}return t&&(l="Alt-"+l),n&&(l="Ctrl-"+l),i&&(l="Meta-"+l),r&&(l="Shift-"+l),l}(n)]=e[n];return t}(e);return function(e,n){var s;let a=("Esc"==(s=!(o&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||l&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?i:r)[n.keyCode]||n.key||"Unidentified")&&(s="Escape"),"Del"==s&&(s="Delete"),"Left"==s&&(s="ArrowLeft"),"Up"==s&&(s="ArrowUp"),"Right"==s&&(s="ArrowRight"),"Down"==s&&(s="ArrowDown"),s),u,c=t[h(a,n)];if(c&&c(e.state,e.dispatch,e))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=t[h(a,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(d&&n.ctrlKey&&n.altKey)&&(u=r[n.keyCode])&&u!=a){let r=t[h(u,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},57870:function(e,t,n){function r(e){this.content=e}function i(e){return e>=56320&&e<57344}function o(e){return e>=55296&&e<56320}n.d(t,{aw:function(){return _},PW:function(){return G},HY:function(){return l},vc:function(){return c},ZU:function(){return H},NB:function(){return E},Ts:function(){return k},e4:function(){return d},V_:function(){return j},p2:function(){return h}}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,o=i.find(e),l=i.content.slice();return -1==o?l.push(n||e,t):(l[o+1]=t,n&&(l[o]=n)),new r(l)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),o=i.content.slice(),l=i.find(e);return o.splice(-1==l?o.length:l,0,t,n),new r(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};class l{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let o=0,l=0;l<t;o++){let s=this.content[o],a=l+s.nodeSize;if(a>e&&!1!==n(s,r+l,i||null,o)&&s.content.size){let i=l+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}l=a}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(l,s)=>{let a=l.isText?l.text.slice(Math.max(e,s)-s,t-s):l.isLeaf?r?"function"==typeof r?r(l):r:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&a||l.isTextblock)&&n&&(o?o=!1:i+=n),i+=a},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new l(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],s=o+l.nodeSize;s>e&&((o<e||s>t)&&(l=l.isText?l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),n.push(l),r+=l.nodeSize),o=s}return new l(n,r)}cutByIndex(e,t){return e==t?l.empty:0==e&&t==this.content.length?this:new l(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;
192let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new l(r,i)}addToStart(e){return new l([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new l(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let l=0;;l++){if(l==t.childCount||l==n.childCount)return t.childCount==n.childCount?null:r;let s=t.child(l),a=n.child(l);if(s==a){r+=s.nodeSize;continue}if(!s.sameMarkup(a))return r;if(s.isText&&s.text!=a.text){let e=s.text,t=a.text,n=0;for(;e[n]==t[n];n++)r++;return n&&n<e.length&&n<t.length&&o(e.charCodeAt(n-1))&&i(e.charCodeAt(n))&&r--,r}if(s.content.size||a.content.size){let t=e(s.content,a.content,r+1);if(null!=t)return t}r+=s.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,l){for(let s=t.childCount,a=n.childCount;;
192){if(0==s||0==a)return s==a?null:{a:r,b:l};let u=t.child(--s),c=n.child(--a),d=u.nodeSize;if(u==c){r-=d,l-=d;continue}if(!u.sameMarkup(c))return{a:r,b:l};if(u.isText&&u.text!=c.text){let e=u.text,t=c.text,n=e.length,s=t.length;for(;n>0&&s>0&&e[n-1]==t[s-1];)n--,s--,r--,l--;return n&&s&&n<e.length&&o(e.charCodeAt(n-1))&&i(e.charCodeAt(n))&&(r++,l++),{a:r,b:l}}if(u.content.size||c.content.size){let t=e(u.content,c.content,r-1,l-1);if(t)return t}r-=d,l-=d}}(this,e,t,n)}findIndex(e){if(0==e)return a(0,e);if(e==this.size)return a(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e){if(r==e)return a(t+1,r);return a(t,n)}n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return l.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return l.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return l.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new l(t||e,n)}static from(e){if(!e)return l.empty;if(e instanceof l)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new l([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}l.empty=new l([],0);let s={index:0,offset:0};function a(e,t){return s.index=e,s.offset=t,s}function u(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!u(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class c{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&u(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return c.none;if(e instanceof c)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}c.none=[];class d extends Error{}class h{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i,o,l){let{index:s,offset:a}=t.findIndex(n),u=t.maybeChild(s);if(a==n||u.isText)return l&&i<=0&&o<=0&&!l.canReplace(s,s,r)?null:t.cut(0,n).append(r).append(t.cut(n));let c=e(u.content,n-a-1,r,0==s?i-1:0,s==t.childCount-1?o-1:0,u);return c&&t.replaceChild(s,u.copy(c))}(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new h(n,this.openStart,this.openEnd)}removeBetween(e,t){return new h(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),l=t.maybeChild(i),{index:s,offset:a}=t.findIndex(r);if(o==n||l.isText){if(a!=r&&!t.child(s).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=s)throw RangeError("Removing non-flat range");return t.replaceChild(i,l.copy(e(l.content,n-o-1,r-o-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return h.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new h(l.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new h(e,n,r)}}function p(e,t){if(!t.type.compatibleContent(e.type))throw new d("Cannot join "+t.type.name+" onto "+e.type.n
vendor: 4,756 bytes, line 192
192ame)}function f(e,t,n){let r=e.node(n);return p(r,t.node(n)),r}function m(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function D(e,t,n,r){let i=(t||e).node(n),o=0,l=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(m(e.nodeAfter,r),o++));for(let e=o;e<l;e++)m(i.child(e),r);t&&t.depth==n&&t.textOffset&&m(t.nodeBefore,r)}function g(e,t){if(!e.type.validContent(t))throw new d("Invalid content for node "+e.type.name);return e.copy(t)}function y(e,t,n){let r=[];return D(null,e,n,r),e.depth>n&&m(g(f(e,t,n+1),y(e,t,n+1)),r),D(t,null,n,r),new l(r)}h.empty=new h(l.empty,0,0);class v{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return c.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}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(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.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(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new k(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),l=i-o;if(n.push(t,e,r+o),!l||(t=t.child(e)).isText)break;i=l-1,r+=o+1}return new v(t,n,i)}static resolveCached(e,t){let n=C.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else C.set(e,n=new b);let r=n.elts[n.i]=v.resolve(e,t);return n.i=(n.i+1)%w,r}}class b{constructor(){this.elts=[],this.i=0}}let w=12,C=new WeakMap;class k{constructor(e,t,n){this.$from=e,this.$to=t,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 F=Object.create(null);class E{constructor(e,t,n,r=c.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||l.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}
192textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&u(this.attrs,t||e.defaultAttrs||F)&&c.sameSet(this.marks,n||c.none)}copy(e=null){return e==this.content?this:new E(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new E(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return h.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),l=r.start(o);return new h(r.node(o).content.cut(r.pos-l,i.pos-l),r.depth-o,i.depth-o)}replace(e,t,n){return function(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return function e(t,n,r,i){let o=t.index(i),s=t.node(i);if(o==n.index(i)&&i<t.depth-r.openStart){let l=e(t,n,r,i+1);return s.copy(s.content.replaceChild(o,l))}if(!r.content.size)return g(s,y(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:e,end:o}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(l.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return g(s,function e(t,n,r,i,o){let s=t.depth>o&&f(t,n,o+1),a=i.depth>o&&f(r,i,o+1),u=[];return D(null,t,o,u),s&&a&&n.index(o)==r.index(o)?(p(s,a),m(g(s,e(t,n,r,i,o+1)),u)):(s&&m(g(s,y(t,n,o+1)),u),D(n,r,o,u),a&&m(g(a,y(r,i,o+1)),u)),D(i,null,o,u),new l(u)}(t,e,o,n,i))}{let e=t.parent,i=e.content;return g(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(e,t,n,0)}(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return v.resolveCached(this,e)}resolveNoCache(e){return v.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.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);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),A(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=l.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),S(this.type.attrs,this.attrs,"node",this.type.name);let e=c.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];S(n.type.attrs,n.attrs,"mark",n.type.name),e=n.addToSet(e)}if(!c.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>
192e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=l.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}E.prototype.text=void 0;class x extends E{constructor(e,t,n,r){if(super(e,t,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):A(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new x(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new x(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function A(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}function S(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}class M{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new T(e,t);if(null==i.next)return M.empty;let o=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=B(e),r=n;return e.eat(",")&&(r="}"!=e.next?B(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let l=(n=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,o)),[]);if("seq"==t.type)for(let r=0;;r++){let l=e(t.exprs[r],o);if(r==t.exprs.length-1)return l;i(l,o=n())}else if("star"==t.type){let l=n();return r(o,l),i(e(t.expr,l),l),[r(l)]}else if("plus"==t.type){let l=n();return i(e(t.expr,o),l),i(e(t.expr,l),l),[r(l)]}else if("opt"==t.type)return[r(o)].concat(e(t.expr,o));else if("range"==t.type){let l=o;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,l),r),l=r}if(-1==t.max)i(e(t.expr,l),l);else for(let o=t.min;o<t.max;o++){let o=n();r(l,o),i(e(t.expr,l),o),l=o}return[r(l)]}else if("name"==t.type)return[r(o,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}}(o),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);L(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let o=r[t.join(",")]=new M(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(O);o.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return o}(L(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:n,next:l}=e.next[t];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(l)&&r.push(l)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(l,i),l}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}
vendor: 4,467 bytes, line 192
192matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(o,s){let a=o.matchFragment(e,n);if(a&&(!t||a.validEnd))return l.from(s.map(e=>e.createAndFill()));for(let e=0;e<o.next.length;e++){let{type:t,next:n}=o.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=i(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:l}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||r.type&&!l.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),t[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}M.empty=new M(!0);class T{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function B(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function O(e,t){return t-e}function L(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:o}=i[e];r||-1!=n.indexOf(o)||t(o)}}(t),n.sort(O)}function N(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function R(e,t){let n=Object.create(null);for(let r in e){let i=e[r],o=t&&t[r];if(void 0===o){if(i.hasDefault)o=i.default;else throw RangeError("No value supplied for attribute "+r)}else i.validate&&i.validate(o);n[r]=o}return n}function I(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new z(e,r,t[r]);return n}class ${constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=I(e,n.attrs),this.defaultAttrs=N(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==M.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:R(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new E(this,this.computeAttrs(e),l.from(t),c.setFrom(n))}createChecked(e=null,t,n){return t=l.from(t),this.checkContent(t),new E(this,this.computeAttrs(e),t,c.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=l.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(l.empty,!0);return i?new E(this,e,t.append(i),c.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);
192if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:c.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new $(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class z{constructor(e,t,n){let r;this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?(r=n.validate.split("|"),n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}):n.validate}get isRequired(){return!this.hasDefault}}class H{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=I(e,r.attrs),this.excluded=null;let i=N(this.attrs);this.instance=i?new c(this,i):null}create(e=null){return!e&&this.instance?this.instance:new c(this,R(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new H(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class j{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=r.from(e.nodes),t.marks=r.from(e.marks||{}),this.nodes=$.compile(this.spec.nodes,this),this.marks=H.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=M.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==i?null:i?P(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:P(this,n.split(" "))}this.nodeFromJSON=e=>E.fromJSON(this,e),this.markFromJSON=e=>c.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof $){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new x(n,n.defaultAttrs,e,c.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function P(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],l=o;if(o)n.push(o);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(l=r)}if(!l)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class _{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new K(this,t,!1);return n.addAll(e,c.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new K(this,t,!0);return n.addAll(e,c.none,t.from,t.to),h.maxOpen(n.finish())}matchTag(e,t,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,(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,r)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs
192){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,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(e)&&(!r.context||n.matchesContext(r.context))&&(!(o.length>e.length)||61==o.charCodeAt(e.length)&&o.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=V(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=V(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new _(e,_.schemaRules(e)))}}let W={address:!0,article:!0,aside:!0,blockquote:!0,body:!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},q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},J={ol:!0,ul:!0};function U(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class Y{constructor(e,t,n,r,i,o){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=c.none,this.match=i||(4&o?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(l.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=l.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(l.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!W.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class K{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,o=U(null,t.preserveWhitespace,0)|(n?4:0);i=r?new Y(r.type,r.attrs,c.none,!0,t.topMatch||r.type.contentMatch,o):n?new Y(null,null,c.none,!0,null,o):new Y(e.schema.topNodeType,null,c.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:o}=this.parser;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i){if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(o.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(o.text(e[n]),t,!/\S/.test(e[n]));n=""}else n=n.replace(/\r?\n|\r/g," ")}else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(o.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;J.hasOwnProperty(o)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&J.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,n));n:if(s?s.ignore:q.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(W.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break n}let l=s&&s.skip?t:this.readStyles(e,t);l&&this.addAll(e,l),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,!1===s.consuming?l:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,o;
vendor: 4,108 bytes, line 192
192if(t.node){if((o=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(o.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(o,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let o=n?e.childNodes[n]:e.firstChild,l=null==r?null:e.childNodes[r];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,o=0;t>=0;t--){let l=this.nodes[t],s=l.findWrapping(e);if(s&&(!r||r.length>s.length+o)&&(r=s,i=l,!s.length))break;if(l.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=c.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):Z(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=U(e,i,o.options);4&o.options&&0==o.content.length&&(l|=4);let s=c.none;return n=n.filter(t=>(o.type?!o.type.allowsMarkType(t.type):!Z(t.type,e))||(s=t.addToSet(s),!1)),this.nodes.push(new Y(e,t,s,r,null,l)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=1)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.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=(e,l)=>{for(;e>=0;e--){let s=t[e];if(""==s){if(e==t.length-1||0==e)continue;for(;l>=i;l--)if(o(e-1,l))return!0;return!1}{let e=l>0||0==l&&r?this.nodes[l].type:n&&l>=i?n.node(l-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;l--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];
192if(t.isTextblock&&t.defaultAttrs)return t}}}function V(e){let t={};for(let n in e)t[n]=e[n];return t}function Z(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],l=e=>{o.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>o.indexOf(i)&&l(i))return!0}};if(l(i.contentMatch))return!0}}class G{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Q(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,o=0;for(;n<i.length&&o<e.marks.length;){let t=e.marks[o];if(!this.marks[t.type.name]){o++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<e.marks.length;){let n=e.marks[o++],l=this.serializeMark(n,e.isInline,t);l&&(i.push([n,r]),r.appendChild(l.dom),r=l.contentDOM||l.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return Q(t).createTextNode(e.text);let{dom:n,contentDOM:r}=et(Q(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&et(Q(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return"string"==typeof t?{dom:e.createTextNode(t)}:et(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new G(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=X(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return X(e.marks)}}function X(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Q(e){return e.document||window.document}let ee=new WeakMap;function et(e,t,n,r){let i,o,l;if(1==t.nodeType)return{dom:t};if(t.dom&&1==t.dom.nodeType)return t;let s=t[0],a;if("string"!=typeof s)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(o=ee.get(r))&&ee.set(r,(l=null,function e(t){if(t&&"object"==typeof t){if(Array.isArray(t)){if("string"==typeof t[0])l||(l=[]),l.push(t);else for(let n=0;n<t.length;n++)e(t[n])}else for(let n in t)e(t[n])}}(r),o=l)),a=o)&&a.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let u=s.indexOf(" ");u>0&&(n=s.slice(0,u),s=s.slice(u+1));let c=n?e.createElementNS(n,s):e.createElement(s),d=t[1],h=1;if(d&&"object"==typeof d&&null==d.nodeType&&!Array.isArray(d)){for(let e in h=2,d)if(null!=d[e]){let t=e.indexOf(" ");t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),d[e]):"style"==e&&c.style?c.style.cssText=d[e]:c.setAttribute(e,d[e])}}for(let o=h;o<t.length;o++){let l=t[o];if(0===l){if(o<t.length-1||o>h)throw RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}if("string"==typeof l)c.appendChild(e.createTextNode(l));else{let{dom:t,contentDOM:o}=et(e,l,n,r);if(c.appendChild(t),o){if(i)throw RangeError("Multiple content holes");i=o}}}return{dom:c,contentDOM:i}}},25580:function(e,t,n){n.d(t,{IB:function(){return l},KI:function(){return o},bw:function(){return s}});var r=n(42639),i=n(57870);function o(e,t=null){return function(n,o){let{$from:l,$to:s}=n.selection,a=l.blockRange(s);if(!a)return!1;let u=o?n.tr:null;return!!function(e,t,n,o=null){let l=!1,s=t,a=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=a.resolve(t.start-2);s=new i.Ts(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.Ts(t.$from,a.resolve(t.$to.end(t.depth)),t.depth)),l=!0}let u=(0,r.nd)(s,n,o,t);return!!u&&(e&&function(e,t,n,o,l){let s=i.HY.empty;for(let e=n.length-1;e>=0;e--)s=i.HY.from(n[e].type.create(n[e].attrs,s));e.step(new r.FC(t.start-(o?2:0),t.end,t.start,t.end,new i.p2(s,0,0),n.length,!0));let a=0;for(let e=0;e<n.length;e++)n[e].type==l&&(a=e+1);let u=n.length-a,c=t.start+n.length-(o?2:0),d=t.parent;for(let n=t.startIndex,i=t.endIndex,o=!0;n<i;n++,o=!1)!o&&(0,r.Ax)(e.doc,c,u)&&(e.split(c,u),c+=2*u),c+=d.child(n).nodeSize}(e,t,u,l,n),!0)}(u,a,e,t)&&(o&&o(u.scrollIntoView()),!0)}}function l(e){return function(t,n){let{$from:o,$to:l}=t.selection,s=o.blockRange(l,t=>t.childCount>0&&t.firstChild.type==e);return!!s&&(!n||(o.node(s.depth-1).type==e?function(e,t,n,o){let l=e.tr,s=o.end,a=o.$to.end(o.depth);s<a&&(l.step(new r.FC(s-1,a,s,a,new i.p2(i.HY.from(n.create(null,o.parent.copy())),1,0),1,!0)),o=new i.Ts(l.doc.resolve(o.$from.pos),l.doc.resolve(a),o.depth));let u=(0,r.k9)(o);if(null==u)return!1;l.lift(o,u);let c=l.doc.resolve(l.mapping.map(s,-1)-1);return(0,r.Mn)(l.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&l.join(c.pos),t(l.scrollIntoView()),!0}(t,n,e,s):function(e,t,n){let o=e.tr,l=n.parent;for(let e=n.end,t=n.endIndex-1,r=n.startIndex;t>r;t--)e-=l.child(t).nodeSize,o.delete(e-1,e+1);let s=o.doc.resolve(n.start),a=s.nodeAfter;if(o.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let u=0==n.startIndex,c=n.endIndex==l.childCount,d=s.node(-1),h=s.index(-1);if(!d.canReplace(h+(u?0:1),h+1,a.content.append(c?i.HY.empty:i.HY.from(l))))return!1;let p=s.pos,f=p+a.nodeSize;return o.step(new r.FC(p-(u?1:0),f+(c?1:0),p+1,f-1,new i.p2((u?i.HY.empty:i.HY.from(l.copy(i.HY.empty))).append(c?i.HY.empty:i.HY.from(l.copy(i.HY.empty))),u?0:1,c?0:1),u?0:1)),t(o.scrollIntoView()),!0}(t,n,s)))}}function s(e){return function(t,n){let{$from:o,$to:l}=t.selection,s=o.blockRange(l,t=>t.childCount>0&&t.firstChild.type==e);if(!s)return!1;let a=s.startIndex;if(0==a)return!1;let u=s.parent,c=u.child(a-1);if(c.type!=e)return!1;if(n){let o=c.lastChild&&c.lastChild.type==u.type,l=i.HY.from(o?e.create():null),a=new i.p2(i.HY.from(e.create(null,i.HY.from(u.type.create(null,l)))),o?3:1,0),d=s.start,h=s.end;n(t.tr.step(new r.FC(d-(o?3:1),h,d,h,a,1,!0)).scrollIntoView())}return!0}}},82804:function(e,t,n){n.d(t,{Bs:function(){return c},C1:function(){return f},H$:function(){return A},Sy:function(){return F},Y1:function(){return l},qv:function(){return h},xm:function(){return s},yy:function(){return k}});var r=n(57870),i=n(42639);let o=Object.create(null);class l{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new s(e.min(t),e.max(t))]}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 e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.p2.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let o=e.steps.length,l=this.ranges;for(let s=0;s<l.length;s++){let{$from:a,$to:u}=l[s],c=e.mapping.slice(o);e.replaceRange(c.map(a.pos),c.map(u.pos),s?r.p2.empty:t),0==s&&g(e,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:l}=r[i],s=e.mapping.slice(n),a=s.map(o.pos),u=s.map(l.pos);i?e.deleteRange(a,u):(e.replaceRangeWith(a,u,t),g(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new c(e):D(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?D(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):D(e.n
192ode(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return D(e,e,0,0,1)||new f(e)}static atEnd(e){return D(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=o[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}l.prototype.visible=!0;class s{constructor(e,t){this.$from=e,this.$to=t}}let a=!1;function u(e){a||e.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class c extends l{constructor(e,t=e){u(e),u(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return l.near(n);let r=e.resolve(t.map(this.anchor));return new c(r.parent.inlineContent?r:n,n)}replace(e,t=r.p2.empty){if(super.replace(e,t),t==r.p2.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof c&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new d(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new c(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=l.findFrom(t,n,!0)||l.findFrom(t,-n,!0);if(!e)return l.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(l.findFrom(e,-n,!0)||l.findFrom(e,n,!0)).$anchor).pos<t.pos==r<0||(e=t)),new c(e,t)}}l.jsonID("text",c);class d{constructor(e,t){this.anchor=e,this.head=t}map(e){return new d(e.map(this.anchor),e.map(this.head))}resolve(e){return c.between(e.resolve(this.anchor),e.resolve(this.head))}}class h extends l{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?l.near(i):new h(i)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(e){return e instanceof h&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new h(e.resolve(t.anchor))}static create(e,t){return new h(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}h.prototype.visible=!1,l.jsonID("node",h);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new d(n,n):new p(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&h.isSelectable(n)?new h(t):l.near(t)}}class f extends l{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.p2.empty){if(t==r.p2.empty){e.delete(0,e.doc.content.size);let t=l.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}l.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function D(e,t,n,r,i,o=!1){if(t.inlineContent)return c.create(e,n);for(let l=r-(i>0?0:1);i>0?l<t.childCount:l>=0;l+=i){let r=t.child(l);if(r.isAtom){if(!o&&h.isSelectable(r))return h.create(e,n-(i<0?r.nodeSize:0))}else{let t=D(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function g(e,t,n){let r,o=e.steps.length-1;if(o<t)return;let s=e.steps[o];(s instanceof i.Pu||s instanceof i.FC)&&(e.mapping.maps[o].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(l.near(e.doc.resolve(r),n)))}class y extends i.wx{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.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(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(l.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function v(e,t){return t&&e?e.bind(t):e}
192class b{constructor(e,t,n){this.name=e,this.init=v(t.init,n),this.apply=v(t.apply,n)}}let w=[new b("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new b("selection",{init:(e,t)=>e.selection||l.atStart(t.doc),apply:e=>e.selection}),new b("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new b("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class C{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=w.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new b(e.key,e.spec.state,e))})}}class k{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let l=this.config.plugins[o];if(l.spec.appendTransaction){let s=r?r[o].n:0,a=r?r[o].state:this,u=s<t.length&&l.spec.appendTransaction.call(l,s?t.slice(s):t,a,n);if(u&&n.filterTransaction(u,o)){if(u.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<o?{state:n,n:t.length}:{state:this,n:0})}t.push(u),n=n.applyInner(u),i=!0}r&&(r[o]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new k(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new y(this)}static create(e){let t=new C(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new k(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new C(this.schema,e.plugins),n=t.fields,r=new k(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new C(e.schema,e.plugins),o=new k(i);return i.fields.forEach(i=>{if("doc"==i.name)o.doc=r.NB.fromJSON(e.schema,t.doc);else if("selection"==i.name)o.selection=l.fromJSON(o.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let l=n[r],s=l.spec.state;if(l.key==i.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){o[i.name]=s.fromJSON.call(l,e,t[r],o);return}}o[i.name]=i.init(e,o)}}),o}}class F{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=e(o,n,{})),r[i]=o}return r}(e.props,this,this.props),this.key=e.key?e.key.key:x("plugin")}getState(e){return e[this.key]}}let E=Object.create(null);function x(e){return e in E?e+"$"+ ++E[e]:(E[e]=0,e+"$")}class A{constructor(e="key"){this.key=x(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},42639:function(e,t,n){n.d(t,{Ax:function(){return F},FC:function(){return D},GJ:function(){return A},Mn:function(){return E},Pu:function(){return m},dR:function(){return M},k9:function(){return v},nd:function(){return b},nj:function(){return S},wx:function(){return P},xu:function(){return h}});var r=n(57870);class i{constructor(e,t,n){this.pos=e,this.delInfo=t,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(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&o.empty)return o.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,l=this.inverted?1:2;
192for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;let u=this.ranges[s+o],c=this.ranges[s+l],d=a+u;if(e<=d){let o=u?e==a?-1:e==d?1:t:t,l=a+r+(o<0?0:c);if(n)return l;let h=e==(t<0?a:d)?null:s/3+(e-a)*65536,p=0;return u&&(p|=e==a?2:e==d?1:4,(t<0?e!=a:e!=d)&&(p|=8)),new i(l,p,h)}r+=c-u}return n?e+r:new i(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,o=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let l=this.ranges[t]-(this.inverted?n:0);if(l>e)break;let s=this.ranges[t+i];if(e<=l+s&&t==3*r)return!0;n+=this.ranges[t+o]-s}return!1}forEach(e){let t=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],l=o-(this.inverted?i:0),s=o+(this.inverted?0:i),a=this.ranges[r+t],u=this.ranges[r+n];e(l,l+a,s,s+u),i+=u-a}}invert(){return new o(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?o.empty:new o(e<0?[0,-e,0]:[0,0,e])}}o.empty=new o([]);class l{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new l(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new l;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new i(e,r,null)}}let s=Object.create(null);class a{getMap(){return o.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=s[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in s)throw RangeError("Duplicate use of step JSON ID "+e);return s[e]=t,t.prototype.jsonID=e,t}}class u{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new u(e,null)}static fail(e){return new u(null,e)}static fromReplace(e,t,n,i){try{return u.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.e4)return u.fail(e.message);throw e}}}function c(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);o.content.size&&(o=o.copy(c(o.content,t,o))),o.isInline&&(o=t(o,n,r)),i.push(o)}return r.HY.fromArray(i)}class d extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new r.p2(c(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),t.openStart,t.openEnd);return u.fromReplace(e,this.from,this.to,o)}invert(){return new h(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new d(t.pos,n.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new d(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("addMark",d);class h extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}
vendor: 5,905 bytes, line 192
192apply(e){let t=e.slice(this.from,this.to),n=new r.p2(c(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return u.fromReplace(e,this.from,this.to,n)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new h(t.pos,n.pos,this.mark)}merge(e){return e instanceof h&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new h(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new h(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("removeMark",h);class p extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return u.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return u.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new p(this.pos,t.marks[n]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new p(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new p(t.pos,e.markFromJSON(t.mark))}}a.jsonID("addNodeMark",p);class f extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return u.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return u.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new p(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new f(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new f(t.pos,e.markFromJSON(t.mark))}}a.jsonID("removeNodeMark",f);class m extends a{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&g(e,this.from,this.to)?u.fail("Structure replace would overwrite content"):u.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new o([this.from,this.to-this.from,this.slice.size])}invert(e){return new m(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&m.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new m(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof m)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?r.p2.empty:new r.p2(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new m(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?r.p2.empty:new r.p2(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new m(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new m(t.from,t.to,r.p2.fromJSON(e,t.slice),!!t.structure)}}m.MAP_BIAS=1,a.jsonID("replace",m);class D extends a{constructor(e,t,n,r,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(g(e,this.from,this.gapFrom)||g(e,this.gapTo,this.to)))return u.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return u.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?u.fromReplace(e,this.from,this.to,n):u.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(e){let t=this.gapTo-this.gapFrom;return new D(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new D(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new D(t.from,t.to,t.gapFrom,t.gapTo,r.p2.fromJSON(e,t.slice),t.insert,!!t.structure)}}function g(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>
1920&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let e=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function y(e,t,n,i=n.contentMatch,o=!0){let l=e.doc.nodeAt(t),s=[],a=t+1;for(let t=0;t<l.childCount;t++){let u=l.child(t),c=a+u.nodeSize,d=i.matchType(u.type);if(d){i=d;for(let t=0;t<u.marks.length;t++)n.allowsMarkType(u.marks[t].type)||e.step(new h(a,c,u.marks[t]));if(o&&u.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(u.text);)i||(i=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new m(a+e.index,a+e.index+e[0].length,i))}}else s.push(new m(a,c,r.p2.empty));a=c}if(!i.validEnd){let t=i.fillBefore(r.HY.empty,!0);e.replace(a,a,new r.p2(t,0,0))}for(let t=s.length-1;t>=0;t--)e.step(s[t])}function v(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let o=e.$from.node(n),l=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&o.canReplace(l,s,t))return n;if(0==n||o.type.spec.isolating||!((0==l||o.canReplace(l,o.childCount))&&(s==o.childCount||o.canReplace(0,s))))break;l&&(r=1),s<o.childCount&&(i=1)}return null}function b(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let l=o.length?o[0]:t;return n.canReplaceWith(r,i,l)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),l=t.contentMatch.findWrapping(o.type);if(!l)return null;let s=(l.length?l[l.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return s&&s.validEnd?l:null}(r,t);return o?i.map(w).concat({type:t,attrs:n}).concat(o.map(w)):null}function w(e){return{type:e,attrs:null}}function C(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let l,s=/\r?\n|\r/g;for(;l=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+o+l.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function k(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+o);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function F(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,l=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!l.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>o;e--,t--){let n=i.node(e),o=i.index(e);if(n.type.spec.isolating)return!1;let l=n.content.cutByIndex(o,n.childCount),s=r&&r[t+1];s&&(l=l.replaceChild(0,s.type.create(s.attrs)));let a=r&&r[t]||n;if(!n.canReplace(o+1,n.childCount)||!a.type.validContent(l))return!1}let s=i.indexAfter(o),a=r&&r[0];return i.node(o).canReplaceWith(s,s,a?a.type:i.node(o+1).type)}function E(e,t){let n=e.resolve(t),r=n.index();return x(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function x(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),l=o.type==r?e.type.schema.nodes.text:o.type;if(!(n=n.matchType(l))||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}(e,t))}function A(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,o,l=r.index(e);if(e==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(e+1),l++,o=r.node(e).maybeChild(l)):(i=r.node(e).maybeChild(l-1),o=r.node(e+1)),i&&!i.isTextblock&&x(i,o)&&r.node(e).canReplace(l,l+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function S(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,o=r.index(t)+(n>0?1:0),l=r.node(t),s=!1;if(1==e)s=l.canReplace(o,o,i);else{let e=l.contentMatchAt(o).findWrapping(i.firstChild.type);s=e&&l.canReplaceWith(o,o,e[0])}if(s)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}
192function M(e,t,n=t,i=r.p2.empty){if(t==n&&!i.size)return null;let o=e.resolve(t),l=e.resolve(n);return T(o,l,i)?new m(t,n,i):new B(o,l,i).fit()}function T(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}a.jsonID("replaceAround",D);class B{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.HY.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let o=this.placed,l=n.depth,s=i.depth;for(;l&&s&&1==o.childCount;)o=o.firstChild.content,l--,s--;let a=new r.p2(o,l,s);return e>-1?new D(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new m(n.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,i=(n?(e=N(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let o=this.depth;o>=0;o--){let{type:l,match:s}=this.frontier[o],a,u=null;if(1==t&&(i?s.matchType(i.type)||(u=s.fillBefore(r.HY.from(i),!1)):e&&l.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:o,parent:e,inject:u};if(2==t&&i&&(a=s.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:o,parent:e,wrap:a};if(e&&s.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced;return!(I(e,-1)<=t)&&(this.unplaced.size>1&&I(e,1)>n&&n++,this.unplaced=new r.p2(e,t+1,n),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=N(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new r.p2(O(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new r.p2(O(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let l=this.unplaced,s=n?n.content:l.content,a=l.openStart-e,u=0,c=[],{match:d,type:h}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)c.push(i.child(e));d=d.matchFragment(i)}let p=s.size+e-(l.content.size-l.openEnd);for(;u<s.childCount;){let e=s.child(u),t=d.matchType(e.type);if(!t)break;(++u>1||0==a||e.content.size)&&(d=t,c.push(function e(t,n,i){if(n<=0)return t;let o=t.content;return n>1&&(o=o.replaceChild(0,e(o.firstChild,n-1,1==o.childCount?i-1:0))),n>0&&(o=t.type.contentMatch.fillBefore(o).append(o),i<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(r.HY.empty,!0)))),t.copy(o)}(e.mark(h.allowedMarks(e.marks)),1==u?a:0,u==s.childCount?p:-1)))}let f=u==s.childCount;f||(p=-1),this.placed=L(this.placed,t,r.HY.from(c)),this.frontier[t].match=d,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?r.p2.empty:new r.p2(O(l.content,e-1,1),e-1,p<0?l.openEnd:e-1):new r.p2(O(l.content,e,u),l.openStart,l.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!R(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.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(e){r:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=R(e,t,r,n,i);if(o){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=R(e,n,r,t,!0);if(!i||i.childCount)continue r}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=L(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=L(this.placed,this.depth,r.HY.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.HY.empty,!0);e.childCount&&(this.placed=L(this.placed,this.frontier.length,e))}}function O(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(O(e.firstChild.content,t-1,n)))}function L(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(L(e.lastChild.content,t-1,n)))}function N(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function R(e,t,n,r,i){let o=e.node(t),l=i?e.indexAfter(t):e.index(t);if(l==o.childCount&&!n.compatibleContent(o.type))return null;let s=r.fillBefore(o.content,!0,l);return s&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,o.content,l)?s:null}function I(e,t){for(let n=0;;
vendor: 6,144 bytes, line 192
192n++){let r=t<0?e.firstChild:e.lastChild;if(!r||r.isAtom)return n;e=r.content}}function $(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class z extends a{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return u.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return u.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(i),0,t.isLeaf?0:1))}getMap(){return o.empty}invert(e){return new z(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new z(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new z(t.pos,t.attr,t.value)}}a.jsonID("attr",z);class H extends a{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return u.ok(n)}getMap(){return o.empty}invert(e){return new H(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new H(t.attr,t.value)}}a.jsonID("docAttr",H);let j=class extends Error{};(j=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),j.prototype.constructor=j,j.prototype.name="TransformError";class P{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new l}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new j(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,o)=>{e=Math.min(e,i),t=Math.max(t,o)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.p2.empty){let i=M(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.p2(r.HY.from(n),0,0))}delete(e,t){return this.replace(e,t,r.p2.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return!function(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),l=e.doc.resolve(n);if(T(o,l,i))return e.step(new m(t,n,i));let s=$(o,l);0==s[s.length-1]&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(e)>-1?a=e:o.before(e)==t&&s.splice(1,0,-e)}let u=s.indexOf(a),c=[],d=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==i.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){var h;let t=c[e],n=(h=t.type).spec.defining||h.spec.definingForContent;if(n&&!t.sameMarkup(o.node(Math.abs(a)-1)))d=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let a=(t+d+1)%(i.openStart+1),h=c[a];if(h)for(let t=0;t<s.length;t++){let c=s[(t+u)%s.length],d=!0;c<0&&(d=!1,c=-c);let p=o.node(c-1),f=o.index(c-1);if(p.canReplaceWith(f,f,h.type,h.marks))return e.replace(o.before(c),d?l.after(c):n,new r.p2(function e(t,n,i,o,l){if(n<i){let r=t.firstChild;t=t.replaceChild(0,r.copy(e(r.content,n+1,i,o,r)))}if(n>o){let e=l.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.HY.empty,!0))}return t}(i.content,0,i.openStart,a),a,i.openEnd))}}let p=e.steps.length;for(let r=s.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>p));r--){let e=s[r];e<0||(t=o.before(e),n=l.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return!function(e,t,n,i){if(!i.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(e.doc,t,i.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.p2(r.HY.from(i),0,0))}(this,e,t,n),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&0==r.parentOffset&&0==i.parentOffset){let o=r.sharedDepth(n),l=!1;for(let e=r.depth;e>o;e--)r.node(e).type.spec.isolating&&(l=!0);for(let e=i.depth;e>o;e--)i.node(e).type.spec.isolating&&(l=!0);if(!l){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let o=$(r,i);for(let t=0;t<o.length;t++){let n=o[t],l=t==o.length-1;if(l&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(l||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(t-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return e.delete(r.before(o),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:i,$to:o,depth:l}=t,s=i.before(l+1),a=o.after(l+1),u=s,c=a,d=r.HY.empty,h=0;for(let e=l,t=!1;e>n;e--)t||i.index(e)>
1920?(t=!0,d=r.HY.from(i.node(e).copy(d)),h++):u--;let p=r.HY.empty,f=0;for(let e=l,t=!1;e>n;e--)t||o.after(e+1)<o.end(e)?(t=!0,p=r.HY.from(o.node(e).copy(p)),f++):c++;e.step(new D(u,c,s,a,new r.p2(d.append(p),h,f),d.size-h,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let i=null,{linebreakReplacement:o}=e.doc.type.schema,l=e.doc.resolve(t-n),s=l.node().type;if(o&&s.inlineContent){let e="pre"==s.whitespace,t=!!s.contentMatch.matchType(o);e&&!t?i=!1:!e&&t&&(i=!0)}let a=e.steps.length;if(!1===i){let r=e.doc.resolve(t+n);k(e,r.node(),r.before(),a)}s.inlineContent&&y(e,t+n-1,s,l.node().contentMatchAt(l.index()),null==i);let u=e.mapping.slice(a),c=u.map(t-n);if(e.step(new m(c,u.map(t+n,-1),r.p2.empty,!0)),!0===i){let t=e.doc.resolve(c);C(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,n){let i=r.HY.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.HY.from(n[e].type.create(n[e].attrs,i))}let o=t.start,l=t.end;e.step(new D(o,l,o,l,new r.p2(i,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,i=null){return!function(e,t,n,i,o){if(!i.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let l=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{var s,a;let u,c,d="function"==typeof o?o(t):o;if(t.isTextblock&&!t.hasMarkup(i,d)&&(s=e.doc,a=e.mapping.slice(l).map(n),c=(u=s.resolve(a)).index(),u.parent.canReplaceWith(c,c+1,i))){let o=null;if(i.schema.linebreakReplacement){let e="pre"==i.whitespace,t=!!i.contentMatch.matchType(i.schema.linebreakReplacement);e&&!t?o=!1:!e&&t&&(o=!0)}!1===o&&k(e,t,n,l),y(e,e.mapping.slice(l).map(n,1),i,void 0,null===o);let s=e.mapping.slice(l),a=s.map(n,1),u=s.map(n+t.nodeSize,1);return e.step(new D(a,u,a+1,u-1,new r.p2(r.HY.from(i.create(d,null,t.marks)),0,0),1,!0)),!0===o&&C(e,t,n,l),!1}})}(this,e,t,n,i),this}setNodeMarkup(e,t,n=null,i){return!function(e,t,n,i,o){let l=e.doc.nodeAt(t);if(!l)throw RangeError("No node at given position");n||(n=l.type);let s=n.create(i,null,o||l.marks);if(l.isLeaf)return e.replaceWith(t,t+l.nodeSize,s);if(!n.validContent(l.content))throw RangeError("Invalid content for node type "+n.name);e.step(new D(t,t+l.nodeSize,t+1,t+l.nodeSize-1,new r.p2(r.HY.from(s),0,0),1,!0))}(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new z(e,t,n)),this}setDocAttribute(e,t){return this.step(new H(e,t)),this}addNodeMark(e,t){return this.step(new p(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.vc)t.isInSet(n.marks)&&this.step(new f(e,t));else{let r=n.marks,i,o=[];for(;i=t.isInSet(r);)o.push(new f(e,i)),r=i.removeFromSet(r);for(let e=o.length-1;e>=0;e--)this.step(o[e])}return this}split(e,t=1,n){return!function(e,t,n=1,i){let o=e.doc.resolve(t),l=r.HY.empty,s=r.HY.empty;for(let e=o.depth,t=o.depth-n,a=n-1;e>t;e--,a--){l=r.HY.from(o.node(e).copy(l));let t=i&&i[a];s=r.HY.from(t?t.type.create(t.attrs,s):o.node(e).copy(s))}e.step(new m(t,t,new r.p2(l.append(s),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){var r;let i,o,l,s;return r=this,l=[],s=[],r.doc.nodesBetween(e,t,(r,a,u)=>{if(!r.isInline)return;let c=r.marks;if(!n.isInSet(c)&&u.type.allowsMarkType(n.type)){let u=Math.max(a,e),p=Math.min(a+r.nodeSize,t),f=n.addToSet(c);for(let e=0;e<c.length;e++)c[e].isInSet(f)||(i&&i.to==u&&i.mark.eq(c[e])?i.to=p:l.push(i=new h(u,p,c[e])));o&&o.to==u?o.to=p:s.push(o=new d(u,p,n))}}),l.forEach(e=>
192r.step(e)),s.forEach(e=>r.step(e)),this}removeMark(e,t,n){var i;let o,l;return i=this,o=[],l=0,i.doc.nodesBetween(e,t,(i,s)=>{if(!i.isInline)return;l++;let a=null;if(n instanceof r.ZU){let e=i.marks,t;for(;t=n.isInSet(e);)(a||(a=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(i.marks)&&(a=[n]):a=i.marks;if(a&&a.length){let n=Math.min(s+i.nodeSize,t);for(let t=0;t<a.length;t++){let r=a[t],i;for(let e=0;e<o.length;e++){let t=o[e];t.step==l-1&&r.eq(o[e].style)&&(i=t)}i?(i.to=n,i.step=l):o.push({style:r,from:Math.max(s,e),to:n,step:l})}}}),o.forEach(e=>i.step(new h(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return y(this,e,t,n),this}}}}]);

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.