PageSourceSearch

https://www.dibru.ac.in/_next/static/chunks/5998-6c8c43ddc87ae748.js

js dibru.ac.in collected 2026-10-02 06:21:48 UTC 439,622 bytes, 4 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5998],{9315:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});for(var r,o=new Uint8Array(16),i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,l=[],s=0;s<256;++s)l.push((s+256).toString(16).substr(1));var a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!("string"==typeof n&&i.test(n)))throw TypeError("Stringified UUID is invalid");return n},c=function(e,t,n){var i=(e=e||{}).random||(e.rng||function(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)})();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var l=0;l<16;++l)t[n+l]=i[l];return t}return a(i)}},79006:function(){},88889:function(){},1394:function(e,t,n){"use strict";n.d(t,{L6:function(){return on}});var r,o=n(2265),i=n(25253),l=n(77319),s=n(57437);function a(e){return Object.keys(e).reduce((t,n)=>(void 0!==e[n]&&(t[n]=e[n]),t),{})}function c(e){return"0rem"===e?"0rem":`calc(${e} * var(--mantine-scale))`}function u(e,{shouldScale:t=!1}={}){return function n(r){if(0===r||"0"===r)return`0${e}`;if("number"==typeof r){let n=`${r/16}${e}`;return t?c(n):n}if("string"==typeof r){if(""===r||r.startsWith("calc(")||r.startsWith("clamp(")||r.includes("rgba("))return r;if(r.includes(","))return r.split(",").map(e=>n(e)).join(",");if(r.includes(" "))return r.split(" ").map(e=>n(e)).join(" ");if(r.includes(e))return t?c(r):r;let o=r.replace("px","");if(!Number.isNaN(Number(o))){let n=`${Number(o)/16}${e}`;return t?c(n):n}}return r}}let d=u("rem",{shouldScale:!0}),p=u("em");function h(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)?function(e){let t=e.replace("#","");if(3===t.length){let e=t.split("");t=[e[0],e[0],e[1],e[1],e[2],e[2]].join("")}if(8===t.length){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:255&n,a:1}}(e):e.startsWith("rgb")?function(e){let[t,n,r,o]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:o||1}}(e):e.startsWith("hsl")?function(e){let t,n,r;let o=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!o)return{r:0,g:0,b:0,a:1};let i=parseInt(o[1],10),l=parseInt(o[2],10)/100,s=parseInt(o[3],10)/100,a=o[5]?parseFloat(o[5]):void 0,c=(1-Math.abs(2*s-1))*l,u=i/60,d=c*(1-Math.abs(u%2-1)),p=s-c/2;return u>=0&&u<1?(t=c,n=d,r=0):u>=1&&u<2?(t=d,n=c,r=0):u>=2&&u<3?(t=0,n=c,r=d):u>=3&&u<4?(t=0,n=d,r=c):u>=4&&u<5?(t=d,n=0,r=c):(t=c,n=0,r=d),{r:Math.round((t+p)*255),g:Math.round((n+p)*255),b:Math.round((r+p)*255),a:a||1}}(e):{r:0,g:0,b:0,a:1}}function f(e,t){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${100*t}%)`;let{r:n,g:r,b:o,a:i}=h(e),l=1-t,s=e=>Math.round(e*l);return`rgba(${s(n)}, ${s(r)}, ${s(o)}, ${i})`}function m(e,t){return"number"==typeof e.primaryShade?e.primaryShade:"dark"===t?e.primaryShade.dark:e.primaryShade.light}function g(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.179;return!e.startsWith("var(")&&function(e){if(e.startsWith("oklch("))return(function(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}(e)||0)/100;let{r:t,g:n,b:r}=h(e);return .2126*g(t/255)+.7152*g(n/255)+.0722*g(r/255)}(e)>t}function v(e){let{color:t,theme:n,colorScheme:r}=e;if("string"!=typeof t)throw Error("[@mantine/core] Failed to parse color. Expected color to be a string, instead got ".concat(typeof t));if("bright"===t)return{color:t,value:"dark"===r?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:y("dark"===r?n.white:n.black,n.luminanceThreshold),variable:"--mantine-color-bright"};if("dimmed"===t)return{color:t,value:"dark"===r?n.colors.dark[2]:n.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:y("dark"===r?n.colors.dark[2]:n.colors.gray[6],n.luminanceThreshold),variable:"--mantine-color-dimmed"};if("white"===t||"black"===t)return{color:t,value:"white"===t?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:y("white"===t?n.white:n.black,n.luminanceThreshold),variable:"--mantine-color-".concat(t)};let[o,i]=t.split("."),l=i?Number(i):void 0,s=o in n.colors;if(s){let e=void 0!==l?n.colors[o][l]:n.colors[o][m(n,r||"light")];return{color:o,value:e,shade:l,isThemeColor:s,isLight:y(e,n.luminanceThreshold),variable:i?"--mantine-color-".concat(o,"-").concat(l):"--mantine-color-".concat(o,"-filled")}}return{color:t,value:t,isThemeColor:s,isLight:y(t,n.luminanceThreshold),shade:l,variable:void 0}}function b(e,t){let n=v({color:e||t.primaryColor,theme:t});return n.variable?"var(".concat(n.variable,")"):e}function w(e,t){let n={from:(null==e?void 0:e.from)||t.defaultGradient.from,to:(null==e?void 0:e.to)||t.defaultGradient.to,deg:(null==e?void 0:e.deg)||t.defaultGradient.deg||0},r=b(n.from,t),o=b(n.to,t);return"linear-gradient(".concat(n.deg,"deg, ").concat(r," 0%, ").concat(o," 100%)")}function x(e,t){if("string"!=typeof e||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var("))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);let{r:n,g:r,b:o}=h(e);return`rgba(${n}, ${r}, ${o}, ${t})`}let k="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",C={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:{dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:e=>{let{color:t,theme:n,variant:r,gradient:o,autoContrast:i}=e,l=v({color:t,theme:n}),s="boolean"==typeof i?i:n.autoContrast;if("filled"===r){let e=s&&l.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return l.isThemeColor?void 0===l.shade?{background:"var(--mantine-color-".concat(t,"-filled)"),hover:"var(--mantine-color-".concat(t,"-filled-hover)"),color:e,border:"".concat(d(1)," solid transparent")}:{background:"var(--mantine-color-".concat(l.color,"-").concat(l.shade,")"),hover:"var(--mantine-color-".concat(l.color,"-").concat(9===l.shade?8:l.shade+1,")"),color:e,border:"".concat(d(1)," solid transparent")}:{background:t,hover:f(t,.1),color:e,border:"".concat(d(1)," solid transparent")}}if("light"===r){if(l.isThemeColor){if(void 0===l.shade)return{background:"var(--mantine-color-".concat(t,"-light)"),hover:"var(--mantine-color-".concat(t,"-light-hover)"),color:"var(--mantine-color-".concat(t,"-light-color)"),border:"".concat(d(1)," solid transparent")};let e=n.colors[l.color][l.shade];return{background:x(e,.1),hover:x(e,.12),color:"var(--mantine-color-".concat(l.color,"-").concat(Math.min(l.shade,6),")"),border:"".concat(d(1)," solid transparent")}}return{background:x(t,.1),hover:x(t,.12),color:t,border:"".concat(d(1)," solid transparent")}}return"outline"===r?l.isThemeColor?void 0===l.shade?{background:"transparent",hover:"var(--mantine-color-".concat(t,"-outline-hover)"),color:"var(--mantine-color-".concat(t,"-outline)"),border:"".concat(d(1)," solid var(--mantine-color-").concat(t,"-outline)")}:{background:"transparent",hover:x(n.colors[l.color][l.shade],.05),color:"var(--mantine-color-".concat(l.color,"-").concat(l.shade,")"),border:"".concat(d(1)," solid var(--mantine-color-").concat(l.color,"-").concat(l.shade,")")}:{background:"transparent",hover:x(t,.05),color:t,border:"".concat(d(1)," solid ").concat(t)}:"subtle"===r?l.isThemeColor?void 0===l.shade?{background:"transparent",hover:"var(--mantine-color-".concat(t,"-light-hover)"),color:"var(--mantine-color-".concat(t,"-light-color)"),border:"".concat(d(1)," solid transparent")}:{background:"transparent",hover:x(n.colors[l.color][l.shade],.12),color:"var(--mantine-color-".concat(l.color,"-").concat(Math.min(l.shade,6),")"),border:"".concat(d(1)," solid transparent")}:{background:"transparent",hover:x(t,.12),color:t,border:"".concat(d(1)," solid transparent")}:"transparent"===r?l.isThemeColor?void 0===l.shade?{background:"transparent",hover:"transparent",color:"var(--mantine-color-".concat(t,"-light-color)"),border:"".concat(d(1)," solid transparent")}:{background:"transparent",hover:"transparent",color:"var(--mantine-color-".concat(l.color,"-").concat(Math.min(l.shade,6),")"),border:"".concat(d(1)," solid transparent")}:{background:"transparent",hover:"transparent",color:t,border:"".concat(d(1)," solid transparent")}:"white"===r?l.isThemeColor?void 0===l.shade?{background:"var(--mantine-color-white)",hover:f(n.white,.01),color:"var(--mantine-color-".concat(t,"-filled)"),border:"".concat(d(1)," solid transparent")}:{background:"var(--mantine-color-white)",hover:f(n.white,.01),color:"var(--mantine-color-".concat(l.color,"-").concat(l.shade,")"),border:"".concat(d(1)," solid transparent")}:{background:"var(--mantine-color-white)",hover:f(n.white,.01),color:t,border:"".concat(d(1)," solid transparent")}:"gradient"===r?{background:w(o,n),hover:w(o,n),color:"var(--mantine-color-white)",border:"none"}:"default"===r?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:"".concat(d(1)," solid var(--mantine-color-default-border)")}:{}},autoContrast:!1,luminanceThreshold:.3,fontFamily:k,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:k,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:d(34),lineHeight:"1.3"},h2:{fontSize:d(26),lineHeight:"1.35"},h3:{fontSize:d(22),lineHeight:"1.4"},h4:{fontSize:d(18),lineHeight:"1.45"},h5:{fontSize:d(16),lineHeight:"1.5"},h6:{fontSize:d(14),lineHeight:"1.5"}}},fontSizes:{xs:d(12),sm:d(14),md:d(16),lg:d(18),xl:d(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"}
1,radius:{xs:d(2),sm:d(4),md:d(8),lg:d(16),xl:d(32)},spacing:{xs:d(10),sm:d(12),md:d(16),lg:d(20),xl:d(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${d(1)} ${d(3)} rgba(0, 0, 0, 0.05), 0 ${d(1)} ${d(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${d(1)} ${d(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${d(10)} ${d(15)} ${d(-5)}, rgba(0, 0, 0, 0.04) 0 ${d(7)} ${d(7)} ${d(-5)}`,md:`0 ${d(1)} ${d(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${d(20)} ${d(25)} ${d(-5)}, rgba(0, 0, 0, 0.04) 0 ${d(10)} ${d(10)} ${d(-5)}`,lg:`0 ${d(1)} ${d(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${d(28)} ${d(23)} ${d(-7)}, rgba(0, 0, 0, 0.04) 0 ${d(12)} ${d(12)} ${d(-7)}`,xl:`0 ${d(1)} ${d(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${d(36)} ${d(28)} ${d(-7)}, rgba(0, 0, 0, 0.04) 0 ${d(17)} ${d(17)} ${d(-7)}`},other:{},components:{}};function S(e){return e&&"object"==typeof e&&!Array.isArray(e)}function M(e,t){let n={...e};return S(e)&&S(t)&&Object.keys(t).forEach(r=>{S(t[r])&&r in e?n[r]=M(n[r],t[r]):n[r]=t[r]}),n}function E(e){return!(e<0)&&!(e>9)&&parseInt(e.toString(),10)===e}function T(e){if(!(e.primaryColor in e.colors))throw Error("[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");if("object"==typeof e.primaryShade&&(!E(e.primaryShade.dark)||!E(e.primaryShade.light))||"number"==typeof e.primaryShade&&!E(e.primaryShade))throw Error("[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }")}let j=(0,o.createContext)(null),R=()=>(0,o.useContext)(j)||C;function A(){let e=(0,o.useContext)(j);if(!e)throw Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function N(e){let{theme:t,children:n,inherit:r=!0}=e,i=R(),l=(0,o.useMemo)(()=>(function(e,t){if(!t)return T(e),e;let n=M(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings.fontFamily=t.fontFamily),T(n),n})(r?i:C,t),[t,i,r]);return(0,s.jsx)(j.Provider,{value:l,children:n})}function O(e,t,n){var r;let o=A(),i=null===(r=o.components[e])||void 0===r?void 0:r.defaultProps,l="function"==typeof i?i(o):i;return{...t,...l,...a(n)}}function H(e){return e}function L(e){let t=(0,o.forwardRef)(e);return t.extend=H,t.withProps=e=>{let n=(0,o.forwardRef)((n,r)=>(0,s.jsx)(t,{...e,...n,ref:r}));return n.extend=t.extend,n.displayName="WithProps(".concat(t.displayName,")"),n},t}function I(e){let t=(0,o.forwardRef)(e);return t.withProps=e=>{let n=(0,o.forwardRef)((n,r)=>(0,s.jsx)(t,{...e,...n,ref:r}));return n.extend=t.extend,n.displayName="WithProps(".concat(t.displayName,")"),n},t.extend=H,t}function _(e){if("number"==typeof e)return!0;if("string"==typeof e){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&""!==e.trim())return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"size",n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(void 0!==e)return _(e)?n?d(e):e:"var(--".concat(t,"-").concat(e,")")}function D(e){return P(e,"mantine-spacing")}function z(e){return void 0===e?"var(--mantine-radius-default)":P(e,"mantine-radius")}function V(e){return P(e,"mantine-font-size")}N.displayName="@mantine/core/MantineThemeProvider";let F=(0,o.createContext)(null);function B(){let e=(0,o.useContext)(F);if(!e)throw Error("[@mantine/core] MantineProvider was not found in tree");return e}function $(){return B().getStyleNonce}var U=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t){if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r)}return o}(e))&&(r&&(r+=" "),r+=t);return r};let W={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"},G={};function Y(e){let{theme:t,classNames:n,props:r,stylesCtx:o}=e;return function(e){let t={};
1return e.forEach(e=>{Object.entries(e).forEach(e=>{let[n,r]=e;t[n]?t[n]=U(t[n],r):t[n]=r})}),t}((Array.isArray(n)?n:[n]).map(e=>"function"==typeof e?e(t,r,o):e||G))}function Z(e){let{selector:t,stylesCtx:n,theme:r,classNames:o,props:i}=e;return Y({theme:r,classNames:o,props:i,stylesCtx:n})[t]}function J(e){let{theme:t,styles:n,props:r,stylesCtx:o}=e;return(Array.isArray(n)?n:[n]).reduce((e,n)=>"function"==typeof n?{...e,...n(t,r,o)}:{...e,...n},{})}function q(e){let{style:t,theme:n}=e;return Array.isArray(t)?[...t].reduce((e,t)=>({...e,...q({style:t,theme:n})}),{}):"function"==typeof t?t(n):null==t?{}:t}function K(e){let{name:t,classes:n,props:r,stylesCtx:o,className:i,style:l,rootSelector:s="root",unstyled:c,classNames:u,styles:d,vars:p,varsResolver:h}=e,f=A(),m=B().classNamesPrefix,g=B().withStaticClasses,y=B().headless,v=(Array.isArray(t)?t:[t]).filter(e=>e),{withStylesTransform:b,getTransformedStyles:w}=function(e){var t,n;let{props:r,stylesCtx:o,themeName:i}=e,l=A(),s=null===(t=null===(n=B().stylesTransform)||void 0===n?void 0:n.styles)||void 0===t?void 0:t();return{getTransformedStyles:e=>s?[...e.map(e=>s(e,{props:r,theme:l,ctx:o})),...i.map(e=>{var t;return s(null===(t=l.components[e])||void 0===t?void 0:t.styles,{props:r,theme:l,ctx:o})})].filter(Boolean):[],withStylesTransform:!!s}}({props:r,stylesCtx:o,themeName:v});return(e,t)=>({className:function(e){let{theme:t,options:n,themeName:r,selector:o,classNamesPrefix:i,classNames:l,classes:s,unstyled:a,className:c,rootSelector:u,props:d,stylesCtx:p,withStaticClasses:h,headless:f,transformedStyles:m}=e;return U(function(e){let{theme:t,options:n,unstyled:r}=e;return U((null==n?void 0:n.focusable)&&!r&&(t.focusClassName||W[t.focusRing]),(null==n?void 0:n.active)&&!r&&t.activeClassName)}({theme:t,options:n,unstyled:a||f}),function(e){let{themeName:t,theme:n,selector:r,props:o,stylesCtx:i}=e;return t.map(e=>{var t,l;return null===(t=Y({theme:n,classNames:null===(l=n.components[e])||void 0===l?void 0:l.classNames,props:o,stylesCtx:i}))||void 0===t?void 0:t[r]})}({theme:t,themeName:r,selector:o,props:d,stylesCtx:p}),function(e){let{options:t,classes:n,selector:r,unstyled:o}=e;return(null==t?void 0:t.variant)&&!o?n["".concat(r,"--").concat(t.variant)]:void 0}({options:n,classes:s,selector:o,unstyled:a}),Z({selector:o,stylesCtx:p,theme:t,classNames:l,props:d}),Z({selector:o,stylesCtx:p,theme:t,classNames:m,props:d}),function(e){let{selector:t,stylesCtx:n,options:r,props:o,theme:i}=e;return Y({theme:i,classNames:null==r?void 0:r.classNames,props:(null==r?void 0:r.props)||o,stylesCtx:n})[t]}({selector:o,stylesCtx:p,options:n,props:d,theme:t}),function(e){let{rootSelector:t,selector:n,className:r}=e;return t===n?r:void 0}({rootSelector:u,selector:o,className:c}),function(e){let{selector:t,classes:n,unstyled:r}=e;return r?void 0:n[t]}({selector:o,classes:s,unstyled:a||f}),h&&!f&&function(e){let{themeName:t,classNamesPrefix:n,selector:r,withStaticClass:o}=e;return!1===o?[]:t.map(e=>"".concat(n,"-").concat(e,"-").concat(r))}({themeName:r,classNamesPrefix:i,selector:o,withStaticClass:null==n?void 0:n.withStaticClass}),null==n?void 0:n.className)}({theme:f,options:t,themeName:v,selector:e,classNamesPrefix:m,classNames:u,classes:n,unstyled:c,className:i,rootSelector:s,props:r,stylesCtx:o,withStaticClasses:g,headless:y,transformedStyles:w([null==t?void 0:t.styles,d])}),style:function(e){let{theme:t,themeName:n,selector:r,options:o,props:i,stylesCtx:l,rootSelector:s,styles:c,style:u,vars:d,varsResolver:p,headless:h,withStylesTransform:f}=e;return{...!f&&function(e){let{theme:t,themeName:n,props:r,stylesCtx:o,selector:i}=e;return n.map(e=>{var n;return J({theme:t,styles:null===(n=t.components[e])||void 0===n?void 0:n.styles,props:r,stylesCtx:o})[i]}).reduce((e,t)=>({...e,...t}),{})}({theme:t,themeName:n,props:i,stylesCtx:l,selector:r}),...!f&&J({theme:t,styles:c,props:i,stylesCtx:l})[r],...!f&&J({theme:t,styles:null==o?void 0:o.styles,props:(null==o?void 0:o.props)||i,stylesCtx:l})[r],...function(e){var t;let{vars:n,varsResolver:r,theme:o,props:i,stylesCtx:l,selector:s,themeName:c,headless:u}=e;return null===(t=[u?{}:null==r?void 0:r(o,i,l),...c.map(e=>{var t,n,r;return null===(r=o.components)||void 0===r?void 0:null===(n=r[e])||void 0===n?void 0:null===(t=n.vars)||void 0===t?void 0:t.call(n,o,i,l)}),null==n?void 0:n(o,i,l)].reduce((e,t)=>
1(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...a(t[n])}}),e),{}))||void 0===t?void 0:t[s]}({theme:t,props:i,stylesCtx:l,vars:d,varsResolver:p,selector:r,themeName:n,headless:h}),...s===r?q({style:u,theme:t}):null,...q({style:null==o?void 0:o.style,theme:t})}}({theme:f,themeName:v,selector:e,options:t,props:r,stylesCtx:o,rootSelector:s,styles:d,style:l,vars:p,varsResolver:h,headless:y,withStylesTransform:b})})}function X(e){let{m:t,mx:n,my:r,mt:o,mb:i,ml:l,mr:s,me:c,ms:u,p:d,px:p,py:h,pt:f,pb:m,pl:g,pr:y,pe:v,ps:b,bd:w,bg:x,c:k,opacity:C,ff:S,fz:M,fw:E,lts:T,ta:j,lh:R,fs:A,tt:N,td:O,w:H,miw:L,maw:I,h:_,mih:P,mah:D,bgsz:z,bgp:V,bgr:F,bga:B,pos:$,top:U,left:W,bottom:G,right:Y,inset:Z,display:J,flex:q,hiddenFrom:K,visibleFrom:X,lightHidden:Q,darkHidden:ee,sx:et,...en}=e;return{styleProps:a({m:t,mx:n,my:r,mt:o,mb:i,ml:l,mr:s,me:c,ms:u,p:d,px:p,py:h,pt:f,pb:m,pl:g,pr:y,pe:v,ps:b,bd:w,bg:x,c:k,opacity:C,ff:S,fz:M,fw:E,lts:T,ta:j,lh:R,fs:A,tt:N,td:O,w:H,miw:L,maw:I,h:_,mih:P,mah:D,bgsz:z,bgp:V,bgr:F,bga:B,pos:$,top:U,left:W,bottom:G,right:Y,inset:Z,display:J,flex:q,hiddenFrom:K,visibleFrom:X,lightHidden:Q,darkHidden:ee,sx:et}),rest:en}}function Q(e){return Object.keys(e)}function ee(e){return Q(e).reduce((t,n)=>void 0!==e[n]?"".concat(t).concat(n.replace(/[A-Z]/g,e=>"-".concat(e.toLowerCase())),":").concat(e[n],";"):t,"").trim()}function et(e){let t=$();return(0,s.jsx)("style",{"data-mantine-styles":"inline",nonce:null==t?void 0:t(),dangerouslySetInnerHTML:{__html:function(e){let{selector:t,styles:n,media:r,container:o}=e,i=n?ee(n):"",l=Array.isArray(r)?r.map(e=>"@media".concat(e.query,"{").concat(t,"{").concat(ee(e.styles),"}}")):[],s=Array.isArray(o)?o.map(e=>"@container ".concat(e.query,"{").concat(t,"{").concat(ee(e.styles),"}}")):[];return"".concat(i?"".concat(t,"{").concat(i,"}"):"").concat(l.join("")).concat(s.join("")).trim()}(e)}})}function en(e){return e.startsWith("data-")?e:"data-".concat(e)}function er(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...er(n,t)}),{}):"function"==typeof e?e(t):null==e?{}:e}let eo={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function ei(e,t){let n=v({color:e,theme:t});return"dimmed"===n.color?"var(--mantine-color-dimmed)":"bright"===n.color?"var(--mantine-color-bright)":n.variable?"var(".concat(n.variable,")"):n.color}let el={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"},es=["h1","h2","h3","h4","h5","h6"],ea=["h1","h2","h3","h4","h5","h6"],ec={color:ei,textColor:function(e,t){let n=v({color:e,theme:t});return n.isThemeColor&&void 0===n.shade?"var(--mantine-color-".concat(n.color,"-text)"):ei(e,t)},fontSize:function(e,t){return"string"==typeof e&&e in t.fontSizes?"var(--mantine-font-size-".concat(e,")"):"string"==typeof e&&es.includes(e)?"var(--mantine-".concat(e,"-font-size)"):"number"==typeof e||"string"==typeof e?d(e):e},spacing:function(e,t){if("number"==typeof e)return d(e);if("string"==typeof e){let n=e.replace("-","");if(!(n in t.spacing))return d(e);let r="--mantine-spacing-".concat(n);return e.startsWith("-")?"calc(var(".concat(r,") * -1)"):"var(".concat(r,")")}return e},identity:function(e){return e},size:function(e){return"number"==typeof e?d(e):e},lineHeight:function(e,t){return"string"==typeof e&&e in t.lineHeights?"var(--mantine-line-height-".concat(e,")"):"string"==typeof e&&ea.includes(e)?"var(--mantine-".concat(e,"-line-height)"):e},fontFamily:function(e){return"string"==typeof e&&e in el?el[e]:e},border:function(e,t){if("number"==typeof e)return d(e);if("string"==typeof e){let[n,r,...o]=e.split(" ").filter(e=>""!==e.trim()),i="".concat(d(n));return r&&(i+=" ".concat(r)),o.length>0&&(i+=" ".concat(ei(o.join(" "),t))),i.trim()}return e}};function eu(e){return e.replace("(min-width: ","").replace("em)","")}let ed=(0,o.forwardRef)((e,t)=>{var n,r;let{component:i,style:l,__vars:a,className:c,variant:u,mod:d,size:p,hiddenFrom:h,visibleFrom
1:f,lightHidden:m,darkHidden:g,renderRoot:y,__size:v,...b}=e,w=A(),{styleProps:x,rest:k}=X(b),C=null===(r=B().stylesTransform)||void 0===r?void 0:r.sx,S=null==C?void 0:null===(n=C())||void 0===n?void 0:n(x.sx),M=function(){let e=(0,o.useId)().replace(/:/g,"");return"__m__-".concat(e)}(),E=function(e){let{styleProps:t,data:n,theme:r}=e;return function(e){let{media:t,...n}=e,r=Object.keys(t).sort((e,t)=>Number(eu(e))-Number(eu(t))).map(e=>({query:e,styles:t[e]}));return{...n,media:r}}(Q(t).reduce((e,o)=>{var i,l;if("hiddenFrom"===o||"visibleFrom"===o||"sx"===o)return e;let s=n[o],a=Array.isArray(s.property)?s.property:[s.property],c="object"==typeof(l=t[o])&&null!==l?"base"in l?l.base:void 0:l;if(!function(e){if("object"!=typeof e||null===e)return!1;let t=Object.keys(e);return 1!==t.length||"base"!==t[0]}(t[o]))return a.forEach(t=>{e.inlineStyles[t]=ec[s.type](c,r)}),e;e.hasResponsiveStyles=!0;let u="object"==typeof(i=t[o])&&null!==i?Q(i).filter(e=>"base"!==e):[];return a.forEach(n=>{c&&(e.styles[n]=ec[s.type](c,r)),u.forEach(i=>{var l;let a="(min-width: ".concat(r.breakpoints[i],")");e.media[a]={...e.media[a],[n]:ec[s.type]("object"==typeof(l=t[o])&&null!==l&&i in l?l[i]:l,r)}})}),e},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}({styleProps:x,theme:w,data:eo}),T={ref:t,style:function(e){let{theme:t,style:n,vars:r,styleProps:o}=e,i=er(n,t),l=er(r,t);return{...i,...l,...o}}({theme:w,style:l,vars:a,styleProps:E.inlineStyles}),className:U(c,S,{[M]:E.hasResponsiveStyles,"mantine-light-hidden":m,"mantine-dark-hidden":g,["mantine-hidden-from-".concat(h)]:h,["mantine-visible-from-".concat(f)]:f}),"data-variant":u,"data-size":_(p)?void 0:p||void 0,size:v,...function e(t){return t?"string"==typeof t?{[en(t)]:!0}:Array.isArray(t)?[...t].reduce((t,n)=>({...t,...e(n)}),{}):Object.keys(t).reduce((e,n)=>{let r=t[n];return void 0===r||""===r||!1===r||null===r||(e[en(n)]=t[n]),e},{}):null}(d),...k};return(0,s.jsxs)(s.Fragment,{children:[E.hasResponsiveStyles&&(0,s.jsx)(et,{selector:".".concat(M),styles:E.styles,media:E.media}),"function"==typeof y?y(T):(0,s.jsx)(i||"div",{...T})]})});ed.displayName="@mantine/core/Box";let[ep,eh]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=(0,o.createContext)(e);return[e=>{let{children:n,value:r}=e;return(0,s.jsx)(t.Provider,{value:r,children:n})},()=>(0,o.useContext)(t)]}({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var ef={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};let em={},eg=(e,t)=>{let{size:n}=t;return{description:{"--input-description-size":void 0===n?void 0:"calc(".concat(V(n)," - ").concat(d(2),")")}}},ey=L((e,t)=>{let n=O("InputDescription",em,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:c,size:u,__staticSelector:d,__inheritStyles:p=!0,variant:h,...f}=O("InputDescription",em,n),m=eh(),g=K({name:["InputWrapper",d],props:n,classes:ef,className:o,style:i,classNames:r,styles:l,unstyled:a,rootSelector:"description",vars:c,varsResolver:eg}),y=p&&(null==m?void 0:m.getStyles)||g;return(0,s.jsx)(ed,{component:"p",ref:t,variant:h,size:u,...y("description",(null==m?void 0:m.getStyles)?{className:o,style:i}:void 0),...f})});ey.classes=ef,ey.displayName="@mantine/core/InputDescription";let ev={},eb=(e,t)=>{let{size:n}=t;return{error:{"--input-error-size":void 0===n?void 0:"calc(".concat(V(n)," - ").concat(d(2),")")}}},ew=L((e,t)=>{let n=O("InputError",ev,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:c,size:u,__staticSelector:d,__inheritStyles:p=!0,variant:h,...f}=n,m=K({name:["InputWrapper",d],props:n,classes:ef,className:o,style:i,classNames:r,styles:l,unstyled:a,rootSelector:"error",vars:c,varsResolver:eb}),g=eh(),y=p&&(null==g?void 0:g.getStyles)||m;return(0,s.jsx)(ed,{component:"p",ref:t,variant:h,size:u,...y("error",(null==g?void 0:g.getStyles)?{className:o,style:i}:void 0),...f})});ew.classes=ef,ew.displayName="@mantine/core/InputError";let ex={labelElement:"label"},ek=(e,t)=>{let{size:n}=t;return{label:{"--input-label-size":V(n),"--input-asterisk-color":void 0}}},eC=L((e,t)=>{let n=O("InputLabel",ex,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:c,labelElement:u,size:d,required:p,htmlFor:h,onMouseDown:f,children:m,__staticSelector:g,variant:y,mod:v,...b}=O("InputLabel",ex,n),w=K({name:["InputWrapper",g],props:n,classes:ef,className:o,style:i,classNames:r,styles:l,unstyled:a,rootSelector:"label",vars:c,varsResolver:ek}),x=eh(),k=(null==x?void 0:x.getStyles)||w;return(0,s.jsxs)(ed,{...k("label",(null==x?void 0:x.getStyles)?{className:o,style:i}:void 0),component:u,variant:y,size:d,ref:t,htmlFor:"label"===u?h:void 0,mod:[{required:p},v],onMouseDown:e=>{null==f||f(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...b,children:[m,p&&(0,s.jsx)("span",{...k("required"),"aria-hidden":!0,
1children:" *"})]})});eC.classes=ef,eC.displayName="@mantine/core/InputLabel";let eS={},eM=L((e,t)=>{let n=O("InputPlaceholder",eS,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:c,__staticSelector:u,variant:d,error:p,mod:h,...f}=O("InputPlaceholder",eS,n),m=K({name:["InputPlaceholder",u],props:n,classes:ef,className:o,style:i,classNames:r,styles:l,unstyled:a,rootSelector:"placeholder"});return(0,s.jsx)(ed,{...m("placeholder"),mod:[{error:!!p},h],component:"span",variant:d,ref:t,...f})});eM.classes=ef,eM.displayName="@mantine/core/InputPlaceholder";let eE="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function eT(){return"mantine-".concat(Math.random().toString(36).slice(2,11))}let ej=o["useId".toString()]||(()=>void 0);function eR(e){let t=function(){let e=ej();return e?"mantine-".concat(e.replace(/:/g,"")):""}(),[n,r]=(0,o.useState)(t);return(eE(()=>{r(eT())},[]),"string"==typeof e)?e:"undefined"==typeof window?t:n}let eA={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},eN=(e,t)=>{let{size:n}=t;return{label:{"--input-label-size":V(n),"--input-asterisk-color":void 0},error:{"--input-error-size":void 0===n?void 0:"calc(".concat(V(n)," - ").concat(d(2),")")},description:{"--input-description-size":void 0===n?void 0:"calc(".concat(V(n)," - ").concat(d(2),")")}}},eO=L((e,t)=>{let n=O("InputWrapper",eA,e),{classNames:r,className:i,style:l,styles:a,unstyled:c,vars:u,size:d,variant:p,__staticSelector:h,inputContainer:f,inputWrapperOrder:m,label:g,error:y,description:v,labelProps:b,descriptionProps:w,errorProps:x,labelElement:k,children:C,withAsterisk:S,id:M,required:E,__stylesApiProps:T,mod:j,...R}=n,A=K({name:["InputWrapper",h],props:T||n,classes:ef,className:i,style:l,classNames:r,styles:a,unstyled:c,vars:u,varsResolver:eN}),N={size:d,variant:p,__staticSelector:h},H=eR(M),L=(null==x?void 0:x.id)||"".concat(H,"-error"),I=(null==w?void 0:w.id)||"".concat(H,"-description"),_=!!y&&"boolean"!=typeof y,P=!!v,D="".concat(_?L:""," ").concat(P?I:""),z=D.trim().length>0?D.trim():void 0,V=(null==b?void 0:b.id)||"".concat(H,"-label"),F=g&&(0,s.jsx)(eC,{labelElement:k,id:V,htmlFor:H,required:"boolean"==typeof S?S:E,...N,...b,children:g},"label"),B=P&&(0,s.jsx)(ey,{...w,...N,size:(null==w?void 0:w.size)||N.size,id:(null==w?void 0:w.id)||I,children:v},"description"),$=(0,s.jsx)(o.Fragment,{children:f(C)},"input"),U=_&&(0,o.createElement)(ew,{...x,...N,size:(null==x?void 0:x.size)||N.size,key:"error",id:(null==x?void 0:x.id)||L},y),W=m.map(e=>{switch(e){case"label":return F;case"input":return $;case"description":return B;case"error":return U;default:return null}});return(0,s.jsx)(ep,{value:{getStyles:A,describedBy:z,inputId:H,labelId:V,...function(e,t){let{hasDescription:n,hasError:r}=t,o=e.findIndex(e=>"input"===e),i=e.slice(0,o),l=e.slice(o+1),s=n&&i.includes("description")||r&&i.includes("error");return{offsetBottom:n&&l.includes("description")||r&&l.includes("error"),offsetTop:s}}(m,{hasDescription:P,hasError:_})},children:(0,s.jsx)(ed,{ref:t,variant:p,size:d,mod:[{error:!!y},j],...A("root"),...R,children:W})})});eO.classes=ef,eO.displayName="@mantine/core/InputWrapper";let eH={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},eL=(e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":n.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":P(t.size,"input-height"),"--input-fz":V(t.size),"--input-radius":void 0===t.radius?void 0:z(t.radius),"--input-left-section-width":void 0!==t.leftSectionWidth?d(t.leftSectionWidth):void 0,"--input-right-section-width":void 0!==t.rightSectionWidth?d(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?P(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),eI=I((e,t)=>{let n=O("Input",eH,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,required:c,__staticSelector:u,__stylesApiProps:d,size:p,wrapperProps:h,error:f,disabled:m,leftSection:g,leftSectionProps:y,leftSectionWidth:v,rightSection:b,rightSectionProps:w,rightSectionWidth:x,rightSectionPointerEvents:k,leftSectionPointerEvents:C,variant:S,vars:M,pointer:E,multiline:T,radius:j,id:R,withAria:A,withErrorStyles:N,mod:H,inputSize:L,...I}=n,{styleProps:_,rest:P}=X(I),D=eh(),z=K({name:["Input",u],props:d||n,classes:ef,className:o,style:i,classNames:r,styles:l,unstyled:a,stylesCtx:{offsetBottom:null==D?void 0:D.offsetBottom,offsetTop:null==D?void 0:D.offsetTop},rootSelector:"wrapper",vars:M,varsResolver:eL}),V=A?{required:c,disabled:m,"aria-invalid":!!f,"aria-describedby":null==D?void 0:D.describedBy,id:(null==D?void 0:D.inputId)||R}:{};return(0,s.jsxs)(ed,{...z("wrapper"),..._,...h,mod:[{error:!!f&&N,pointer:E,disabled:m,multiline:T,"data-with-right-section":!!b,"data-with-left-section":!!g}
1,H],variant:S,size:p,children:[g&&(0,s.jsx)("div",{...y,"data-position":"left",...z("section",{className:null==y?void 0:y.className,style:null==y?void 0:y.style}),children:g}),(0,s.jsx)(ed,{component:"input",...P,...V,ref:t,required:c,mod:{disabled:m,error:!!f&&N},variant:S,__size:L,...z("input")}),b&&(0,s.jsx)("div",{...w,"data-position":"right",...z("section",{className:null==w?void 0:w.className,style:null==w?void 0:w.style}),children:b})]})});eI.classes=ef,eI.Wrapper=eO,eI.Label=eC,eI.Error=ew,eI.Description=ey,eI.Placeholder=eM,eI.displayName="@mantine/core/Input";let e_={__staticSelector:"InputBase",withAria:!0},eP=I((e,t)=>{let{inputProps:n,wrapperProps:r,...o}=function(e,t,n){let r=O(e,t,n),{label:o,description:i,error:l,required:s,classNames:a,styles:c,className:u,unstyled:d,__staticSelector:p,__stylesApiProps:h,errorProps:f,labelProps:m,descriptionProps:g,wrapperProps:y,id:v,size:b,style:w,inputContainer:x,inputWrapperOrder:k,withAsterisk:C,variant:S,vars:M,mod:E,...T}=r,{styleProps:j,rest:R}=X(T),A={label:o,description:i,error:l,required:s,classNames:a,className:u,__staticSelector:p,__stylesApiProps:h||r,errorProps:f,labelProps:m,descriptionProps:g,unstyled:d,styles:c,size:b,style:w,inputContainer:x,inputWrapperOrder:k,withAsterisk:C,variant:S,id:v,mod:E,...y};return{...R,classNames:a,styles:c,unstyled:d,wrapperProps:{...A,...j},inputProps:{required:s,classNames:a,styles:c,unstyled:d,size:b,__staticSelector:p,__stylesApiProps:h||r,error:l,variant:S,id:v}}}("InputBase",e_,e);return(0,s.jsx)(eI.Wrapper,{...r,children:(0,s.jsx)(eI,{...n,...o,ref:t})})});eP.classes={...eI.classes,...eI.Wrapper.classes},eP.displayName="@mantine/core/InputBase";let eD={},ez=L((e,t)=>{let n=O("TextInput",eD,e);return(0,s.jsx)(eP,{component:"input",ref:t,...n,__staticSelector:"TextInput"})});function eV(e){let{value:t,defaultValue:n,finalValue:r,onChange:i=()=>{}}=e,[l,s]=(0,o.useState)(void 0!==n?n:r);return void 0!==t?[t,i,!0]:[l,function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];s(e),null==i||i(e,...n)},!1]}function eF(e,t){let n=(0,o.useRef)(!1);(0,o.useEffect)(()=>()=>{n.current=!1},[]),(0,o.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}function eB(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}ez.classes=eP.classes,ez.displayName="@mantine/core/TextInput";let e$=["mousedown","touchstart"],eU=200,eW=300,eG=400,eY=(0,o.createContext)({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function eZ(){return(0,o.useContext)(eY)}function eJ(e,t){if("rtl"===e&&(t.includes("right")||t.includes("left"))){let[e,n]=t.split("-"),r="right"===e?"left":"right";return void 0===n?r:"".concat(r,"-").concat(n)}return t}function eq(e){let t=(0,o.createContext)(null);return[e=>{let{children:n,value:r}=e;return(0,s.jsx)(t.Provider,{value:r,children:n})},()=>{let n=(0,o.useContext)(t);if(null===n)throw Error(e);return n}]}let[eK,eX]=eq("Popover component was not found in the tree");function eQ(e,t){"function"==typeof e?e(t):"object"==typeof e&&null!==e&&"current"in e&&(e.current=t)}function e0(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach(t=>eQ(t,e))}}function e1(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.useCallback)(e0(...t),t)}let e2=()=>{};function e4(e,t,n,r){return"center"===e||"center"===r?{top:t}:"end"===e?{bottom:n}:"start"===e?{top:n}:{}}function e5(e,t,n,r,o){return"center"===e||"center"===r?{left:t}:"end"===e?{["ltr"===o?"right":"left"]:n}:"start"===e?{["ltr"===o?"left":"right"]:n}:{}}let e3={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"},e8=(0,o.forwardRef)((e,t)=>{let{position:n,arrowSize:r,arrowOffset:o,arrowRadius:i,arrowPosition:l,visible:a,arrowX:c,arrowY:u,style:d,...p}=e,{dir:h}=eZ();return a?(0,s.jsx)("div",{...p,ref:t,style:{...d,...function(e){let{position:t,arrowSize:n,arrowOffset:r,arrowRadius:o,arrowPosition:i,arrowX:l,arrowY:s,dir:a}=e,[c,u="center"]=t.split("-"),d={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[e3[c]]:o},p=-n/2;return"left"===c?{...d,...e4(u,s,r,i),right:p,borderLeftColor:"transparent",borderBottomColor:"transparent"}
1:"right"===c?{...d,...e4(u,s,r,i),left:p,borderRightColor:"transparent",borderTopColor:"transparent"}:"top"===c?{...d,...e5(u,l,r,i,a),bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent"}:"bottom"===c?{...d,...e5(u,l,r,i,a),top:p,borderBottomColor:"transparent",borderRightColor:"transparent"}:{}}({position:n,arrowSize:r,arrowOffset:o,arrowRadius:i,arrowPosition:l,dir:h,arrowX:c,arrowY:u})}}):null});e8.displayName="@mantine/core/FloatingArrow";let e7=/input|select|textarea|button|object/,e6="a, input, select, textarea, button, object, [tabindex]";function e9(e){let t=e.getAttribute("tabindex");return null===t&&(t=void 0),parseInt(t,10)}function te(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(e9(e));return(e7.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&function(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||"hidden"===e.getAttribute("type"))return!1;let t=e;for(;t&&t!==document.body&&11!==t.nodeType;){if("none"===t.style.display)return!1;t=t.parentNode}return!0}(e)}function tt(e){let t=e9(e);return(Number.isNaN(t)||t>=0)&&te(e)}function tn(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,o.useRef)(),n=(0,o.useRef)(null),r=e=>{let t=e.querySelector("[data-autofocus]");if(!t){let n=Array.from(e.querySelectorAll(e6));!(t=n.find(tt)||n.find(te)||null)&&te(e)&&(t=e)}t&&t.focus({preventScroll:!0})},i=(0,o.useCallback)(o=>{if(e){if(null===o){n.current&&(n.current(),n.current=null);return}n.current=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body > :not(script)",n=eT(),r=Array.from(document.querySelectorAll(t)).map(t=>{var r;if((null==t?void 0:null===(r=t.shadowRoot)||void 0===r?void 0:r.contains(e))||t.contains(e))return;let o=t.getAttribute("aria-hidden"),i=t.getAttribute("data-hidden"),l=t.getAttribute("data-focus-id");return t.setAttribute("data-focus-id",n),null===o||"false"===o?t.setAttribute("aria-hidden","true"):i||l||t.setAttribute("data-hidden",o),{node:t,ariaHidden:i||null}});return()=>{r.forEach(e=>{e&&n===e.node.getAttribute("data-focus-id")&&(null===e.ariaHidden?e.node.removeAttribute("aria-hidden"):e.node.setAttribute("aria-hidden",e.ariaHidden),e.node.removeAttribute("data-focus-id"),e.node.removeAttribute("data-hidden"))})}}(o),t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&r(o)}),t.current=o):t.current=null)}},[e]);return(0,o.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));let o=e=>{"Tab"===e.key&&t.current&&function(e,t){let n=Array.from(e.querySelectorAll(e6)).filter(tt);if(!n.length){t.preventDefault();return}let r=n[t.shiftKey?0:n.length-1],o=e.getRootNode(),i=r===o.activeElement||e===o.activeElement,l=o.activeElement;if("INPUT"===l.tagName&&"radio"===l.getAttribute("type")&&(i=n.filter(e=>"radio"===e.getAttribute("type")&&e.getAttribute("name")===l.getAttribute("name")).includes(r)),!i)return;t.preventDefault();let s=n[t.shiftKey?n.length-1:0];s&&s.focus()}(t.current,e)};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),n.current&&n.current()}},[e]),i}function tr(e){return!Array.isArray(e)&&null!==e&&"object"==typeof e&&e.type!==o.Fragment}var to={root:"m_515a97f8"};let ti={},tl=L((e,t)=>{let n=O("VisuallyHidden",ti,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:c,...u}=n,d=K({name:"VisuallyHidden",classes:to,props:n,className:o,style:i,classNames:r,styles:l,unstyled:a});return(0,s.jsx)(ed,{component:"span",ref:t,...d("root"),...u})});function ts(e){let{children:t,active:n=!0,refProp:r="ref",innerRef:i}=e,l=e1(tn(n),i);return tr(t)?(0,o.cloneElement)(t,{[r]:l}):t}function ta(e){return(0,s.jsx)(tl,{tabIndex:-1,"data-autofocus":!0,...e})}tl.classes=to,tl.displayName="@mantine/core/VisuallyHidden",ts.displayName="@mantine/core/FocusTrap",ta.displayName="@mantine/core/FocusTrapInitialFocus",ts.InitialFocus=ta;var tc=n(54887);let tu={},td=(0,o.forwardRef)((e,t)=>{let{children:n,target:r,...i}=O("Portal",tu,e),[l,a]=(0,o.useState)(!1),c=(0,o.useRef)(null);return(eE(()=>(a(!0),c.current=r?"string"==typeof r?document.querySelector(r):r:function(e){let t=document.createElement("div");return t.setAttribute("data-portal","true"),"string"==typeof e.className&&t.classList.add(...e.className.split(" ").filter(
1Boolean)),"object"==typeof e.style&&Object.assign(t.style,e.style),"string"==typeof e.id&&t.setAttribute("id",e.id),t}(i),eQ(t,c.current),!r&&c.current&&document.body.appendChild(c.current),()=>{!r&&c.current&&document.body.removeChild(c.current)}),[r]),l&&c.current)?(0,tc.createPortal)((0,s.jsx)(s.Fragment,{children:n}),c.current):null});function tp(e){let{withinPortal:t=!0,children:n,...r}=e;return t?(0,s.jsx)(td,{...r,children:n}):(0,s.jsx)(s.Fragment,{children:n})}td.displayName="@mantine/core/Portal",tp.displayName="@mantine/core/OptionalPortal";let th=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(.9) translateY(".concat(d("bottom"===e?10:-10),")")},transitionProperty:"transform, opacity"}),tf={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(".concat(d(30))},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(".concat(d(-30))},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(".concat(d(30))},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(".concat(d(-30))},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(".concat(d(-20),") skew(-10deg, -5deg)")},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(".concat(d(20),") skew(-10deg, -5deg)")},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(".concat(d(20),") rotate(-5deg)")},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(".concat(d(20),") rotate(5deg)")},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...th("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...th("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...th("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...th("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...th("top"),common:{transformOrigin:"top right"}}},tm={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function tg(e){let{keepMounted:t,transition:n="fade",duration:r=250,exitDuration:i=r,mounted:l,children:a,timingFunction:c="ease",onExit:u,onEntered:d,onEnter:p,onExited:h,enterDelay:f,exitDelay:m}=e,{transitionDuration:g,transitionStatus:y,transitionTimingFunction:v}=function(e){let{duration:t,exitDuration:n,timingFunction:r,mounted:i,onEnter:l,onExit:s,onEntered:a,onExited:c,enterDelay:u,exitDelay:d}=e,p=A(),h=function(e,t){let{getInitialValueInEffect:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{getInitialValueInEffect:!0},[r,i]=(0,o.useState)(n?t:!!("undefined"!=typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches),l=(0,o.useRef)();return(0,o.useEffect)(()=>
1{if("matchMedia"in window)return l.current=window.matchMedia(e),i(l.current.matches),function(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch(n){return e.addListener(t),()=>e.removeListener(t)}}(l.current,e=>i(e.matches))},[e]),r}("(prefers-reduced-motion: reduce)",void 0,void 0),f=!!p.respectReducedMotion&&h,[m,g]=(0,o.useState)(f?0:t),[y,v]=(0,o.useState)(i?"entered":"exited"),b=(0,o.useRef)(-1),w=(0,o.useRef)(-1),x=(0,o.useRef)(-1),k=e=>{let r=e?l:s,o=e?a:c;window.clearTimeout(b.current);let i=f?0:e?t:n;g(i),0===i?("function"==typeof r&&r(),"function"==typeof o&&o(),v(e?"entered":"exited")):x.current=requestAnimationFrame(()=>{tc.flushSync(()=>{v(e?"pre-entering":"pre-exiting")}),x.current=requestAnimationFrame(()=>{"function"==typeof r&&r(),v(e?"entering":"exiting"),b.current=window.setTimeout(()=>{"function"==typeof o&&o(),v(e?"entered":"exited")},i)})})},C=e=>{if(window.clearTimeout(w.current),"number"!=typeof(e?u:d)){k(e);return}w.current=window.setTimeout(()=>{k(e)},e?u:d)};return eF(()=>{C(i)},[i]),(0,o.useEffect)(()=>()=>{window.clearTimeout(b.current),cancelAnimationFrame(x.current)},[]),{transitionDuration:m,transitionStatus:y,transitionTimingFunction:r||"ease"}}({mounted:l,exitDuration:i,duration:r,timingFunction:c,onExit:u,onEntered:d,onEnter:p,onExited:h,enterDelay:f,exitDelay:m});return 0===g?l?(0,s.jsx)(s.Fragment,{children:a({})}
1):t?a({display:"none"}):null:"exited"===y?t?a({display:"none"}):null:(0,s.jsx)(s.Fragment,{children:a(function(e){let{transition:t,state:n,duration:r,timingFunction:o}=e,i={transitionDuration:"".concat(r,"ms"),transitionTimingFunction:o};return"string"==typeof t?t in tf?{transitionProperty:tf[t].transitionProperty,...i,...tf[t].common,...tf[t][tm[n]]}:{}:{transitionProperty:t.transitionProperty,...i,...t.common,...t[tm[n]]}}({transition:n,duration:g,state:y,timingFunction:v}))})}tg.displayName="@mantine/core/Transition";var ty={dropdown:"m_38a85659",arrow:"m_a31dc6c1"};let tv={},tb=L((e,t)=>{var n,r,i,l,a;let c=O("PopoverDropdown",tv,e),{className:u,style:p,vars:h,children:f,onKeyDownCapture:m,variant:g,classNames:y,styles:v,...b}=c,w=eX(),x=function(e){let{opened:t,shouldReturnFocus:n=!0}=e,r=(0,o.useRef)(),i=()=>{if(r.current&&"focus"in r.current&&"function"==typeof r.current.focus){var e;null===(e=r.current)||void 0===e||e.focus({preventScroll:!0})}};return eF(()=>{let e=-1,o=t=>{"Tab"===t.key&&window.clearTimeout(e)};return document.addEventListener("keydown",o),t?r.current=document.activeElement:n&&(e=window.setTimeout(i,10)),()=>{window.clearTimeout(e),document.removeEventListener("keydown",o)}},[t,n]),i}({opened:w.opened,shouldReturnFocus:w.returnFocus}),k=w.withRoles?{"aria-labelledby":w.getTargetId(),id:w.getDropdownId(),role:"dialog",tabIndex:-1}:{},C=e1(t,w.floating);return w.disabled?null:(0,s.jsx)(tp,{...w.portalProps,withinPortal:w.withinPortal,children:(0,s.jsx)(tg,{mounted:w.opened,...w.transitionProps,transition:(null===(n=w.transitionProps)||void 0===n?void 0:n.transition)||"fade",duration:null!==(a=null===(r=w.transitionProps)||void 0===r?void 0:r.duration)&&void 0!==a?a:150,keepMounted:w.keepMounted,exitDuration:"number"==typeof(null===(i=w.transitionProps)||void 0===i?void 0:i.exitDuration)?w.transitionProps.exitDuration:null===(l=w.transitionProps)||void 0===l?void 0:l.duration,children:e=>{var t,n;return(0,s.jsx)(ts,{active:w.trapFocus&&w.opened,innerRef:C,children:(0,s.jsxs)(ed,{...k,...b,variant:g,onKeyDownCapture:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{active:!0};return"function"==typeof e&&t.active?n=>{if("Escape"===n.key){var r;e(n),null===(r=t.onTrigger)||void 0===r||r.call(t)}}:t.onKeyDown||e2}(w.onClose,{active:w.closeOnEscape,onTrigger:x,onKeyDown:m}),"data-position":w.placement,"data-fixed":"fixed"===w.floatingStrategy||void 0,...w.getStyles("dropdown",{className:u,props:c,classNames:y,styles:v,style:[{...e,zIndex:w.zIndex,top:null!==(t=w.y)&&void 0!==t?t:0,left:null!==(n=w.x)&&void 0!==n?n:0,width:"target"===w.width?void 0:d(w.width)},p]}),children:[f,(0,s.jsx)(e8,{ref:w.arrowRef,arrowX:w.arrowX,arrowY:w.arrowY,visible:w.withArrow,position:w.placement,arrowSize:w.arrowSize,arrowRadius:w.arrowRadius,arrowOffset:w.arrowOffset,arrowPosition:w.arrowPosition,...w.getStyles("arrow",{props:c,classNames:y,styles:v})})]})})}})})});tb.classes=ty,tb.displayName="@mantine/core/PopoverDropdown";let tw={refProp:"ref",popupType:"dialog"},tx=L((e,t)=>{let{children:n,refProp:r,popupType:i,...l}=O("PopoverTarget",tw,e);if(!tr(n))throw Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let s=eX(),a=e1(s.reference,n.ref,t),c=s.withRoles?{"aria-haspopup":i,"aria-expanded":s.opened,"aria-controls":s.getDropdownId(),id:s.getTargetId()}:{};return(0,o.cloneElement)(n,{...l,...c,...s.targetProps,className:U(s.targetProps.className,l.className,n.props.className),[r]:a,...s.controlled?null:{onClick:s.onToggle}})});tx.displayName="@mantine/core/PopoverTarget";var tk=n(97859),tC=n(61896),tS=n(2859);function tM(e){let{opened:t,floating:n,position:r,positionDependencies:i}=e,[l,s]=(0,o.useState)(0);(0,o.useEffect)(()=>{if(n.refs.reference.current&&n.refs.floating.current&&t)return(0,tS.Me)(n.refs.reference.current,n.refs.floating.current,n.update)},[n.refs.reference.current,n.refs.floating.current,t,l,r]),eF(()=>{n.update()},i),eF(()=>{s(e=>e+1)},[t])}let tE={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:eW,__staticSelector:"Popover",width:"max-content"},tT=(e,t)=>
1{let{radius:n,shadow:r}=t;return{dropdown:{"--popover-radius":void 0===n?void 0:z(n),"--popover-shadow":function(e){if(e)return P(e,"mantine-shadow",!1)}(r)}}};function tj(e){var t,n,r,i,l,a;let c=O("Popover",tE,e),{children:u,position:d,offset:p,onPositionChange:h,positionDependencies:f,opened:m,transitionProps:g,width:y,middlewares:v,withArrow:b,arrowSize:w,arrowOffset:x,arrowRadius:k,arrowPosition:C,unstyled:S,classNames:M,styles:E,closeOnClickOutside:T,withinPortal:j,portalProps:R,closeOnEscape:A,clickOutsideEvents:N,trapFocus:H,onClose:L,onOpen:I,onChange:_,zIndex:P,radius:D,shadow:z,id:V,defaultOpened:F,__staticSelector:B,withRoles:$,disabled:U,returnFocus:W,variant:G,keepMounted:Y,vars:Z,floatingStrategy:J,...q}=c,X=K({name:B,props:c,classes:ty,classNames:M,styles:E,unstyled:S,rootSelector:"dropdown",vars:Z,varsResolver:tT}),Q=(0,o.useRef)(null),[ee,et]=(0,o.useState)(null),[en,er]=(0,o.useState)(null),{dir:eo}=eZ(),ei=eR(V),el=function(e){let[t,n]=eV({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=(0,tC.YF)({strategy:e.strategy,placement:e.position,middleware:function(e,t){let n=function(e){if(void 0===e)return{shift:!0,flip:!0};let t={...e};return void 0===e.shift&&(t.shift=!0),void 0===e.flip&&(t.flip=!0),t}(e.middlewares),r=[(0,tk.cv)(e.offset)];return n.shift&&r.push((0,tk.uY)("boolean"==typeof n.shift?{limiter:(0,tk.dr)(),padding:5}:{limiter:(0,tk.dr)(),padding:5,...n.shift})),n.flip&&r.push("boolean"==typeof n.flip?(0,tk.RR)():(0,tk.RR)(n.flip)),n.inline&&r.push("boolean"==typeof n.inline?(0,tk.Qo)():(0,tk.Qo)(n.inline)),r.push((0,tk.x7)({element:e.arrowRef,padding:e.arrowOffset})),(n.size||"target"===e.width)&&r.push((0,tk.dp)({..."boolean"==typeof n.size?{}:n.size,apply(r){var o,i;let{rects:l,availableWidth:s,availableHeight:a,...c}=r,u=null!==(i=null===(o=t().refs.floating.current)||void 0===o?void 0:o.style)&&void 0!==i?i:{};n.size&&("object"==typeof n.size&&n.size.apply?n.size.apply({rects:l,availableWidth:s,availableHeight:a,...c}):Object.assign(u,{maxWidth:"".concat(s,"px"),maxHeight:"".concat(a,"px")})),"target"===e.width&&Object.assign(u,{width:"".concat(l.reference.width,"px")})}})),r}(e,()=>r)});return tM({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:r}),eF(()=>{var t;null===(t=e.onPositionChange)||void 0===t||t.call(e,r.placement)},[r.placement]),eF(()=>{var n,r;t?null===(r=e.onOpen)||void 0===r||r.call(e):null===(n=e.onClose)||void 0===n||n.call(e)},[t,e.onClose,e.onOpen]),{floating:r,controlled:"boolean"==typeof e.opened,opened:t,onClose:()=>{t&&n(!1)},onToggle:()=>n(!t)}}({middlewares:v,width:y,position:eJ(eo,d),offset:"number"==typeof p?p+(b?w/2:0):p,arrowRef:Q,arrowOffset:x,onPositionChange:h,positionDependencies:f,opened:m,defaultOpened:F,onChange:_,onOpen:I,onClose:L,strategy:J});!function(e,t,n){let r=(0,o.useRef)();(0,o.useEffect)(()=>{let o=t=>{let{target:o}=null!=t?t:{};if(Array.isArray(n)){let r=(null==o?void 0:o.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(o)&&"HTML"!==o.tagName;n.every(e=>!!e&&!t.composedPath().includes(e))&&!r&&e()}else r.current&&!r.current.contains(o)&&e()};return(t||e$).forEach(e=>document.addEventListener(e,o)),()=>{(t||e$).forEach(e=>document.removeEventListener(e,o))}},[r,e,n])}(()=>T&&el.onClose(),N,[ee,en]);let es=(0,o.useCallback)(e=>{et(e),el.floating.refs.setReference(e)},[el.floating.refs.setReference]),ea=(0,o.useCallback)(e=>{er(e),el.floating.refs.setFloating(e)},[el.floating.refs.setFloating]);return(0,s.jsx)(eK,{value:{returnFocus:W,disabled:U,controlled:el.controlled,reference:es,floating:ea,x:el.floating.x,y:el.floating.y,arrowX:null===(r=el.floating)||void 0===r?void 0:null===(n=r.middlewareData)||void 0===n?void 0:null===(t=n.arrow)||void 0===t?void 0:t.x,arrowY:null===(a=el.floating)||void 0===a?void 0:null===(l=a.middlewareData)||void 0===l?void 0:null===(i=l.arrow)||void 0===i?void 0:i.y,opened:el.opened,arrowRef:Q,transitionProps:g,width:y,withArrow:b,arrowSize:w,arrowOffset:x,arrowRadius:k,arrowPosition:C,placement:el.floating.placement,trapFocus:H,withinPortal:j,portalProps:R,zIndex:P,radius:D,shadow:z,closeOnEscape:A,onClose:el.onClose,onToggle:el.onToggle,getTargetId:()=>"".concat(ei,"-target"),getDropdownId:()=>"".concat(ei,"-dropdown"),withRoles:$,targetProps:q,__staticSelector:B,classNames:M,styles:E,unstyled:S,variant:G,keepMounted:Y,getStyles:X,floatingStrategy:J},children:u})}tj.Target=tx,tj.Dropdown=tb,tj.displayName="@mantine/core/Popover",tj.extend=e=>e;let[tR,tA]=eq("Menu component was not found in the tree");var tN={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};let tO={},tH=L((e,t)=>{let{classNames:n,className:r,style:o,styles:i,vars:l,...a}=O("MenuDivider",tO,e),c=tA();return(0,s.jsx)(ed,{ref:t,...c.getStyles("divider",{className:r,style:o,styles:i,classNames:n}
1),...a})});function tL(e,t){return n=>{null==e||e(n),null==t||t(n)}}tH.classes=tN,tH.displayName="@mantine/core/MenuDivider";let tI={},t_=L((e,t)=>{let{classNames:n,className:r,style:i,styles:l,vars:a,onMouseEnter:c,onMouseLeave:u,onKeyDown:d,children:p,...h}=O("MenuDropdown",tI,e),f=(0,o.useRef)(null),m=tA(),g=tL(d,e=>{if("ArrowUp"===e.key||"ArrowDown"===e.key){var t,n;e.preventDefault(),null===(n=f.current)||void 0===n||null===(t=n.querySelectorAll("[data-menu-item]:not(:disabled)")[0])||void 0===t||t.focus()}}),y=tL(c,()=>("hover"===m.trigger||"click-hover"===m.trigger)&&m.openDropdown()),v=tL(u,()=>("hover"===m.trigger||"click-hover"===m.trigger)&&m.closeDropdown());return(0,s.jsxs)(tj.Dropdown,{...h,onMouseEnter:y,onMouseLeave:v,role:"menu","aria-orientation":"vertical",ref:e1(t,f),...m.getStyles("dropdown",{className:r,style:i,styles:l,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:g,children:[(0,s.jsx)("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),p]})});function tP(e){let{parentSelector:t,siblingSelector:n,onKeyDown:r,loop:o=!0,activateOnFocus:i=!1,dir:l="rtl",orientation:s}=e;return e=>{var a;null==r||r(e);let c=Array.from((null===(a=eB(e.currentTarget,t))||void 0===a?void 0:a.querySelectorAll(n))||[]).filter(n=>eB(e.currentTarget,t)===eB(n,t)),u=c.findIndex(t=>e.currentTarget===t),d=function(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].disabled)return e}return e}(u,c,o),p=function(e,t,n){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;e-=1)if(!t[e].disabled)return e}return e}(u,c,o),h="rtl"===l?p:d,f="rtl"===l?d:p;switch(e.key){case"ArrowRight":"horizontal"===s&&(e.stopPropagation(),e.preventDefault(),c[h].focus(),i&&c[h].click());break;case"ArrowLeft":"horizontal"===s&&(e.stopPropagation(),e.preventDefault(),c[f].focus(),i&&c[f].click());break;case"ArrowUp":"vertical"===s&&(e.stopPropagation(),e.preventDefault(),c[p].focus(),i&&c[p].click());break;case"ArrowDown":"vertical"===s&&(e.stopPropagation(),e.preventDefault(),c[d].focus(),i&&c[d].click());break;case"Home":e.stopPropagation(),e.preventDefault(),c[0].disabled||c[0].focus();break;case"End":{e.stopPropagation(),e.preventDefault();let t=c.length-1;c[t].disabled||c[t].focus()}}}}t_.classes=tN,t_.displayName="@mantine/core/MenuDropdown";var tD={root:"m_87cf2631"};let tz={__staticSelector:"UnstyledButton"},tV=I((e,t)=>{let n=O("UnstyledButton",tz,e),{className:r,component:o="button",__staticSelector:i,unstyled:l,classNames:a,styles:c,style:u,...d}=n,p=K({name:i,props:n,classes:tD,className:r,style:u,classNames:a,styles:c,unstyled:l});return(0,s.jsx)(ed,{...p("root",{focusable:!0}),component:o,ref:t,type:"button"===o?"button":void 0,...d})});tV.classes=tD,tV.displayName="@mantine/core/UnstyledButton";let tF={},tB=I((e,t)=>{let{classNames:n,className:r,style:i,styles:l,vars:a,color:c,closeMenuOnClick:u,leftSection:d,rightSection:p,children:h,disabled:f,...m}=O("MenuItem",tF,e),g=tA(),y=A(),{dir:b}=eZ(),w=(0,o.useRef)(),x=g.getItemIndex(w.current),k=tL(m.onMouseLeave,()=>g.setHovered(-1)),C=tL(m.onMouseEnter,()=>g.setHovered(g.getItemIndex(w.current))),S=tL(m.onClick,()=>{"boolean"==typeof u?u&&g.closeDropdownImmediately():g.closeOnItemClick&&g.closeDropdownImmediately()}),M=tL(m.onFocus,()=>g.setHovered(g.getItemIndex(w.current))),E=c?y.variantColorResolver({color:c,theme:y,variant:"light"}):void 0,T=c?v({color:c,theme:y}):null;return(0,s.jsxs)(tV,{...m,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,onFocus:M,...g.getStyles("item",{className:r,style:i,styles:l,classNames:n}),ref:e1(w,t),role:"menuitem",disabled:f,"data-menu-item":!0,"data-disabled":f||void 0,"data-hovered":g.hovered===x||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:C,onMouseLeave:k,onClick:S,onKeyDown:tP({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:g.loop,dir:b,orientation:"vertical",onKeyDown:m.onKeyDown}),__vars:{"--menu-item-color":(null==T?void 0:T.isThemeColor)&&(null==T?void 0:T.shade)===void 0?"var(--mantine-color-".concat(T.color,"-6)"):null==E?void 0:E.
1color,"--menu-item-hover":null==E?void 0:E.hover},children:[d&&(0,s.jsx)("div",{...g.getStyles("itemSection",{styles:l,classNames:n}),"data-position":"left",children:d}),h&&(0,s.jsx)("div",{...g.getStyles("itemLabel",{styles:l,classNames:n}),children:h}),p&&(0,s.jsx)("div",{...g.getStyles("itemSection",{styles:l,classNames:n}),"data-position":"right",children:p})]})});tB.classes=tN,tB.displayName="@mantine/core/MenuItem";let t$={},tU=L((e,t)=>{let{classNames:n,className:r,style:o,styles:i,vars:l,...a}=O("MenuLabel",t$,e),c=tA();return(0,s.jsx)(ed,{ref:t,...c.getStyles("label",{className:r,style:o,styles:i,classNames:n}),...a})});tU.classes=tN,tU.displayName="@mantine/core/MenuLabel";let tW={refProp:"ref"},tG=(0,o.forwardRef)((e,t)=>{let{children:n,refProp:r,...i}=O("MenuTarget",tW,e);if(!tr(n))throw Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let l=tA(),a=tL(n.props.onClick,()=>{"click"===l.trigger?l.toggleDropdown():"click-hover"!==l.trigger||(l.setOpenedViaClick(!0),l.opened||l.openDropdown())}),c=tL(n.props.onMouseEnter,()=>("hover"===l.trigger||"click-hover"===l.trigger)&&l.openDropdown()),u=tL(n.props.onMouseLeave,()=>{"hover"===l.trigger?l.closeDropdown():"click-hover"!==l.trigger||l.openedViaClick||l.closeDropdown()});return(0,s.jsx)(tj.Target,{refProp:r,popupType:"menu",ref:t,...i,children:(0,o.cloneElement)(n,{onClick:a,onMouseEnter:c,onMouseLeave:u,"data-expanded":!!l.opened||void 0})})});tG.displayName="@mantine/core/MenuTarget";let tY={trapFocus:!0,closeOnItemClick:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function tZ(e){let t=O("Menu",tY,e),{children:n,onOpen:r,onClose:i,opened:l,defaultOpened:a,trapFocus:c,onChange:u,closeOnItemClick:d,loop:p,closeOnEscape:h,trigger:f,openDelay:m,closeDelay:g,classNames:y,styles:v,unstyled:b,variant:w,vars:x,menuItemTabIndex:k,keepMounted:C,...S}=t,M=K({name:"Menu",classes:tN,props:t,classNames:y,styles:v,unstyled:b}),[E,{setHovered:T,resetHovered:j}]=function(){let[e,t]=(0,o.useState)(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}(),[R,N]=eV({value:l,defaultValue:a,finalValue:!1,onChange:u}),[H,L]=(0,o.useState)(!1),I=()=>{N(!1),L(!1),R&&(null==i||i())},_=()=>{N(!0),R||null==r||r()},P=()=>{R?I():_()},{openDropdown:D,closeDropdown:z}=function(e){let{open:t,close:n,openDelay:r,closeDelay:i}=e,l=(0,o.useRef)(-1),s=(0,o.useRef)(-1),a=()=>{window.clearTimeout(l.current),window.clearTimeout(s.current)};return(0,o.useEffect)(()=>a,[]),{openDropdown:()=>{a(),0===r||void 0===r?t():l.current=window.setTimeout(t,r)},closeDropdown:()=>{a(),0===i||void 0===i?n():s.current=window.setTimeout(n,i)}}}({open:_,close:I,closeDelay:g,openDelay:m}),{resolvedClassNames:V,resolvedStyles:F}=function(e){let{classNames:t,styles:n,props:r,stylesCtx:o}=e,i=A();return{resolvedClassNames:Y({theme:i,classNames:t,props:r,stylesCtx:o||void 0}),resolvedStyles:J({theme:i,styles:n,props:r,stylesCtx:o||void 0})}}({classNames:y,styles:v,props:t});return eF(()=>{j()},[R]),(0,s.jsx)(tR,{value:{getStyles:M,opened:R,toggleDropdown:P,getItemIndex:e=>{var t,n,r;return t="[data-menu-item]",n="[data-menu-dropdown]",e?Array.from((null===(r=eB(e,n))||void 0===r?void 0:r.querySelectorAll(t))||[]).findIndex(t=>t===e):null},hovered:E,setHovered:T,openedViaClick:H,setOpenedViaClick:L,closeOnItemClick:d,closeDropdown:"click"===f?I:z,openDropdown:"click"===f?_:D,closeDropdownImmediately:I,loop:p,trigger:f,unstyled:b,menuItemTabIndex:k},children:(0,s.jsx)(tj,{...S,opened:R,onChange:P,defaultOpened:a,trapFocus:!C&&c,closeOnEscape:h,__staticSelector:"Menu",classNames:V,styles:F,unstyled:b,variant:w,keepMounted:C,children:n})})}function tJ(e){let{size:t,style:n,...r}=e,o=void 0!==t?{width:d(t),height:d(t),...n}:n;return(0,s.jsx)("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":!0,...r,children:(0,s.jsx)("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"
1currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}tZ.extend=e=>e,tZ.classes=tN,tZ.displayName="@mantine/core/Menu",tZ.Item=tB,tZ.Label=tU,tZ.Dropdown=t_,tZ.Target=tG,tZ.Divider=tH;var tq={root:"m_4081bf90"};let tK={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},tX=(e,t,n)=>{let{grow:r,preventGrowOverflow:o,gap:i,align:l,justify:s,wrap:a}=t,{childWidth:c}=n;return{root:{"--group-child-width":r&&o?c:void 0,"--group-gap":D(i),"--group-align":l,"--group-justify":s,"--group-wrap":a}}},tQ=L((e,t)=>{let n=O("Group",tK,e),{classNames:r,className:i,style:l,styles:a,unstyled:c,children:u,gap:d,align:p,justify:h,wrap:f,grow:m,preventGrowOverflow:g,vars:y,variant:v,__size:b,mod:w,...x}=n,k=o.Children.toArray(u).filter(Boolean),C=k.length,S=D(null!=d?d:"md"),M=K({name:"Group",props:n,stylesCtx:{childWidth:"calc(".concat(100/C,"% - (").concat(S," - ").concat(S," / ").concat(C,"))")},className:i,style:l,classes:tq,classNames:r,styles:a,unstyled:c,vars:y,varsResolver:tX});return(0,s.jsx)(ed,{...M("root"),ref:t,variant:v,mod:[{grow:m},w],size:b,...x,children:k})});function t0(e,t){return n=>{if("string"!=typeof n||0===n.trim().length)throw Error(t);return"".concat(e,"-").concat(n)}}function t1(e){let{color:t,theme:n,autoContrast:r}=e;return("boolean"==typeof r?r:n.autoContrast)&&v({color:t||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function t2(e,t){return t1({color:e.colors[e.primaryColor][m(e,t)],theme:e,autoContrast:null})}tQ.classes=tq,tQ.displayName="@mantine/core/Group";let[t4,t5]=eq("Tabs component was not found in the tree");var t3={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",panel:"m_b0c91715",tab:"m_4ec4dce6",tabSection:"m_fc420b1f","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};let t8={},t7=L((e,t)=>{let n=O("TabsList",t8,e),{children:r,className:o,grow:i,justify:l,classNames:a,styles:c,style:u,mod:d,...p}=n,h=t5();return(0,s.jsx)(ed,{...p,...h.getStyles("list",{className:o,style:u,classNames:a,styles:c,props:n,variant:h.variant}),ref:t,role:"tablist",variant:h.variant,mod:[{grow:i,orientation:h.orientation,placement:"vertical"===h.orientation&&h.placement,inverted:h.inverted},d],"aria-orientation":h.orientation,__vars:{"--tabs-justify":l},children:r})});t7.classes=t3,t7.displayName="@mantine/core/TabsList";let t6={},t9=L((e,t)=>{let n=O("TabsPanel",t6,e),{children:r,className:o,value:i,classNames:l,styles:a,style:c,mod:u,keepMounted:d,...p}=n,h=t5(),f=h.value===i,m=h.keepMounted||d?r:f?r:null;return(0,s.jsx)(ed,{...p,...h.getStyles("panel",{className:o,classNames:l,styles:a,style:[c,f?void 0:{display:"none"}],props:n}),ref:t,mod:[{orientation:h.orientation},u],role:"tabpanel",id:h.getPanelId(i),"aria-labelledby":h.getTabId(i),children:m})});t9.classes=t3,t9.displayName="@mantine/core/TabsPanel";let ne={},nt=L((e,t)=>{let n=O("TabsTab",ne,e),{className:r,children:o,rightSection:i,leftSection:l,value:a,onClick:c,onKeyDown:u,disabled:d,color:p,style:h,classNames:f,styles:m,vars:g,mod:y,...v}=n,w=A(),{dir:x}=eZ(),k=t5(),C=a===k.value,S={classNames:f,styles:m,props:n};return(0,s.jsxs)(tV,{...v,...k.getStyles("tab",{className:r,style:h,variant:k.variant,...S}),disabled:d,unstyled:k.unstyled,variant:k.variant,mod:[{active:C,disabled:d,orientation:k.orientation,inverted:k.inverted,placement:"vertical"===k.orientation&&k.placement},y],ref:t,role:"tab",id:k.getTabId(a),"aria-selected":C,tabIndex:C||null===k.value?0:-1,"aria-controls":k.getPanelId(a),onClick:e=>{k.onChange(k.allowTabDeactivation&&a===k.value?null:a),null==c||c(e)},__vars:{"--tabs-color":p?b(p,w):void 0},onKeyDown:tP({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:k.activateTabWithKeyboard,loop:k.loop,orientation:k.orientation||"horizontal",dir:x,onKeyDown:u}),children:[l&&(0,s.jsx)("span",{...k.getStyles("tabSection",S),"data-position":"left",children:l}),o&&(0,s.jsx)("span",{...k.getStyles("tabLabel",S),children:o}),i&&(0,s.jsx)("span",{...k.getStyles("tabSection",S),"data-position":"right",children:i})]})});nt.classes=t3,nt.displayName="@mantine/core/TabsTab";let nn="Tabs.Tab or Tabs.Panel component was rendered with invali
1d value or without value",nr={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},no=(e,t)=>{let{radius:n,color:r,autoContrast:o}=t;return{root:{"--tabs-radius":z(n),"--tabs-color":b(r,e),"--tabs-text-color":("boolean"==typeof o?o:e.autoContrast)?t1({color:r,theme:e,autoContrast:o}):void 0}}},ni=L((e,t)=>{let n=O("Tabs",nr,e),{defaultValue:r,value:o,onChange:i,orientation:l,children:a,loop:c,id:u,activateTabWithKeyboard:d,allowTabDeactivation:p,variant:h,color:f,radius:m,inverted:g,placement:y,keepMounted:v,classNames:b,styles:w,unstyled:x,className:k,style:C,vars:S,autoContrast:M,mod:E,...T}=n,j=eR(u),[R,A]=eV({value:o,defaultValue:r,finalValue:null,onChange:i}),N=K({name:"Tabs",props:n,classes:t3,className:k,style:C,classNames:b,styles:w,unstyled:x,vars:S,varsResolver:no});return(0,s.jsx)(t4,{value:{placement:y,value:R,orientation:l,id:j,loop:c,activateTabWithKeyboard:d,getTabId:t0("".concat(j,"-tab"),nn),getPanelId:t0("".concat(j,"-panel"),nn),onChange:A,allowTabDeactivation:p,variant:h,color:f,radius:m,inverted:g,keepMounted:v,unstyled:x,getStyles:N},children:(0,s.jsx)(ed,{ref:t,id:j,variant:h,mod:[{orientation:l,inverted:"horizontal"===l&&g,placement:"vertical"===l&&y},E],...N("root"),...T,children:a})})});ni.classes=t3,ni.displayName="@mantine/core/Tabs",ni.Tab=nt,ni.Panel=t9,ni.List=t7;var nl={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};let ns=(0,o.forwardRef)((e,t)=>{let{className:n,...r}=e;return(0,s.jsxs)(ed,{component:"span",className:U(nl.barsLoader,n),...r,ref:t,children:[(0,s.jsx)("span",{className:nl.bar}),(0,s.jsx)("span",{className:nl.bar}),(0,s.jsx)("span",{className:nl.bar})]})});ns.displayName="@mantine/core/Bars";let na=(0,o.forwardRef)((e,t)=>{let{className:n,...r}=e;return(0,s.jsxs)(ed,{component:"span",className:U(nl.dotsLoader,n),...r,ref:t,children:[(0,s.jsx)("span",{className:nl.dot}),(0,s.jsx)("span",{className:nl.dot}),(0,s.jsx)("span",{className:nl.dot})]})});na.displayName="@mantine/core/Dots";let nc=(0,o.forwardRef)((e,t)=>{let{className:n,...r}=e;
1return(0,s.jsx)(ed,{component:"span",className:U(nl.ovalLoader,n),...r,ref:t})});nc.displayName="@mantine/core/Oval";let nu={bars:ns,oval:nc,dots:na},nd={loaders:nu,type:"oval"},np=(e,t)=>{let{size:n,color:r}=t;return{root:{"--loader-size":P(n,"loader-size"),"--loader-color":r?b(r,e):void 0}}},nh=L((e,t)=>{let n=O("Loader",nd,e),{size:r,color:o,type:i,vars:l,className:a,style:c,classNames:u,styles:d,unstyled:p,loaders:h,variant:f,children:m,...g}=n,y=K({name:"Loader",props:n,classes:nl,className:a,style:c,classNames:u,styles:d,unstyled:p,vars:l,varsResolver:np});return m?(0,s.jsx)(ed,{...y("root"),ref:t,...g,children:m}):(0,s.jsx)(ed,{...y("root"),ref:t,component:h[i],variant:f,size:r,...g})});nh.defaultLoaders=nu,nh.classes=nl,nh.displayName="@mantine/core/Loader";var nf={root:"m_9814e45f"};let nm={zIndex:eU},ng=(e,t)=>{let{gradient:n,color:r,backgroundOpacity:o,blur:i,radius:l,zIndex:s}=t;return{root:{"--overlay-bg":n||(void 0!==r||void 0!==o)&&x(r||"#000",null!=o?o:.6)||void 0,"--overlay-filter":i?"blur(".concat(d(i),")"):void 0,"--overlay-radius":void 0===l?void 0:z(l),"--overlay-z-index":null==s?void 0:s.toString()}}},ny=I((e,t)=>{let n=O("Overlay",nm,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:c,fixed:u,center:d,children:p,radius:h,zIndex:f,gradient:m,blur:g,color:y,backgroundOpacity:v,mod:b,...w}=n,x=K({name:"Overlay",props:n,classes:nf,className:o,style:i,classNames:r,styles:l,unstyled:a,vars:c,varsResolver:ng});return(0,s.jsx)(ed,{ref:t,...x("root"),mod:[{center:d,fixed:u},b],...w,children:p})});ny.classes=nf,ny.displayName="@mantine/core/Overlay";var nv={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};let nb={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:eG},nw=(e,t)=>{let{zIndex:n}=t;return{root:{"--lo-z-index":null==n?void 0:n.toString()}}},nx=L((e,t)=>{let n=O("LoadingOverlay",nb,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:c,transitionProps:u,loaderProps:d,overlayProps:p,visible:h,zIndex:f,...m}=n,g=A(),y=K({name:"LoadingOverlay",classes:nv,props:n,className:o,style:i,classNames:r,styles:l,unstyled:a,vars:c,varsResolver:nw}),v={...nb.overlayProps,...p};return(0,s.jsx)(tg,{transition:"fade",...u,mounted:!!h,children:e=>(0,s.jsxs)(ed,{...y("root",{style:e}),ref:t,...m,children:[(0,s.jsx)(nh,{...y("loader"),unstyled:a,...d}),(0,s.jsx)(ny,{...v,...y("overlay"),darkHidden:!0,unstyled:a,color:(null==p?void 0:p.color)||g.white}),(0,s.jsx)(ny,{...v,...y("overlay"),lightHidden:!0,unstyled:a,color:(null==p?void 0:p.color)||g.colors.dark[5]})]})})});nx.classes=nv,nx.displayName="@mantine/core/LoadingOverlay";var nk={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844"};let nC={orientation:"horizontal"},nS=(e,t)=>{let{borderWidth:n}=t;return{group:{"--button-border-width":d(n)}}},nM=L((e,t)=>{let n=O("ButtonGroup",nC,e),{className:r,style:o,classNames:i,styles:l,unstyled:a,orientation:c,vars:u,borderWidth:d,variant:p,mod:h,...f}=O("ButtonGroup",nC,e),m=K({name:"ButtonGroup",props:n,classes:nk,className:r,style:o,classNames:i,styles:l,unstyled:a,vars:u,varsResolver:nS,rootSelector:"group"});return(0,s.jsx)(ed,{...m("group"),ref:t,variant:p,mod:[{"data-orientation":c},h],role:"group",...f})});nM.classes=nk,nM.displayName="@mantine/core/ButtonGroup";let nE={in:{opacity:1,transform:"translate(-50%, calc(-50% + ".concat(d(1),"))")},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},nT={},nj=(e,t)=>{let{radius:n,color:r,gradient:o,variant:i,size:l,justify:s,autoContrast:a}=t,c=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:o,variant:i||"filled",autoContrast:a});return{root:{"--button-justify":s,"--button-height":P(l,"button-height"),"--button-padding-x":P(l,"button-padding-x"),"--button-fz":(null==l?void 0:l.includes("compact"))?V(l.replace("compact-","")):V(l),"--button-radius":void 0===n?void 0:z(n),"--button-bg":r||i?c.background:void 0,"--button-hover":r||i?c.hover:void 0,"--button-color":c.color,"--button-bd":r||i?c.border:void 0,"--button-hover-color":r||i?c.hoverColor:void 0}}},nR=I((e,t)=>{let n=O("Button",nT,e),{style:r,vars:o,className:i,color:l,disabled:a,children:c,leftSection:u,rightSection:d,fullWidth:p,variant:h,radius:f,loading:m,loaderProps:g,gradient:y,classNames:v,styles:b,unstyled:w,"data-disabled":x,autoContrast:k,mod:C,...S}=n,M=K({name:"Button",props:n,classes:nk,className:i,style:r,classNames:v,styles:b,unstyled:w,vars:o,varsResolver:nj}),E=!!u,T=!!d;return(0,s.jsxs)(tV,{ref:t,...M("root",{active:!a&&!m&&!x}),unstyled:w,variant:h,disabled:a||m,mod:[{disabled:a||x,loading:m,block:p,"with-left-section":E,"with-right-section":T},C],...S,children:[(0,s.jsx)(tg,{mounted:!!m,transition:nE,duration:150,children:e=>(0,s.jsx)(ed,{component:"span",...M("loader",{style:e}
1),"aria-hidden":!0,children:(0,s.jsx)(nh,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...g})})}),(0,s.jsxs)("span",{...M("inner"),children:[u&&(0,s.jsx)(ed,{component:"span",...M("section"),mod:{position:"left"},children:u}),(0,s.jsx)(ed,{component:"span",mod:{loading:m},...M("label"),children:c}),d&&(0,s.jsx)(ed,{component:"span",...M("section"),mod:{position:"right"},children:d})]})]})});nR.classes=nk,nR.displayName="@mantine/core/Button",nR.Group=nM;let nA=(0,o.forwardRef)((e,t)=>{let{size:n="var(--cb-icon-size, 70%)",style:r,...o}=e;return(0,s.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...r,width:n,height:n},ref:t,...o,children:(0,s.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});nA.displayName="@mantine/core/CloseIcon";var nN={root:"m_86a44da5","root--subtle":"m_220c80f2"};let nO={variant:"subtle"},nH=(e,t)=>{let{size:n,radius:r,iconSize:o}=t;return{root:{"--cb-size":P(n,"cb-size"),"--cb-radius":void 0===r?void 0:z(r),"--cb-icon-size":d(o)}}},nL=I((e,t)=>{let n=O("CloseButton",nO,e),{iconSize:r,children:o,vars:i,radius:l,className:a,classNames:c,style:u,styles:d,unstyled:p,"data-disabled":h,disabled:f,variant:m,icon:g,mod:y,...v}=n,b=K({name:"CloseButton",props:n,className:a,style:u,classes:nN,classNames:c,styles:d,unstyled:p,vars:i,varsResolver:nH});return(0,s.jsxs)(tV,{ref:t,...v,unstyled:p,variant:m,disabled:f,mod:[{disabled:f||h},y],...b("root",{variant:m,active:!f&&!h}),children:[g||(0,s.jsx)(nA,{}),o]})});nL.classes=nN,nL.displayName="@mantine/core/CloseButton";let nI={multiple:!1},n_=(0,o.forwardRef)((e,t)=>{let{onChange:n,children:r,multiple:i,accept:l,name:a,form:c,resetRef:u,disabled:d,capture:p,inputProps:h,...f}=O("FileButton",nI,e),m=(0,o.useRef)();return eQ(u,()=>{m.current.value=""}),(0,s.jsxs)(s.Fragment,{children:[r({onClick:()=>{var e;d||null===(e=m.current)||void 0===e||e.click()},...f}),(0,s.jsx)("input",{style:{display:"none"},type:"file",accept:l,multiple:i,onChange:e=>{i?n(Array.from(e.currentTarget.files)):n(e.currentTarget.files[0]||null)},ref:e1(t,m),name:a,form:c,capture:p,...h})]})});n_.displayName="@mantine/core/FileButton";let nP={valueComponent:e=>{let{value:t}=e;return(0,s.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Array.isArray(t)?t.map(e=>e.name).join(", "):null==t?void 0:t.name})}},nD=L((e,t)=>{let n=O("FileInput",nP,e),{unstyled:r,vars:i,onChange:l,value:a,defaultValue:c,multiple:u,accept:d,name:p,form:h,valueComponent:f,clearable:m,clearButtonProps:g,readOnly:y,capture:v,fileInputProps:b,rightSection:w,size:x,placeholder:k,resetRef:C,...S}=n,M=(0,o.useRef)(null),[E,T]=eV({value:a,defaultValue:c,onChange:l,finalValue:u?[]:null}),j=Array.isArray(E)?0!==E.length:null!==E,R=w||(m&&j&&!y?(0,s.jsx)(nL,{...g,variant:"subtle",onClick:()=>T(u?[]:null),size:x,unstyled:r}):null);return(0,o.useEffect)(()=>{if(Array.isArray(E)&&0===E.length||null===E){var e;null===(e=M.current)||void 0===e||e.call(M)}},[E]),(0,s.jsx)(n_,{onChange:T,multiple:u,accept:d,name:p,form:h,resetRef:e1(M,C),disabled:y,capture:v,inputProps:b,children:e=>(0,s.jsx)(eP,{component:"button",ref:t,rightSection:R,...e,...S,__staticSelector:"FileInput",multiline:!0,type:"button",pointer:!0,__stylesApiProps:n,unstyled:r,size:x,children:j?(0,s.jsx)(f,{value:E}):(0,s.jsx)(eI.Placeholder,{children:k})})})});nD.classes=eP.classes,nD.displayName="@mantine/core/FileInput";var nz={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21"};let nV={orientation:"horizontal"},nF=(e,t)=>{let{borderWidth:n}=t;return{group:{"--ai-border-width":d(n)}}},nB=L((e,t)=>{let n=O("ActionIconGroup",nV,e),{className:r,style:o,classNames:i,styles:l,unstyled:a,orientation:c,vars:u,borderWidth:d,variant:p,mod:h,...f}=O("ActionIconGroup",nV,e),m=K({name:"ActionIconGroup",props:n,classes:nz,className:r,style:o,classNames:i,styles:l,unstyled:a,vars:u,varsResolver:nF,rootSelector:"group"});
1return(0,s.jsx)(ed,{...m("group"),ref:t,variant:p,mod:[{"data-orientation":c},h],role:"group",...f})});nB.classes=nz,nB.displayName="@mantine/core/ActionIconGroup";let n$={},nU=(e,t)=>{let{size:n,radius:r,variant:o,gradient:i,color:l,autoContrast:s}=t,a=e.variantColorResolver({color:l||e.primaryColor,theme:e,gradient:i,variant:o||"filled",autoContrast:s});return{root:{"--ai-size":P(n,"ai-size"),"--ai-radius":void 0===r?void 0:z(r),"--ai-bg":l||o?a.background:void 0,"--ai-hover":l||o?a.hover:void 0,"--ai-hover-color":l||o?a.hoverColor:void 0,"--ai-color":a.color,"--ai-bd":l||o?a.border:void 0}}},nW=I((e,t)=>{let n=O("ActionIcon",n$,e),{className:r,unstyled:o,variant:i,classNames:l,styles:a,style:c,loading:u,loaderProps:d,size:p,color:h,radius:f,__staticSelector:m,gradient:g,vars:y,children:v,disabled:b,"data-disabled":w,autoContrast:x,mod:k,...C}=n,S=K({name:["ActionIcon",m],props:n,className:r,style:c,classes:nz,classNames:l,styles:a,unstyled:o,vars:y,varsResolver:nU});return(0,s.jsxs)(tV,{...S("root",{active:!b&&!u&&!w}),...C,unstyled:o,variant:i,size:p,disabled:b||u,ref:t,mod:[{loading:u,disabled:b||w},k],children:[(0,s.jsx)(tg,{mounted:!!u,transition:"slide-down",duration:150,children:e=>(0,s.jsx)(ed,{component:"span",...S("loader",{style:e}),"aria-hidden":!0,children:(0,s.jsx)(nh,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...d})})}),(0,s.jsx)(ed,{component:"span",mod:{loading:u},...S("icon"),children:v})]})});nW.classes=nz,nW.displayName="@mantine/core/ActionIcon",nW.Group=nB;var nG={root:"m_6d731127"};let nY={gap:"md",align:"stretch",justify:"flex-start"},nZ=(e,t)=>{let{gap:n,align:r,justify:o}=t;return{root:{"--stack-gap":D(n),"--stack-align":r,"--stack-justify":o}}},nJ=L((e,t)=>{let n=O("Stack",nY,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:c,align:u,justify:d,gap:p,variant:h,...f}=n,m=K({name:"Stack",props:n,classes:nG,className:o,style:i,classNames:r,styles:l,unstyled:a,vars:c,varsResolver:nZ});return(0,s.jsx)(ed,{ref:t,...m("root"),variant:h,...f})});nJ.classes=nG,nJ.displayName="@mantine/core/Stack";var nq={root:"m_b6d8b162"};let nK={inherit:!1},nX=(e,t)=>{let{variant:n,lineClamp:r,gradient:o,size:i,color:l}=t;return{root:{"--text-fz":V(i),"--text-lh":P(i,"mantine-line-height",!1),"--text-gradient":"gradient"===n?w(o,e):void 0,"--text-line-clamp":"number"==typeof r?r.toString():void 0,"--text-color":l?b(l,e):void 0}}},nQ=I((e,t)=>{let n=O("Text",nK,e),{lineClamp:r,truncate:o,inline:i,inherit:l,gradient:a,span:c,__staticSelector:u,vars:d,className:p,style:h,classNames:f,styles:m,unstyled:g,variant:y,mod:v,size:b,...w}=n,x=K({name:["Text",u],props:n,classes:nq,className:p,style:h,classNames:f,styles:m,unstyled:g,vars:d,varsResolver:nX});return(0,s.jsx)(ed,{...x("root",{focusable:!0}),ref:t,component:c?"span":"p",variant:y,mod:[{"data-truncate":"start"===o?"start":"end"===o||o?"end":void 0,"data-line-clamp":"number"==typeof r,"data-inline":i,"data-inherit":l},v],size:b,...w})});nQ.classes=nq,nQ.displayName="@mantine/core/Text";var n0={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};let n1={},n2=(e,t)=>{let{radius:n,color:r,gradient:o,variant:i,size:l,autoContrast:s}=t,a=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:o,variant:i||"filled",autoContrast:s});return{root:{"--badge-height":P(l,"badge-height"),"--badge-padding-x":P(l,"badge-padding-x"),"--badge-fz":P(l,"badge-fz"),"--badge-radius":void 0===n?void 0:z(n),"--badge-bg":r||i?a.background:void 0,"--badge-color":r||i?a.color:void 0,"--badge-bd":r||i?a.border:void 0,"--badge-dot-color":"dot"===i?b(r,e):void 0}}},n4=I((e,t)=>{let n=O("Badge",n1,e),{classNames:r,className:o,style:i,styles:l,unstyled:a,vars:c,radius:u,color:d,gradient:p,leftSection:h,rightSection:f,children:m,variant:g,fullWidth:y,autoContrast:v,circle:b,mod:w,...x}=n,k=K({name:"Badge",props:n,classes:n0,className:o,style:i,classNames:r,styles:l,unstyled:a,vars:c,varsResolver:n2});return(0,s.jsxs)(ed,{variant:g,mod:[{block:y,circle:b,"with-right-section":!!f,"with-left-section":!!h},w],...k("root",{variant:g}),ref:t,...x,children:[h&&(0,s.jsx)("span",{...k("section"),"data-position":"left",children:h}),(0,s.jsx)("span",{...k("label"),children:m}),f&&(0,s.jsx)("span",{...k("section"),"data-position":"right",children:f})]})});n4.classes=n0,n4.displayName="@mantine/core/Badge";let n5={duration:100,transition:"fade"};var n3=n(94046),n8={tooltip:"m_1b3c8819",arrow:"m_f898399f"};let n7={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:eW},n6=(e,t)=>{let{radius:n,color:r}=t;return{tooltip:{"--tooltip-radius":void 0===n?void 0:z(n),"--tooltip-bg":r?b(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}},n9=L((e,t)=>{var n,r;let i=O("TooltipFloating",n7,e),{children:l,refProp:a,withinPortal:c,style:u,className:d,classNames:p,styles:h,unstyled:f,radius:m,color:g,label:y,offset:v,position:b,multiline:w,zIndex:x,disabled:k,defaultOpened:C,variant:S,vars:M,portalProps:E,...T}=i,j=A(),R=K({name:"TooltipFloating",props:i,classes:n8,className:d,style:u,classNames:p,styles:h,unstyled:f,rootSelector:"tooltip",vars:M,varsResolver:n6}),{handleMouseMove:N,x:H,y:L,opened:I,boundaryRef:_,floating:P,setOpened:D}=function(e){let{offset:t,position:n,defaultOpened:r}=e,[i,l]=(0,o.useState)(r),s=(0,o.useRef)(),{x:a,y:c,elements:u,refs:d,update:p,placement:h}=(0,tC.YF)({placement:n,middleware:[(0,tk.uY)({crossAxis:!0,padding:5,rootBoundary:"document"})]}),f=h.includes("right")?t:n.includes("left")?-1*t:0,m=h.includes("bottom")?t:n.includes("top")?-1*t:0,g=(0,o.useCallback)(e=>{let{clientX:t,clientY:n}=e;d.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:t,y:n,left:t+f,top:n+m,right:t,bottom:n})})},[u.reference]);return(0,o.useEffect)(()=>
1{if(d.floating.current){let e=s.current;e.addEventListener("mousemove",g);let t=(0,n3.Kx)(d.floating.current);return t.forEach(e=>{e.addEventListener("scroll",p)}),()=>{e.removeEventListener("mousemove",g),t.forEach(e=>{e.removeEventListener("scroll",p)})}}},[u.reference,d.floating.current,p,g,i]),{handleMouseMove:g,x:a,y:c,opened:i,setOpened:l,boundaryRef:s,floating:d.setFloating}}({offset:v,position:b,defaultOpened:C});if(!tr(l))throw Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");let z=e1(_,l.ref,t);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tp,{...E,withinPortal:c,children:(0,s.jsx)(ed,{...T,...R("tooltip",{style:{...function e(t,n){return Array.isArray(t)?[...t].reduce((t,r)=>({...t,...e(r,n)}),{}):"function"==typeof t?t(n):null==t?{}:t}(u,j),zIndex:x,display:!k&&I?"block":"none",top:null!==(n=L&&Math.round(L))&&void 0!==n?n:"",left:null!==(r=H&&Math.round(H))&&void 0!==r?r:""}}),variant:S,ref:P,mod:{multiline:w},children:y})}),(0,o.cloneElement)(l,{...l.props,[a]:z,onMouseEnter:e=>{var t,n;null===(t=(n=l.props).onMouseEnter)||void 0===t||t.call(n,e),N(e),D(!0)},onMouseLeave:e=>{var t,n;null===(t=(n=l.props).onMouseLeave)||void 0===t||t.call(n,e),D(!1)}})]})});n9.classes=n8,n9.displayName="@mantine/core/TooltipFloating";let re=(0,o.createContext)(!1),rt=re.Provider,rn=()=>(0,o.useContext)(re),rr={openDelay:0,closeDelay:0};function ro(e){let{openDelay:t,closeDelay:n,children:r}=O("TooltipGroup",rr,e);return(0,s.jsx)(rt,{value:!0,children:(0,s.jsx)(tC.e0,{delay:{open:t,close:n},children:r})})}ro.displayName="@mantine/core/TooltipGroup",ro.extend=e=>e;let ri={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:eW,positionDependencies:[]},rl=(e,t)=>{let{radius:n,color:r}=t;return{tooltip:{"--tooltip-radius":void 0===n?void 0:z(n),"--tooltip-bg":r?b(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}},rs=L((e,t)=>{var n;let r=O("Tooltip",ri,e),{children:i,position:l,refProp:a,label:c,openDelay:u,closeDelay:d,onPositionChange:p,opened:h,defaultOpened:f,withinPortal:m,radius:g,color:y,classNames:v,styles:b,unstyled:w,style:x,className:k,withArrow:C,arrowSize:S,arrowOffset:M,arrowRadius:E,arrowPosition:T,offset:j,transitionProps:R,multiline:A,events:N,zIndex:H,disabled:L,positionDependencies:I,onClick:_,onMouseEnter:P,onMouseLeave:D,inline:z,variant:V,keepMounted:F,vars:B,portalProps:$,mod:W,floatingStrategy:G,...Y}=O("Tooltip",ri,r),{dir:Z}=eZ(),J=(0,o.useRef)(null),q=function(e){var t,n,r;let[i,l]=(0,o.useState)(e.defaultOpened),s="boolean"==typeof e.opened?e.opened:i,a=rn(),c=eR(),{delay:u,currentId:d,setCurrentId:p}=(0,tC.tj)(),h=(0,o.useCallback)(e=>{l(e),e&&p(c)},[p,c]),{x:f,y:m,context:g,refs:y,update:v,placement:b,middlewareData:{arrow:{x:w,y:x}={}}}=(0,tC.YF)({strategy:e.strategy,placement:e.position,open:s,onOpenChange:h,middleware:[(0,tk.cv)(e.offset),(0,tk.uY)({padding:8}),(0,tk.RR)(),(0,tk.x7)({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[(0,tk.Qo)()]:[]]}),{getReferenceProps:k,getFloatingProps:C}=(0,tC.NI)([(0,tC.XI)(g,{enabled:null===(t=e.events)||void 0===t?void 0:t.hover,delay:a?u:{open:e.openDelay,close:e.closeDelay},mouseOnly:!(null===(n=e.events)||void 0===n?void 0:n.touch)}),(0,tC.KK)(g,{enabled:null===(r=e.events)||void 0===r?void 0:r.focus,visibleOnly:!0}),(0,tC.qs)(g,{role:"tooltip"}),(0,tC.bQ)(g,{enabled:void 0===e.opened}),(0,tC.Qu)(g,{id:c})]);tM({opened:s,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:y,update:v}}),eF(()=>{var t;null===(t=e.onPositionChange)||void 0===t||t.call(e,b)},[b]);let S=s&&d&&d!==c;return{x:f,y:m,arrowX:w,arrowY:x,reference:y.setReference,floating:y.setFloating,getFloatingProps:C,getReferenceProps:k,isGroupPhase:S,opened:s,placement:b}}({position:eJ(Z,l),closeDelay:d,openDelay:u,onPositionChange:p,opened:h,defaultOpened:f,events:N,arrowRef:J,arrowOffset:M,offset:"number"==typeof j?j+(C?S/2:0):j,positionDependencies:[...I,i],inline:z,strategy:G}),X=K({name:"Tooltip",props:r,classes:n8,className:k,style:x,classNames:v,styles:b,unstyled:w,rootSelector:"tooltip",vars:B,varsResolver:rl});if(!tr(i))throw Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, str
1ings, numbers and other primitive values are not supported");let Q=e1(q.reference,i.ref,t),ee=(n={duration:100,transition:"fade"},{...n5,...n,...R});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tp,{...$,withinPortal:m,children:(0,s.jsx)(tg,{...ee,keepMounted:F,mounted:!L&&!!q.opened,duration:q.isGroupPhase?10:ee.duration,children:e=>{var t,n;return(0,s.jsxs)(ed,{...Y,"data-fixed":"fixed"===G||void 0,variant:V,mod:[{multiline:A},W],...q.getFloatingProps({ref:q.floating,className:X("tooltip").className,style:{...X("tooltip").style,...e,zIndex:H,top:null!==(t=q.y)&&void 0!==t?t:0,left:null!==(n=q.x)&&void 0!==n?n:0}}),children:[c,(0,s.jsx)(e8,{ref:J,arrowX:q.arrowX,arrowY:q.arrowY,visible:C,position:q.placement,arrowSize:S,arrowOffset:M,arrowRadius:E,arrowPosition:T,...X("arrow")})]})}})}),(0,o.cloneElement)(i,q.getReferenceProps({onClick:_,onMouseEnter:P,onMouseLeave:D,onMouseMove:r.onMouseMove,onPointerDown:r.onPointerDown,onPointerEnter:r.onPointerEnter,[a]:Q,className:U(k,i.props.className),...i.props}))]})});function ra(e){return"auto"===e||"dark"===e||"light"===e}function rc(){let e=A(),t=$(),n=Q(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes("px"),o=function(e){let t="string"==typeof e&&e.includes("var(--mantine-scale)")?e.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim():e;return"number"==typeof t?t:"string"==typeof t?t.includes("calc")||t.includes("var")?t:t.includes("px")?Number(t.replace("px","")):t.includes("rem")?16*Number(t.replace("rem","")):t.includes("em")?16*Number(t.replace("em","")):Number(t):NaN}(e.breakpoints[n]),i=r?"".concat(o-.1,"px"):p(o-.1),l=r?"".concat(o,"px"):p(o);return"".concat(t,"@media (max-width: ").concat(i,") {.mantine-visible-from-").concat(n," {display: none !important;}}@media (min-width: ").concat(l,") {.mantine-hidden-from-").concat(n," {display: none !important;}}")},"");return(0,s.jsx)("style",{"data-mantine-styles":"classes",nonce:null==t?void 0:t(),dangerouslySetInnerHTML:{__html:n}})}function ru(e){return Object.entries(e).map(e=>{let[t,n]=e;return"".concat(t,": ").concat(n,";")}).join("")}function rd(e,t){return(Array.isArray(e)?e:[e]).reduce((e,t)=>"".concat(t,"{").concat(e,"}"),t)}function rp(e){let{theme:t,color:n,colorScheme:r,name:o=n,withColorValues:i=!0}=e;if(!t.colors[n])return{};if("light"===r){let e=m(t,"light"),r={["--mantine-color-".concat(o,"-text")]:"var(--mantine-color-".concat(o,"-filled)"),["--mantine-color-".concat(o,"-filled")]:"var(--mantine-color-".concat(o,"-").concat(e,")"),["--mantine-color-".concat(o,"-filled-hover")]:"var(--mantine-color-".concat(o,"-").concat(9===e?8:e+1,")"),["--mantine-color-".concat(o,"-light")]:x(t.colors[n][e],.1),["--mantine-color-".concat(o,"-light-hover")]:x(t.colors[n][e],.12),["--mantine-color-".concat(o,"-light-color")]:"var(--mantine-color-".concat(o,"-").concat(e,")"),["--mantine-color-".concat(o,"-outline")]:"var(--mantine-color-".concat(o,"-").concat(e,")"),["--mantine-color-".concat(o,"-outline-hover")]:x(t.colors[n][e],.05)};return i?{["--mantine-color-".concat(o,"-0")]:t.colors[n][0],["--mantine-color-".concat(o,"-1")]:t.colors[n][1],["--mantine-color-".concat(o,"-2")]:t.colors[n][2],["--mantine-color-".concat(o,"-3")]:t.colors[n][3],["--mantine-color-".concat(o,"-4")]:t.colors[n][4],["--mantine-color-".concat(o,"-5")]:t.colors[n][5],["--mantine-color-".concat(o,"-6")]:t.colors[n][6],["--mantine-color-".concat(o,"-7")]:t.colors[n][7],["--mantine-color-".concat(o,"-8")]:t.colors[n][8],["--mantine-color-".concat(o,"-9")]:t.colors[n][9],...r}:r}let l=m(t,"dark"),s={["--mantine-color-".concat(o,"-text")]:"var(--mantine-color-".concat(o,"-4)"),["--mantine-color-".concat(o,"-filled")]:"var(--mantine-color-".concat(o,"-").concat(l,")"),["--mantine-color-".concat(o,"-filled-hover")]:"var(--mantine-color-".concat(o,"-").concat(9===l?8:l+1,")"),["--mantine-color-".concat(o,"-light")]:x(t.colors[n][Math.max(0,l-2)],.15),["--mantine-color-".concat(o,"-light-hover")]:x(t.colors[n][Math.max(0,l-2)],.2),["--mantine-color-".concat(o,"-light-color")]:"var(--mantine-color-".concat(o,"-").concat(Math.max(l-5,0),")"),["--mantine-color-".concat(o,"-outline")]:"var(--mantine-color-".concat(o,"-").concat(Math.max(l-4,0),")"),["--mantine-color-".concat(o,"-outline-hover")]:x(t.colors[n][Math.max(l-4,0)],.05)};return i?{["--mantine-color-".concat(o,"-0")]:t.colors[n][0],["--mantine-color-".concat(o,"-1")]:t.colors[n][1],["--mantine-color-".concat(o,"-2")]:t.colors[n][2],["--mantine-color-".concat(o,"-3")]:t.colors[n][3],["--mantine-color-".concat(o,"-4")]:t.colors[n][4],["--mantine-color-".concat(o,"-5")]:t.colors[n][5],["--mantine-color-".concat(o,"-6")]:t.colors[n][6],["--mantine-color-".concat(o,"-7")]:t.colors[n][7],["--mantine-color-".concat(o,"-8")]:t.colors[n][8],["--mantine-color-".concat(o,"-9")]:t.colors[n][9],...s}:s}function rh(e,t,n){Q(t).forEach(r=>Object.assign(e,{["--mantine-".concat(n,"-").concat(r)]:t[r]}))}rs.classes=n8,rs.displayName="@mantine/core/Tooltip",rs.Floating=n9,rs.Group=ro;let rf=e=>{let t=m(e,"light"),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:d(e.defaultRadius),r={variables:{"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-we
1ight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":"var(--mantine-color-".concat(e.primaryColor,"-filled)"),"--mantine-primary-color-filled-hover":"var(--mantine-color-".concat(e.primaryColor,"-filled-hover)"),"--mantine-primary-color-light":"var(--mantine-color-".concat(e.primaryColor,"-light)"),"--mantine-primary-color-light-hover":"var(--mantine-color-".concat(e.primaryColor,"-light-hover)"),"--mantine-primary-color-light-color":"var(--mantine-color-".concat(e.primaryColor,"-light-color)")},light:{"--mantine-primary-color-contrast":t2(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":"var(--mantine-color-".concat(e.primaryColor,"-").concat(t,")"),"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":t2(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":"var(--mantine-color-".concat(e.primaryColor,"-4)"),"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};rh(r.variables,e.breakpoints,"breakpoint"),rh(r.variables,e.spacing,"spacing"),rh(r.variables,e.fontSizes,"font-size"),rh(r.variables,e.lineHeights,"line-height"),rh(r.variables,e.shadows,"shadow"),rh(r.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((t,n)=>{r.variables["--mantine-primary-color-".concat(n)]="var(--mantine-color-".concat(e.primaryColor,"-").concat(n,")")}),Q(e.colors).forEach(t=>{let n=e.colors[t];if(n&&"object"==typeof n&&"mantine-virtual-color"in n){Object.assign(r.light,rp({theme:e,name:n.name,color:n.light,colorScheme:"light",withColorValues:!0})),Object.assign(r.dark,rp({theme:e,name:n.name,color:n.dark,colorScheme:"dark",withColorValues:!0}));return}n.forEach((e,n)=>{r.variables["--mantine-color-".concat(t,"-").concat(n)]=e}),Object.assign(r.light,rp({theme:e,color:t,colorScheme:"light",withColorValues:!1})),Object.assign(r.dark,rp({theme:e,color:t,colorScheme:"dark",withColorValues:!1}))});let o=e.headings.sizes;return Q(o).forEach(t=>{r.variables["--mantine-".concat(t,"-font-size")]=o[t].fontSize,r.variables["--mantine-".concat(t,"-line-height")]=o[t].lineHeight,r.variables["--mantine-".concat(t,"-font-weight")]=o[t].fontWeight||e.headings.fontWeight}),r},rm=rf(C);function rg(e){let{cssVariablesSelector:t,deduplicateCssVariables:n}=e,r=A(),o=$(),i=function(e){let{theme:t,generator:n}=e,r=rf(t),o=null==n?void 0:n(t);return o?M(r,o):r}({theme:r,generator:B().cssVariablesResolver}),l=":root"===t&&n,a=function(e,t){let n=ru(e.variables),r=n?rd(t,n):"",o=ru(e.dark),i=ru(e.light),l=o?":host"===t?rd("".concat(t,'([data-mantine-color-scheme="dark"])'),o):rd("".concat(t,'[data-mantine-color-scheme="dark"]'),o):"",s=i?":host"===t?rd("".concat(t,'([data-mantine-color-scheme="light"])'),i):rd("".concat(t,'[data-mantine-color-scheme="light"]'),i):"";return"".concat(r).concat(l).concat(s)}(l?function(e){let t={variables:{},light:{},dark:{}};return Q(e.variables).forEach(n=>{rm.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),Q(e.light).forEach(n=>{rm.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),Q(e.dark).forEach(n=>{rm.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}(i):i,t);return a?(0,s.jsx)("style",{"data-mantine-styles":!0,nonce:null==o?void 0:o(),dangerouslySetInnerHTML:{__html:"".concat(a).concat(l?"":"\n  ".concat(t,'[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }\n  ').concat(t,'[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }\n'))}}):null}function ry(e,t){var n;let r="auto"!==e?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
1k":"light";null===(n=t())||void 0===n||n.setAttribute("data-mantine-color-scheme",r)}function rv(e){let{theme:t,children:n,getStyleNonce:r,withStaticClasses:i=!0,withGlobalClasses:l=!0,deduplicateCssVariables:a=!0,withCssVariables:c=!0,cssVariablesSelector:u=":root",classNamesPrefix:d="mantine",colorSchemeManager:p=function(){let e,{key:t="mantine-color-scheme-value"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{get:e=>{if("undefined"==typeof window)return e;try{let n=window.localStorage.getItem(t);return ra(n)?n:e}catch(t){return e}},set:e=>{try{window.localStorage.setItem(t,e)}catch(e){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",e)}},subscribe:n=>{e=e=>{e.storageArea===window.localStorage&&e.key===t&&ra(e.newValue)&&n(e.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}(),defaultColorScheme:h="light",getRootElement:f=()=>document.documentElement,cssVariablesResolver:m,forceColorScheme:g,stylesTransform:y}=e,{colorScheme:v,setColorScheme:b,clearColorScheme:w}=function(e){let{manager:t,defaultColorScheme:n,getRootElement:r,forceColorScheme:i}=e,l=(0,o.useRef)(),[s,a]=(0,o.useState)(()=>t.get(n)),c=i||s,u=(0,o.useCallback)(e=>{i||(ry(e,r),a(e),t.set(e))},[t.set,c,i]),d=(0,o.useCallback)(()=>{a(n),ry(n,r),t.clear()},[t.clear,n]);return(0,o.useEffect)(()=>(t.subscribe(u),t.unsubscribe),[t.subscribe,t.unsubscribe]),eE(()=>{ry(t.get(n),r)},[]),(0,o.useEffect)(()=>{var e;if(i)return ry(i,r),()=>{};void 0===i&&ry(s,r),l.current=window.matchMedia("(prefers-color-scheme: dark)");let t=e=>{"auto"===s&&ry(e.matches?"dark":"light",r)};return null===(e=l.current)||void 0===e||e.addEventListener("change",t),()=>{var e;return null===(e=l.current)||void 0===e?void 0:e.removeEventListener("change",t)}},[s,i]),{colorScheme:c,setColorScheme:u,clearColorScheme:d}}({defaultColorScheme:h,forceColorScheme:g,manager:p,getRootElement:f});return!function(e){let{respectReducedMotion:t,getRootElement:n}=e;eE(()=>{if(t){var e;null===(e=n())||void 0===e||e.setAttribute("data-respect-reduced-motion","true")}},[t])}({respectReducedMotion:(null==t?void 0:t.respectReducedMotion)||!1,getRootElement:f}),(0,s.jsx)(F.Provider,{value:{colorScheme:v,setColorScheme:b,clearColorScheme:w,getRootElement:f,classNamesPrefix:d,getStyleNonce:r,cssVariablesResolver:m,cssVariablesSelector:u,withStaticClasses:i,stylesTransform:y},children:(0,s.jsxs)(N,{theme:t,children:[c&&(0,s.jsx)(rg,{cssVariablesSelector:u,deduplicateCssVariables:a}),l&&(0,s.jsx)(rc,{}),n]})})}rg.displayName="@mantine/CssVariables",function(){let e=console.error;console.error=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>1&&"string"==typeof n[0]&&n[0].toLowerCase().includes("extra attributes from the server")&&"string"==typeof n[1]&&n[1].toLowerCase().includes("data-mantine-color-scheme")||e(...n)}}(),rv.displayName="@mantine/core/MantineProvider";var rb={exports:{}},rw={};rb.exports=function(){if(r)return rw;r=1;var e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function s(t,r,o){var s,a={},c=null,u=null;for(s in void 0!==o&&(c=""+o),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(u=r.ref),r)n.call(r,s)&&!l.hasOwnProperty(s)&&(a[s]=r[s]);if(t&&t.defaultProps)for(s in r=t.defaultProps)void 0===a[s]&&(a[s]=r[s]);return{$$typeof:e,type:t,key:c,ref:u,props:a,_owner:i.current}}return rw.Fragment=t,rw.jsx=s,rw.jsxs=s,rw}();var rx=rb.exports;let rk=(e,t,n=!1)=>((function e(r,o="--bn"){for(let i in r){let l=i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),s=`${o}-${l}`;"object"!=typeof r[i]?("number"==typeof r[i]&&(r[i]=`${r[i]}px`),n?t.style.removeProperty(s):t.style.setProperty(s,r[i].toString())):e(r[i],s)}})(e),[]),rC=(e,t)=>rk(e,t),rS={colors:{editor:{text:void 0,background:void 0},menu:{text:void 0,background:void 0},tooltip:{text:void 0,background:void 0},hovered:{text:void 0,background:void 0},selected:{text:void 0,background:void 0},disabled:{text:void 0,background:void 0},shadow:void 0,border:void 0,sideMenu:void 0,highlights:{gray:{text:void 0,background:void 0},brown:{text:void 0,background:void 0},red:{text:void 0,background:void 0},orange:{text:void 0,background:void 0},yellow:{text:void 0,background:void 0},green:{text:void 0,background:void 0},blue:{text:void 0,background:void 0},purple:{text:void 0,background:void 0},pink:{text:void 0,background:void 0}}},borderRadius:void 0,fontFamily:void 0},rM=e=>rk(rS,e,!0),rE=(0,o.forwardRef)((e,t)=>{let{className:n,name:r,label:o,icon:l,value:s,autoFocus:a,placeholder:c,onKeyDown:u,onChange:d,onSubmit:p,...h}=e;return(0,i.e8)(h),rx.jsx(ez,{size:"xs",className:n,ref:t,name:r,label:o,leftSection:l,value:s,autoFocus:a,"data-autofocus":a?"true":void 0,placeholder:c,onKeyDown:u,onChange:d,onSubmit:p})});var rT={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},rj=o.createContext&&o.createContext(rT),rR=["attr","size","title"];function rA(){return(rA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function rN(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 rO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?rN(Object(n),!0).forEach(function(t){var r,o;r=t,o=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||"default");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:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rH(e){return t=>o.createElement(rL,rA({attr:rO({},e.attr)},t),function e(t){return t&&t.map((t,n)=>o.createElement(t.tag,rO({key:n},t.attr),e(t.child)))}(e.child))}function rL(e){var t=t=>{var n,{attr:r,size:i,title:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,rR),a=i||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),o.createElement("svg",rA({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,s,{className:n,style:rO(rO({color:e.color||t.color},t.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),l&&o.createElement("title",null,l),e.children)};return void 0!==rj?o.createElement(rj.Consumer,null,e=>t(e)):t(rT)}function rI(e){return rH({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(e)}function r_(e){return rH({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"},child:[]}]})(e)}let rP=(0,o.createContext)(void 0),rD=(0,o.forwardRef)((e,t)=>{let{children:n,onOpenChange:r,position:l,sub:s,...a}=e;(0,i.e8)(a);let[c,u]=(0,o.useState)(!1),d=(0,o.useRef)(null),p=(0,o.useRef)(),h=(0,o.useCallback)(()=>{p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{u(!1)},250)},[]),f=(0,o.useCallback)(()=>{p.current&&clearTimeout(p.current),u(!0)},[]);return rx.jsx(rP.Provider,{value:{onMenuMouseOver:f,onMenuMouseLeave:h},children:rx.jsx(tZ.Item,{className:"bn-menu-item bn-mt-sub-menu-item",ref:e0(t,d),onMouseOver:f,onMouseLeave:h,children:rx.jsx(tZ,{portalProps:{target:d.current?d.current.parentElement:void 0},middlewares:{flip:!0,shift:!0,inline:!1,size:!0},trigger:"hover",opened:c,onClose:()=>null==r?void 0:r(!1),onOpen:()=>null==r?void 0:r(!0),position:l,children:n})})})}),rz=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,icon:o,checked:l,subTrigger:s,onClick:a,...c}=e;return(0,i.e8)(c,!1),s?rx.jsxs("div",{ref:t,...c,children:[r,rx.jsx(r_,{size:15})]}):rx.jsx(tZ.Item,{className:n,ref:t,leftSection:o,rightSection:l?rx.jsx(tJ,{size:10}):!1===l?rx.jsx("div",{className:"bn-tick-space"}):null,onClick:a,...c,children:r})}),rV=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,sub:l,...s}=e;(0,i.e8)(s);let a=(0,o.useContext)(rP);return rx.jsx(tZ.Dropdown,{className:n,ref:t,onMouseOver:null==a?void 0:a.onMenuMouseOver,onMouseLeave:null==a?void 0:a.onMenuMouseLeave,children:r})}),rF=(0,o.forwardRef)((e,t)=>{let{className:n,...r}=e;return(0,i.e8)(r),rx.jsx(tZ.Divider,{className:n,ref:t})}),rB=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,...o}=e;return(0,i.e8)(o),rx.jsx(tZ.Label,{className:n,ref:t,children:r})}),r$=(0,o.forwardRef)((e,t)=>{let{className:n,tabs:r,defaultOpenTab:o,openTab:l,setOpenTab:s,loading:a,...c}=e;return(0,i.e8)(c),rx.jsx(tQ,{className:n,ref:t,children:rx.jsxs(ni,{value:l,defaultValue:o,onChange:s,children:[a&&rx.jsx(nx,{visible:a}),rx.jsx(ni.List,{children:r.map(e=>rx.jsx(ni.Tab,{"data-test":`${e.name.toLowerCase()}-tab`,value:e.name,children:e.name},e.name))}),r.map(e=>rx.jsx(ni.Panel,{value:e.name,children:e.tabPanel},e.name))]})})}),rU=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,onClick:o,label:l,...s}=e;return(0,i.e8)(s),rx.jsx(nR,{size:"xs","aria-label":l,className:n,ref:t,onClick:o,...s,children:r})}),rW=(0,o.forwardRef)((e,t)=>{let{className:n,accept:r,value:o,placeholder:l,onChange:s,...a}=e;return(0,i.e8)(a),rx.jsx(nD,{size:"xs",className:n,ref:t,accept:r,value:o,placeholder:l,onChange:s,...a})}),rG=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,...o}=e;return(0,i.e8)(o),rx.jsx("div",{className:n,ref:t,children:r})}),rY=(0,o.forwardRef)((e,t)=>{let{className:n,value:r,placeholder:o,onKeyDown:l,onChange:s,...a}=e;return(0,i.e8)(a),rx.jsx(ez,{size:"xs","data-test":"embed-input",className:n,ref:t,value:r,placeholder:o,onKeyDown:l,onChange:s})}),rZ=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,variant:o,...l}=e;return(0,i.e8)(l),rx.jsx(tb,{className:n,ref:t,children:r})}),rJ=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,...o}=e;return(0,i.e8)(o,!1),rx.jsx(tQ,{align:"center",gap:0,className:n,ref:t,...o,children:r})}),rq=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,icon:o,onClick:l,onDragEnd:s,onDragStart:a,draggable:c,label:u,...d}=e;return(0,i.e8)(d,!1),o?rx.jsx(nW,{size:24,className:n,ref:t,onClick:l,onDragEnd:s,onDragStart:a,draggable:c,"aria-label":u,...d,children:o}):rx.jsx(nR,{className:n,ref:t,onClick:l,onDragEnd:s,onDragStart:a,draggable:c,"aria-label":u,...d,children:r})}),rK=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,id:o,columns:l,...s}=e;return(0,i.e8)(s),rx.jsx("div",{className:n,style:{gridTemplateColumns:`repeat(${l}, 1fr)`},ref:t,id:o,role:"grid",children:r})}),rX=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,columns:o,...l}=e;return(0,i.e8)(l),rx.jsx(tQ,{className:n,style:{gridColumn:`1 / ${o+1}`},ref:t,children:rx.jsx(tQ,{className:"bn-mt-suggestion-menu-item-title",children:r})})}),rQ=(0,o.forwardRef)((e,t)=>{let{className:n,isSelected:r,onClick:s,item:a,id:c,...u}=e;(0,i.e8)(u);let d=(0,o.useRef)(null);return(0,o.useEffect)(()=>
1{if(!d.current||!r)return;let e=(0,l.ng)(d.current,document.querySelector(".bn-grid-suggestion-menu"));"top"===e?d.current.scrollIntoView(!0):"bottom"===e&&d.current.scrollIntoView(!1)},[r]),rx.jsx("div",{className:n,ref:e0(t,d),id:c,role:"option",onClick:s,"aria-selected":r||void 0,children:a.icon})}),r0=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,columns:o,...l}=e;return(0,i.e8)(l),rx.jsx(nh,{className:n,style:{gridColumn:`1 / ${o+1}`},type:"dots",ref:t})}),r1=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,id:o,...l}=e;return(0,i.e8)(l),rx.jsx(nJ,{gap:0,className:n,ref:t,id:o,role:"listbox",children:r})}),r2=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,...o}=e;return(0,i.e8)(o),rx.jsx(tQ,{className:n,ref:t,children:rx.jsx(tQ,{className:"bn-mt-suggestion-menu-item-title",children:r})})}),r4=(0,o.forwardRef)((e,t)=>{let{className:n,isSelected:r,onClick:s,item:a,id:c,...u}=e;(0,i.e8)(u);let d=(0,o.useRef)(null);return(0,o.useEffect)(()=>{if(!d.current||!r)return;let e=(0,l.ng)(d.current,document.querySelector(".bn-suggestion-menu"));"top"===e?d.current.scrollIntoView(!0):"bottom"===e&&d.current.scrollIntoView(!1)},[r]),rx.jsxs(tQ,{gap:0,className:n,ref:e0(t,d),id:c,role:"option",onClick:s,"aria-selected":r||void 0,children:[a.icon&&rx.jsx(tQ,{className:"bn-mt-suggestion-menu-item-section","data-position":"left",children:a.icon}),rx.jsxs(nJ,{gap:0,className:"bn-mt-suggestion-menu-item-body",children:[rx.jsx(nQ,{className:"bn-mt-suggestion-menu-item-title",children:a.title}),rx.jsx(nQ,{className:"bn-mt-suggestion-menu-item-subtitle",children:a.subtext})]}),a.badge&&rx.jsx(tQ,{"data-position":"right",className:"bn-mt-suggestion-menu-item-section",children:rx.jsx(n4,{size:"xs",children:a.badge})})]})}),r5=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,...o}=e;return(0,i.e8)(o),rx.jsx(tQ,{className:n,ref:t,children:r})}),r3=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,...o}=e;return(0,i.e8)(o),rx.jsx(nh,{className:n,type:"dots",ref:t})}),r8=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,draggable:o,onDragStart:l,onDragEnd:s,style:a,label:c,...u}=e;return(0,i.e8)(u,!1),rx.jsx(nR,{className:n,ref:t,"aria-label":c,draggable:o,onDragStart:l,onDragEnd:s,style:a,...u,children:r})}),r7=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,onMouseEnter:l,onMouseLeave:s,...a}=e;(0,i.e8)(a);let{ref:c,focused:u}=function(){let{onBlur:e,onFocus:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,o.useRef)(),[r,i]=(0,o.useState)(!1),l=(0,o.useRef)(!1),s=e=>{i(e),l.current=e},a=e=>{l.current||(s(!0),null==t||t(e))},c=t=>{l.current&&!(t.currentTarget instanceof HTMLElement&&t.relatedTarget instanceof HTMLElement&&t.currentTarget.contains(t.relatedTarget))&&(s(!1),null==e||e(t))};return(0,o.useEffect)(()=>{if(n.current)return n.current.addEventListener("focusin",a),n.current.addEventListener("focusout",c),()=>{var e,t;null===(e=n.current)||void 0===e||e.removeEventListener("focusin",a),null===(t=n.current)||void 0===t||t.removeEventListener("focusout",c)}},[a,c]),{ref:n,focused:r}}(),d=e0(t,c,tn(u));return rx.jsx(tQ,{className:n,ref:d,role:"toolbar",onMouseEnter:l,onMouseLeave:s,children:r})}),r6=e=>rx.jsxs(nJ,{gap:0,className:"bn-tooltip",children:[rx.jsx(nQ,{size:"sm",children:e.mainTooltip}),e.secondaryTooltip&&rx.jsx(nQ,{size:"xs",children:e.secondaryTooltip})]}),r9=(0,o.forwardRef)((e,t)=>{let{className:n,children:r,mainTooltip:o,secondaryTooltip:l,icon:s,isSelected:a,isDisabled:c,onClick:u,label:d,...p}=e;return(0,i.e8)(p,!1),rx.jsx(rs,{withinPortal:!1,label:rx.jsx(r6,{mainTooltip:o,secondaryTooltip:l}),children:r?rx.jsx(nR,{"aria-label":d,className:n,onMouseDown:e=>{(0,i.G6)()&&e.currentTarget.focus()},onClick:u,"aria-pressed":a,"data-selected":a||void 0,"data-test":o.slice(0,1).toLowerCase()+o.replace(/\s+/g,"").slice(1),size:"xs",disabled:c||!1,ref:t,...p,children:r}):rx.jsx(nW,{className:n,"aria-label":d,onMouseDown:e=>{(0,i.G6)()&&e.currentTarget.focus()},onClick:u,"aria-pressed":a,"data-selected":a||void 0,"data-test":o.slice(0,1).toLowerCase()+o.replace(/\s+/g,"").slice(1),size:30,disabled:c||!1,ref:t,...p,children:s})})}),oe={FormattingToolbar:{Root:r7,Button:r9,Select:(0,o.forwardRef)((e,t)=>{let{className:n,items:r,isDisabled:o,...l}=e;(0,i.e8)(l);let s=r.filter(e=>e.isSelected)[0];return s?rx.jsxs(tZ,{withinPortal:!1,transitionProps:{exitDuration:0},disabled:o,middlewares:{flip:!0,shift:!0,inline:!1,size:!0},children:[rx.jsx(tZ.Target,{children:rx.jsx(nR,{onMouseDown:e=>
1{(0,i.G6)()&&e.currentTarget.focus()},leftSection:s.icon,rightSection:rx.jsx(rI,{}),size:"xs",variant:"subtle",disabled:o,children:s.text})}),rx.jsx(tZ.Dropdown,{className:n,ref:t,children:r.map(e=>rx.jsx(tZ.Item,{onClick:e.onClick,leftSection:e.icon,rightSection:e.isSelected?rx.jsx(tJ,{size:10,className:"bn-tick-icon"}):rx.jsx("div",{className:"bn-tick-space"}),disabled:e.isDisabled,children:e.text},e.text))})]}):null})},FilePanel:{Root:r$,Button:rU,FileInput:rW,TabPanel:rG,TextInput:rY},GridSuggestionMenu:{Root:rK,Item:rQ,EmptyItem:rX,Loader:r0},LinkToolbar:{Root:r7,Button:r9},SideMenu:{Root:rJ,Button:rq},SuggestionMenu:{Root:r1,Item:r4,EmptyItem:r2,Label:r5,Loader:r3},TableHandle:{Root:r8},Generic:{Form:{Root:e=>rx.jsx("div",{children:e.children}),TextInput:rE},Menu:{Root:e=>{let{children:t,onOpenChange:n,position:r,sub:o,...l}=e;return(0,i.e8)(l),o?rx.jsx(rD,{...e}):rx.jsx(tZ,{withinPortal:!1,middlewares:{flip:!0,shift:!0,inline:!1,size:!0},onClose:()=>null==n?void 0:n(!1),onOpen:()=>null==n?void 0:n(!0),position:r,children:t})},Trigger:e=>{let{children:t,sub:n,...r}=e;return(0,i.e8)(r),rx.jsx(tZ.Target,{children:t})},Dropdown:rV,Divider:rF,Label:rB,Item:rz},Popover:{Root:e=>{let{children:t,opened:n,position:r,...o}=e;return(0,i.e8)(o),rx.jsx(tj,{withinPortal:!1,zIndex:1e4,opened:n,position:r,children:t})},Trigger:e=>{let{children:t,...n}=e;return(0,i.e8)(n),rx.jsx(tx,{children:t})},Content:rZ}}},ot={activeClassName:""},on=e=>{let{className:t,theme:n,...r}=e,s=(0,l.ju)(),a=(0,l.tJ)(),c=(null==s?void 0:s.colorSchemePreference)||a,u=(0,o.useCallback)(e=>{if(e&&(rM(e),"object"==typeof n)){if("light"in n&&"dark"in n){rC(n["dark"===c?"dark":"light"],e);return}rC(n,e);return}},[c,n]);return rx.jsx(l.Cd.Provider,{value:oe,children:rx.jsx(rv,{theme:ot,cssVariablesSelector:".bn-mantine",getRootElement:()=>{},children:rx.jsx(l.C4,{className:(0,i.xQ)("bn-mantine",t||""),theme:"object"==typeof n?void 0:n,...r,ref:u})})})}},77319:function(e,t,n){"use strict";n.d(t,{dv:function(){return tO},C4:function(){return tM},Cd:function(){return _},gy:function(){return tA},Ny:function(){return tN},k2:function(){return tj},ng:function(){return tV},ju:function(){return R},tJ:function(){return tw}});var r,o,i,l,s=n(2265),a=n(61896),c=n(97859),u=n(25253),d=n(54887),p=n(94725),h={exports:{}},f={};h.exports=function(){if(r)return f;r=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=s.useState,n=s.useEffect,o=s.useLayoutEffect,i=s.useDebugValue;function l(t){var n=t.getSnapshot;t=t.value;try{var r=n();return!e(t,r)}catch(e){return!0}}var a="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,r){var s=r(),a=t({inst:{value:s,getSnapshot:r}}),c=a[0].inst,u=a[1];return o(function(){c.value=s,c.getSnapshot=r,l(c)&&u({inst:c})},[e,s,r]),n(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),i(s),s};return f.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:a,f}();var m=h.exports;let g=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},y=({contentComponent:e})=>{let t=m.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return s.createElement(s.Fragment,null,Object.values(t))};class v extends s.Component{constructor(e){var t;super(e),this.editorContentRef=s.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null===(t=e.editor)||void 0===t?void 0:t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=function(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(n,r){t={...t,[n]:d.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};
1delete r[n],t=r,e.forEach(e=>e())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){let e=this.props.editor;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild))return;let t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){let{editor:e,innerRef:t,...n}=this.props;return s.createElement(s.Fragment,null,s.createElement("div",{ref:g(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&s.createElement(y,{contentComponent:e.contentComponent}))}}let b=(0,s.forwardRef)((e,t)=>{let n=s.useMemo(()=>Math.floor(4294967295*Math.random()).toString(),[e.editor]);return s.createElement(v,{key:n,innerRef:t,...e})});s.memo(b);var w={exports:{}},x={};w.exports=function(){if(o)return x;o=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=m.useSyncExternalStore,n=s.useRef,r=s.useEffect,i=s.useMemo,l=s.useDebugValue;return x.useSyncExternalStoreWithSelector=function(o,s,a,c,u){var d=n(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;var h=t(o,(d=i(function(){function t(t){if(!o){if(o=!0,n=t,t=c(t),void 0!==u&&p.hasValue){var i=p.value;if(u(i,t))return r=i}return r=t}if(i=r,e(n,t))return i;var l=c(t);return void 0!==u&&u(i,l)?i:(n=t,r=l)}var n,r,o=!1,i=void 0===a?null:a;return[function(){return t(s())},null===i?void 0:function(){return t(i())}]},[s,a,c,u]))[0],d[1]);return r(function(){p.hasValue=!0,p.value=h},[h]),l(h),h},x}(),w.exports,"undefined"==typeof window||"undefined"!=typeof window&&window.next,(0,s.createContext)({editor:null}).Consumer;let k=(0,s.createContext)({onDragStart:void 0}),C=()=>(0,s.useContext)(k),S=e=>{let t=e.as||"div",{nodeViewContentRef:n}=C();return s.createElement(t,{...e,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...e.style}})},M=s.forwardRef((e,t)=>{let{onDragStart:n}=C(),r=e.as||"div";return s.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});class E{constructor(e,{editor:t,props:n={},as:r="div",className:o=""}){this.ref=null,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isInitialized?(0,d.flushSync)(()=>{this.render()}):this.render()}render(){var e,t;let n=this.component,r=this.props,o=this.editor;("function"==typeof n&&n.prototype&&n.prototype.isReactComponent||"object"==typeof n&&(null===(t=n.$$typeof)||void 0===t?void 0:t.toString())==="Symbol(react.forward_ref)")&&(r.ref=e=>{this.ref=e}),this.reactElement=s.createElement(n,r),null===(e=null==o?void 0:o.contentComponent)||void 0===e||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;null===(e=null==t?void 0:t.contentComponent)||void 0===e||e.removeRenderer(this.id)}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}}class T extends p.DK{mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){let e;this.component.displayName=(e=this.extension.name).charAt(0).toUpperCase()+e.substring(1)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&e.appendChild(this.contentDOMElement)}},n=this.component,r=s.memo(e=>s.createElement(k.Provider,{value:t},s.createElement(n,e)));r.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let o=this.node.isInline?"span":"div";this.options.as&&(o=this.options.as);let{className:i=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new E(r,{editor:this.editor,props:e,as:o,className:`node-${this.node.type.n
1ame} ${i}`.trim()}),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null===(e=this.renderer.element.firstElementChild)||void 0===e?void 0:e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if("number"==typeof n){if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}}update(e,t,n){let r=e=>{this.renderer.updateProps(e),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){let o=this.node,i=this.decorations,l=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:o,oldDecorations:i,newNode:e,newDecorations:t,oldInnerDecorations:l,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if("function"==typeof this.options.attrs){let t=this.editor.extensionManager.attributes,n=(0,p.m7)(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}let j=(0,s.createContext)(void 0);function R(e){return(0,s.useContext)(j)}var A={exports:{}},N={};A.exports=function(){if(i)return N;i=1;var e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(t,i,l){var s,a={},c=null,u=null;for(s in void 0!==l&&(c=""+l),void 0!==i.key&&(c=""+i.key),void 0!==i.ref&&(u=i.ref),i)n.call(i,s)&&!o.hasOwnProperty(s)&&(a[s]=i[s]);if(t&&t.defaultProps)for(s in i=t.defaultProps)void 0===a[s]&&(a[s]=i[s]);return{$$typeof:e,type:t,key:c,ref:u,props:a,_owner:r.current}}return N.Fragment=t,N.jsx=l,N.jsxs=l,N}();var O=A.exports;function H(e){let t=R();if(!(null!=t&&t.editor))throw Error("useBlockNoteEditor was called outside of a BlockNoteContext provider or BlockNoteView component");return t.editor}function L(e,t,n,r){let{refs:o,update:i,context:l,floatingStyles:c}=(0,a.YF)({open:e,...r}),{isMounted:u,styles:d}=(0,a.Y_)(l),p=(0,a.bQ)(l),{getReferenceProps:h,getFloatingProps:f}=(0,a.NI)([p]);return(0,s.useEffect)(()=>{i()},[t,i]),(0,s.useEffect)(()=>{null!==t&&o.setReference({getBoundingClientRect:()=>t})},[t,o]),(0,s.useMemo)(()=>({isMounted:u,ref:o.setFloating,style:{display:"flex",...d,...c,zIndex:n},getFloatingProps:f,getReferenceProps:h}),[c,u,o.setFloating,d,n,f,h])}function I(e){let[t,n]=(0,s.useState)();return(0,s.useEffect)(()=>e(e=>{n({...e})}),[e]),t}let _=(0,s.createContext)(void 0);function P(){return(0,s.useContext)(_)}function D(){return R().editor.dictionary}let z=e=>{let t=P(),n=D(),{block:r}=e,o=H(),[i,l]=(0,s.useState)(""),a=(0,s.useCallback)(e=>{l(e.currentTarget.value)},[]),c=(0,s.useCallback)(e=>{"Enter"===e.key&&(e.preventDefault(),o.updateBlock(r,{props:{name:(0,u.Xc)(i),url:i}}))},[o,r,i]),d=(0,s.useCallback)(()=>{o.updateBlock(r,{props:{name:(0,u.Xc)(i),url:i}})},[o,r,i]);return O.jsxs(t.FilePanel.TabPanel,{className:"bn-tab-panel",children:[O.jsx(t.FilePanel.TextInput,{className:"bn-text-input",placeholder:n.file_panel.embed.url_placeholder,value:i,onChange:a,onKeyDown:c,"data-test":"embed-input"}),O.jsx(t.FilePanel.Button,{className:"bn-button",onClick:d,"data-test":"embed-input-button",children:n.file_panel.embed.embed_button[r.type]||n.file_panel.embed.embed_button.file})]})},V=e=>{var t;
1let n=P(),r=D(),{block:o,setLoading:i}=e,l=H(),[a,c]=(0,s.useState)(!1);(0,s.useEffect)(()=>{a&&setTimeout(()=>{c(!1)},3e3)},[a]);let u=(0,s.useCallback)(e=>{null!==e&&t(e);async function t(e){if(i(!0),void 0!==l.uploadFile)try{let t=await l.uploadFile(e);"string"==typeof t&&(t={props:{name:e.name,url:t}}),l.updateBlock(o,t)}catch{c(!0)}finally{i(!1)}}},[o,l,i]),d=l.schema.blockSchema[o.type],p=d.isFileBlock&&null!=(t=d.fileBlockAccept)&&t.length?d.fileBlockAccept.join(","):"*/*";return O.jsxs(n.FilePanel.TabPanel,{className:"bn-tab-panel",children:[O.jsx(n.FilePanel.FileInput,{className:"bn-file-input","data-test":"upload-input",accept:p,placeholder:r.file_panel.upload.file_placeholder[o.type]||r.file_panel.upload.file_placeholder.file,value:null,onChange:u}),a&&O.jsx("div",{className:"bn-error-text",children:r.file_panel.upload.upload_error})]})},F=e=>{let t=P(),n=D(),r=H(),[o,i]=(0,s.useState)(!1),l=e.tabs??[...void 0!==r.uploadFile?[{name:n.file_panel.upload.title,tabPanel:O.jsx(V,{block:e.block,setLoading:i})}]:[],{name:n.file_panel.embed.title,tabPanel:O.jsx(z,{block:e.block})}],[a,c]=(0,s.useState)(e.defaultOpenTab||l[0].name);return O.jsx(t.FilePanel.Root,{className:"bn-panel",defaultOpenTab:a,openTab:a,setOpenTab:c,tabs:l,loading:o})},B=e=>{let t=H();if(!t.filePanel)throw Error("FileToolbarController can only be used when BlockNote editor schema contains file block");let n=I(t.filePanel.onUpdate.bind(t.filePanel)),{isMounted:r,ref:o,style:i,getFloatingProps:l}=L((null==n?void 0:n.show)||!1,(null==n?void 0:n.referencePos)||null,5e3,{placement:"bottom",middleware:[(0,c.cv)(10),(0,c.RR)()],onOpenChange:e=>{e||(t.filePanel.closeMenu(),t.focus())}});if(!r||!n)return null;let{show:s,referencePos:a,...u}=n,d=e.filePanel||F;return O.jsx("div",{ref:o,style:i,...l(),children:O.jsx(d,{...u})})};function $(e,t){let n=R();t||(t=null==n?void 0:n.editor),(0,s.useEffect)(()=>{if(!t)throw Error("'editor' is required, either from BlockNoteContext or as a function argument");return t.onChange(e)},[e,t])}function U(e,t){let n=R();t||(t=null==n?void 0:n.editor),(0,s.useEffect)(()=>{if(!t)throw Error("'editor' is required, either from BlockNoteContext or as a function argument");return t.onSelectionChange(e)},[e,t])}function W(e,t){$(e,t),U(e,t)}var G={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Y=s.createContext&&s.createContext(G),Z=["attr","size","title"];function J(){return(J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function q(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 K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach(function(t){var r,o;r=t,o=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||"default");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:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function X(e){return t=>s.createElement(Q,J({attr:K({},e.attr)},t),function e(t){return t&&t.map((t,n)=>s.createElement(t.tag,K({key:n},t.attr),e(t.child)))}(e.child))}function Q(e){var t=t=>{var n,{attr:r,size:o,title:i}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Z),a=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),s.createElement("svg",J({stroke:"currentColor",fill:"
1currentColor",strokeWidth:"0"},t.attr,r,l,{className:n,style:K(K({color:e.color||t.color},t.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&s.createElement("title",null,i),e.children)};return void 0!==Y?s.createElement(Y.Consumer,null,e=>t(e)):t(G)}function ee(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"},child:[]}]})(e)}function et(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.55397 22H3.3999L10.9999 3H12.9999L20.5999 22H18.4458L16.0458 16H7.95397L5.55397 22ZM8.75397 14H15.2458L11.9999 5.88517L8.75397 14Z"},child:[]}]})(e)}function en(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13 20H11V13H4V20H2V4H4V11H11V4H13V20ZM21.0005 8V20H19.0005L19 10.204L17 10.74V8.67L19.5005 8H21.0005Z"},child:[]}]})(e)}function er(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 4V11H11V4H13V20H11V13H4V20H2V4H4ZM18.5 8C20.5711 8 22.25 9.67893 22.25 11.75C22.25 12.6074 21.9623 13.3976 21.4781 14.0292L21.3302 14.2102L18.0343 18H22V20H15L14.9993 18.444L19.8207 12.8981C20.0881 12.5908 20.25 12.1893 20.25 11.75C20.25 10.7835 19.4665 10 18.5 10C17.5818 10 16.8288 10.7071 16.7558 11.6065L16.75 11.75H14.75C14.75 9.67893 16.4289 8 18.5 8Z"},child:[]}]})(e)}function eo(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M22 8L21.9984 10L19.4934 12.883C21.0823 13.3184 22.25 14.7728 22.25 16.5C22.25 18.5711 20.5711 20.25 18.5 20.25C16.674 20.25 15.1528 18.9449 14.8184 17.2166L16.7821 16.8352C16.9384 17.6413 17.6481 18.25 18.5 18.25C19.4665 18.25 20.25 17.4665 20.25 16.5C20.25 15.5335 19.4665 14.75 18.5 14.75C18.214 14.75 17.944 14.8186 17.7056 14.9403L16.3992 13.3932L19.3484 10H15V8H22ZM4 4V11H11V4H13V20H11V13H4V20H2V4H4Z"},child:[]}]})(e)}function ei(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM3 12.5L7 9V16L3 12.5Z"},child:[]}]})(e)}function el(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM7 12.5L3 16V9L7 12.5Z"},child:[]}]})(e)}function es(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 5H11V19H8V21H16V19H13V5H16V3H8V5ZM2 7C1.44772 7 1 7.44772 1 8V16C1 16.5523 1.44772 17 2 17H8V15H3V9H8V7H2ZM16 9H21V15H16V17H22C22.5523 17 23 16.5523 23 16V8C23 7.44772 22.5523 7 22 7H16V9Z"},child:[]}]})(e)}function ea(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17 17H22V19H19V22H17V17ZM7 7H2V5H5V2H7V
17ZM18.364 15.5355L16.9497 14.1213L18.364 12.7071C20.3166 10.7545 20.3166 7.58866 18.364 5.63604C16.4113 3.68342 13.2455 3.68342 11.2929 5.63604L9.87868 7.05025L8.46447 5.63604L9.87868 4.22183C12.6123 1.48816 17.0445 1.48816 19.7782 4.22183C22.5118 6.9555 22.5118 11.3877 19.7782 14.1213L18.364 15.5355ZM15.5355 18.364L14.1213 19.7782C11.3877 22.5118 6.9555 22.5118 4.22183 19.7782C1.48816 17.0445 1.48816 12.6123 4.22183 9.87868L5.63604 8.46447L7.05025 9.87868L5.63604 11.2929C3.68342 13.2455 3.68342 16.4113 5.63604 18.364C7.58866 20.3166 10.7545 20.3166 12.7071 18.364L14.1213 16.9497L15.5355 18.364ZM14.8284 7.75736L16.2426 9.17157L9.17157 16.2426L7.75736 14.8284L14.8284 7.75736Z"},child:[]}]})(e)}function ec(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M18.3638 15.5355L16.9496 14.1213L18.3638 12.7071C20.3164 10.7545 20.3164 7.58866 18.3638 5.63604C16.4112 3.68341 13.2453 3.68341 11.2927 5.63604L9.87849 7.05025L8.46428 5.63604L9.87849 4.22182C12.6122 1.48815 17.0443 1.48815 19.778 4.22182C22.5117 6.95549 22.5117 11.3876 19.778 14.1213L18.3638 15.5355ZM15.5353 18.364L14.1211 19.7782C11.3875 22.5118 6.95531 22.5118 4.22164 19.7782C1.48797 17.0445 1.48797 12.6123 4.22164 9.87868L5.63585 8.46446L7.05007 9.87868L5.63585 11.2929C3.68323 13.2455 3.68323 16.4113 5.63585 18.364C7.58847 20.3166 10.7543 20.3166 12.7069 18.364L14.1211 16.9497L15.5353 18.364ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z"},child:[]}]})(e)}function eu(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8.00008 6V9H5.00008V6H8.00008ZM3.00008 4V11H10.0001V4H3.00008ZM13.0001 4H21.0001V6H13.0001V4ZM13.0001 11H21.0001V13H13.0001V11ZM13.0001 18H21.0001V20H13.0001V18ZM10.7072 16.2071L9.29297 14.7929L6.00008 18.0858L4.20718 16.2929L2.79297 17.7071L6.00008 20.9142L10.7072 16.2071Z"},child:[]}]})(e)}function ed(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 4H21V6H8V4ZM5 3V6H6V7H3V6H4V4H3V3H5ZM3 14V11.5H5V11H3V10H6V12.5H4V13H6V14H3ZM5 19.5H3V18.5H5V18H3V17H6V21H3V20H5V19.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z"},child:[]}]})(e)}function ep(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z"},child:[]}]})(e)}function eh(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13 6V21H11V6H5V4H19V6H13Z"},child:[]}]})(e)}function ef(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5 11.1005L7 9.1005L12.5 14.6005L16 11.1005L19 14.1005V5H5V11.1005ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10Z"},child:[]}]})(e)}function em(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M21 15V18H24V20H21V23H19V20H16V18H19V15H21ZM21.0082 3C21.556 3 22 3.44495 22 3.9934L22.0007 13.3417C21.3749 13.1204 20.7015 13 20 13V5H4L4.001 19L13.2929 9.70715C13.6528 9.34604 14.22 9.31823 14.6123 9.62322L14.7065 9.70772L18.2521 13.2586C15.791 14.0069 14 16.2943 14 19C14 19.7015 14.1204 20.3749 14.3417 21.0007L2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082ZM8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7Z"},child:[]}]})(e)}function eg(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 3C20.5523 3 21 3.44772 21 4V5.757L19 7.757V5H5V13.1L9 9.1005L13.328 13.429L12.0012 14.7562L11.995 18.995L16.2414 19.0012L17.571 17.671L18.8995 19H19V16.242L21 14.242V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM21.7782 7.80761L23.1924 9.22183L15.4142 17L13.9979 16.9979L14 15.5858L21.7782 7.80761ZM15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7Z"},child:[]}]})(e)}function ey(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"
1currentColor"},child:[{tag:"path",attr:{d:"M3 3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44495 21 3.9934V20.0066C21 20.5552 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5551 3 20.0066V3.9934ZM10.6219 8.41459C10.5562 8.37078 10.479 8.34741 10.4 8.34741C10.1791 8.34741 10 8.52649 10 8.74741V15.2526C10 15.3316 10.0234 15.4088 10.0672 15.4745C10.1897 15.6583 10.4381 15.708 10.6219 15.5854L15.5008 12.3328C15.5447 12.3035 15.5824 12.2658 15.6117 12.2219C15.7343 12.0381 15.6846 11.7897 15.5008 11.6672L10.6219 8.41459Z"},child:[]}]})(e)}function ev(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"},child:[]}]})(e)}function eb(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 4V6H15V4H9Z"},child:[]}]})(e)}function ew(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19ZM14 9H19L12 16L5 9H10V3H14V9Z"},child:[]}]})(e)}function ex(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V12L17.206 8.207L11.2071 14.2071L9.79289 12.7929L15.792 6.793L12 3H21Z"},child:[]}]})(e)}function ek(e){let t=R();if(e||(e=null==t?void 0:t.editor),!e)throw Error("'editor' is required, either from BlockNoteContext or as a function argument");
1let n=e,[r,o]=(0,s.useState)(()=>{var e;return(null==(e=n.getSelection())?void 0:e.blocks)||[n.getTextCursorPosition().block]});return W(()=>{var e;return o((null==(e=n.getSelection())?void 0:e.blocks)||[n.getTextCursorPosition().block])},n),r}let eC={bold:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 11H12.5C13.8807 11 15 9.88071 15 8.5C15 7.11929 13.8807 6 12.5 6H8V11ZM18 15.5C18 17.9853 15.9853 20 13.5 20H6V4H12.5C14.9853 4 17 6.01472 17 8.5C17 9.70431 16.5269 10.7981 15.7564 11.6058C17.0979 12.3847 18 13.837 18 15.5ZM8 13V18H13.5C14.8807 18 16 16.8807 16 15.5C16 14.1193 14.8807 13 13.5 13H8Z"},child:[]}]})(e)},italic:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 20H7V18H9.92661L12.0425 6H9V4H17V6H14.0734L11.9575 18H15V20Z"},child:[]}]})(e)},underline:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8 3V12C8 14.2091 9.79086 16 12 16C14.2091 16 16 14.2091 16 12V3H18V12C18 15.3137 15.3137 18 12 18C8.68629 18 6 15.3137 6 12V3H8ZM4 20H20V22H4V20Z"},child:[]}]})(e)},strike:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.1538 14C17.3846 14.5161 17.5 15.0893 17.5 15.7196C17.5 17.0625 16.9762 18.1116 15.9286 18.867C14.8809 19.6223 13.4335 20 11.5862 20C9.94674 20 8.32335 19.6185 6.71592 18.8555V16.6009C8.23538 17.4783 9.7908 17.917 11.3822 17.917C13.9333 17.917 15.2128 17.1846 15.2208 15.7196C15.2208 15.0939 15.0049 14.5598 14.5731 14.1173C14.5339 14.0772 14.4939 14.0381 14.4531 14H3V12H21V14H17.1538ZM13.076 11H7.62908C7.4566 10.8433 7.29616 10.6692 7.14776 10.4778C6.71592 9.92084 6.5 9.24559 6.5 8.45207C6.5 7.21602 6.96583 6.165 7.89749 5.299C8.82916 4.43299 10.2706 4 12.2219 4C13.6934 4 15.1009 4.32808 16.4444 4.98426V7.13591C15.2448 6.44921 13.9293 6.10587 12.4978 6.10587C10.0187 6.10587 8.77917 6.88793 8.77917 8.45207C8.77917 8.87172 8.99709 9.23796 9.43293 9.55079C9.86878 9.86362 10.4066 10.1135 11.0463 10.3004C11.6665 10.4816 12.3431 10.7148 13.076 11H13.076Z"},child:[]}]})(e)},code:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M23 12L15.9289 19.0711L14.5147 17.6569L20.1716 12L14.5147 6.34317L15.9289 4.92896L23 12ZM3.82843 12L9.48528 17.6569L8.07107 19.0711L1 12L8.07107 4.92896L9.48528 6.34317L3.82843 12Z"},child:[]}]})(e)}},eS=e=>{var t;let n=D(),r=P(),o=H(),i=(t=e.basicTextStyle)in o.schema.styleSchema&&o.schema.styleSchema[t].type===t&&"boolean"===o.schema.styleSchema[t].propSchema,l=ek(o),[a,c]=(0,s.useState)(e.basicTextStyle in o.getActiveStyles());W(()=>{i&&c(e.basicTextStyle in o.getActiveStyles())},o);let d=e=>{if(o.focus(),i){if("boolean"!==o.schema.styleSchema[e].propSchema)throw Error("can only toggle boolean styles");o.toggleStyles({[e]:!0})}};if(!(0,s.useMemo)(()=>!!i&&!!l.find(e=>void 0!==e.content),[i,l])||!o.isEditable)return null;let p=eC[e.basicTextStyle];return O.jsx(r.FormattingToolbar.Button,{className:"bn-button","data-test":e.basicTextStyle,onClick:()=>d(e.basicTextStyle),isSelected:a,label:n.formatting_toolbar[e.basicTextStyle].tooltip,mainTooltip:n.formatting_toolbar[e.basicTextStyle].tooltip,secondaryTooltip:(0,u.eD)(n.formatting_toolbar[e.basicTextStyle].secondary_tooltip,n.generic.ctrl_shortcut),icon:O.jsx(p,{})})},eM=e=>{let t=e.textColor||"default",n=e.backgroundColor||"default",r=e.size||16,o=(0,s.useMemo)(()=>({pointerEvents:"none",fontSize:(.75*r).toString()+"px",height:r.toString()+"px",lineHeight:r.toString()+"px",textAlign:"center",width:r.toString()+"px"}),[r]);return O.jsx("div",{className:"bn-color-icon","data-background-color":n,"data-text-color":t,style:o,children:"A"})},eE=["default","gray","brown","red","orange","yellow","green","blue","purple","pink"],eT=e=>{let t=P(),n=D();return O.jsxs(O.Fragment,{children:[O.jsx(()=>e.text?O.jsxs(O.Fragment,{children:[O.jsx(t.Generic.Menu.Label,{children:n.color_picker.text_title}),eE.map(r=>O.jsx(t.Generic.Menu.Item,{onClick:()=>{e.onClick&&e.onClick(),e.text.setColor(r)},"data-test":"text-color-"+r,icon:O.jsx(eM,{textColor:r,size:e.iconSize}),checked:e.text.color===r,children:n.color_picker.colors[r]},"text-color-"+r))]}):null,{}),O.jsx(()=>e.background?O.jsxs(O.Fragment,{children:[O.jsx(t.Generic.Menu.Label,{children:n.color_picker.background_title}),eE.map(r=>O.jsx(t.Generic.Menu.Item,{onClick:()=>{e.onClick&&e.onClick(),e.background.setColor(r)},"data-test":"background-color-"+r,icon:O.jsx(eM,{backgroundColor:r,size:e.iconSize}),checked:e.background.color===r,children:n.color_picker.colors[r]},"background-color-"+r))]}):null,{})]})};function ej(e,t){return`${e}Color` in t.schema.styleSchema&&t.schema.styleSchema[`${e}
1Color`].type===`${e}Color`&&"string"===t.schema.styleSchema[`${e}Color`].propSchema}let eR=()=>{let e=P(),t=D(),n=H(),r=ej("text",n),o=ej("background",n),i=ek(n),[l,a]=(0,s.useState)(r&&n.getActiveStyles().textColor||"default"),[c,u]=(0,s.useState)(o&&n.getActiveStyles().backgroundColor||"default");W(()=>{r&&a(n.getActiveStyles().textColor||"default"),o&&u(n.getActiveStyles().backgroundColor||"default")},n);let d=(0,s.useCallback)(e=>{if(!r)throw Error("Tried to set text color, but style does not exist in editor schema.");"default"===e?n.removeStyles({textColor:e}):n.addStyles({textColor:e}),setTimeout(()=>{n.focus()})},[n,r]),p=(0,s.useCallback)(e=>{if(!o)throw Error("Tried to set background color, but style does not exist in editor schema.");"default"===e?n.removeStyles({backgroundColor:e}):n.addStyles({backgroundColor:e}),setTimeout(()=>{n.focus()})},[o,n]);return(0,s.useMemo)(()=>{if(!r&&!o)return!1;for(let e of i)if(void 0!==e.content)return!0;return!1},[o,i,r])&&n.isEditable?O.jsxs(e.Generic.Menu.Root,{children:[O.jsx(e.Generic.Menu.Trigger,{children:O.jsx(e.FormattingToolbar.Button,{className:"bn-button","data-test":"colors",label:t.formatting_toolbar.colors.tooltip,mainTooltip:t.formatting_toolbar.colors.tooltip,icon:O.jsx(eM,{textColor:l,backgroundColor:c,size:20})})}),O.jsx(e.Generic.Menu.Dropdown,{className:"bn-menu-dropdown bn-color-picker-dropdown",children:O.jsx(eT,{text:r?{color:l,setColor:d}:void 0,background:o?{color:c,setColor:p}:void 0})})]}):null},eA=e=>{let t=P(),n=D(),{url:r,text:o,editLink:i}
1=e,[l,a]=(0,s.useState)(r),[c,u]=(0,s.useState)(o);(0,s.useEffect)(()=>{a(r),u(o)},[o,r]);let d=(0,s.useCallback)(e=>{"Enter"===e.key&&(e.preventDefault(),i(l,c))},[i,l,c]),p=(0,s.useCallback)(e=>a(e.currentTarget.value),[]),h=(0,s.useCallback)(e=>u(e.currentTarget.value),[]),f=(0,s.useCallback)(()=>i(l,c),[i,l,c]);return O.jsxs(t.Generic.Form.Root,{children:[O.jsx(t.Generic.Form.TextInput,{className:"bn-text-input",name:"url",icon:O.jsx(ec,{}),autoFocus:!0,placeholder:n.link_toolbar.form.url_placeholder,value:l,onKeyDown:d,onChange:p,onSubmit:f}),O.jsx(t.Generic.Form.TextInput,{className:"bn-text-input",name:"title",icon:O.jsx(eh,{}),placeholder:n.link_toolbar.form.title_placeholder,value:c,onKeyDown:d,onChange:h,onSubmit:f})]})},eN=()=>{let e=H(),t=P(),n=D(),r="link"in e.schema.inlineContentSchema&&"link"===e.schema.inlineContentSchema.link,o=ek(e),[i,l]=(0,s.useState)(e.getSelectedLinkUrl()||""),[a,c]=(0,s.useState)(e.getSelectedText());W(()=>{c(e.getSelectedText()||""),l(e.getSelectedLinkUrl()||"")},e);let d=(0,s.useCallback)((t,n)=>{e.createLink(t,n),e.focus()},[e]);return(0,s.useMemo)(()=>{if(!r)return!1;for(let e of o)if(void 0===e.content)return!1;return!0},[r,o])&&"link"in e.schema.inlineContentSchema&&e.isEditable?O.jsxs(t.Generic.Popover.Root,{children:[O.jsx(t.Generic.Popover.Trigger,{children:O.jsx(t.FormattingToolbar.Button,{className:"bn-button","data-test":"createLink",label:n.formatting_toolbar.link.tooltip,mainTooltip:n.formatting_toolbar.link.tooltip,secondaryTooltip:(0,u.eD)(n.formatting_toolbar.link.secondary_tooltip,n.generic.ctrl_shortcut),icon:O.jsx(ec,{})})}),O.jsx(t.Generic.Popover.Content,{className:"bn-popover-content bn-form-popover",variant:"form-popover",children:O.jsx(eA,{url:i,text:a,editLink:d})})]}):null},eO=()=>
1{let e=D(),t=P(),n=H(),[r,o]=(0,s.useState)(),i=ek(n),l=(0,s.useMemo)(()=>{if(1!==i.length)return;let e=i[0];if((0,u.lt)(e,n))return o(e.props.caption),e},[n,i]),a=(0,s.useCallback)(e=>{l&&"Enter"===e.key&&(e.preventDefault(),n.updateBlock(l,{props:{caption:r}}))},[r,n,l]),c=(0,s.useCallback)(e=>o(e.currentTarget.value),[]);return!l||(0,u.am)(l,n)||!n.isEditable?null:O.jsxs(t.Generic.Popover.Root,{children:[O.jsx(t.Generic.Popover.Trigger,{children:O.jsx(t.FormattingToolbar.Button,{className:"bn-button",label:e.formatting_toolbar.file_caption.tooltip,mainTooltip:e.formatting_toolbar.file_caption.tooltip,icon:O.jsx(es,{}),isSelected:""!==l.props.caption})}),O.jsx(t.Generic.Popover.Content,{className:"bn-popover-content bn-form-popover",variant:"form-popover",children:O.jsx(t.Generic.Form.Root,{children:O.jsx(t.Generic.Form.TextInput,{name:"file-caption",icon:O.jsx(es,{}),value:r||"",autoFocus:!0,placeholder:e.formatting_toolbar.file_caption.input_placeholder,onKeyDown:a,onChange:c})})})]})},eH=()=>{let e=D(),t=P(),n=H(),r=ek(n),o=(0,s.useMemo)(()=>{if(1!==r.length)return;let e=r[0];if((0,u.lt)(e,n))return e},[n,r]),i=(0,s.useCallback)(()=>
1{n.focus(),n.removeBlocks([o])},[n,o]);return!o||(0,u.am)(o,n)||!n.isEditable?null:O.jsx(t.FormattingToolbar.Button,{className:"bn-button",label:e.formatting_toolbar.file_delete.tooltip[o.type]||e.formatting_toolbar.file_delete.tooltip.file,mainTooltip:e.formatting_toolbar.file_delete.tooltip[o.type]||e.formatting_toolbar.file_delete.tooltip.file,icon:O.jsx(eb,{}),onClick:i})},eL=()=>{let e=D(),t=P(),n=H(),[r,o]=(0,s.useState)(),i=ek(n),l=(0,s.useMemo)(()=>{if(1!==i.length)return;let e=i[0];if((0,u.lt)(e,n))return o(e.props.name),e},[n,i]),a=(0,s.useCallback)(e=>{l&&"Enter"===e.key&&(e.preventDefault(),n.updateBlock(l,{props:{name:r}}))},[r,n,l]),c=(0,s.useCallback)(e=>o(e.currentTarget.value),[]);return!l||(0,u.am)(l,n)||!n.isEditable?null:O.jsxs(t.Generic.Popover.Root,{children:[O.jsx(t.Generic.Popover.Trigger,{children:O.jsx(t.FormattingToolbar.Button,{className:"bn-button",label:e.formatting_toolbar.file_rename.tooltip[l.type]||e.formatting_toolbar.file_rename.tooltip.file,mainTooltip:e.formatting_toolbar.file_rename.tooltip[l.type]||e.formatting_toolbar.file_rename.tooltip.file,icon:O.jsx(et,{})})}),O.jsx(t.Generic.Popover.Content,{className:"bn-popover-content bn-form-popover",variant:"form-popover",children:O.jsx(t.Generic.Form.Root,{children:O.jsx(t.Generic.Form.TextInput,{name:"file-name",icon:O.jsx(et,{}),value:r||"",autoFocus:!0,placeholder:e.formatting_toolbar.file_rename.input_placeholder[l.type]||e.formatting_toolbar.file_rename.input_placeholder.file,onKeyDown:a,onChange:c})})})]})},eI=()=>{let e=D(),t=P(),n=H(),r=ek(n),[o,i]=(0,s.useState)(!1);(0,s.useEffect)(()=>{i(!1)},[r]);let l=1===r.length?r[0]:void 0;return void 0!==l&&(0,u.lt)(l,n)&&n.isEditable?O.jsxs(t.Generic.Popover.Root,{opened:o,position:"bottom",children:[O.jsx(t.Generic.Popover.Trigger,{children:O.jsx(t.FormattingToolbar.Button,{className:"bn-button",onClick:()=>i(!o),isSelected:o,mainTooltip:e.formatting_toolbar.file_replace.tooltip[l.type]||e.formatting_toolbar.file_replace.tooltip.file,label:e.formatting_toolbar.file_replace.tooltip[l.type]||e.formatting_toolbar.file_replace.tooltip.file,icon:O.jsx(eg,{})})}),O.jsx(t.Generic.Popover.Content,{className:"bn-popover-content bn-panel-popover",variant:"panel-popover",children:O.jsx(F,{block:l})})]}):null},e_=()=>{let e=D(),t=P(),n=H(),r=ek(n),[o,i]=(0,s.useState)(()=>n.canNestBlock());W(()=>{i(n.canNestBlock())},n);let l=(0,s.useCallback)(()=>{n.focus(),n.nestBlock()},[n]);return(0,s.useMemo)(()=>!r.find(e=>"inline"!==n.schema.blockSchema[e.type].content),[n.schema.blockSchema,r])&&n.isEditable?O.jsx(t.FormattingToolbar.Button,{className:"bn-button","data-test":"nestBlock",onClick:l,isDisabled:!o,label:e.formatting_toolbar.nest.tooltip,mainTooltip:e.formatting_toolbar.nest.tooltip,secondaryTooltip:(0,u.eD)(e.formatting_toolbar.nest.secondary_tooltip,e.generic.ctrl_shortcut),icon:O.jsx(el,{})}):null},eP=()=>{let e=D(),t=P(),n=H(),r=ek(n),[o,i]=(0,s.useState)(()=>n.canUnnestBlock());W(()=>{i(n.canUnnestBlock())},n);let l=(0,s.useCallback)(()=>{n.focus(),n.unnestBlock()},[n]);return(0,s.useMemo)(()=>!r.find(e=>"inline"!==n.schema.blockSchema[e.type].content),[n.schema.blockSchema,r])&&n.isEditable?O.jsx(t.FormattingToolbar.Button,{className:"bn-button","data-test":"unnestBlock",onClick:l,isDisabled:!o,label:e.formatting_toolbar.unnest.tooltip,mainTooltip:e.formatting_toolbar.unnest.tooltip,secondaryTooltip:(0,u.eD)(e.formatting_toolbar.unnest.secondary_tooltip,e.generic.ctrl_shortcut),icon:O.jsx(ei,{})}):null},eD=e=>[{name:e.slash_menu.paragraph.title,type:"paragraph",icon:eh,isSelected:e=>"paragraph"===e.type},{name:e.slash_menu.heading.title,type:"heading",props:{level:1},icon:en,isSelected:e=>"heading"===e.type&&"level"in e.props&&1===e.props.level},{name:e.slash_menu.heading_2.title,type:"heading",props:{level:2},icon:er,isSelected:e=>"heading"===e.type&&"level"in e.props&&2===e.props.level},{name:e.slash_menu.heading_3.title,type:"heading",props:{level:3},icon:eo,isSelected:e=>"heading"===e.type&&"level"in e.props&&3===e.props.level},{name:e.slash_menu.bullet_list.title,type:"bulletListItem",icon:ep,isSelected:e=>"bulletListItem"===e.type},{name:e.slash_menu.numbered_list.title,type:"numberedListItem",icon:ed,isSelected:e=>"numberedListItem"===e.type},{name:e.slash_menu.check_list.title,type:"checkListItem",icon:eu,isSelected:e=>"checkListItem"===e.type}],ez=e=>
1{let t=P(),n=D(),r=H(),o=ek(r),[i,l]=(0,s.useState)(r.getTextCursorPosition().block),a=(0,s.useMemo)(()=>(e.items||eD(n)).filter(e=>e.type in r.schema.blockSchema),[r,n,e.items]),c=(0,s.useMemo)(()=>void 0!==a.find(e=>e.type===i.type),[i.type,a]),u=(0,s.useMemo)(()=>{let e=e=>{for(let t of(r.focus(),o))r.updateBlock(t,{type:e.type,props:e.props})};return a.map(t=>{let n=t.icon;return{text:t.name,icon:O.jsx(n,{size:16}),onClick:()=>e(t),isSelected:t.isSelected(i)}})},[i,a,r,o]);return W(()=>{l(r.getTextCursorPosition().block)},r),c&&r.isEditable?O.jsx(t.FormattingToolbar.Select,{className:"bn-select",items:u}):null};function eV(e,t){try{let n=new URL(e,t);if("javascript:"!==n.protocol)return n.href}catch{}return"#"}let eF=()=>{let e=D(),t=P(),n=H(),r=ek(n),o=(0,s.useMemo)(()=>{if(1!==r.length)return;let e=r[0];if((0,u.lt)(e,n))return e},[n,r]),i=(0,s.useCallback)(()=>{o&&o.props.url&&(n.focus(),n.resolveFileUrl(o.props.url).then(e=>window.open(eV(e,window.location.href))))},[n,o]);return!o||(0,u.am)(o,n)?null:O.jsx(t.FormattingToolbar.Button,{className:"bn-button",label:e.formatting_toolbar.file_download.tooltip[o.type]||e.formatting_toolbar.file_download.tooltip.file,mainTooltip:e.formatting_toolbar.file_download.tooltip[o.type]||e.formatting_toolbar.file_download.tooltip.file,icon:O.jsx(ew,{}),onClick:i})},eB=()=>{let e=D(),t=P(),n=H(),r=ek(n),o=(0,s.useMemo)(()=>{if(1!==r.length)return;let e=r[0];if((0,u.P9)(e,n))return e},[n,r]),i=(0,s.useCallback)(()=>{o&&n.updateBlock(o,{props:{showPreview:!o.props.showPreview}})},[n,o]);return!o||(0,u.am)(o,n)||!n.isEditable?null:O.jsx(t.FormattingToolbar.Button,{className:"bn-button",label:"Toggle preview",mainTooltip:e.formatting_toolbar.file_preview_toggle.tooltip,icon:O.jsx(em,{}),isSelected:o.props.showPreview,onClick:i})},e$={left:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z"},child:[]}]})(e)},center:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z"},child:[]}]})(e)},right:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z"},child:[]}]})(e)},justify:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z"},child:[]}]})(e)}},eU=e=>{let t=P(),n=D(),r=H(),o=ek(r),i=(0,s.useMemo)(()=>{let e=o[0];if((0,u.w2)("textAlignment",e,r))return e.props.textAlignment},[r,o]),l=(0,s.useCallback)(e=>{for(let t of(r.focus(),o))(0,u.xg)("textAlignment",t.type,r)&&r.updateBlock(t,{props:{textAlignment:e}})},[r,o]);if(!(0,s.useMemo)(()=>!!o.find(e=>"textAlignment"in e.props),[o])||!r.isEditable)return null;let a=e$[e.textAlignment];return O.jsx(t.FormattingToolbar.Button,{className:"bn-button","data-test":`alignText${e.textAlignment.slice(0,1).toUpperCase()+e.textAlignment.slice(1)}`,onClick:()=>l(e.textAlignment),isSelected:i===e.textAlignment,label:n.formatting_toolbar[`align_${e.textAlignment}`].tooltip,mainTooltip:n.formatting_toolbar[`align_${e.textAlignment}`].tooltip,icon:O.jsx(a,{})})},eW=e=>[O.jsx(ez,{items:e},"blockTypeSelect"),O.jsx(eO,{},"fileCaptionButton"),O.jsx(eI,{},"replaceFileButton"),O.jsx(eL,{},"fileRenameButton"),O.jsx(eH,{},"fileDeleteButton"),O.jsx(eF,{},"fileDownloadButton"),O.jsx(eB,{},"filePreviewButton"),O.jsx(eS,{basicTextStyle:"bold"},"boldStyleButton"),O.jsx(eS,{basicTextStyle:"italic"},"italicStyleButton"),O.jsx(eS,{basicTextStyle:"underline"},"underlineStyleButton"),O.jsx(eS,{basicTextStyle:"strike"},"strikeStyleButton"),O.jsx(eU,{textAlignment:"left"},"textAlignLeftButton"),O.jsx(eU,{textAlignment:"center"},"textAlignCenterButton"),O.jsx(eU,{textAlignment:"right"},"textAlignRightButton"),O.jsx(eR,{},"colorStyleButton"),O.jsx(e_,{},"nestBlockButton"),O.jsx(eP,{},"unnestBlockButton"),O.jsx(eN,{},"createLinkButton")],eG=e=>{let t=P();return O.jsx(t.FormattingToolbar.Root,{className:"bn-toolbar bn-formatting-toolbar",children:e.children||eW(e.blockTypeSelectItems)})},eY=e=>{switch(e){case"left":default:return"top-start";case"center":return"top";case"right":return"top-end"}},eZ=e=>
1{let t=(0,s.useRef)(null),n=H(),[r,o]=(0,s.useState)(()=>{let e=n.getTextCursorPosition().block;return"textAlignment"in e.props?eY(e.props.textAlignment):"top-start"});W(()=>{let e=n.getTextCursorPosition().block;"textAlignment"in e.props?o(eY(e.props.textAlignment)):o("top-start")},n);let i=I(n.formattingToolbar.onUpdate.bind(n.formattingToolbar)),{isMounted:l,ref:a,style:u,getFloatingProps:d}=L((null==i?void 0:i.show)||!1,(null==i?void 0:i.referencePos)||null,3e3,{placement:r,middleware:[(0,c.cv)(10),(0,c.RR)()],onOpenChange:(e,t)=>{e||(n.formattingToolbar.closeMenu(),n.focus())}}),p=(0,s.useMemo)(()=>{var e;return e=[t,a],t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}},[t,a]);if(!l||!i)return null;if(!i.show&&t.current)return O.jsx("div",{ref:p,style:u,dangerouslySetInnerHTML:{__html:t.current.innerHTML}});let h=e.formattingToolbar||eG;return O.jsx("div",{ref:p,style:u,...d(),children:O.jsx(h,{})})},eJ=e=>{let t=P(),n=D();return O.jsx(t.LinkToolbar.Button,{className:"bn-button",label:n.link_toolbar.delete.tooltip,mainTooltip:n.link_toolbar.delete.tooltip,isSelected:!1,onClick:e.deleteLink,icon:O.jsx(ea,{})})},eq=e=>{let t=P(),n=D();return O.jsxs(t.Generic.Popover.Root,{children:[O.jsx(t.Generic.Popover.Trigger,{children:O.jsx(t.LinkToolbar.Button,{className:"bn-button",mainTooltip:n.link_toolbar.edit.tooltip,isSelected:!1,children:n.link_toolbar.edit.text})}),O.jsx(t.Generic.Popover.Content,{className:"bn-popover-content bn-form-popover",variant:"form-popover",children:O.jsx(eA,{...e})})]})},eK=e=>{let t=P(),n=D();return O.jsx(t.LinkToolbar.Button,{className:"bn-button",mainTooltip:n.link_toolbar.open.tooltip,label:n.link_toolbar.open.tooltip,isSelected:!1,onClick:()=>{window.open(eV(e.url,window.location.href),"_blank")},icon:O.jsx(ex,{})})},eX=e=>{let t=P();return e.children?O.jsx(t.LinkToolbar.Root,{className:"bn-toolbar bn-link-toolbar",children:e.children}):O.jsxs(t.LinkToolbar.Root,{className:"bn-toolbar bn-link-toolbar",onMouseEnter:e.stopHideTimer,onMouseLeave:e.startHideTimer,children:[O.jsx(eq,{url:e.url,text:e.text,editLink:e.editLink}),O.jsx(eK,{url:e.url}),O.jsx(eJ,{deleteLink:e.deleteLink})]})},eQ=e=>{let t=H(),n={deleteLink:t.linkToolbar.deleteLink,editLink:t.linkToolbar.editLink,startHideTimer:t.linkToolbar.startHideTimer,stopHideTimer:t.linkToolbar.stopHideTimer},r=I(t.linkToolbar.onUpdate.bind(t.linkToolbar)),{isMounted:o,ref:i,style:l,getFloatingProps:s}=L((null==r?void 0:r.show)||!1,(null==r?void 0:r.referencePos)||null,4e3,{placement:"top-start",middleware:[(0,c.cv)(10),(0,c.RR)()],onOpenChange:e=>{e||(t.linkToolbar.closeMenu(),t.focus())}});if(!o||!r)return null;let{show:a,referencePos:u,...d}=r,p=e.linkToolbar||eX;return O.jsx("div",{ref:i,style:l,...s(),children:O.jsx(p,{...d,...n})})};function e0(e){return X({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8Z"},child:[]},{tag:"path",attr:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z"},child:[]}]})(e)}let e1=e=>{let t=P(),n=D(),r=H(),o=(0,s.useCallback)(()=>{let t=e.block.content;if(void 0!==t&&Array.isArray(t)&&0===t.length)r.setTextCursorPosition(e.block),r.openSuggestionMenu("/");else{let t=r.insertBlocks([{type:"paragraph"}],e.block,"after")[0];r.setTextCursorPosition(t),r.openSuggestionMenu("/")}},[r,e.block]);return O.jsx(t.SideMenu.Button,{className:"bn-button",label:n.side_menu.add_block_label,icon:O.jsx(e0,{size:24,onClick:o,"data-test":"dragHandleAdd"})})};function e2(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(e)}let e4=e=>{let t=P(),n=H();return(0,u.xg)("textColor",e.block.type,n)||(0,u.xg)("backgroundColor",e.block.type,n)?O.jsxs(t.Generic.Menu.Root,{position:"right",sub:!0,children:[O.jsx(t.Generic.Menu.Trigger,{sub:!0,children:O.jsx(t.Generic.Menu.Item,{className:"bn-menu-item",subTrigger:!0,children:e.children})}),O.jsx(t.Generic.Menu.Dropdown,{sub:!0,className:"bn-menu-dropdown bn-color-picker-dropdown",children:O.jsx(eT,{iconSize:18,text:(0,u.xg)("textColor",e.block.type,n)&&(0,u.w2)("textColor",e.block,n)?{c
1olor:e.block.props.textColor,setColor:t=>n.updateBlock(e.block,{type:e.block.type,props:{textColor:t}})}:void 0,background:(0,u.xg)("backgroundColor",e.block.type,n)&&(0,u.w2)("backgroundColor",e.block,n)?{color:e.block.props.backgroundColor,setColor:t=>n.updateBlock(e.block,{props:{backgroundColor:t}})}:void 0})})]}):null},e5=e=>{let t=P(),n=H();return O.jsx(t.Generic.Menu.Item,{className:"bn-menu-item",onClick:()=>n.removeBlocks([e.block]),children:e.children})},e3=e=>{let t=P(),n=D();return O.jsx(t.Generic.Menu.Dropdown,{className:"bn-menu-dropdown bn-drag-handle-menu",children:e.children||O.jsxs(O.Fragment,{children:[O.jsx(e5,{...e,children:n.drag_handle.delete_menuitem}),O.jsx(e4,{...e,children:n.drag_handle.colors_menuitem})]})})},e8=e=>{let t=P(),n=D(),r=e.dragHandleMenu||e3;return O.jsxs(t.Generic.Menu.Root,{onOpenChange:t=>{t?e.freezeMenu():e.unfreezeMenu()},position:"left",children:[O.jsx(t.Generic.Menu.Trigger,{children:O.jsx(t.SideMenu.Button,{label:n.side_menu.drag_handle_label,draggable:!0,onDragStart:e.blockDragStart,onDragEnd:e.blockDragEnd,className:"bn-button",icon:O.jsx(e2,{size:24,"data-test":"dragHandle"})})}),O.jsx(r,{block:e.block})]})},e7=e=>{let t=P(),n=(0,s.useMemo)(()=>{let t={"data-block-type":e.block.type};return"heading"===e.block.type&&(t["data-level"]=e.block.props.level.toString()),e.editor.schema.blockSchema[e.block.type].isFileBlock&&(e.block.props.url?t["data-url"]="true":t["data-url"]="false"),t},[e.block,e.editor.schema.blockSchema]);return O.jsx(t.SideMenu.Root,{className:"bn-side-menu",...n,children:e.children||O.jsxs(O.Fragment,{children:[O.jsx(e1,{...e}),O.jsx(e8,{...e})]})})},e6=e=>{let t=H(),n={blockDragStart:t.sideMenu.blockDragStart,blockDragEnd:t.sideMenu.blockDragEnd,freezeMenu:t.sideMenu.freezeMenu,unfreezeMenu:t.sideMenu.unfreezeMenu},r=I(t.sideMenu.onUpdate.bind(t.sideMenu)),{isMounted:o,ref:i,style:l,getFloatingProps:s}=L((null==r?void 0:r.show)||!1,(null==r?void 0:r.referencePos)||null,1e3,{placement:"left-start"});if(!o||!r)return null;let{show:a,referencePos:c,...u}=r,d=e.sideMenu||e7;return O.jsx("div",{ref:i,style:l,...s(),children:O.jsx(d,{...u,...n,editor:t})})};async function e9(e,t){return(await (0,u.Ei)(e,t)).map(({id:e,onItemClick:t})=>({id:e,onItemClick:t,icon:e}))}function te(e){let t=P(),n=D(),{items:r,loadingState:o,selectedIndex:i,onItemClick:l,columns:a}=e,c="loading-initial"===o||"loading"===o?O.jsx(t.GridSuggestionMenu.Loader,{className:"bn-grid-suggestion-menu-loader",columns:a,children:n.suggestion_menu.loading}):null,u=(0,s.useMemo)(()=>{let e=[];for(let n=0;n<r.length;n++){let o=r[n];e.push(O.jsx(t.GridSuggestionMenu.Item,{className:"bn-grid-suggestion-menu-item",item:o,id:`bn-grid-suggestion-menu-item-${n}`,isSelected:n===i,onClick:()=>null==l?void 0:l(o)},o.id))}return e},[t,r,l,i]);return O.jsxs(t.GridSuggestionMenu.Root,{id:"bn-grid-suggestion-menu",columns:a,className:"bn-grid-suggestion-menu",children:[c,u,0===u.length&&"loaded"===e.loadingState&&O.jsx(t.GridSuggestionMenu.EmptyItem,{className:"bn-grid-suggestion-menu-empty-item",columns:a,children:n.suggestion_menu.no_items_title})]})}function tt(e,t,n,r=3){let o=(0,s.useRef)(0);(0,s.useEffect)(()=>{void 0!==t&&(e.length>0?o.current=t.length:t.length-o.current>r&&n())},[n,r,e.length,t])}function tn(e,t){let[n,r]=(0,s.useState)([]),[o,i]=(0,s.useState)(!1),l=(0,s.useRef)(),a=(0,s.useRef)();return(0,s.useEffect)(()=>{l.current=e,i(!0),t(e).then(t=>{l.current===e&&(r(t),i(!1),a.current=e)})},[e,t]),{items:n||[],usedQuery:a.current,loadingState:void 0===a.current?"loading-initial":o?"loading":"loaded"}}function tr(e){let t=R().setContentEditableProps,n=H(),{getItems:r,gridSuggestionMenuComponent:o,query:i,clearQuery:l,closeMenu:a,onItemClick:c,columns:u}=e,d=(0,s.useCallback)(e=>{a(),l(),null==c||c(e)},[c,a,l]),{items:p,usedQuery:h,loadingState:f}=tn(i,r);tt(p,h,a);let{selectedIndex:m}=function(e,t,n,r,o){let[i,l]=(0,s.useState)(0);return(0,s.useEffect)(()=>{let t=e=>("ArrowLeft"===e.key&&(e.preventDefault(),n.length&&l((i-1+n.length)%n.length)),"ArrowRight"===e.key&&(e.preventDefault(),n.length&&l((i+1+n.length)%n.length)),"ArrowUp"===e.key?(e.preventDefault(),n.length&&l((i-r+n.length)%n.length),!0):"ArrowDown"===e.key?(e.preventDefault(),n.length&&l((i+r)%n.length),!0):"Enter"===e.key&&!e.isComposing&&(e.preventDefault(),n.length&&(null==o||o(n[i])),!0));return e.domElement.addEventListener("keydown",t,!0),()=>{e.domElement.removeEventListener("keydown",t,!0)}},[e.domElement,n,i,o,r,void 0!==r&&r>1]),(0,s.useEffect)(()=>
1{l(0)},[t]),{selectedIndex:0===n.length?void 0:i}}(n,i,p,u,d);return(0,s.useEffect)(()=>(t(e=>({...e,"aria-expanded":!0,"aria-controls":"bn-suggestion-menu"})),()=>{t(e=>({...e,"aria-expanded":!1,"aria-controls":void 0}))}),[t]),(0,s.useEffect)(()=>(t(e=>({...e,"aria-activedescendant":m?"bn-suggestion-menu-item-"+m:void 0})),()=>{t(e=>({...e,"aria-activedescendant":void 0}))}),[t,m]),O.jsx(o,{items:p,onItemClick:d,loadingState:f,selectedIndex:m,columns:u})}function to(e){let t=H(),{triggerCharacter:n,gridSuggestionMenuComponent:r,columns:o,minQueryLength:i,onItemClick:l,getItems:a}=e,u=(0,s.useMemo)(()=>l||(e=>{e.onItemClick(t)}),[t,l]),d=(0,s.useMemo)(()=>a||(async e=>await e9(t,e)),[t,a]),p={closeMenu:t.suggestionMenus.closeMenu,clearQuery:t.suggestionMenus.clearQuery},h=I((0,s.useCallback)(e=>t.suggestionMenus.onUpdate(n,e),[t.suggestionMenus,n])),{isMounted:f,ref:m,style:g,getFloatingProps:y}=L((null==h?void 0:h.show)||!1,(null==h?void 0:h.referencePos)||null,2e3,{placement:"bottom-start",middleware:[(0,c.cv)(10),(0,c.RR)(),(0,c.dp)({apply({availableHeight:e,elements:t}){Object.assign(t.floating.style,{maxHeight:`${e-10}px`})}})],onOpenChange(e){e||t.suggestionMenus.closeMenu()}});return!f||!h||!(null!=h&&h.ignoreQueryLength)&&i&&(h.query.startsWith(" ")||h.query.length<i)?null:O.jsx("div",{ref:m,style:g,...y(),children:O.jsx(tr,{query:h.query,closeMenu:p.closeMenu,clearQuery:p.clearQuery,getItems:d,columns:o,gridSuggestionMenuComponent:r||te,onItemClick:u})})}function ti(e){let t=P(),n=D(),{items:r,loadingState:o,selectedIndex:i,onItemClick:l}=e,a="loading-initial"===o||"loading"===o?O.jsx(t.SuggestionMenu.Loader,{className:"bn-suggestion-menu-loader",children:n.suggestion_menu.loading}):null,c=(0,s.useMemo)(()=>{let e;let n=[];for(let o=0;o<r.length;o++){let s=r[o];s.group!==e&&(e=s.group,n.push(O.jsx(t.SuggestionMenu.Label,{className:"bn-suggestion-menu-label",children:e},e))),n.push(O.jsx(t.SuggestionMenu.Item,{className:"bn-suggestion-menu-item",item:s,id:`bn-suggestion-menu-item-${o}`,isSelected:o===i,onClick:()=>null==l?void 0:l(s)},s.title))}return n},[t,r,l,i]);return O.jsxs(t.SuggestionMenu.Root,{id:"bn-suggestion-menu",className:"bn-suggestion-menu",children:[c,0===c.length&&("loading"===e.loadingState||"loaded"===e.loadingState)&&O.jsx(t.SuggestionMenu.EmptyItem,{className:"bn-suggestion-menu-item",children:n.suggestion_menu.no_items_title}),a]})}function tl(e){let t=R().setContentEditableProps,n=H(),{getItems:r,suggestionMenuComponent:o,query:i,clearQuery:l,closeMenu:a,onItemClick:c}=e,u=(0,s.useCallback)(e=>{a(),l(),null==c||c(e)},[c,a,l]),{items:d,usedQuery:p,loadingState:h}=tn(i,r);tt(d,p,a);let{selectedIndex:f}=function(e,t,n,r){let[o,i]=(0,s.useState)(0);return(0,s.useEffect)(()=>{let t=e=>"ArrowUp"===e.key?(e.preventDefault(),n.length&&i((o-1+n.length)%n.length),!0):"ArrowDown"===e.key?(e.preventDefault(),n.length&&i((o+1)%n.length),!0):"Enter"===e.key&&!e.isComposing&&(e.preventDefault(),n.length&&(null==r||r(n[o])),!0);return e.domElement.addEventListener("keydown",t,!0),()=>{e.domElement.removeEventListener("keydown",t,!0)}},[e.domElement,n,o,r]),(0,s.useEffect)(()=>{i(0)},[t]),{selectedIndex:0===n.length?void 0:o}}(n,i,d,u);return(0,s.useEffect)(()=>(t(e=>({...e,"aria-expanded":!0,"aria-controls":"bn-suggestion-menu"})),()=>{t(e=>({...e,"aria-expanded":!1,"aria-controls":void 0}))}),[t]),(0,s.useEffect)(()=>(t(e=>({...e,"aria-activedescendant":f?"bn-suggestion-menu-item-"+f:void 0})),()=>{t(e=>({...e,"aria-activedescendant":void 0}))}),[t,f]),O.jsx(o,{items:d,onItemClick:u,loadingState:h,selectedIndex:f})}let ts={heading:en,heading_2:er,heading_3:eo,numbered_list:ed,bullet_list:ep,check_list:eu,paragraph:eh,table:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M13 10V14H19V10H13ZM11 10H5V14H11V10ZM13 19H19V16H13V19ZM11 19V16H5V19H11ZM13 5V8H19V5H13ZM11 5H5V8H11V5ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z"},child:[]}]})(e)},image:ef,video:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"
1currentColor"},child:[{tag:"path",attr:{d:"M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"},child:[]}]})(e)},audio:ev,file:ee,emoji:function(e){return X({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM8 13C8 15.2091 9.79086 17 12 17C14.2091 17 16 15.2091 16 13H8ZM8 11C8.82843 11 9.5 10.3284 9.5 9.5C9.5 8.67157 8.82843 8 8 8C7.17157 8 6.5 8.67157 6.5 9.5C6.5 10.3284 7.17157 11 8 11ZM16 11C16.8284 11 17.5 10.3284 17.5 9.5C17.5 8.67157 16.8284 8 16 8C15.1716 8 14.5 8.67157 14.5 9.5C14.5 10.3284 15.1716 11 16 11Z"},child:[]}]})(e)}};function ta(e){let t=H(),{triggerCharacter:n,suggestionMenuComponent:r,minQueryLength:o,onItemClick:i,getItems:l}=e,a=(0,s.useMemo)(()=>i||(e=>{e.onItemClick(t)}),[t,i]),d=(0,s.useMemo)(()=>l||(async e=>(0,u.yD)((0,u.tp)(t).map(e=>{let t=ts[e.key];return{...e,icon:O.jsx(t,{size:18})}}),e)),[t,l]),p={closeMenu:t.suggestionMenus.closeMenu,clearQuery:t.suggestionMenus.clearQuery},h=I((0,s.useCallback)(e=>t.suggestionMenus.onUpdate(n,e),[t.suggestionMenus,n])),{isMounted:f,ref:m,style:g,getFloatingProps:y}=L((null==h?void 0:h.show)||!1,(null==h?void 0:h.referencePos)||null,2e3,{placement:"bottom-start",middleware:[(0,c.cv)(10),(0,c.RR)({mainAxis:!0,crossAxis:!1}),(0,c.uY)(),(0,c.dp)({apply({availableHeight:e,elements:t}){Object.assign(t.floating.style,{maxHeight:`${e-10}px`})}})],onOpenChange(e){e||t.suggestionMenus.closeMenu()}});return!f||!h||!(null!=h&&h.ignoreQueryLength)&&o&&(h.query.startsWith(" ")||h.query.length<o)?null:O.jsx("div",{ref:m,style:g,...y(),children:O.jsx(tl,{query:h.query,closeMenu:p.closeMenu,clearQuery:p.clearQuery,getItems:d,suggestionMenuComponent:r||ti,onItemClick:a})})}let tc=e=>{let t=P(),n=D(),r=H();return O.jsx(t.Generic.Menu.Item,{onClick:()=>{let t=e.block.content.rows[e.index].cells.map(()=>[]),n=[...e.block.content.rows];n.splice(e.index+("below"===e.side?1:0),0,{cells:t}),r.updateBlock(e.block,{type:"table",content:{type:"tableContent",rows:n}}),r.setTextCursorPosition(e.block)},children:n.table_handle[`add_${e.side}_menuitem`]})},tu=e=>{let t=P(),n=D(),r=H();return O.jsx(t.Generic.Menu.Item,{onClick:()=>{let t={type:"tableContent",rows:e.block.content.rows.map(t=>{let n=[...t.cells];return n.splice(e.index+("right"===e.side?1:0),0,[]),{cells:n}})};r.updateBlock(e.block,{type:"table",content:t}),r.setTextCursorPosition(e.block)},children:n.table_handle[`add_${e.side}_menuitem`]})},td=e=>"row"===e.orientation?O.jsx(tc,{...e,side:e.side}):O.jsx(tu,{...e,side:e.side}),tp=e=>{let t=P(),n=D(),r=H();return O.jsx(t.Generic.Menu.Item,{onClick:()=>{let t={type:"tableContent",rows:e.block.content.rows.filter((t,
1n)=>n!==e.index)};r.updateBlock(e.block,{type:"table",content:t}),r.setTextCursorPosition(e.block)},children:n.table_handle.delete_row_menuitem})},th=e=>{let t=P(),n=D(),r=H();return O.jsx(t.Generic.Menu.Item,{onClick:()=>{let t={type:"tableContent",rows:e.block.content.rows.map(t=>({cells:t.cells.filter((t,n)=>n!==e.index)}))};r.updateBlock(e.block,{type:"table",content:t}),r.setTextCursorPosition(e.block)},children:n.table_handle.delete_column_menuitem})},tf=e=>"row"===e.orientation?O.jsx(tp,{...e}):O.jsx(th,{...e}),tm=e=>{let t=P();return O.jsx(t.Generic.Menu.Dropdown,{className:"bn-table-handle-menu",children:e.children||O.jsxs(O.Fragment,{children:[O.jsx(tf,{orientation:e.orientation,block:e.block,index:e.index}),O.jsx(td,{orientation:e.orientation,block:e.block,index:e.index,side:"row"===e.orientation?"above":"left"}),O.jsx(td,{orientation:e.orientation,block:e.block,index:e.index,side:"row"===e.orientation?"below":"right"})]})})},tg=e=>{let t=P(),[n,r]=(0,s.useState)(!1),o=e.tableHandleMenu||tm;return O.jsxs(t.Generic.Menu.Root,{onOpenChange:t=>{t?(e.freezeHandles(),e.hideOtherSide()):(e.unfreezeHandles(),e.showOtherSide(),e.editor.focus())},position:"right",children:[O.jsx(t.Generic.Menu.Trigger,{children:O.jsx(t.TableHandle.Root,{className:(0,u.xQ)("bn-table-handle",n?"bn-table-handle-dragging":""),draggable:!0,onDragStart:t=>{r(!0),e.dragStart(t)},onDragEnd:()=>{e.dragEnd(),r(!1)},style:"column"===e.orientation?{transform:"rotate(0.25turn)"}:void 0,children:e.children||O.jsx(e2,{size:24,"data-test":"tableHandle"})})}),O.jsx(o,{orientation:e.orientation,block:e.block,index:e.index})]})};function ty(e,t,n,r,o){let{refs:i,update:l,context:u,floatingStyles:d}=(0,a.YF)({open:t,placement:"row"===e?"left":"top",middleware:[(0,c.cv)("row"===e?-10:-12)]}),{isMounted:p,styles:h}=(0,a.Y_)(u);return(0,s.useEffect)(()=>
1{l()},[n,r,l]),(0,s.useEffect)(()=>{null===n||null===r||i.setReference({getBoundingClientRect:()=>("row"===e?function(e,t,n){return n&&"row"===n.draggedCellOrientation?new DOMRect(t.x,n.mousePos,t.width,0):new DOMRect(t.x,e.y,t.width,e.height)}:function(e,t,n){return n&&"col"===n.draggedCellOrientation?new DOMRect(n.mousePos,t.y,0,t.height):new DOMRect(e.x,t.y,e.width,t.height)})(n,r,o)})},[o,e,n,r,i]),(0,s.useMemo)(()=>({isMounted:p,ref:i.setFloating,style:{display:"flex",...h,...d,zIndex:1e4}}),[d,p,i.setFloating,h])}let tv=e=>{var t,n;let r=H();if(!r.tableHandles)throw Error("TableHandlesController can only be used when BlockNote editor schema contains table block");let o={rowDragStart:r.tableHandles.rowDragStart,colDragStart:r.tableHandles.colDragStart,dragEnd:r.tableHandles.dragEnd,freezeHandles:r.tableHandles.freezeHandles,unfreezeHandles:r.tableHandles.unfreezeHandles},i=I(r.tableHandles.onUpdate.bind(r.tableHandles)),l=(0,s.useMemo)(()=>{var e,t;return null!=i&&i.draggingState?{draggedCellOrientation:null==(e=null==i?void 0:i.draggingState)?void 0:e.draggedCellOrientation,mousePos:null==(t=null==i?void 0:i.draggingState)?void 0:t.mousePos}:void 0},[null==i?void 0:i.draggingState,null==(t=null==i?void 0:i.draggingState)?void 0:t.draggedCellOrientation,null==(n=null==i?void 0:i.draggingState)?void 0:n.mousePos]),{rowHandle:a,colHandle:c}=function(e,t,n,r){let o=ty("row",e,t,n,r),i=ty("col",e,t,n,r);return(0,s.useMemo)(()=>({rowHandle:o,colHandle:i}),[i,o])}((null==i?void 0:i.show)||!1,(null==i?void 0:i.referencePosCell)||null,(null==i?void 0:i.referencePosTable)||null,l),[u,d]=(0,s.use
1State)(!1),[p,h]=(0,s.useState)(!1);if(!a.isMounted||!c.isMounted||!i)return null;let f=e.tableHandle||tg;return O.jsxs(O.Fragment,{children:[!u&&O.jsx("div",{ref:a.ref,style:a.style,children:O.jsx(f,{editor:r,orientation:"row",showOtherSide:()=>h(!1),hideOtherSide:()=>h(!0),index:i.rowIndex,block:i.block,dragStart:o.rowDragStart,dragEnd:o.dragEnd,freezeHandles:o.freezeHandles,unfreezeHandles:o.unfreezeHandles})}),!p&&O.jsx("div",{ref:c.ref,style:c.style,children:O.jsx(f,{editor:r,orientation:"column",showOtherSide:()=>d(!1),hideOtherSide:()=>d(!0),index:i.colIndex,block:i.block,dragStart:o.colDragStart,dragEnd:o.dragEnd,freezeHandles:o.freezeHandles,unfreezeHandles:o.unfreezeHandles})})]})};function tb(e){let t=H();if(!t)throw Error("BlockNoteDefaultUI must be used within a BlockNoteContext.Provider");return O.jsxs(O.Fragment,{children:[!1!==e.formattingToolbar&&O.jsx(eZ,{}),!1!==e.linkToolbar&&O.jsx(eQ,{}),!1!==e.slashMenu&&O.jsx(ta,{triggerCharacter:"/"}),!1!==e.emojiPicker&&O.jsx(to,{triggerCharacter:":",columns:10,minQueryLength:2}),!1!==e.sideMenu&&O.jsx(e6,{}),t.filePanel&&!1!==e.filePanel&&O.jsx(B,{}),t.tableHandles&&!1!==e.tableHandles&&O.jsx(tv,{})]})}let tw=()=>{let e=(0,s.useMemo)(()=>{var e;return null==(e=window.matchMedia)?void 0:e.call(window,"(prefers-color-scheme: dark)")},[]),t=(0,s.useMemo)(()=>{var e;return null==(e=window.matchMedia)?void 0:e.call(window,"(prefers-color-scheme: light)")},[]),n=null==e?void 0:e.matches,r=null==t?void 0:t.matches,[o,i]=(0,s.useState)(n?"dark":r?"light":"no-preference");return(0,s.useEffect)(()=>{i(n?"dark":r?"light":"no-preference")},[n,r]),(0,s.useEffect)(()=>{if("function"==typeof(null==e?void 0:e.addEventListener)){let n=({matches:e})=>e&&i("dark"),r=({matches:e})=>e&&i("light");return null==e||e.addEventListener("change",n),null==t||t.addEventListener("change",r),()=>{null==e||e.removeEventListener("change",n),null==t||t.removeEventListener("change",r)}}{let n=()=>i(e.matches?"dark":t.matches?"light":"no-preference");return null==e||e.addEventListener("change",n),null==t||t.addEventListener("change",n),()=>{null==e||e.removeEventListener("change",n),null==t||t.removeEventListener("change",n)}}},[e,t]),window.matchMedia,o},tx=({renderers:e})=>O.jsx(O.Fragment,{children:Object.entries(e).map(([e,t])=>(0,d.createPortal)(t.reactElement,t.element,e))});function tk(e){let[t,n]=(0,s.useState)({});return(0,s.useEffect)(()=>(e.editor._tiptapEditor.contentComponent={setRenderer(e,t){n(n=>({...n,[e]:t}))},removeRenderer(e){n(t=>{let n={...t};return delete n[e],n})}},queueMicrotask(()=>{e.editor._tiptapEditor.createNodeViews()}),()=>{e.editor._tiptapEditor.contentComponent=null}),[e.editor._tiptapEditor]),O.jsxs(O.Fragment,{children:[O.jsx(tx,{renderers:t}),e.children]})}let tC=(0,s.forwardRef)((e,t)=>{let[n,r]=(0,s.useState)();return(0,s.useImperativeHandle)(t,()=>(e,t)=>{(0,d.flushSync)(()=>{r({node:e,container:t})}),r(void 0)},[]),O.jsx(O.Fragment,{children:n&&(0,d.createPortal)(n.node,n.container)})}),tS=()=>{},tM=s.forwardRef(function(e,t){let{editor:n,className:r,theme:o,children:i,editable:l,onSelectionChange:a,onChange:c,formattingToolbar:d,linkToolbar:p,slashMenu:h,emojiPicker:f,sideMenu:m,filePanel:g,tableHandles:y,...v}=e,[b,w]=(0,s.useState)(),x=R(),k=tw(),C=(null==x?void 0:x.colorSchemePreference)||k,S=o||("dark"===C?"dark":"light");$(c||tS,n),U(a||tS,n),(0,s.useEffect)(()=>{n.isEditable=!1!==l},[l,n]);let M=(0,s.useMemo)(()=>O.jsxs(O.Fragment,{children:[i,O.jsx(tb,{formattingToolbar:d,linkToolbar:p,slashMenu:h,emojiPicker:f,sideMenu:m,filePanel:g,tableHandles:y})]}),[i,d,p,h,f,m,g,y]),E=(0,s.useMemo)(()=>({...x,editor:n,setContentEditableProps:w}),[x,n]),T=(0,s.useCallback)(e=>{n.elementRenderer=e},[n]);return O.jsxs(j.Provider,{value:E,children:[O.jsx(tC,{ref:T}),!n.headless&&O.jsx(tk,{editor:n,children:O.jsxs("div",{className:(0,u.xQ)("bn-container",S||"",r||""),"data-color-scheme":S,...v,ref:t,children:[O.jsx("div",{"aria-autocomplete":"list","aria-haspopup":"listbox",ref:n.mount,...b}),M]})})]})});function tE(e,t){let n,r;let o=document.createElement("div");if(null!=t&&t.elementRenderer?t.elementRenderer(e(e=>n=e||void 0),o):(r=l(o),(0,d.flushSync)(()=>{r.render(e(e=>n=e||void 0))})),!o.childElementCount)return console.warn("ReactInlineContentSpec: renderHTML() failed"),{dom:document.createElement("span")};null==n||n.setAttribute("data-tmp-find","true");let i=o.cloneNode(!0),s=i.firstElementChild,a=i.querySelector("[data-tmp-find]");return null==a||a.removeAttribute("data-tmp-find"),null==r||r.unmount(),{dom:s,contentDOM:a||void 0}}function tT(e){var t;return O.jsx(M,{...Object.fromEntries(Object.entries(e.domAttributes||{}).filter(([e])=>"class"!==e)),className:(0,u.xQ)("bn-block-content",(null==(t=e.domAttributes)?void 0:t.class)||""),"data-content-type":e.blockType,...Object.fromEntries(Object.entries(e.blockProps).filter(([t,n])=>!u.rn.includes(t)&&n!==e.propSchema[t].default).map(([e,t])=>[(0,u.Rp)(e),t])),"data-file-block":!0===e.isFileBlock||void 0,children:e.children})}function tj(e,t){let n=(0,u.BM)({name:e.type,content:"inline"===e.content?"inline*":"",group:"blockContent",selectable:e.isSelectable??!0,addAttributes:()=>(0,u.HC)(e.propSchema),parseHTML:()=>(0,u.rP)(e,t.parse),renderHTML({HTMLAttributes:t}){let n=document.createElement("div");return(0,u.Mu)({dom:n,contentDOM:"inline"===e.content?n:void 0},e.type,{},e.propSchema,e.isFileBlock,t)},addNodeView(){return n=>{var r,o;let i=(r=n=>{var r;let o=this.options.editor,i=(0,u.kQ)(n.getPos,o,this.editor,e.type),l=(null==(r=this.options.domAttributes)?void 0:r.blockContent)||{},s=S({}).ref,a=t.render;return O.jsx(tT,{blockType:i.type,blockProps:i.props,propSchema:e.propSchema,isFileBlock:e.isFileBlock,domAttributes:l,children:O.jsx(a,{block:i,editor:o,contentRef:s})})},o={className:"bn-react-node-view-renderer"},e=>e.editor.contentComponent?new T(r,e,o):{})(n);return!1===e.isSelectable&&(0,u._d)(i,this.editor),i}}});return(0,u.lz)(e,{node:n,toInternalHTML:(r,o)=>{var i,l;let s=(null==(i=n.options.domAttributes)?void 0:i.blockContent)||{},a=t.render,c=tE(t=>O.jsx(tT,{blockType:r.type,blockProps:r.props,propSchema:e.propSchema,domAttributes:s,children:O.jsx(a,{block:r,editor:o,contentRef:t})}),o);return null==(l=c.contentDOM)||l.setAttribute("data-editable",""),c},toExternalHTML:(r,o)=>{var i,l;let s=(null==(i=n.options.domAttributes)?void 0:i.blockContent)||{},a=t.toExternalHTML||t.render,c=tE(t=>O.jsx(tT,{blockType:r.type,blockProps:r.props,propSchema:e.propSchema,domAttributes:s,children:O.jsx(a,{block:r,editor:o,contentRef:t})}),o);return null==(l=c.contentDOM)||l.setAttribute("data-editable",""),c}})}l=d.createRoot,d.hydrateRoot;let tR=e=>
1!function(e){let[t,n]=(0,s.useState)(!1);return function(e){let t=H();(0,s.useEffect)(()=>t.onUploadStart(e),[e,t])}(t=>{t===e&&n(!0)}),function(e){let t=H();(0,s.useEffect)(()=>t.onUploadEnd(e),[e,t])}(t=>{t===e&&n(!1)}),t}(e.block.id)?O.jsx("div",{className:"bn-file-block-content-wrapper",children:""===e.block.props.url?O.jsx(tO,{...e}):!1===e.block.props.showPreview?O.jsx(tN,{block:e.block,editor:e.editor,children:O.jsx(tA,{block:e.block,editor:e.editor})}):O.jsx(tN,{block:e.block,editor:e.editor,children:e.children})}):O.jsx("div",{className:"bn-file-loading-preview",children:"Loading..."}),tA=e=>O.jsxs("div",{className:"bn-file-default-preview",contentEditable:!1,draggable:!1,children:[O.jsx("div",{className:"bn-file-default-preview-icon",children:O.jsx(ee,{size:24})}),O.jsx("p",{className:"bn-file-default-preview-name",children:e.block.props.name})]}),tN=e=>O.jsxs("div",{className:"bn-file-and-caption-wrapper",children:[e.children,e.block.props.caption&&O.jsx("p",{className:"bn-file-caption",children:e.block.props.caption})]}),tO=e=>{let t=D(),n=(0,s.useCallback)(e=>{e.preventDefault()},[]),r=(0,s.useCallback)(()=>{e.editor.dispatch(e.editor._tiptapEditor.state.tr.setMeta(e.editor.filePanel.plugin,{block:e.block}))},[e.block,e.editor]);return O.jsxs("div",{className:"bn-add-file-button",onMouseDown:n,onClick:r,children:[O.jsx("div",{className:"bn-add-file-button-icon",children:e.buttonIcon||O.jsx(ee,{size:24})}),O.jsx("div",{className:"bn-add-file-button-text",children:e.buttonText||t.file_blocks.file.add_button_text})]})},tH=e=>O.jsxs("div",{children:[e.children,O.jsx("p",{children:e.caption})]}),tL=e=>O.jsxs("figure",{children:[e.children,O.jsx("figcaption",{children:e.caption})]}),tI=e=>
1{let[t,n]=(0,s.useState)(!1),[r,o]=(0,s.useState)(void 0);(0,s.useEffect)(()=>{let t=t=>{let n;(n="center"===e.block.props.textAlignment?"left"===r.handleUsed?r.initialWidth+(r.initialClientX-t.clientX)*2:r.initialWidth+(t.clientX-r.initialClientX)*2:"left"===r.handleUsed?r.initialWidth+r.initialClientX-t.clientX:r.initialWidth+t.clientX-r.initialClientX)<64?e.setWidth(64):n>e.editor.domElement.firstElementChild.clientWidth?e.setWidth(e.editor.domElement.firstElementChild.clientWidth):e.setWidth(n)},n=()=>{o(void 0),e.editor.updateBlock(e.block,{props:{previewWidth:e.width}})};return r&&(window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)}},[e,r]);let i=(0,s.useCallback)(()=>{e.editor.isEditable&&n(!0)},[e.editor.isEditable]),l=(0,s.useCallback)(()=>{n(!1)},[]),a=(0,s.useCallback)(t=>{t.preventDefault(),o({handleUsed:"left",initialWidth:e.width,initialClientX:t.clientX})},[e.width]),c=(0,s.useCallback)(t=>{t.preventDefault(),o({handleUsed:"right",initialWidth:e.width,initialClientX:t.clientX})},[e.width]);return O.jsxs("div",{className:"bn-visual-media-wrapper",onMouseEnter:i,onMouseLeave:l,children:[e.children,(t||r)&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"bn-visual-media-resize-handle",style:{left:"4px"},onMouseDown:a}),O.jsx("div",{className:"bn-visual-media-resize-handle",style:{right:"4px"},onMouseDown:c})]})]})};function t_(e){let t=H(),[n,r]=(0,s.useState)("loading"),[o,i]=(0,s.useState)();if((0,s.useEffect)(()=>{let n=!0;return(async()=>{let o="";r("loading");try{o=await t.resolveFileUrl(e)}catch{r("error");return}n&&(r("loaded"),i(o))})(),()=>{n=!1}},[t,e]),"loaded"!==n)return{loadingState:n};if(!o)throw Error("Finished fetching file but did not get download URL.");return{loadingState:n,downloadUrl:o}}let tP=e=>{let t=t_(e.block.props.url);return"loading"===t.loadingState?null:O.jsx("audio",{className:"bn-audio",src:t.downloadUrl,controls:!0,contentEditable:!1,draggable:!1})},tD=(tj(u.Kx,{render:e=>O.jsx(tR,{...e,buttonText:e.editor.dictionary.file_blocks.audio.add_button_text,buttonIcon:O.jsx(ev,{size:24}),children:O.jsx(tP,{block:e.block,editor:e.editor})}),parse:u.Vj,toExternalHTML:e=>{if(!e.block.props.url)return O.jsx("p",{children:"Add audio"});let t=e.block.props.showPreview?O.jsx("audio",{src:e.block.props.url}):O.jsx("a",{href:e.block.props.url,children:e.block.props.name||e.block.props.url});return e.block.props.caption?e.block.props.showPreview?O.jsx(tL,{caption:e.block.props.caption,children:t}):O.jsx(tH,{caption:e.block.props.caption,children:t}):t}}),tj(u.kl,{render:e=>O.jsx(tR,{...e,children:O.jsx(tA,{block:e.block,editor:e.editor})}),parse:u.px,toExternalHTML:e=>{if(!e.block.props.url)return O.jsx("p",{children:"Add file"});let t=O.jsx("a",{href:e.block.props.url,children:e.block.props.name||e.block.props.url});return e.block.props.caption?O.jsx(tH,{caption:e.block.props.caption,children:t}):t}}),e=>{let[t,n]=(0,s.useState)(Math.min(e.block.props.previewWidth,e.editor.domElement.firstElementChild.clientWidth)),r=t_(e.block.props.url);return"loading"===r.loadingState?null:O.jsx(tI,{...e,width:t,setWidth:n,children:O.jsx("img",{className:"bn-visual-media",src:r.downloadUrl,alt:e.block.props.caption||"BlockNote image",contentEditable:!1,draggable:!1,width:t})})}),tz=(tj(u.HF,{render:e=>O.jsx(tR,{...e,buttonText:e.editor.dictionary.file_blocks.image.add_button_text,buttonIcon:O.jsx(ef,{size:24}),children:O.jsx(tD,{block:e.block,editor:e.editor})}),parse:u.Sh,toExternalHTML:e=>{if(!e.block.props.url)return O.jsx("p",{children:"Add image"});let t=e.block.props.showPreview?O.jsx("img",{src:e.block.props.url,alt:e.block.props.name||e.block.props.caption||"BlockNote image",width:e.block.props.previewWidth}):O.jsx("a",{href:e.block.props.url,children:e.block.props.name||e.block.props.url});return e.block.props.caption?e.block.props.showPreview?O.jsx(tL,{caption:e.block.props.caption,children:t}):O.jsx(tH,{caption:e.block.props.caption,children:t}):t}}),e=>{let[t,n]=(0,s.useState)(Math.min(e.block.props.previewWidth,e.editor.domElement.firstElementChild.clientWidth)),r=t_(e.block.props.url);return"loading"===r.loadingState?null:O.jsx(tI,{...e,width:t,setWidth:n,children:O.jsx("video",{className:"bn-visual-media",src:r.downloadUrl,controls:!0,contentEditable:!1,draggable:!1,width:t})})});function tV(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=n.top<r.top,i=n.bottom>r.bottom;return o&&i?"both":o?"top":i?"bottom":"none"}tj(u.aw,{render:e=>O.jsx(tR,{...e,buttonText:e.editor.dictionary.file_blocks.video.add_button_text,buttonIcon:O.jsx(ey,{size:24}),children:O.jsx(tz,{block:e.block,editor:e.editor})}),parse:u.an,toExternalHTML:e=>{if(!e.block.props.url)return O.jsx("p",{children:"Add video"});let t=e.block.props.showPreview?O.jsx("video",{src:e.block.props.url}):O.jsx("a",{href:e.block.props.url,children:e.block.props.name||e.block.props.url});return e.block.props.caption?e.block.props.showPreview?O.jsx(tL,{caption:e.block.props.caption,children:t}):O.jsx(tH,{caption:e.block.props.caption,children:t}):t}})},2859:function(e,t,n){"use strict";n.d(t,{x7:function(){return U},Me:function(){return z},oo:function(){return Y},RR:function(){return B},Qo:function(){return W},dr:function(){return G},cv:function(){return V},uY:function(){return F},dp:function(){return $}});let r=Math.min,o=Math.max,i=Math.round,l=Math.floor,s=e=>({x:e,y:e}
1),a={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function u(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function f(e){return"y"===e?"height":"width"}function m(e){return["top","bottom"].includes(d(e))?"y":"x"}function g(e){return e.replace(/start|end/g,e=>c[e])}function y(e){return e.replace(/left|right|bottom|top/g,e=>a[e])}function v(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function b(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function w(e,t,n){let r,{reference:o,floating:i}=e,l=m(t),s=h(m(t)),a=f(s),c=d(t),u="y"===l,g=o.x+o.width/2-i.width/2,y=o.y+o.height/2-i.height/2,v=o[a]/2-i[a]/2;switch(c){case"top":r={x:g,y:o.y-i.height};break;case"bottom":r={x:g,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:y};break;case"left":r={x:o.x-i.width,y:y};break;default:r={x:o.x,y:o.y}}switch(p(t)){case"start":r[s]-=v*(n&&u?-1:1);break;case"end":r[s]+=v*(n&&u?-1:1)}return r}let x=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=w(c,r,a),p=r,h={},f=0;for(let n=0;n<s.length;n++){let{name:i,fn:m}=s[n],{x:g,y:y,data:v,reset:b}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,h={...h,[i]:{...h[i],...v}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:u,y:d}=w(c,p,a)),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}};async function k(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:f=0}=u(t,e),m=v(f),g=s[h?"floating"===p?"reference":"floating":p],y=b(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:a})),w="floating"===p?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,x=await (null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),k=await (null==i.isElement?void 0:i.isElement(x))&&await (null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},C=b(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:a}):w);return{top:(y.top-C.top+m.top)/k.y,bottom:(C.bottom-y.bottom+m.bottom)/k.y,left:(y.left-C.left+m.left)/k.x,right:(C.right-y.right+m.right)/k.x}}function C(e){let t=r(...e.map(e=>e.left)),n=r(...e.map(e=>e.top));return{x:t,y:n,width:o(...e.map(e=>e.right))-t,height:o(...e.map(e=>e.bottom))-n}}async function S(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=d(n),s=p(n),a="y"===m(n),c=["left","top"].includes(l)?-1:1,h=i&&a?-1:1,f=u(t,e),{mainAxis:g,crossAxis:y,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof v&&(y="end"===s?-1*v:v),a?{x:y*h,y:g*c}:{x:g*c,y:y*h}}var M=n(94046);function E(e){let t=(0,M.Dx)(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=(0,M.Re)(e),l=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=i(n)!==l||i(r)!==s;return a&&(n=l,r=s),{width:n,height:r,$:a}}function T(e){return(0,M.kK)(e)?e:e.contextElement}function j(e){let t=T(e);if(!(0,M.Re)(t))return s(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:l}=E(t),a=(l?i(n.width):n.width)/r,c=(l?i(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),c&&Number.isFinite(c)||(c=1),{x:a,y:c}}let R=s(0);function A(e){let t=(0,M.Jj)(e);
1return(0,M.Pf)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:R}function N(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=T(e),a=s(1);t&&(r?(0,M.kK)(r)&&(a=j(r)):a=j(e));let c=(void 0===(o=n)&&(o=!1),r&&(!o||r===(0,M.Jj)(l))&&o)?A(l):s(0),u=(i.left+c.x)/a.x,d=(i.top+c.y)/a.y,p=i.width/a.x,h=i.height/a.y;if(l){let e=(0,M.Jj)(l),t=r&&(0,M.kK)(r)?(0,M.Jj)(r):r,n=e,o=(0,M.wK)(n);for(;o&&r&&t!==n;){let e=j(o),t=o.getBoundingClientRect(),r=(0,M.Dx)(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,d*=e.y,p*=e.x,h*=e.y,u+=i,d+=l,n=(0,M.Jj)(o),o=(0,M.wK)(n)}}return b({width:p,height:h,x:u,y:d})}function O(e,t){let n=(0,M.Lw)(e).scrollLeft;return t?t.left+n:N((0,M.tF)(e)).left+n}function H(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=(0,M.Jj)(e),r=(0,M.tF)(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;let e=(0,M.Pf)();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t)r=function(e){let t=(0,M.tF)(e),n=(0,M.Lw)(e),r=e.ownerDocument.body,i=o(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=o(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+O(e),a=-n.scrollTop;return"rtl"===(0,M.Dx)(r).direction&&(s+=o(t.clientWidth,r.clientWidth)-i),{width:i,height:l,x:s,y:a}}((0,M.tF)(e));else if((0,M.kK)(t))r=function(e,t){let n=N(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=(0,M.Re)(e)?j(e):s(1),l=e.clientWidth*i.x;return{width:l,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{let n=A(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return b(r)}function L(e){return"static"===(0,M.Dx)(e).position}function I(e,t){if(!(0,M.Re)(e)||"fixed"===(0,M.Dx)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,M.tF)(e)===n&&(n=n.ownerDocument.body),n}function _(e,t){let n=(0,M.Jj)(e);if((0,M.tR)(e))return n;if(!(0,M.Re)(e)){let t=(0,M.Ow)(e);for(;t&&!(0,M.Py)(t);){if((0,M.kK)(t)&&!L(t))return t;t=(0,M.Ow)(t)}return n}let r=I(e,t);for(;r&&(0,M.Ze)(r)&&L(r);)r=I(r,t);return r&&(0,M.Py)(r)&&L(r)&&!(0,M.hT)(r)?n:r||(0,M.gQ)(e)||n}let P=async function(e){let t=this.getOffsetParent||_,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=(0,M.Re)(t),o=(0,M.tF)(t),i="fixed"===n,l=N(e,!0,i,t),a={scrollLeft:0,scrollTop:0},c=s(0);if(r||!r&&!i){if(("body"!==(0,M.wk)(t)||(0,M.ao)(o))&&(a=(0,M.Lw)(t)),r){let e=N(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=O(o))}let u=0,d=0;if(o&&!r&&!i){let e=o.getBoundingClientRect();d=e.top+a.scrollTop,u=e.left+a.scrollLeft-O(o,e)}return{x:l.left+a.scrollLeft-c.x-u,y:l.top+a.scrollTop-c.y-d,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}}},D={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=(0,M.tF)(r),a=!!t&&(0,M.tR)(t.floating);if(r===l||a&&i)return n;let c={scrollLeft:0,scrollTop:0},u=s(1),d=s(0),p=(0,M.Re)(r);if((p||!p&&!i)&&(("body"!==(0,M.wk)(r)||(0,M.ao)(l))&&(c=(0,M.Lw)(r)),(0,M.Re)(r))){let e=N(r);u=j(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}},getDocumentElement:M.tF,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:l}=e,s=[..."clippingAncestors"===n?(0,M.tR)(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=(0,M.Kx)(e,[],!1).filter(e=>(0,M.kK)(e)&&"body"!==(0,M.wk)(e)),o=null,i="fixed"===(0,M.Dx)(e).position,l=i?(0,M.Ow)(e):e;for(;(0,M.kK)(l)&&!(0,M.Py)(l);){let t=(0,M.Dx)(l),n=(0,M.hT)(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||(0,M.ao)(l)&&!n&&function e(t,n){let r=(0,M.Ow)(t);return!(r===n||!(0,M.kK)(r)||(0,M.Py)(r))&&("fixed"===(0,M.Dx)(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=(0,M.Ow)(l)}return t.set(e,r),r}(t,this._c):[].concat(n),i],a=s[0],c=s.reduce((e,n)=>{let i=H(t,n,l);return e.top=o(i.top,e.top),e.right=r(i.right,e.right),e.bottom=r(i.bottom,e.bottom),e.left=o(i.left,e.left),e},H(t,a,l));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:_,getElementRects:P,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=E(e);return{width:t,height:n}},getScale:j,isElement:M.kK,isRTL:function(e){return"rtl"===(0,M.Dx)(e).direction}};function z(e,t,n,i){let s;void 0===i&&(i={});let{ancestorScroll:a=!0,ancestorResize:c=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:p=!1}
1=i,h=T(e),f=a||c?[...h?(0,M.Kx)(h):[],...(0,M.Kx)(t)]:[];f.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)});let m=h&&d?function(e,t){let n,i=null,s=(0,M.tF)(e);function a(){var e;clearTimeout(n),null==(e=i)||e.disconnect(),i=null}return!function c(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),a();let{left:p,top:h,width:f,height:m}=e.getBoundingClientRect();if(u||t(),!f||!m)return;let g=l(h),y=l(s.clientWidth-(p+f)),v={rootMargin:-g+"px "+-y+"px "+-l(s.clientHeight-(h+m))+"px "+-l(p)+"px",threshold:o(0,r(1,d))||1},b=!0;function w(e){let t=e[0].intersectionRatio;if(t!==d){if(!b)return c();t?c(!1,t):n=setTimeout(()=>{c(!1,1e-7)},1e3)}b=!1}try{i=new IntersectionObserver(w,{...v,root:s.ownerDocument})}catch(e){i=new IntersectionObserver(w,v)}i.observe(e)}(!0),a}(h,n):null,g=-1,y=null;u&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),h&&!p&&y.observe(h),y.observe(t));let v=p?N(e):null;return p&&function t(){let r=N(e);v&&(r.x!==v.x||r.y!==v.y||r.width!==v.width||r.height!==v.height)&&n(),v=r,s=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{a&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,p&&cancelAnimationFrame(s)}}let V=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:s}=t,a=await S(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},F=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:i,placement:l}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...p}=u(e,t),f={x:n,y:i},g=await k(t,p),y=m(d(l)),v=h(y),b=f[v],w=f[y];if(s){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",n=b+g[e],i=b-g[t];b=o(n,r(b,i))}if(a){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=w+g[e],i=w-g[t];w=o(n,r(w,i))}let x=c.fn({...t,[v]:b,[y]:w});return{...x,data:{x:x.x-n,y:x.y-i,enabled:{[v]:s,[y]:a}}}}}},B=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let{placement:s,middlewareData:a,rects:c,initialPlacement:v,platform:b,elements:w}=t,{mainAxis:x=!0,crossAxis:C=!0,fallbackPlacements:S,fallbackStrategy:M="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:T=!0,...j}=u(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};let R=d(s),A=m(v),N=d(v)===v,O=await (null==b.isRTL?void 0:b.isRTL(w.floating)),H=S||(N||!T?[y(v)]:function(e){let t=y(e);return[g(e),t,g(t)]}(v)),L="none"!==E;!S&&L&&H.push(...function(e,t,n,r){let o=p(e),i=function(e,t,n){let r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(n)return t?o:r;return t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(d(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(g)))),i}(v,T,E,O));let I=[v,...H],_=await k(t,j),P=[],D=(null==(r=a.flip)?void 0:r.overflows)||[];if(x&&P.push(_[R]),C){let e=function(e,t,n){void 0===n&&(n=!1);let r=p(e),o=h(m(e)),i=f(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=y(l)),[l,y(l)]}(s,c,O);P.push(_[e[0]],_[e[1]])}if(D=[...D,{placement:s,overflows:P}],!P.every(e=>e<=0)){let e=((null==(o=a.flip)?void 0:o.index)||0)+1,t=I[e];if(t)return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(i=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(M){case"bestFit":{let e=null==(l=D.filter(e=>{if(L){let t=m(e.placement);return t===A||"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:l[0];e&&(n=e);break}case"initialPlacement":n=v}if(s!==n)return{reset:{placement:n}}}return{}}}},$=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,i;let l,s;let{placement:a,rects:c,platform:h,elements:f}=t,{apply:g=()=>{},...y}=u(e,t),v=await k(t,y),b=d(a),w=p(a),x="y"===m(a),{width:C,height:S}=c.floating;"top"===b||"bottom"===b?(l=b,s=w===(await (null==h.isRTL?void 0:h.isRTL(f.floating))?"start":"end")?"left":"right"):(s=b,l="end"===w?"top":"bottom");let M=S-v.top-v.bottom,E=C-v.left-v.right,T=r(S-v[l],M),j=r(C-v[s],E),R=!t.middlewareData.shift,A=T,N=j;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(N=E),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(A=M),R&&!w){let e=o(v.left,0),t=o(v.right,0),n=o(v.top,0),r=o(v.bottom,0);x?N=C-2*(0!==e||0!==t?e+t:o(v.left,v.right)):A=S-2*(0!==n||0!==r?n+r:o(v.top,v.bottom))}await g({...t,availableWidth:N,availableHeight:A});let O=await h.getDimensions(f.floating);return C!==O.width||S!==O.height?{reset:{rects:!0}}:{}}}},U=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:i,placement:l,rects:s,platform:a,elements:c,middlewareData:d}=t,{element:g,padding:y=0}=u(e,t)||{};if(null==g)return{};let b=v(y),w={x:n,y:i},x=h(m(l)),k=f(x),C=await a.getDimensions(g),S="y"===x,M=S?"clientHeight":"clientWidth",E=s.reference[k]+s.reference[x]-w[x]-s.floating[k],T=w[x]-s.reference[x],j=await (null==a.getOffsetParent?void 0:a.getOffsetParent(g)),R=j?j[M]:0;
1R&&await (null==a.isElement?void 0:a.isElement(j))||(R=c.floating[M]||s.floating[k]);let A=R/2-C[k]/2-1,N=r(b[S?"top":"left"],A),O=r(b[S?"bottom":"right"],A),H=R-C[k]-O,L=R/2-C[k]/2+(E/2-T/2),I=o(N,r(L,H)),_=!d.arrow&&null!=p(l)&&L!==I&&s.reference[k]/2-(L<N?N:O)-C[k]/2<0,P=_?L<N?L-N:L-H:0;return{[x]:w[x]+P,data:{[x]:I,centerOffset:L-I-P,..._&&{alignmentOffset:P}},reset:_}}}),W=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:i,rects:l,platform:s,strategy:a}=t,{padding:c=2,x:p,y:h}=u(e,t),f=Array.from(await (null==s.getClientRects?void 0:s.getClientRects(i.reference))||[]),g=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let o=t[e];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(e=>b(C(e)))}(f),y=b(C(f)),w=v(c),x=await s.getElementRects({reference:{getBoundingClientRect:function(){if(2===g.length&&g[0].left>g[1].right&&null!=p&&null!=h)return g.find(e=>p>e.left-w.left&&p<e.right+w.right&&h>e.top-w.top&&h<e.bottom+w.bottom)||y;if(g.length>=2){if("y"===m(n)){let e=g[0],t=g[g.length-1],r="top"===d(n),o=e.top,i=t.bottom,l=r?e.left:t.left,s=r?e.right:t.right;return{top:o,bottom:i,left:l,right:s,width:s-l,height:i-o,x:l,y:o}}let e="left"===d(n),t=o(...g.map(e=>e.right)),i=r(...g.map(e=>e.left)),l=g.filter(n=>e?n.left===i:n.right===t),s=l[0].top,a=l[l.length-1].bottom;return{top:s,bottom:a,left:i,right:t,width:t-i,height:a-s,x:i,y:s}}return y}},floating:i.floating,strategy:a});return l.reference.x!==x.reference.x||l.reference.y!==x.reference.y||l.reference.width!==x.reference.width||l.reference.height!==x.reference.height?{reset:{rects:x}}:{}}}},G=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:c=!0}=u(e,t),p={x:n,y:r},f=m(o),g=h(f),y=p[g],v=p[f],b=u(s,t),w="number"==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(a){let e="y"===g?"height":"width",t=i.reference[g]-i.floating[e]+w.mainAxis,n=i.reference[g]+i.reference[e]-w.mainAxis;y<t?y=t:y>n&&(y=n)}if(c){var x,k;let e="y"===g?"width":"height",t=["top","left"].includes(d(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(x=l.offset)?void 0:x[f])||0)+(t?0:w.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(k=l.offset)?void 0:k[f])||0)-(t?w.crossAxis:0);v<n?v=n:v>r&&(v=r)}return{[g]:y,[f]:v}}}},Y=(e,t,n)=>{let r=new Map,o={platform:D,...n},i={...o.platform,_c:r};return x(e,t,{...o,platform:i})}},97859:function(e,t,n){"use strict";n.d(t,{Qo:function(){return v},RR:function(){return g},YF:function(){return d},cv:function(){return h},dp:function(){return y},dr:function(){return m},uY:function(){return f},x7:function(){return b}});var r=n(2859),o=n(2265),i=n(54887),l="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function s(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!s(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!s(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function a(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function c(e,t){let n=a(e);return Math.round(t*n)/n}function u(e){let t=o.useRef(e);return l(()=>{t.current=e}),t}function d(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:d=[],platform:p,elements:{reference:h,floating:f}={},transform:m=!0,whileElementsMounted:g,open:y}=e,[v,b]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,x]=o.useState(d);s(w,d)||x(d);let[k,C]=o.useState(null),[S,M]=o.useState(null),E=o.useCallback(e=>{e!==A.current&&(A.current=e,C(e))},[]),T=o.useCallback(e=>{e!==N.current&&(N.current=e,M(e))},[]),j=h||k,R=f||S,A=o.useRef(null),N=o.useRef(null),O=o.useRef(v),H=null!=g,L=u(g),I=u(p),_=u(y),P=o.useCallback(()=>
1{if(!A.current||!N.current)return;let e={placement:t,strategy:n,middleware:w};I.current&&(e.platform=I.current),(0,r.oo)(A.current,N.current,e).then(e=>{let t={...e,isPositioned:!1!==_.current};D.current&&!s(O.current,t)&&(O.current=t,i.flushSync(()=>{b(t)}))})},[w,t,n,I,_]);l(()=>{!1===y&&O.current.isPositioned&&(O.current.isPositioned=!1,b(e=>({...e,isPositioned:!1})))},[y]);let D=o.useRef(!1);l(()=>(D.current=!0,()=>{D.current=!1}),[]),l(()=>{if(j&&(A.current=j),R&&(N.current=R),j&&R){if(L.current)return L.current(j,R,P);P()}},[j,R,P,L,H]);let z=o.useMemo(()=>({reference:A,floating:N,setReference:E,setFloating:T}),[E,T]),V=o.useMemo(()=>({reference:j,floating:R}),[j,R]),F=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!V.floating)return e;let t=c(V.floating,v.x),r=c(V.floating,v.y);return m?{...e,transform:"translate("+t+"px, "+r+"px)",...a(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,m,V.floating,v.x,v.y]);return o.useMemo(()=>({...v,update:P,refs:z,elements:V,floatingStyles:F}),[v,P,z,V,F])}let p=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:o}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.x7)({element:n.current,padding:o}).fn(t):{}:n?(0,r.x7)({element:n,padding:o}).fn(t):{}}}),h=(e,t)=>({...(0,r.cv)(e),options:[e,t]}),f=(e,t)=>({...(0,r.uY)(e),options:[e,t]}),m=(e,t)=>({...(0,r.dr)(e),options:[e,t]}),g=(e,t)=>({...(0,r.RR)(e),options:[e,t]}),y=(e,t)=>({...(0,r.dp)(e),options:[e,t]}),v=(e,t)=>
1({...(0,r.Qo)(e),options:[e,t]}),b=(e,t)=>({...p(e),options:[e,t]})},89750:function(e,t,n){"use strict";n.d(t,{AW:function(){return o},G6:function(){return c},MM:function(){return h},Me:function(){return m},Pe:function(){return g},U9:function(){return y},V5:function(){return d},cr:function(){return a},ex:function(){return f},j7:function(){return v},r:function(){return p},r3:function(){return i}});var r=n(94046);function o(e){let t=e.activeElement;for(;(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function i(e,t){if(!e||!t)return!1;let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&(0,r.Zq)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function l(){let e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function s(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function a(e){return!s().includes("jsdom/")&&(!u()&&0===e.width&&0===e.height||u()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function c(){return/apple/i.test(navigator.vendor)}function u(){let e=/android/i;return e.test(l())||e.test(s())}function d(){return l().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function p(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function h(e){return"nativeEvent"in e}function f(e){return e.matches("html,body")}function m(e){return(null==e?void 0:e.ownerDocument)||document}function g(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function y(e){return"composedPath"in e?e.composedPath()[0]:e.target}function v(e){return(0,r.Re)(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}},94046:function(e,t,n){"use strict";function r(){return"undefined"!=typeof window}function o(e){return s(e)?(e.nodeName||"").toLowerCase():"#document"}function i(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function l(e){var t;return null==(t=(s(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function s(e){return!!r()&&(e instanceof Node||e instanceof i(e).Node)}function a(e){return!!r()&&(e instanceof Element||e instanceof i(e).Element)}function c(e){return!!r()&&(e instanceof HTMLElement||e instanceof i(e).HTMLElement)}function u(e){return!!r()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof i(e).ShadowRoot)}function d(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=v(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function p(e){return["table","td","th"].includes(o(e))}function h(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function f(e){let t=g(),n=a(e)?v(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function m(e){let t=w(e);for(;c(t)&&!y(t);){if(f(t))return t;if(h(t))break;t=w(t)}return null}function g(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function y(e){return["html","body","#document"].includes(o(e))}function v(e){return i(e).getComputedStyle(e)}function b(e){return a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function w(e){if("html"===o(e))return e;let t=e.assignedSlot||e.parentNode||u(e)&&e.host||l(e);return u(t)?t.host:t}function x(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}n.d(t,{Dx:function(){return v},Jj:function(){return i},Kx:function(){return function e(t,n,r){var o;void 0===n&&(n=[]),void 0===r&&(r=!0);let l=function e(t){let n=w(t);return y(n)?t.ownerDocument?t.ownerDocument.body:t.body:c(n)&&d(n)?n:e(n)}(t),s=l===(null==(o=t.ownerDocument)?void 0:o.body),a=i(l);if(s){let t=x(a);
1return n.concat(a,a.visualViewport||[],d(l)?l:[],t&&r?e(t):[])}return n.concat(l,e(l,[],r))}},Lw:function(){return b},Ow:function(){return w},Pf:function(){return g},Py:function(){return y},Re:function(){return c},Ze:function(){return p},Zq:function(){return u},ao:function(){return d},gQ:function(){return m},hT:function(){return f},kK:function(){return a},tF:function(){return l},tR:function(){return h},wK:function(){return x},wk:function(){return o}})},60808:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a}});var r=n(94725);let o=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,i=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,l=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,s=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,a=r.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["strong",(0,r.P1)(this.options.HTMLAttributes,e),0]},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()}}
1,addInputRules(){return[(0,r.Cf)({find:o,type:this.type}),(0,r.Cf)({find:l,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:i,type:this.type}),(0,r.K9)({find:s,type:this.type})]}})},37011:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(94725);let o=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,i=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,l=r.vc.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,r.P1)(this.options.HTMLAttributes,e),0]},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,r.Cf)({find:o,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:i,type:this.type})]}})},6392:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(94725),o=n(49914),i=n(97528),l=n(17213);n(53968);var s=n(26802);n(17656),n(57853);var a=n(76517),c=n(29386);let u=(e,t,n)=>e!==t,d=e=>{let t=document.createElement("span");t.classList.add("ProseMirror-yjs-cursor"),t.setAttribute("style",`border-color: ${e.color}`);let n=document.createElement("div");n.setAttribute("style",`background-color: ${e.color}`),n.insertBefore(document.createTextNode(e.name),null);let r=document.createTextNode("⁠"),o=document.createTextNode("⁠");return t.insertBefore(r,null),t.insertBefore(n,null),t.insertBefore(o,null),t},p=e=>({style:`background-color: ${e.color}70`,class:"ProseMirror-yjs-selection"}),h=/^#[0-9a-fA-F]{6}$/,f=(e,t,n,r,l)=>{let u=c.Gt.getState(e),d=u.doc,p=[];return null!=u.snapshot||null!=u.prevSnapshot||0===u.binding.mapping.size?i.EH.create(e.doc,[]):(t.getStates().forEac
1h((t,c)=>{if(n(d.clientID,c,t)&&null!=t.cursor){let n=t.user||{};null==n.color?n.color="#ffa500":h.test(n.color)||console.warn("A user uses an unsupported color format",n),null==n.name&&(n.name=`User: ${c}`);let f=(0,a.SF)(d,u.type,o.og(t.cursor.anchor),u.binding.mapping),m=(0,a.SF)(d,u.type,o.og(t.cursor.head),u.binding.mapping);if(null!==f&&null!==m){let t=s.Fp(e.doc.content.size-1,0);f=s.VV(f,t),m=s.VV(m,t),p.push(i.p.widget(m,()=>r(n),{key:c+"",side:10}));let o=s.VV(f,m),a=s.Fp(f,m);p.push(i.p.inline(o,a,l(n),{inclusiveEnd:!0,inclusiveStart:!1}))}}}),i.EH.create(e.doc,p))},m=(e,{awarenessStateFilter:t=u,cursorBuilder:n=d,selectionBuilder:r=p,getSelection:i=e=>e.selection}={},s="cursor")=>new l.Sy({key:c.uJ,state:{init:(o,i)=>f(i,e,t,n,r),apply(o,i,l,s){let a=c.Gt.getState(s),u=o.getMeta(c.uJ);return a&&a.isChangeOrigin||u&&u.awarenessUpdated?f(s,e,t,n,r):i.map(o.mapping,o.doc)}},props:{decorations:e=>c.uJ.getState(e)},view:t=>{let n=()=>{t.docView&&(0,a.US)(t,c.uJ,{awarenessUpdated:!0})},r=()=>{let n=c.Gt.getState(t.state),r=e.getLocalState()||{};if(t.hasFocus()){let l=i(t.state),c=(0,a.JR)(l.anchor,n.type,n.binding.mapping),u=(0,a.JR)(l.head,n.type,n.binding.mapping);null!=r.cursor&&o.Uq(o.og(r.cursor.anchor),c)&&o.Uq(o.og(r.cursor.head),u)||e.setLocalStateField(s,{anchor:c,head:u})}else null!=r.cursor&&null!==(0,a.SF)(n.doc,n.type,o.og(r.cursor.anchor),n.binding.mapping)&&e.setLocalStateField(s,null)};return e.on("change",n),t.dom.addEventListener("focusin",r),t.dom.addEventListener("focusout",r),{update:r,destroy:()=>{t.dom.removeEventListener("focusin",r),t.dom.removeEventListener("focusout",r),e.off("change",n),e.setLocalStateField(s,null)}}}}),g=e=>Array.from(e.entries()).map(([e,t])=>({clientId:e,...t.user})),y=()=>null,v=r.hj.create({name:"collaborationCursor",priority:999,addOptions:()=>({provider:null,user:{name:null,color:null},render:e=>{let t=document.createElement("span");t.classList.add("collaboration-cursor__caret"),t.setAttribute("style",`border-color: ${e.color}`);let n=document.createElement("div");return n.classList.add("collaboration-cursor__label"),n.setAttribute("style",`background-color: ${e.color}`),n.insertBefore(document.createTextNode(e.name),null),t.insertBefore(n,null),t},selectionRender:p,onUpdate:y}),onCreate(){if(this.options.onUpdate!==y&&console.warn('[tiptap warn]: DEPRECATED: The "onUpdate" option is deprecated. Please use `editor.storage.collaborationCursor.users` instead. Read more: https://tiptap.dev/api/extensions/collaboration-cursor'),!this.options.provider)throw Error('The "provider" option is required for the CollaborationCursor extension')},addStorage:()=>({users:[]}),addCommands(){return{updateUser:e=>()=>(this.options.user=e,this.options.provider.awareness.setLocalStateField("user",this.options.user),!0),user:e=>({editor:t})=>(console.warn('[tiptap warn]: DEPRECATED: The "user" command is deprecated. Please use "updateUser" instead. Read more: https://tiptap.dev/api/extensions/collaboration-cursor'),t.commands.updateUser(e))}},addProseMirrorPlugins(){return[m((this.options.provider.awareness.setLocalStateField("user",this.options.user),this.storage.users=g(this.options.provider.awareness.states),this.options.provider.awareness.on("update",()=>{this.storage.users=g(this.options.provider.awareness.states)}),this.options.provider.awareness),{cursorBuilder:this.options.render,selectionBuilder:this.options.selectionRender})]}})},74984:function(e,t,n){"use strict";n.d(t,{ZP:function(){return K}});var r=n(94725),o=n(17213),i=n(29386);let l=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else void 0!==n&&n()}};var s=n(10121),a=n(26802),c=n(95187),u=n(28070);let d=/[\uD800-\uDBFF]/,p=/[\uDC00-\uDFFF]/,h=(e,t)=>{let n=0,r=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;for(n>0&&d.test(e[n-1])&&n--;r+n<e.length&&r+n<t.length&&e[e.length-r-1]===t[t.length-r-1];)r++;return r>0&&p.test(e[e.length-r])&&r--,{index:n,remove:e.length-n-r,insert:t.slice(n,t.length-r)}};var f=n(68253),m=n(49914),g=n(76517),y=n(76616),v=n(94200),b=n(58062),w=n(29926);let x=(e,t)=>void 0===t?!e.deleted:t.sv.has(e.id.client)&&t.sv.get(e.id.client)>e.id.clock&&!m.uY(t.ds,e.id),k=[{light:"#ecd44433",dark:"#ecd444"}],C=(e,t,n)=>{if(!e.has(n)){if(e.size<t.length){let n=u.Ue();
1e.forEach(e=>n.add(e)),t=t.filter(e=>!n.has(e))}e.set(n,y.kw(t))}return e.get(n)},S=(e,{colors:t=k,colorMapping:n=new Map,permanentUserData:r=null,onFirstRender:l=()=>{},mapping:s}={})=>{let a=!1,c=new T(e,s),u=new o.Sy({props:{editable:e=>{let t=i.Gt.getState(e);return null==t.snapshot&&null==t.prevSnapshot}},key:i.Gt,state:{init:(o,i)=>({type:e,doc:e.doc,binding:c,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:t,colorMapping:n,permanentUserData:r}),apply:(e,t)=>{let n=e.getMeta(i.Gt);if(void 0!==n)for(let e in t=Object.assign({},t),n)t[e]=n[e];return t.addToHistory=!1!==e.getMeta("addToHistory"),t.isChangeOrigin=void 0!==n&&!!n.isChangeOrigin,t.isUndoRedoOperation=void 0!==n&&!!n.isChangeOrigin&&!!n.isUndoRedoOperation,null!==c.prosemirrorView&&void 0!==n&&(null!=n.snapshot||null!=n.prevSnapshot)&&w.Vs(0,()=>{null!=c.prosemirrorView&&(null==n.restore?c._renderSnapshot(n.snapshot,n.prevSnapshot,t):(c._renderSnapshot(n.snapshot,n.snapshot,t),delete t.restore,delete t.snapshot,delete t.prevSnapshot,c.mux(()=>{c._prosemirrorChanged(c.prosemirrorView.state.doc)})))}),t}},view:e=>(c.initView(e),null==s&&c._forceRerender(),l(),{update:()=>{let t=u.getState(e.state);if(null==t.snapshot&&null==t.prevSnapshot&&(a||null!==e.state.doc.content.findDiffStart(e.state.doc.type.createAndFill().content))){if(a=!0,!1===t.addToHistory&&!t.isChangeOrigin){let t=i.Gk.getState(e.state),n=t&&t.undoManager;n&&n.stopCapturing()}c.mux(()=>{t.doc.transact(n=>{n.meta.set("addToHistory",t.addToHistory),c._prosemirrorChanged(e.state.doc)},i.Gt)})}},destroy:()=>{c.destroy()}})});return u},M=(e,t,n)=>{if(null!==t&&null!==t.anchor&&null!==t.head){let r=(0,g.SF)(n.doc,n.type,t.anchor,n.mapping),i=(0,g.SF)(n.doc,n.type,t.head,n.mapping);null!==r&&null!==i&&(e=e.setSelection(o.Bs.create(e.doc,r,i)))}},E=(e,t)=>({anchor:(0,g.JR)(t.selection.anchor,e.type,e.mapping),head:(0,g.JR)(t.selection.head,e.type,e.mapping)});class T{constructor(e,t=new Map){this.type=e,this.prosemirrorView=null,this.mux=l(),this.mapping=t,this._observeFunction=this._typeChanged.bind(this),this.doc=e.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{null===this.beforeTransactionSelection&&null!=this.prosemirrorView&&(this.beforeTransactionSelection=E(this,this.prosemirrorView.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta("addToHistory",!1)}_isLocalCursorInView(){return!!this.prosemirrorView.hasFocus()&&(v.jU&&null===this._domSelectionInView&&(w.Vs(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView)}_isDomSelectionInView(){let e=this.prosemirrorView._root.getSelection(),t=this.prosemirrorView._root.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset),0===t.getClientRects().length&&t.startContainer&&t.collapsed&&t.selectNodeContents(t.startContainer);let n=t.getBoundingClientRect(),r=b.JU.documentElement;return n.bottom>=0&&n.right>=0&&n.left<=(window.innerWidth||r.clientWidth||0)&&n.top<=(window.innerHeight||r.clientHeight||0)}renderSnapshot(e,t){t||(t=m.Ox(m.VG(),new Map)),this.prosemirrorView.dispatch(this._tr.setMeta(i.Gt,{snapshot:e,prevSnapshot:t}))}unrenderSnapshot(){this.mapping.clear(),this.mux(()=>{let e=this.type.toArray().map(e=>R(e,this.prosemirrorView.state.schema,this.mapping)).filter(e=>null!==e),t=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new s.p2(s.HY.from(e),0,0));t.setMeta(i.Gt,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(t)})}_forceRerender(){this.mapping.clear(),this.mux(()=>{let e=null!==this.beforeTransactionSelection?null:this.prosemirrorView.state.selection,t=this.type.toArray().map(e=>R(e,this.prosemirrorView.state.schema,this.mapping)).filter(e=>null!==e),n=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new s.p2(s.HY.from(t),0,0));e&&n.setSelection(o.Bs.create(n.doc,e.anchor,e.head)),this.prosemirrorView.dispatch(n.setMeta(i.Gt,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(e,t,n){let r=this.doc;e||(e=m.CO(this.doc)),(e instanceof Uint8Array||t instanceof Uint8Array)&&(e instanceof Uint8Array&&t instanceof Uint8Array||f.zR(),r=new m.QW({gc:!1}),m.cp(r,t),t=m.CO(r),m.cp(r,e),e=m.CO(r)),this.mapping.clear(),this.mux(()=>{r.transact(r=>{let o=n.permanentUserData;
1o&&o.dss.forEach(e=>{m.UQ(r,e,e=>{})});let l=(e,t)=>{let r="added"===e?o.getUserByClientId(t.client):o.getUserByDeletedId(t);return{user:r,type:e,color:C(n.colorMapping,n.colors,r)}},a=m.ud(this.type,new m.aC(t.ds,e.sv)).map(n=>!n._item.deleted||x(n._item,e)||x(n._item,t)?R(n,this.prosemirrorView.state.schema,new Map,e,t,l):null).filter(e=>null!==e),c=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new s.p2(s.HY.from(a),0,0));this.prosemirrorView.dispatch(c.setMeta(i.Gt,{isChangeOrigin:!0}))},i.Gt)})}_typeChanged(e,t){if(null==this.prosemirrorView)return;let n=i.Gt.getState(this.prosemirrorView.state);if(0===e.length||null!=n.snapshot||null!=n.prevSnapshot){this.renderSnapshot(n.snapshot,n.prevSnapshot);return}this.mux(()=>{let e=(e,t)=>this.mapping.delete(t);m.UQ(t,t.deleteSet,e=>{if(e.constructor===m.ck){let t=e.content.type;t&&this.mapping.delete(t)}}),t.changed.forEach(e),t.changedParentTypes.forEach(e);let n=this.type.toArray().map(e=>j(e,this.prosemirrorView.state.schema,this.mapping)).filter(e=>null!==e),r=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new s.p2(s.HY.from(n),0,0));M(r,this.beforeTransactionSelection,this),r=r.setMeta(i.Gt,{isChangeOrigin:!0,isUndoRedoOperation:t.origin instanceof m.H6}),null!==this.beforeTransactionSelection&&this._isLocalCursorInView()&&r.scrollIntoView(),this.prosemirrorView.dispatch(r)})}_prosemirrorChanged(e){this.doc.transact(()=>{U(this.doc,this.type,e,this.mapping),this.beforeTransactionSelection=E(this,this.prosemirrorView.state)},i.Gt)}initView(e){null!=this.prosemirrorView&&this.destroy(),this.prosemirrorView=e,this.doc.on("beforeAllTransactions",this.beforeAllTransactions),this.doc.on("afterAllTransactions",this.afterAllTransactions),this.type.observeDeep(this._observeFunction)}destroy(){null!=this.prosemirrorView&&(this.prosemirrorView=null,this.type.unobserveDeep(this._observeFunction),this.doc.off("beforeAllTransactions",this.beforeAllTransactions),this.doc.off("afterAllTransactions",this.afterAllTransactions))}}let j=(e,t,n,r,o,i)=>{let l=n.get(e);if(void 0===l){if(e instanceof m.lt)return R(e,t,n,r,o,i);throw f.Nw()}return l},R=(e,t,n,r,o,l)=>{let s=[],a=e=>{if(e.constructor===m.lt){let i=j(e,t,n,r,o,l);null!==i&&s.push(i)}else{let i=e._item.right?.content.type;i instanceof m.xv&&!i._item.deleted&&i._item.id.client===i.doc.clientID&&(e.applyDelta([{retain:e.length},...i.toDelta()]),i.doc.transact(e=>{i._item.delete(e)}));let a=A(e,t,n,r,o,l);null!==a&&a.forEach(e=>{null!==e&&s.push(e)})}};void 0===r||void 0===o?e.toArray().forEach(a):m.ud(e,new m.aC(o.ds,r.sv)).forEac
1h(a);try{let i=e.getAttributes(r);void 0===r||(x(e._item,r)?x(e._item,o)||(i.ychange=l?l("added",e._item.id):{type:"added"}):i.ychange=l?l("removed",e._item.id):{type:"removed"});let a=t.node(e.nodeName,i,s);return n.set(e,a),a}catch(t){return e.doc.transact(t=>{e._item.delete(t)},i.Gt),n.delete(e),null}},A=(e,t,n,r,o,l)=>{let s=[],a=e.toDelta(r,o,l);try{for(let e=0;e<a.length;e++){let n=a[e],r=[];for(let e in n.attributes)r.push(t.mark(e,n.attributes[e]));s.push(t.text(n.insert,r))}}catch(t){return e.doc.transact(t=>{e._item.delete(t)},i.Gt),null}return s},N=(e,t)=>{let n=new m.eI,r=e.map(e=>({insert:e.text,attributes:$(e.marks)}));return n.applyDelta(r),t.set(n,e),n},O=(e,t)=>{let n=new m.lt(e.type.name);for(let t in e.attrs){let r=e.attrs[t];null!==r&&"ychange"!==t&&n.setAttribute(t,r)}return n.insert(0,_(e).map(e=>H(e,t))),t.set(n,e),n},H=(e,t)=>e instanceof Array?N(e,t):O(e,t),L=e=>"object"==typeof e&&null!==e,I=(e,t)=>{let n=Object.keys(e).filter(t=>null!==e[t]),r=n.length===Object.keys(t).filter(e=>null!==t[e]).length;for(let o=0;o<n.length&&r;o++){let i=n[o],l=e[i],s=t[i];r="ychange"===i||l===s||L(l)&&L(s)&&I(l,s)}return r},_=e=>{let t=e.content.content,n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r.isText){let r=[];for(let n=t[e];e<t.length&&n.isText;n=t[++e])r.push(n);e--,n.push(r)}else n.push(r)}return n},P=(e,t)=>{let n=e.toDelta();return n.length===t.length&&n.every((e,n)=>e.insert===t[n].text&&c.XP(e.attributes||{}).length===t[n].marks.length&&t[n].marks.every(t=>I(e.attributes[t.type.name]||{},t.attrs)))},D=(e,t)=>{if(e instanceof m.lt&&!(t instanceof Array)&&W(e,t)){let n=_(t);return e._length===n.length&&I(e.getAttributes(),t.attrs)&&e.toArray().every((e,t)=>D(e,n[t]))}return e instanceof m.eI&&t instanceof Array&&P(e,t)},z=(e,t)=>e===t||e instanceof Array&&t instanceof Array&&e.length===t.length&&e.every((e,n)=>t[n]===e),V=(e,t,n)=>{let r=e.toArray(),o=_(t),i=o.length,l=r.length,s=a.VV(l,i),c=0,u=0,d=!1;for(;c<s;c++){let e=r[c],t=o[c];if(z(n.get(e),t))d=!0;else if(!D(e,t))break}for(;c+u<s;u++){let e=r[l-u-1],t=o[i-u-1];if(z(n.get(e),t))d=!0;else if(!D(e,t))break}return{equalityFactor:c+u,foundMappedChild:d}},F=e=>{let t="",n=e._start,r={};for(;null!==n;)!n.deleted&&(n.countable&&n.content instanceof m.$_?t+=n.content.str:n.content instanceof m.MM&&(r[n.content.key]=null)),n=n.right;return{str:t,nAttrs:r}},B=(e,t,n)=>{n.set(e,t);let{nAttrs:r,str:o}=F(e),i=t.map(e=>({insert:e.text,attributes:Object.assign({},r,$(e.marks))})),{insert:l,remove:s,index:a}=h(o,i.map(e=>e.insert).join(""));e.delete(a,s),e.insert(a,l),e.applyDelta(i.map(e=>({retain:e.insert.length,attributes:e.attributes})))},$=e=>{let t={};return e.forEach(e=>{"ychange"!==e.type.name&&(t[e.type.name]=e.attrs)}),t},U=(e,t,n,r)=>{if(t instanceof m.lt&&t.nodeName!==n.type.name)throw Error("node name mismatch!");if(r.set(t,n),t instanceof m.lt){let e=t.getAttributes(),r=n.attrs;for(let n in r)null!==r[n]?e[n]!==r[n]&&"ychange"!==n&&t.setAttribute(n,r[n]):t.removeAttribute(n);for(let n in e)void 0===r[n]&&t.removeAttribute(n)}let o=_(n),l=o.length,s=t.toArray(),c=s.length,u=a.VV(l,c),d=0,p=0;for(;d<u;d++){let e=s[d],t=o[d];if(!z(r.get(e),t)){if(D(e,t))r.set(e,t);else break}}for(;p+d+1<u;p++){let e=s[c-p-1],t=o[l-p-1];if(!z(r.get(e),t)){if(D(e,t))r.set(e,t);else break}}e.transact(()=>{for(;c-d-p>0&&l-d-p>0;){let n=s[d],i=o[d],a=s[c-p-1],u=o[l-p-1];if(n instanceof m.eI&&i instanceof Array)P(n,i)||B(n,i,r),d+=1;else{let o=n instanceof m.lt&&W(n,i),l=a instanceof m.lt&&W(a,u);if(o&&l){let e=V(n,i,r),t=V(a,u,r);e.foundMappedChild&&!t.foundMappedChild?l=!1:!e.foundMappedChild&&t.foundMappedChild?o=!1:e.equalityFactor<t.equalityFactor?o=!1:l=!1}o?(U(e,n,i,r),d+=1):l?(U(e,a,u,r),p+=1):(r.delete(t.get(d)),t.delete(d,1),t.insert(d,[H(i,r)]),d+=1)}}let n=c-d-p;if(1===c&&0===l&&s[0]instanceof m.eI?(r.delete(s[0]),s[0].delete(0,s[0].length)):n>
10&&(t.slice(d,d+n).forEach(e=>r.delete(e)),t.delete(d,n)),d+p<l){let e=[];for(let t=d;t<l-p;t++)e.push(H(o[t],r));t.insert(d,e)}},i.Gt)},W=(e,t)=>!(t instanceof Array)&&e.nodeName===t.type.name,G=e=>{let t=i.Gk.getState(e).undoManager;if(null!=t)return t.undo(),!0},Y=e=>{let t=i.Gk.getState(e).undoManager;if(null!=t)return t.redo(),!0},Z=new Set(["paragraph"]),J=(e,t)=>!(e instanceof m.ck)||!(e.content instanceof m.zc)||!(e.content.type instanceof m.xv||e.content.type instanceof m.lt&&t.has(e.content.type.nodeName))||0===e.content.type._length,q=({protectedNodes:e=Z,trackedOrigins:t=[],undoManager:n=null}={})=>new o.Sy({key:i.Gk,state:{init:(r,o)=>{let l=i.Gt.getState(o),s=n||new m.H6(l.type,{trackedOrigins:new Set([i.Gt].concat(t)),deleteFilter:t=>J(t,e),captureTransaction:e=>!1!==e.meta.get("addToHistory")});return{undoManager:s,prevSel:null,hasUndoOps:s.undoStack.length>0,hasRedoOps:s.redoStack.length>0}},apply:(e,t,n,r)=>{let o=i.Gt.getState(r).binding,l=t.undoManager,s=l.undoStack.length>0,a=l.redoStack.length>0;return o?{undoManager:l,prevSel:E(o,n),hasUndoOps:s,hasRedoOps:a}:s!==t.hasUndoOps||a!==t.hasRedoOps?Object.assign({},t,{hasUndoOps:l.undoStack.length>0,hasRedoOps:l.redoStack.length>0}):t}},view:e=>{let t=i.Gt.getState(e.state),n=i.Gk.getState(e.state).undoManager;return n.on("stack-item-added",({stackItem:n})=>{let r=t.binding;r&&n.meta.set(r,i.Gk.getState(e.state).prevSel)}),n.on("stack-item-popped",({stackItem:e})=>{let n=t.binding;n&&(n.beforeTransactionSelection=e.meta.get(n)||n.beforeTransactionSelection)}),{destroy:()=>{n.destroy()}}}}),K=r.hj.create({name:"collaboration",priority:1e3,addOptions:()=>({document:null,field:"default",fragment:null}),addStorage:()=>({isDisabled:!1}),onCreate(){this.editor.extensionManager.extensions.find(e=>"history"===e.name)&&console.warn('[tiptap warn]: "@tiptap/extension-collaboration" comes with its own history support and is not compatible with "@tiptap/extension-history".')},addCommands:()=>({undo:()=>({tr:e,state:t,dispatch:n})=>(e.setMeta("preventDispatch",!0),0!==i.Gk.getState(t).undoManager.undoStack.length&&(!n||G(t))),redo:()=>({tr:e,state:t,dispatch:n})=>(e.setMeta("preventDispatch",!0),0!==i.Gk.getState(t).undoManager.redoStack.length&&(!n||Y(t)))}),addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo()}},addProseMirrorPlugins(){var e;let t=this.options.fragment?this.options.fragment:this.options.document.getXmlFragment(this.options.field),n=q(this.options.yUndoOptions),r=n.spec.view;n.spec.view=e=>{let{undoManager:t}=i.Gk.getState(e.state);t.restore&&(t.restore(),t.restore=()=>{});let n=r?r(e):void 0;return{destroy:()=>{let e=t.trackedOrigins.has(t),r=t._observers;t.restore=()=>{e&&t.trackedOrigins.add(t),t.doc.on("afterTransaction",t.afterTransactionHandler),t._observers=r},(null==n?void 0:n.destroy)&&n.destroy()}}};let l=S(t,{...this.options.ySyncOptions,onFirstRender:this.options.onFirstRender});return this.editor.options.enableContentCheck&&(null===(e=t.doc)||void 0===e||e.on("beforeTransaction",()=>{try{let e=(0,g.wE)(t);if(0===e.content.length)return;this.editor.schema.nodeFromJSON(e).check()}catch(e){return this.editor.emit("contentError",{error:e,editor:this.editor,disableCollaboration:()=>{var e;null===(e=t.doc)||void 0===e||e.destroy(),this.storage.isDisabled=!0}}),!1}})),[l,n,this.editor.options.enableContentCheck&&new o.Sy({key:new o.H$("filterInvalidContent"),filterTransaction:()=>{var e;return this.storage.isDisabled&&(null===(e=t.doc)||void 0===e||e.destroy()),!0}})].filter(Boolean)}})},4e3:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var r=n(94725),o=n(17213),i=n(94536);class l{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=t.width)&&void 0!==n?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}
1destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,o;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),i=e?r.bottom:r.top;e&&t&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),o={left:r.left,right:r.right,top:i-this.width/2,bottom:i+this.width/2}}}}if(!o){let e=this.editorView.coordsAtPos(this.cursorPos);o={left:e.left-this.width/2,right:e.left+this.width/2,top:e.top,bottom:e.bottom}}let i=this.editorView.dom.offsetParent;if(!this.element&&(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),i&&(i!=document.body||"static"!=getComputedStyle(i).position)){let n=i.getBoundingClientRect();e=n.left-i.scrollLeft,t=n.top-i.scrollTop}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=o.left-e+"px",this.element.style.top=o.top-t+"px",this.element.style.width=o.right-o.left+"px",this.element.style.height=o.bottom-o.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t,e):r;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,i.nj)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}let s=r.hj.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(e={}){return new o.Sy({view:t=>new l(t,e)})}(this.options)]}})},12147:function(e,t,n){"use strict";n.d(t,{f:function(){return m}});
1var r=n(94725),o=n(10258),i=n(17213),l=n(10121),s=n(97528);class a extends i.Y1{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return a.valid(n)?new a(n):i.Y1.near(n)}content(){return l.p2.empty}eq(e){return e instanceof a&&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 a(e.resolve(t.pos))}getBookmark(){return new c(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!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||e.isAtom||e.type.spec.isolating)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||e.isAtom||e.type.spec.isolating)return!0;if(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&&a.valid(e))return e;let r=e.pos,o=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){o=i.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(a.valid(l))return l}for(;;){let l=t>0?o.firstChild:o.lastChild;if(!l){if(o.isAtom&&!o.isText&&!i.qv.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue e}break}o=l,r+=t;let s=e.doc.resolve(r);if(a.valid(s))return s}return null}}}a.prototype.visible=!1,a.findFrom=a.findGapCursorFrom,i.Y1.jsonID("gapcursor",a);class c{constructor(e){this.pos=e}map(e){return new c(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return a.valid(t)?new a(t):i.Y1.near(t)}}let u=(0,o.$)({ArrowLeft:d("horiz",-1),ArrowRight:d("horiz",1),ArrowUp:d("vert",-1),ArrowDown:d("vert",1)});function d(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){let l=e.selection,s=t>0?l.$to:l.$from,c=l.empty;if(l instanceof i.Bs){if(!o.endOfTextblock(n)||0==s.depth)return!1;c=!1,s=e.doc.resolve(t>0?s.after():s.before())}let u=a.findGapCursorFrom(s,t,c);return!!u&&(r&&r(e.tr.setSelection(new a(u))),!0)}}function p(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!a.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&i.qv.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new a(r))),!0)}function h(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof a))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=l.HY.empty;for(let e=r.length-1;e>=0;e--)o=l.HY.from(r[e].createAndFill(null,o));let s=e.state.tr.replace(n.pos,n.pos,new l.p2(o,0,0));return s.setSelection(i.Bs.near(s.doc.resolve(n.pos+1))),e.dispatch(s),!1}function f(e){if(!(e.selection instanceof a))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",s.EH.create(e.doc,[s.p.widget(e.selection.head,t,{key:"gapcursor"})])}let m=r.hj.create({name:"gapCursor",addProseMirrorPlugins:()=>[new i.Sy({props:{decorations:f,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&a.valid(n)?new a(n):null,handleClick:p,handleKeyDown:u,handleDOMEvents:{beforeinput
1:h}}})],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!==(t=(0,r.nU)((0,r.Nl)(e,"allowGapCursor",n)))&&void 0!==t?t:null}}})},10105:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var r=n(94725);let o=r.NB.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.P1)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:o}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:i}=this.options,{splittableMarks:l}=r.extensionManager,s=o||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&s&&i){let t=s.filter(e=>l.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})},66563:function(e,t,n){"use strict";n.d(t,{A:function(){return C}});var r=n(94725),o=function(){};o.prototype.append=function(e){return e.length?(e=o.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},o.prototype.prepend=function(e){return e.length?o.from(e).append(this):this},o.prototype.appendInner=function(e){return new l(this,e)},o.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?o.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},o.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},o.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},o.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},o.from=function(e){return e instanceof o?e:e&&e.length?new i(e):o.empty};var i=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(o);o.empty=new i([]);var l=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;if(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r)||n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;if(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o)||n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(o),s=n(94536),a=n(17213);class c{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,o,i;if(0==this.eventCount)return null;let l=this.items.length;for(;;l--)if(this.items.get(l-1).selection){--l;break}t&&(r=(n=this.remapping(l,this.items.length)).maps.length);let s=e.tr,a=[],d=[];
1return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(l,t+1)).maps.length),r--,d.push(e);return}if(n){d.push(new u(e.map));let t=e.step.map(n.slice(r)),o;t&&s.maybeStep(t).doc&&(o=s.mapping.maps[s.mapping.maps.length-1],a.push(new u(o,void 0,void 0,a.length+d.length))),r--,o&&n.appendMap(o,r)}else s.maybeStep(e.step);if(e.selection)return o=n?e.selection.map(n.slice(r)):e.selection,i=new c(this.items.slice(0,l).append(d.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:i,transform:s,selection:o}}addTransform(e,t,n,r){var o,i;let l,s=[],a=this.eventCount,d=this.items,h=!r&&d.length?d.get(d.length-1):null;for(let n=0;n<e.steps.length;n++){let o=e.steps[n].invert(e.docs[n]),i=new u(e.mapping.maps[n],o,t),l;(l=h&&h.merge(i))&&(i=l,n?s.pop():d=d.slice(0,d.length-1)),s.push(i),t&&(a++,t=void 0),r||(h=i)}let f=a-n.depth;return f>p&&(o=d,i=f,o.forEach((e,t)=>{if(e.selection&&0==i--)return l=t,!1}),d=o.slice(l),a-=f),new c(d.append(s),a)}remapping(e,t){let n=new s.vs;return this.items.forEach((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)},e,t),n}addMaps(e){return 0==this.eventCount?this:new c(this.items.append(e.map(e=>new u(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,l=this.eventCount;this.items.forEach(e=>{e.selection&&l--},r);let s=t;this.items.forEach(t=>{let r=o.getMirror(--s);if(null==r)return;i=Math.min(i,r);let a=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(s+1,r));c&&l++,n.push(new u(a,i,c))}else n.push(new u(a))},r);let a=[];for(let e=t;e<i;e++)a.push(new u(o.maps[e]));let d=new c(this.items.slice(0,r).append(a).append(n),l);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((o,l)=>{if(l>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),l=e&&e.getMap();if(n--,l&&t.appendMap(l,n),e){let s=o.selection&&o.selection.map(t.slice(n));s&&i++;let a=new u(l.invert(),e,s),c,d=r.length-1;(c=r.length&&r[d].merge(a))?r[d]=c:r.push(a)}}else o.map&&n--},this.items.length,0),new c(o.from(r.reverse()),i)}}c.empty=new c(o.empty,0);class u{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new u(t.getMap().invert(),t,this.selection)}}}class d{constructor(e,t,n,r,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}let p=20;function h(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,o)=>t.push(r,o));return t}function f(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}let m=!1,g=null;function y(e){let t=e.plugins;if(g!=t){m=!1,g=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){m=!0;break}}return m}let v=new a.H$("history"),b=new a.H$("closeHistory");function w(e,t){return(n,r)=>{let o=v.getState(n);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(r){let i=function(e,t,n){let r=y(t),o=v.get(t).spec.config,i=(n?e.undone:e.done).popEvent(t,r);if(!i)return null;let l=i.selection.resolve(i.transform.doc),s=(n?e.done:e.undone).addTransform(i.transform,t.selection.getBookmark(),o,r),a=new d(n?s:i.remaining,n?i.remaining:s,null,0,-1);return i.transform.setSelection(l).setMeta(v,{redo:n,historyState:a})}(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}let x=w(!1,!0),k=w(!0,!0);w(!1,!1),w(!0,!1);let C=r.hj.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>x(e,t),redo:()=>({state:e,dispatch:t})=>k(e,t)}),addProseMirrorPlugins(){return[function(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new a.Sy({key:v,state:{init:()=>new d(c.empty,c.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let o=n.getMeta(v),i;if(o)return o.historyState;n.getMeta(b)&&(e=new d(e.done,e.undone,null,0,-1));let l=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(l&&l.getMeta(v))return l.getMeta(v).redo?new d(e.done.addTransform(n,void 0,r,y(t)),e.undone,h(n.mapping.maps),e.prevTime,e.prevComposition):new d(e.done,e.undone.addTransform(n,void 0,r,y(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||l&&!1===l.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new d(e.done.rebased(n,i),e.undone.rebased(n,i),f(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new d(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),f(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let o=n.getMeta("composition"),i=0==e.prevTime||!l&&e.prevComposition!=o&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;
1return e.mapping.maps[0].forEach((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)}),n}(n,e.prevRanges)),s=l?f(e.prevRanges,n.mapping):h(n.mapping.maps);return new d(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,y(t)),c.empty,s,n.time,null==o?e.prevComposition:o)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?x:"historyRedo"==n?k:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},68096:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a}});var r=n(94725);let o=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,i=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,l=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,s=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,a=r.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,r.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)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}}
1,addInputRules(){return[(0,r.Cf)({find:o,type:this.type}),(0,r.Cf)({find:l,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:i,type:this.type}),(0,r.K9)({find:s,type:this.type})]}})},42680:function(e,t,n){"use strict";n.d(t,{rU:function(){return ez}});var r=n(94725);let o=(e,t)=>{for(let n in t)e[n]=t[n];return e},i="numeric",l="ascii",s="alpha",a="asciinumeric",c="alphanumeric",u="domain",d="emoji",p="whitespace";function h(e,t,n){for(let r in t[i]&&(t[a]=!0,t[c]=!0),t[l]&&(t[a]=!0,t[s]=!0),t[a]&&(t[c]=!0),t[s]&&(t[c]=!0),t[c]&&(t[u]=!0),t[d]&&(t[u]=!0),t){let t=(r in n||(n[r]=[]),n[r]);0>t.indexOf(e)&&t.push(e)}}function f(e){void 0===e&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}f.groups={},f.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){return void 0===t&&(t=!1),t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let o=0;o<e.length;o++)this.tt(e[o],t,n,r)},tr(e,t,n,r){let o;return r=r||f.groups,t&&t.j?o=t:(o=new f(t),n&&r&&h(t,n,r)),this.jr.push([e,o]),o},ts(e,t,n,r){let o=this,i=e.length;if(!i)return o;for(let t=0;t<i-1;t++)o=o.tt(e[t]);return o.tt(e[i-1],t,n,r)},tt(e,t,n,r){if(r=r||f.groups,t&&t.j)return this.j[e]=t,t;let i,l=this.go(e);return l?(o((i=new f).j,l.j),i.jr.push.apply(i.jr,l.jr),i.jd=l.jd,i.t=l.t):i=new f,t&&(r&&(i.t&&"string"==typeof i.t?h(t,o(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&&h(t,n,r)),i.t=t),this.j[e]=i,i}};let m=(e,t,n,r,o)=>e.ta(t,n,r,o),g=(e,t,n,r,o)=>e.tr(t,n,r,o),y=(e,t,n,r,o)=>e.ts(t,n,r,o),v=(e,t,n,r,o)=>e.tt(t,n,r,o),b="WORD",w="UWORD",x="LOCALHOST",k="UTLD",C="SCHEME",S="SLASH_SCHEME",M="OPENBRACE",E="CLOSEBRACE",T="OPENBRACKET",j="CLOSEBRACKET",R="OPENPAREN",A="CLOSEPAREN",N="OPENANGLEBRACKET",O="CLOSEANGLEBRACKET",H="FULLWIDTHLEFTPAREN",L="FULLWIDTHRIGHTPAREN",I="LEFTCORNERBRACKET",_="RIGHTCORNERBRACKET",P="LEFTWHITECORNERBRACKET",D="RIGHTWHITECORNERBRACKET",z="FULLWIDTHLESSTHAN",V="FULLWIDTHGREATERTHAN",F="AMPERSAND",B="APOSTROPHE",$="ASTERISK",U="BACKSLASH",W="BACKTICK",G="CARET",Y="COLON",Z="COMMA",J="DOLLAR",q="EQUALS",K="EXCLAMATION",X="HYPHEN",Q="PERCENT",ee="PIPE",et="PLUS",en="POUND",er="QUERY",eo="QUOTE",ei="SEMI",el="SLASH",es="TILDE",ea="UNDERSCORE",ec="EMOJI";var eu=Object.freeze({__proto__:null,WORD:b,UWORD:w,LOCALHOST:x,TLD:"TLD",UTLD:k,SCHEME:C,SLASH_SCHEME:S,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:M,CLOSEBRACE:E,OPENBRACKET:T,CLOSEBRACKET:j,OPENPAREN:R,CLOSEPAREN:A,OPENANGLEBRACKET:N,CLOSEANGLEBRACKET:O,FULLWIDTHLEFTPAREN:H,FULLWIDTHRIGHTPAREN:L,LEFTCORNERBRACKET:I,RIGHTCORNERBRACKET:_,LEFTWHITECORNERBRACKET:P,RIGHTWHITECORNERBRACKET:D,FULLWIDTHLESSTHAN:z,FULLWIDTHGREATERTHAN:V,AMPERSAND:F,APOSTROPHE:B,ASTERISK:$,AT:"AT",BACKSLASH:U,BACKTICK:W,CARET:G,COLON:Y,COMMA:Z,DOLLAR:J,DOT:"DOT",EQUALS:q,EXCLAMATION:K,HYPHEN:X,PERCENT:Q,PIPE:ee,PLUS:et,POUND:en,QUERY:er,QUOTE:eo,SEMI:ei,SLASH:el,TILDE:es,UNDERSCORE:ea,EMOJI:ec,SYM:"SYM"});let ed=/[a-z]/,ep=/\p{L}/u,eh=/\p{Emoji}/u,ef=/\d/,em=/\s/,eg=null,ey=null;function ev(e,t,n,r,o){let i;let l=t.length;for(let n=0;n<l-1;n++){let l=t[n];e.j[l]?i=e.j[l]:((i=new f(r)).jr=o.slice(),e.j[l]=i),e=i}return(i=new f(n)).jr=o.slice(),e.j[t[l-1]]=i,i}function eb(e){let t=[],n=[],r=0;for(;r<e.length;){let o=0;for(;"0123456789".indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+o),10);t>0;t--)n.pop();r+=o}else n.push(e[r]),r++}return t}let ew={defaultProtocol:"http",events:null,format:ek,formatHref:ek,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ex(e,t){void 0===t&&(t=null);let n=o({},ew);e&&(n=o(n,e instanceof ex?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 ek(e){return e}function eC(e,t){this.t="token",this.v=e,this.tk=t}function eS(e,t){class n extends eC{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}ex.prototype={o:ew,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,o=this.o[e];return o&&("object"==typeof o?"function"==typeof(o=n.t in o?o[n.t]:ew[e])&&r&&(
1o=o(t,n)):"function"==typeof o&&r&&(o=o(t,n.t,n))),o},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)}},eC.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){return void 0===e&&(e=ew.defaultProtocol),{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),l={},s=e.get("className",t,this),a=e.get("target",t,this),c=e.get("rel",t,this),u=e.getObj("attributes",t,this),d=e.getObj("events",t,this);return l.href=n,s&&(l.class=s),a&&(l.target=a),c&&(l.rel=c),u&&o(l,u),{tagName:r,attributes:l,content:i,eventListeners:d}}};let eM=eS("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eE=eS("text"),eT=eS("nl"),ej=eS("url",{isLink:!0,toHref(e){return void 0===e&&(e=ew.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==x&&e[1].t===Y}}),eR=e=>new f(e);function eA(e,t,n){let r=n[0].s,o=n[n.length-1].e;return new e(t.slice(r,o),n)}let eN="undefined"!=typeof console&&console&&console.warn||(()=>{}),eO={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function eH(e,t){if(void 0===t&&(t=!1),eO.initialized&&eN(`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.
21. Must only contain digits, lowercase ASCII letters or "-"
32. Cannot start or end with "-"
43. "-" cannot repeat`);eO.customSchemes.push([e,t])}function eL(e){return eO.initialized||function(){eO.scanner=function(e){void 0===e&&(e=[]);let t={};f.groups=t;let n=new f;null==eg&&(eg=eb("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
4ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==ey&&(ey=eb("ελ1υ2бг1ел3дети4ею2католик6ом3мÐ
4ºÐ´2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3Õ°Õ¡Õµ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1ì»´2삼성2한국2")),v(n,"'",B),v(n,"{",M),v(n,"}",E),v(n,"[",T),v(n,"]",j),v(n,"(",R),v(n,")",A),v(n,"<",N),v(n,">",O),v(n,"(",H),v(n,")",L),v(n,"「",I),v(n,"」",_),v(n,"『",P),v(n,"』",D),v(n,"<",z),v(n,">",V),v(n,"&",F),v(n,"*",$),v(n,"@","AT"),v(n,"`",W),v(n,"^",G),v(n,":",Y),v(n,",",Z),v(n,"$",J),v(n,".","DOT"),v(n,"=",q),v(n,"!",K),v(n,"-",X),v(n,"%",Q),v(n,"|",ee),v(n,"+",et),v(n,"#",en),v(n,"?",er),v(n,'"',eo),v(n,"/",el),v(n,";",ei),v(n,"~",es),v(n,"_",ea),v(n,"\\",U);let r=g(n,ef,"NUM",{[i]:!0});g(r,ef,r);let c=g(n,ed,b,{[l]:!0});g(c,ed,c);let m=g(n,ep,w,{[s]:!0});g(m,ed),g(m,ep,m);let ew=g(n,em,"WS",{[p]:!0});v(n,"\n","NL",{[p]:!0}),v(ew,"\n"),g(ew,em,ew);let ex=g(n,eh,ec,{[d]:!0});g(ex,eh,ex),v(ex,"️",ex),g(v(ex,"‍"),eh,ex);let ek=[[ed,c]],eC=[[ed,null],[ep,m]];for(let e=0;e<eg.length;e++)ev(n,eg[e],"TLD",b,ek);for(let e=0;e<ey.length;e++)ev(n,ey[e],k,w,eC);h("TLD",{tld:!0,ascii:!0},t),h(k,{utld:!0,alpha:!0},t),ev(n,"file",C,b,ek),ev(n,"mailto",C,b,ek),ev(n,"http",S,b,ek),ev(n,"https",S,b,ek),ev(n,"ftp",S,b,ek),ev(n,"ftps",S,b,ek),h(C,{scheme:!0,ascii:!0},t),h(S,{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],o=e[t][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?o[u]=!0:ed.test(r)?ef.test(r)?o[a]=!0:o[l]=!0:o[i]=!0,y(n,r,r,o)}return y(n,"localhost",x,{ascii:!0}),n.jd=new f("SYM"),{start:n,tokens:o({groups:t},eu)}}(eO.customSchemes);for(let e=0;e<eO.tokenQueue.length;e++)eO.tokenQueue[e][1]({scanner:eO.scanner});eO.parser=function(e){let{groups:t}=e,n=t.domain.concat([F,$,"AT",U,W,G,J,q,X,"NUM",Q,ee,et,en,el,"SYM",es,ea]),r=[B,Y,Z,"DOT",K,er,eo,ei,N,O,M,E,j,T,R,A,H,L,I,_,P,D,z,V],o=[F,B,$,U,W,G,J,q,X,M,E,Q,ee,et,en,er,el,"SYM",es,ea],i=eR(),l=v(i,es);m(l,o,l),m(l,t.domain,l);let s=eR(),a=eR(),c=eR();m(i,t.domain,s),m(i,t.scheme,a),m(i,t.slashscheme,c),m(s,o,l),m(s,t.domain,s);let u=v(s,"AT");v(l,"AT",u),v(a,"AT",u),v(c,"AT",u);let d=v(l,"DOT");m(d,o,l),m(d,t.domain,l);let p=eR();m(u,t.domain,p),m(p,t.domain,p);let h=v(p,"DOT");m(h,t.domain,p);let f=eR(eM);m(h,t.tld,f),m(h,t.utld,f),v(u,x,f);let g=v(p,X);m(g,t.domain,p),m(f,t.domain,p),v(f,"DOT",h),v(f,X,g),m(v(f,Y),t.numeric,eM);let y=v(s,X),b=v(s,"DOT");m(y,t.domain,s),m(b,o,l),m(b,t.domain,s);let w=eR(ej);m(b,t.tld,w),m(b,t.utld,w),m(w,t.domain,s),m(w,o,l),v(w,"DOT",b),v(w,X,y),v(w,"AT",u);let k=v(w,Y),C=eR(ej);m(k,t.numeric,C);let S=eR(ej),ec=eR();m(S,n,S),m(S,r,ec),m(ec,n,S),m(ec,r,ec),v(w,el,S),v(C,el,S);let ed=v(a,Y),ep=v(c,Y),eh=v(ep,el),ef=v(eh,el);m(a,t.domain,s),v(a,"DOT",b),v(a,X,y),m(c,t.domain,s),v(c,"DOT",b),v(c,X,y),m(ed,t.domain,S),v(ed,el,S),m(ef,t.domain,S),m(ef,n,S),v(ef,el,S);let em=[[M,E],[T,j],[R,A],[N,O],[H,L],[I,_],[P,D],[z,V]];for(let e=0;e<em.length;e++){let[t,o]=em[e],i=v(S,t);v(ec,t,i),v(i,o,S);let l=eR(ej);m(i,n,l);let s=eR();m(i,r),m(l,n,l),m(l,r,s),m(s,n,l),m(s,r,s),v(l,o,S),v(s,o,S)}return v(i,x,w),v(i,"NL",eT),{start:i,tokens:eu}}(eO.scanner.tokens);for(let e=0;e<eO.pluginQueue.length;e++)eO.pluginQueue[e][1]({scanner:eO.scanner,parser:eO.parser});eO.initialized=!0}(),function(e,t,n){let r=n.length,o=0,i=[],l=[];for(;o<r;){let s=e,a=null,c=null,u=0,d=null,p=-1;for(;o<r&&!(a=s.go(n[o].t));)l.push(n[o++]);for(;o<r&&(c=a||s.go(n[o].t));)a=null,(s=c).accepts()?(p=0,d=s):p>=0&&p++,o++,u++;if(p<0)(o-=u)<r&&(l.push(n[o]),o++);else{l.length>0&&(i.push(eA(eE,t,l)),l=[]),o-=p,u-=p;let e=d.t,r=n.slice(o-u,o);i.push(eA(e,t,r))}}return l.length>0&&i.push(eA(eE,t,l)),i}(eO.parser.start,e,function(e,t){let n=function(e){let t=[],n=e.length,r=0;for(;r<n;){let o,i=e.charCodeAt(r),l=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>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,o=[],i=0,l=0;for(;l<r;){let s=e,a=null,c=0,u=null,d=-1,p=-1;for(;
4l<r&&(a=s.go(n[l]));)(s=a).accepts()?(d=0,p=0,u=s):d>=0&&(d+=n[l].length,p++),c+=n[l].length,i+=n[l].length,l++;i-=d,l-=p,c-=d,o.push({t:u.t,v:t.slice(i-c,i),s:i-c,e:i})}return o}(eO.scanner.start,e))}function eI(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new ex(n),o=eL(e),i=[];for(let e=0;e<o.length;e++){let n=o[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&i.push(n.toFormattedObject(r))}return i}var e_=n(17213);let eP=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function eD(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(eP,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}let ez=r.vc.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(e=>{if("string"==typeof e){eH(e);return}eH(e.scheme,e.optionalSlashes)})},onDestroy(){f.groups={},eO.scanner=null,eO.parser=null,eO.tokenQueue=[],eO.pluginQueue=[],eO.customSchemes=[],eO.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:e=>!!e}),addAttributes(){return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!(t&&eD(t,this.options.protocols))&&null}}]},renderHTML({HTMLAttributes:e}){return eD(e.href,this.options.protocols)?["a",(0,r.P1)(this.options.HTMLAttributes,e),0]:["a",(0,r.P1)(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.K9)({find:e=>{let t=[];if(e){let{validate:n}=this.options,r=eI(e).filter(e=>e.isLink&&n(e.value));r.length&&r.forEach(e=>t.push({text:e.value,data:{href:e.href},index:e.start}))}return t}
4,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 o=[];return this.options.autolink&&o.push((e={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate},new e_.Sy({key:new e_.H$("autolink"),appendTransaction:(t,n,o)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(o.doc),l=t.some(e=>e.getMeta("preventAutolink"));if(!i||l)return;let{tr:s}=o,a=(0,r.XP)(n.doc,[...t]);if((0,r.QC)(a).forEach(({newRange:t})=>{let n,i;let l=(0,r.b5)(o.doc,t,e=>e.isTextblock);if(l.length>1?(n=l[0],i=o.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ")):l.length&&o.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(n=l[0],i=o.doc.textBetween(n.pos,t.to,void 0," ")),n&&i){let t=i.split(" ").filter(e=>""!==e);if(t.length<=0)return!1;let l=t[t.length-1],a=n.pos+i.lastIndexOf(l);if(!l)return!1;let c=eL(l).map(t=>t.toObject(e.defaultProtocol));if(!(1===c.length?c[0].isLink:3===c.length&&!!c[1].isLink&&["()","[]"].includes(c[0].value+c[2].value)))return!1;c.filter(e=>e.isLink).map(e=>({...e,from:a+e.start+1,to:a+e.end+1})).filter(e=>!o.schema.marks.code||!o.doc.rangeHasMark(e.from,e.to,o.schema.marks.code)).filter(t=>e.validate(t.value)).forEach(t=>{(0,r.tI)(t.from,t.to,o.doc).some(t=>t.mark.type===e.type)||s.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),s.steps.length)return s}}))),!0===this.options.openOnClick&&o.push((t={type:this.type},new e_.Sy({key:new e_.H$("handleClickLink"),props:{handleClick:(e,n,o)=>{var i,l;if(0!==o.button||!e.editable)return!1;let s=o.target,a=[];for(;"DIV"!==s.nodeName;)a.push(s),s=s.parentNode;if(!a.find(e=>"A"===e.nodeName))return!1;let c=(0,r.u9)(e.state,t.type.name),u=o.target,d=null!==(i=null==u?void 0:u.href)&&void 0!==i?i:c.href,p=null!==(l=null==u?void 0:u.target)&&void 0!==l?l:c.target;return!!u&&!!d&&(window.open(d,p),!0)}}}))),this.options.linkOnPaste&&o.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type},new e_.Sy({key:new e_.H$("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{state:o}=e,{selection:i}=o,{empty:l}=i;if(l)return!1;let s="";r.content.forEach(e=>{s+=e.textContent});let a=eI(s,{defaultProtocol:n.defaultProtocol}).find(e=>e.isLink&&e.value===s);return!!s&&!!a&&(n.editor.commands.setMark(n.type,{href:a.href}),!0)}}}))),o}})},72673:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(94725);let o=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,i=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,l=r.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,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}}
4,addInputRules(){return[(0,r.Cf)({find:o,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:i,type:this.type})]}})},36750:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(94725);let o=r.NB.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},67966:function(e,t,n){"use strict";n.d(t,{x:function(){return o}});var r=n(94725);let o=r.NB.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},84110:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r=n(94725);let o=r.NB.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},95380:function(e,t,n){"use strict";n.d(t,{x:function(){return r}});let r=n(94725).NB.create({name:"text",group:"inline"})},78234:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(94725);let o=r.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,r.P1)(this.options.HTMLAttributes,e),0]},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()}}})},4087:function(e,t,n){"use strict";n.d(t,{Dp:function(){return i},G:function(){return l},Z$:function(){return r},kJ:function(){return s},s7:function(){return o}});let r=e=>e[e.length-1],o=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},i=Array.from,l=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1},s=Array.isArray},99333:function(e,t,n){"use strict";n.d(t,{$2:function(){return d},CY:function(){return i},Ko:function(){return l},Qn:function(){return o},RP:function(){return h},Tg:function(){return f},Vw:function(){return r},cq:function(){return s},jS:function(){return p},kr:function(){return u},rc:function(){return a},x1:function(){return c}});let r=1,o=2,i=4,l=8,s=32,a=64,c=128,u=31,d=63,p=127,h=2147483647,f=4294967295},1838:function(e,t,n){"use strict";n.d(t,{HN:function(){return f},UF:function(){return C},XW:function(){return k},dD:function(){return S},kj:function(){return m},l1:function(){return d},sO:function(){return M},v_:function(){return x},yg:function(){return g}});var r=n(99333),o=n(26802),i=n(47448),l=n(65129),s=n(68253);let a=s.Ue("Unexpected end of array"),c=s.Ue("Integer out of Range");class u{constructor(e){this.arr=e,this.pos=0}}let d=e=>new u(e),p=e=>e.pos!==e.arr.length,h=(e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},f=e=>h(e,g(e)),m=e=>e.arr[e.pos++],g=e=>{let t=0,n=1,o=e.arr.length;for(;e.pos<o;){let o=e.arr[e.pos++];if(t+=(o&r.jS)*n,n*=128,o<r.x1)return t;if(t>i.YM)throw c}throw a},y=e=>{let t=e.arr[e.pos++],n=t&r.$2,o=64,l=(t&r.rc)>0?-1:1;if((t&r.x1)==0)return l*n;let s=e.arr.length;for(;e.pos<s;){if(n+=((t=e.arr[e.pos++])&r.jS)*o,o*=128,t<r.x1)return l*n;if(n>i.YM)throw c}throw a},v=l.CO?e=>l.CO.decode(f(e)):e=>{let t=g(e);if(0===t)return"";{let n=String.fromCodePoint(m(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(m(e));else for(;t>0;){let r=t<1e4?t:1e4,o=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,o),t-=r}return decodeURIComponent(escape(n))}},b=(e,t)=>{let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},w=[e=>void 0,e=>null,y,e=>b(e,4).getFloat32(0,!1),e=>b(e,8).getFloat64(0,!1),e=>b(e,8).getBigInt64(0,!1),e=>!1,e=>!0,v,e=>{let t=g(e),n={};for(let r=0;r<t;r++)n[v(e)]=x(e);return n},e=>{let t=g(e),n=[];for(let r=0;r<t;r++)n.push(x(e));return n},f],x=e=>w[127-m(e)](e);class k extends u{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){return 0===this.count&&(this.s=this.reader(this),p(this)?this.count=g(this)+1:this.count=-1),this.count--,this.s}}class C extends u{constructor(e){super(e),this.s=0,this.count=0}read(){if(0===this.count){this.s=y(this);let e=o.GR(this.s);this.count=1,e&&(this.s=-this.s,this.count=g(this)+2)}return this.count--,this.s}}class S extends u{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(0===this.count){let e=y(this);this.diff=o.GW(e/2),this.count=1,1&e&&(this.count=g(this)+2)}return this.s+=this.diff,this.count--,this.s}}class M{constructor(e){this.decoder=new C(e),this.str=v(this.decoder),this.spos=0}read(){let e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}}},58062:function(e,t,n){"use strict";n.d(t,{JU:function(){return o},x0:function(){return i}});var r=n(97399);let o="undefined"!=typeof document?document:{};"undefined"!=typeof DOMParser&&new DOMParser;let i=e=>r.UI(e,(e,t)=>`${t}:${e};`).join("");o.ELEMENT_NODE,o.TEXT_NODE,o.CDATA_SECTION_NODE,o.COMMENT_NODE,o.DOCUMENT_NODE,o.DOCUMENT_TYPE_NODE,o.DOCUMENT_FRAGMENT_NODE},88029:function(e,t,n){"use strict";n.d(t,{$F:function(){return f},EM:function(){return j},GF:function(){return R},HE:function(){return N},HK:function(){return w},Mf:function(){return c},TS:function(){return L},_f:function(){return d},mP:function(){return x},sX:function(){return H},uE:function(){return m},uw:function(){return b}});var r=n(26802),o=n(47448),i=n(99333),l=n(65129),s=n(4087);class a{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}let c=()=>new a,u=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},d=e=>{let t=new Uint8Array(u(e)),n=0;for(let r=0;r<e.bufs.length;r++){let o=e.bufs[r];t.set(o,n),n+=o.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},p=(e,t)=>{let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(2*r.Fp(n,t)),e.cpos=0)},h=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},f=h,m=(e,t)=>
4{for(;t>i.jS;)h(e,i.x1|i.jS&t),t=r.GW(t/128);h(e,i.jS&t)},g=(e,t)=>{let n=r.GR(t);for(n&&(t=-t),h(e,(t>i.$2?i.x1:0)|(n?i.rc:0)|i.$2&t),t=r.GW(t/64);t>0;)h(e,(t>i.jS?i.x1:0)|i.jS&t),t=r.GW(t/128)},y=new Uint8Array(3e4),v=y.length/3,b=l.YZ&&l.YZ.encodeInto?(e,t)=>{if(t.length<v){let n=l.YZ.encodeInto(t,y).written||0;m(e,n);for(let t=0;t<n;t++)h(e,y[t])}else x(e,l.lz(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;m(e,r);for(let t=0;t<r;t++)h(e,n.codePointAt(t))},w=(e,t)=>{let n=e.cbuf.length,o=e.cpos,i=r.VV(n-o,t.length),l=t.length-i;e.cbuf.set(t.subarray(0,i),o),e.cpos+=i,l>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(r.Fp(2*n,l)),e.cbuf.set(t.subarray(i)),e.cpos=l)},x=(e,t)=>{m(e,t.byteLength),w(e,t)},k=(e,t)=>{p(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},C=(e,t)=>k(e,4).setFloat32(0,t,!1),S=(e,t)=>k(e,8).setFloat64(0,t,!1),M=(e,t)=>k(e,8).setBigInt64(0,t,!1),E=new DataView(new ArrayBuffer(4)),T=e=>(E.setFloat32(0,e),E.getFloat32(0)===e),j=(e,t)=>{switch(typeof t){case"string":h(e,119),b(e,t);break;case"number":o.U(t)&&r.Wn(t)<=i.RP?(h(e,125),g(e,t)):T(t)?(h(e,124),C(e,t)):(h(e,123),S(e,t));break;case"bigint":h(e,122),M(e,t);break;case"object":if(null===t)h(e,126);else if(s.kJ(t)){h(e,117),m(e,t.length);for(let n=0;n<t.length;n++)j(e,t[n])}else if(t instanceof Uint8Array)h(e,116),x(e,t);else{h(e,118);let n=Object.keys(t);m(e,n.length);for(let r=0;r<n.length;r++){let o=n[r];b(e,o),j(e,t[o])}}break;case"boolean":h(e,t?120:121);break;default:h(e,127)}};class R extends a{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&m(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}let A=e=>{e.count>0&&(g(e.encoder,1===e.count?e.s:-e.s),e.count>1&&m(e.encoder,e.count-2))};class N{constructor(){this.encoder=new a,this.s=0,this.count=0}write(e){this.s===e?this.count++:(A(this),this.count=1,this.s=e)}toUint8Array(){return A(this),d(this.encoder)}}let O=e=>{if(e.count>0){let t=2*e.diff+(1===e.count?0:1);g(e.encoder,t),e.count>1&&m(e.encoder,e.count-2)}};class H{constructor(){this.encoder=new a,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(O(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return O(this),d(this.encoder)}}class L{constructor(){this.sarr=[],this.s="",this.lensE=new N}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){let e=new a;return this.sarr.push(this.s),this.s="",b(e,this.sarr.join("")),w(e,this.lensE.toUint8Array()),d(e)}}},94200:function(e,t,n){"use strict";let r;n.d(t,{E0:function(){return y},jU:function(){return h},hH:function(){return b}});var o=n(97399),i=n(65129);let l=e=>void 0===e?null:e;class s{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}}let a=new s;try{"undefined"!=typeof localStorage&&localStorage&&(a=localStorage)}catch(e){}let c=a;var u=n(57853),d=n(40257);let p=void 0!==d&&d.release&&/node|io\.js/.test(d.release.name)&&"[object process]"===Object.prototype.toString.call(void 0!==d?d:0),h="undefined"!=typeof window&&"undefined"!=typeof document&&!p;"undefined"!=typeof navigator&&/Mac/.test(navigator.platform);let f=[],m=()=>{if(void 0===r){if(p){r=o.Ue();let e=d.argv,t=null;for(let n=0;n<e.length;n++){let o=e[n];"-"===o[0]?(null!==t&&r.set(t,""),t=o):null!==t?(r.set(t,o),t=null):f.push(o)}null!==t&&r.set(t,"")}else"object"==typeof location?(r=o.Ue(),(location.search||"?").slice(1).split("&").forEach(e=>{if(0!==e.length){let[t,n]=e.split("=");r.set(`--${i.NF(t,"-")}`,n),r.set(`-${i.NF(t,"-")}`,n)}})):r=o.Ue()}return r},g=e=>m().has(e),y=e=>p?l(d.env[e.toUpperCase().replaceAll("-","_")]):l(c.getItem(e)),v=e=>g("--"+e)||null!==y(e);v("production");let b=p&&u.gB(d.env.FORCE_COLOR,["true","1","2"])||!g("--no-colors")&&!v("no-color")&&(!p||d.stdout.isTTY)&&(!p||g("--color")||null!==y("COLORTERM")||(y("TERM")||"").includes("color"))},68253:function(e,t,n){"use strict";n.d(t,{Nw:function(){return o},Ue:function(){return r},zR:function(){return i}});let r=e=>Error(e),o=()=>{throw r("Method unimplemented")},i=()=>{throw r("Unexpected case")}},29926:function(e,t,n){"use strict";n.d(t,{Vs:function(){return i}});let r=e=>class{constructor(e){this._=e}destroy(){e(this._)}},o=r(clearTimeout),i=(e,t)=>new o(setTimeout(t,e));r(clearInterval),r(e=>"undefined"!=typeof requestAnimationFrame&&cancelAnimationFrame(e)),r(e=>"undefined"!=typeof cancelIdleCallback&&cancelIdleCallback(e))},57853:function(e,t,n){"use strict";n.d(t,{Hi:function(){return s},PP:function(){return i},gB:function(){return a}});var r=n(4087),o=n(95187);let i=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&i(e,t,n+1)}},l=(e,t)=>
4e===t,s=(e,t)=>{if(null==e||null==t)return l(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!s(e.get(n),t.get(n)))return!1;break;case Object:if(o.kE(e)!==o.kE(t))return!1;for(let n in e)if(!o.l$(e,n)||!s(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!s(e[n],t[n]))return!1;break;default:return!1}return!0},a=(e,t)=>t.includes(e);r.kJ},14093:function(e,t,n){"use strict";n.d(t,{BG:function(){return o},CA:function(){return i}});let r=e=>({[Symbol.iterator](){return this},next:e}),o=(e,t)=>r(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),i=(e,t)=>r(()=>{let{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}})},73189:function(e,t,n){"use strict";n.d(t,{Ej:function(){return s},Pl:function(){return i},ZA:function(){return c},s7:function(){return a},ud:function(){return p},Wd:function(){return d},hM:function(){return u},YW:function(){return l},WO:function(){return h},_X:function(){return f}});let r=Symbol;var o=n(53968);let i=r(),l=r(),s=r(),a=r(),c=r(),u=r(),d=r(),p=r(),h=r(),f=e=>{1===e.length&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=0;for(;r<e.length;r++){let n=e[r];if(void 0===n)break;if(n.constructor===String||n.constructor===Number)t.push(n);else if(n.constructor===Object)break}for(r>0&&n.push(t.join(""));r<e.length;r++){let t=e[r];t instanceof Symbol||n.push(t)}return n};o.ZG()},19622:function(e,t,n){"use strict";n.d(t,{S0:function(){return p},ZK:function(){return h}});var r=n(94200),o=n(28070);class i{constructor(e,t){this.left=e,this.right=t}}let l=(e,t)=>new i(e,t);var s=n(58062),a=n(97399),c=n(73189);let u={[c.Pl]:l("font-weight","bold"),[c.YW]:l("font-weight","normal"),[c.Ej]:l("color","blue"),[c.ZA]:l("color","green"),[c.s7]:l("color","grey"),[c.hM]:l("color","red"),[c.Wd]:l("color","purple"),[c.ud]:l("color","orange"),[c.WO]:l("color","black")},d=r.hH?e=>{1===e.length&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=a.Ue(),o=[],i=0;for(;i<e.length;i++){let o=e[i],l=u[o];if(void 0!==l)r.set(l.left,l.right);else{if(void 0===o)break;if(o.constructor===String||o.constructor===Number){let e=s.x0(r);i>0||e.length>0?(t.push("%c"+o),n.push(e)):t.push(o)}else break}}for(i>0&&(o=n).unshift(t.join(""));i<e.length;i++){let t=e[i];t instanceof Symbol||o.push(t)}return o}:c._X,p=(...e)=>{console.log(...d(e)),f.forEach(t=>t.print(e))},h=(...e)=>{console.warn(...d(e)),e.unshift(c.ud),f.forEach(t=>t.print(e))},f=o.Ue()},97399:function(e,t,n){"use strict";n.d(t,{JG:function(){return o},UI:function(){return l},Ue:function(){return r},Yj:function(){return s},Yu:function(){return i}});let r=()=>new Map,o=e=>{let t=r();return e.forEach((e,n)=>{t.set(n,e)}),t},i=(e,t,n)=>{let r=e.get(t);return void 0===r&&e.set(t,r=n()),r},l=(e,t)=>{let n=[];for(let[r,o]of e)n.push(t(o,r));return n},s=(e,t)=>{for(let[n,r]of e)if(t(r,n))return!0;return!1}},26802:function(e,t,n){"use strict";n.d(t,{Fp:function(){return l},GR:function(){return s},GW:function(){return r},VV:function(){return i},Wn:function(){return o}});let r=Math.floor,o=Math.abs,i=(e,t)=>e<t?e:t,l=(e,t)=>e>t?e:t,s=e=>0!==e?e<0:1/e<0},47448:function(e,t,n){"use strict";n.d(t,{U:function(){return l},YM:function(){return i}});var r=n(26802),o=n(99333);let i=Number.MAX_SAFE_INTEGER;o.RP,o.Tg;let l=Number.isInteger||(e=>"number"==typeof e&&isFinite(e)&&r.GW(e)===e)},95187:function(e,t,n){"use strict";n.d(t,{$m:function(){return d},Ed:function(){return i},XP:function(){return o},_A:function(){return h},f0:function(){return r},kE:function(){return l},l$:function(){return u},xb:function(){return a}});let r=Object.assign,o=Object.keys,i=(e,t)=>{for(let n in e)t(e[n],n)},l=e=>o(e).length,s=e=>o(e).length,a=e=>{for(let t in e)return!1;return!0},c=(e,t)=>
4{for(let n in e)if(!t(e[n],n))return!1;return!0},u=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d=(e,t)=>e===t||s(e)===s(t)&&c(e,(e,n)=>(void 0!==e||u(t,n))&&t[n]===e),p=Object.freeze,h=e=>{for(let t in e){let n=e[t];("object"==typeof n||"function"==typeof n)&&h(e[t])}return p(e)}},17656:function(e,t,n){"use strict";n.d(t,{g:function(){return l},y:function(){return s}});var r=n(97399),o=n(28070),i=n(4087);class l{constructor(){this._observers=r.Ue()}on(e,t){return r.Yu(this._observers,e,o.Ue).add(t),t}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return i.Dp((this._observers.get(e)||r.Ue()).values()).forEach(e=>e(...t))}destroy(){this._observers=r.Ue()}}class s{constructor(){this._observers=r.Ue()}on(e,t){r.Yu(this._observers,e,o.Ue).add(t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return i.Dp((this._observers.get(e)||r.Ue()).values()).forEach(e=>e(...t))}destroy(){this._observers=r.Ue()}}},97530:function(e,t,n){"use strict";n.d(t,{Ue:function(){return r}});let r=e=>new Promise(e);Promise.all.bind(Promise)},76616:function(e,t,n){"use strict";n.d(t,{kw:function(){return s},U7:function(){return l},k$:function(){return a}});var r=n(26802);crypto.subtle;let o=crypto.getRandomValues.bind(crypto),i=Math.random,l=()=>o(new Uint32Array(1))[0],s=e=>e[r.GW(i()*e.length)],a=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^l()&15>>e/4).toString(16))},28070:function(e,t,n){"use strict";n.d(t,{Ue:function(){return r}});let r=()=>new Set},65129:function(e,t,n){"use strict";n.d(t,{CO:function(){return u},NF:function(){return s},YZ:function(){return a},lz:function(){return c}}),(0,String.fromCharCode)(65535);let r=e=>e.toLowerCase(),o=/^\s*/g,i=e=>e.replace(o,""),l=/([A-Z])/g,s=(e,t)=>i(e.replace(l,e=>`${t}${r(e)}`)),a="undefined"!=typeof TextEncoder?new TextEncoder:null,c=a?e=>a.encode(e):e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},u="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});u&&1===u.decode(new Uint8Array).length&&(u=null)},53968:function(e,t,n){"use strict";n.d(t,{ZG:function(){return r}});let r=Date.now},20946:function(e,t,n){"use strict";n.d(t,{Ig:function(){return w},MI:function(){return b},N0:function(){return T},NE:function(){return l},QK:function(){return k},U9:function(){return A},X0:function(){return E},Y_:function(){return g},_M:function(){return h},al:function(){return a},cR:function(){return u},mD:function(){return M},nw:function(){return N},o:function(){return y},rr:function(){return c},uJ:function(){return H},uo:function(){return S},xb:function(){return x},ym:function(){return O}});var r=n(94536),o=n(10121),i=n(17213);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(),o=n&&(0,r.k9)(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let c=a.nodeBefore;if(j(e,a,t,-1))return!0;if(0==l.parent.content.size&&(p(c,"end")||i.qv.isSelectable(c)))for(let n=l.depth;;n--){let s=(0,r.dR)(e.doc,l.before(n),l.after(n),o.p2.empty);if(s&&s.slice.size<s.to-s.from){if(t){let n=e.tr.step(s);n.setSelection(p(c,"end")?i.Y1.findFrom(n.doc.resolve(n.mapping.map(a.pos,-1)),-1):i.qv.create(n.doc,a.pos-c.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||l.node(n-1).childCount>1)break}return!!c.isAtom&&a.depth==l.depth-1&&(t&&t(e.tr.delete(a.pos-c.nodeSize,a.pos).scrollIntoView()),!0)},c=(e,t,n)=>{let r=s(e,n);if(!r)return!1;let o=f(r);return!!o&&d(e,o,t)},u=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let o=v(r);return!!o&&d(e,o,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,c=t.pos+1;for(;!a.isTextblock;c++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let u=(0,r.dR)(e.doc,s,c,o.p2.empty);if(!u||u.from!=s||u instanceof r.Pu&&u.slice.size>=c-s)return!1;if(n){let t=e.tr.step(u);t.setSelection(i.Bs.create(t.doc,s)),n(t.scrollIntoView())}return!0}function p(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;
4if(n&&1!=r.childCount)break}return!1}let h=(e,t,n)=>{let{$head:r,empty:o}=e.selection,l=r;if(!o)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&&i.qv.isSelectable(s))&&(t&&t(e.tr.setSelection(i.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 g=(e,t,n)=>{let l=m(e,n);if(!l)return!1;let s=v(l);if(!s)return!1;let a=s.nodeAfter;if(j(e,s,t,1))return!0;if(0==l.parent.content.size&&(p(a,"start")||i.qv.isSelectable(a))){let n=(0,r.dR)(e.doc,l.before(),l.after(),o.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(p(a,"start")?i.Y1.findFrom(r.doc.resolve(r.mapping.map(s.pos)),1):i.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)},y=(e,t,n)=>{let{$head:r,empty:o}=e.selection,l=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;l=v(r)}let s=l&&l.nodeAfter;return!!(s&&i.qv.isSelectable(s))&&(t&&t(e.tr.setSelection(i.qv.create(e.doc,l.pos)).scrollIntoView()),!0)};function v(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 b=(e,t)=>{let n=e.selection,o=n instanceof i.qv,l;if(o){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);o&&n.setSelection(i.qv.create(n.doc,l-e.doc.resolve(l).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},w=(e,t)=>{let n=e.selection,o;if(n instanceof i.qv){if(n.node.isTextblock||!(0,r.Mn)(e.doc,n.to))return!1;o=n.to}else if(null==(o=(0,r.GJ)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(o).scrollIntoView()),!0},x=(e,t)=>{let{$from:n,$to:o}=e.selection,i=n.blockRange(o),l=i&&(0,r.k9)(i);return null!=l&&(t&&t(e.tr.lift(i,l).scrollIntoView()),!0)},k=(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 C(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 S=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),l=n.indexAfter(-1),s=C(o.contentMatchAt(l));if(!s||!o.canReplaceWith(l,l,s))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,s.createAndFill());o.setSelection(i.Y1.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0},M=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof i.C1||r.parent.inlineContent||o.parent.inlineContent)return!1;let l=C(o.parent.contentMatchAt(o.indexAfter()));if(!l||!l.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(n,l.createAndFill());s.setSelection(i.Bs.create(s.doc,n+1)),t(s.scrollIntoView())}return!0},E=(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 o=n.before();if((0,r.Ax)(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let o=n.blockRange(),i=o&&(0,r.k9)(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},T=(e,t)=>{let{$from:n,to:r}=e.selection,o,l=n.sharedDepth(r);return 0!=l&&(o=n.before(l),t&&t(e.tr.setSelection(i.qv.create(e.doc,o))),!0)};function j(e,t,n,l){let s,a,c,u=t.nodeBefore,d=t.nodeAfter,h,f,m=u.type.spec.isolating||d.type.spec.isolating;if(!m&&(s=t.nodeBefore,a=t.nodeAfter,c=t.index(),s&&a&&s.type.compatibleContent(a.type)&&(!s.content.size&&t.parent.canReplace(c-1,c)?(n&&n(e.tr.delete(t.pos-s.nodeSize,t.pos).scrollIntoView()),!0):!!(t.parent.canReplace(c,c+1)&&(a.isTextblock||(0,r.Mn)(e.doc,t.pos)))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let g=!m&&t.parent.canReplace(t.index(),t.index()+1);if(g&&(h=(f=u.contentMatchAt(u.childCount)).findWrapping(d.type))&&f.matchType(h[0]||d.type).validEnd){if(n){let i=t.pos+d.nodeSize,l=o.HY.empty;for(let e=h.length-1;e>=0;e--)l=o.HY.from(h[e].create(null,l));l=o.HY.from(u.copy(l));let s=e.tr.step(new r.FC(t.pos-1,i,t.pos,i,new o.p2(l,1,0),h.length,!0)),a=s.doc.resolve(i+2*h.length);a.nodeAfter&&a.nodeAfter.type==u.type&&(0,r.Mn)(s.doc,a.pos)&&s.join(a.pos),n(s.scrollIntoView())}return!0}let y=d.type.spec.isolating||l>0&&m?null:i.Y1.findFrom(t,1),v=y&&y.$from.blockRange(y.$to),b=v&&(0,r.k9)(v);if(null!=b&&b>=t.depth)return n&&n(e.tr.lift(v,b).scrollIntoView()),!0;if(g&&p(d,"start",!0)&&p(u,"end")){let i=u,l=[];for(;l.push(i),!i.isTextblock;)i=i.lastChild;let s=d,a=1;for(;!s.isTextblock;s=s.firstChild)a++;if(i.canReplace(i.childCount,i.childCount,s.content)){if(n){let i=o.HY.empty;for(let e=l.length-1;e>=0;e--)i=o.HY.from(l[e].copy(i));n(e.tr.step(new r.FC(t.pos-l.length,t.pos+d.nodeSize,t.pos+a,t.pos+d.nodeSize-a,new o.p2(i,l.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function R(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,l=o.depth;for(;o.node(l).isInline;){if(!l)return!1;l--}return!!o.node(l).isTextblock&&(n&&n(t.tr.setSelection(i.Bs.create(t.doc,e<0?o.start(l):o.end(l)))),!0)}}let A=R(-1),N=R(1);function O(e,t=null){return function(n,o){let{$from:i,$to:l}=n.selection,s=i.blockRange(l),a=s&&(0,r.nd)(s,e,t);return!!a&&(o&&o(n.tr.wrap(s,a).scrollIntoView()),!0)}}function H(e,t=null){return function(n,r){let o=!1;for(let r=0;r<n.selection.ranges.length&&!o;r++){let{$from:{pos:i},$to:{pos:l}}=n.selection.ranges[r];n.doc.nodesBetween(i,l,(r,i)=>{if(o)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t))){if(r.type==e)o=!0;else{let t=n.doc.resolve(i),r=t.index();o=t.parent.canReplaceWith(r,r+1,e)}}})}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:i},$to:{pos:l}}=n.selection.ranges[r];o.setBlockType(i,l,e,t)}r(o.scrollIntoView())}return!0}}function L(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let I=L(l,a,h),_=L(l,g,y),P={Enter:L(k,M,E,(e,t)=>{let{$from:n,$to:o}=e.selection;if(e.selection instanceof i.qv&&e.selection.node.isBlock)return!!(n.parentOffset&&(0,r.Ax)(e.doc,n.pos))&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let l=[],s,a,c=!1,u=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){let t;c=n.end(e)==n.pos+(n.depth-e),u=n.start(e)==n.pos-(n.depth-e),a=C(n.node(e-1).contentMatchAt(n.indexAfter(e-1))),l.unshift(t||(c&&a?{type:a}:null)),s=e;break}if(1==e)return!1;l.unshift(null)}let d=e.tr;(e.selection instanceof i.Bs||e.selection instanceof i.C1)&&d.deleteSelection();let p=d.mapping.map(n.pos),h=(0,r.Ax)(d.doc,p,l.length,l);if(h||(l[0]=a?{type:a}:null,h=(0,r.Ax)(d.doc,p,l.length,l)),d.split(p,l.length,l),!c&&u&&n.node(s).type!=a){let e=d.mapping.map(n.before(s)),t=d.doc.resolve(e);a&&n.node(s-1).canReplaceWith(t.index(),t.index()+1,a)&&d.setNodeMarkup(d.mapping.map(n.before(s)),a)}return t&&t(d.scrollIntoView()),!0}),"Mod-Enter":S,Backspace:I,"Mod-Backspace":I,"Shift-Backspace":I,Delete:_,"Mod-Delete":_,"Mod-a":(e,t)=>
4(t&&t(e.tr.setSelection(new i.C1(e.doc))),!0)},D={"Ctrl-h":P.Backspace,"Alt-Backspace":P["Mod-Backspace"],"Ctrl-d":P.Delete,"Ctrl-Alt-Backspace":P["Mod-Delete"],"Alt-Delete":P["Mod-Delete"],"Alt-d":P["Mod-Delete"],"Ctrl-a":A,"Ctrl-e":N};for(let e in P)D[e]=P[e];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},10258:function(e,t,n){"use strict";n.d(t,{$:function(){return h},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:"'"},o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},i="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),o[s]=String.fromCharCode(s);for(var a in r)o.hasOwnProperty(a)||(o[a]=r[a]);var c=n(17213);let u="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function d(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 c.Sy({props:{handleKeyDown:h(e)}})}function h(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,o,i=e.split(/-(?!$)/),l=i[i.length-1];"Space"==l&&(l=" ");for(let e=0;e<i.length-1;e++){let l=i[e];if(/^(cmd|meta|m)$/i.test(l))o=!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))u?o=!0:n=!0;else throw Error("Unrecognized modifier name: "+l)}return t&&(l="Alt-"+l),n&&(l="Ctrl-"+l),o&&(l="Meta-"+l),r&&(l="Shift-"+l),l}(n)]=e[n];return t}(e);return function(e,n){var s;let a=("Esc"==(s=!(i&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||l&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?o: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),c,u=t[d(a,n)];if(u&&u(e.state,e.dispatch,e))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=t[d(a,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.shiftKey||n.altKey||n.metaKey||a.charCodeAt(0)>127)&&(c=r[n.keyCode])&&c!=a){let r=t[d(c,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},10121:function(e,t,n){"use strict";function r(e){this.content=e}n.d(t,{aw:function(){return V},PW:function(){return J},HY:function(){return o},vc:function(){return a},ZU:function(){return P},NB:function(){return C},Ts:function(){return x},e4:function(){return c},V_:function(){return D},p2:function(){return u}}),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 o=n&&n!=e?this.remove(n):this,i=o.find(e),l=o.content.slice();return -1==i?l.push(n||e,t):(l[i+1]=t,n&&(l[i]=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 o=this.remove(t),i=o.content.slice(),l=o.find(e);return i.splice(-1==l?i.length:l,0,t,n),new r(i)}
4,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 o{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,o){for(let i=0,l=0;l<t;i++){let s=this.content[i],a=l+s.nodeSize;if(a>e&&!1!==n(s,r+l,o||null,i)&&s.content.size){let o=l+1;s.nodesBetween(Math.max(0,e-o),Math.min(s.content.size,t-o),n,r+o)}l=a}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!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&&(i?i=!1:o+=n),o+=a},0),o}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 o(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 o=0,i=0;i<t;o++){let l=this.content[o],s=i+l.nodeSize;s>e&&((i<e||s>t)&&(l=l.isText?l.cut(Math.max(0,e-i),Math.min(l.text.length,t-i)):l.cut(Math.max(0,e-i-1),Math.min(l.content.size,t-i-1))),n.push(l),r+=l.nodeSize),i=s}return new o(n,r)}cutByIndex(e,t){return e==t?o.empty:0==e&&t==this.content.length?this:new o(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new o(r,i)}addToStart(e){return new o([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new o(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 o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;let i=t.child(o),l=n.child(o);if(i==l){r+=i.nodeSize;continue}if(!i.sameMarkup(l))return r;if(i.isText&&i.text!=l.text){for(let e=0;i.text[e]==l.text[e];e++)r++;return r}if(i.content.size||l.content.size){let t=e(i.content,l.content,r+1);if(null!=t)return t}r+=i.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,o){for(let i=t.childCount,l=n.childCount;;){if(0==i||0==l)return i==l?null:{a:r,b:o};let s=t.child(--i),a=n.child(--l),c=s.nodeSize;if(s==a){r-=c,o-=c;continue}if(!s.sameMarkup(a))return{a:r,b:o};if(s.isText&&s.text!=a.text){let e=0,t=Math.min(s.text.length,a.text.length);for(;e<t&&s.text[s.text.length-e-1]==a.text[a.text.length-e-1];)e++,r--,o--;return{a:r,b:o}}if(s.content.size||a.content.size){let t=e(s.content,a.content,r-1,o-1);if(t)return t}r-=c,o-=c}}(this,e,t,n)}findIndex(e,t=-1){if(0==e)return l(0,e);if(e==this.size)return l(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e){if(o==e||t>0)return l(n+1,o);return l(n,r)}r=o}}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 o.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new o(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return o.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new o(t||e,n)}static from(e){if(!e)return o.empty;if(e instanceof o)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new o([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}o.empty=new o([],0);let i={index:0,offset:0};function l(e,t){return i.index=e,i.offset=t,i}function s(e,t){if(e===t)return!0;
vendor: 6,853 bytes, line 4
4if(!(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(!s(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!s(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class a{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}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&&s(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`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}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 a.none;if(e instanceof a)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}a.none=[];class c extends Error{}class u{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,o){let{index:i,offset:l}=t.findIndex(n),s=t.maybeChild(i);if(l==n||s.isText)return o&&!o.canReplace(i,i,r)?null:t.cut(0,n).append(r).append(t.cut(n));let a=e(s.content,n-l-1,r);return a&&t.replaceChild(i,s.copy(a))}(this.content,e+this.openStart,t);return n&&new u(n,this.openStart,this.openEnd)}removeBetween(e,t){return new u(function e(t,n,r){let{index:o,offset:i}=t.findIndex(n),l=t.maybeChild(o),{index:s,offset:a}=t.findIndex(r);if(i==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(o!=s)throw RangeError("Removing non-flat range");return t.replaceChild(o,l.copy(e(l.content,n-i-1,r-i-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 u.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 u(o.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 u(e,n,r)}}function d(e,t){if(!t.type.compatibleContent(e.type))throw new c("Cannot join "+t.type.name+" onto "+e.type.name)}function p(e,t,n){let r=e.node(n);return d(r,t.node(n)),r}function h(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 f(e,t,n,r){let o=(t||e).node(n),i=0,l=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(h(e.nodeAfter,r),i++));for(let e=i;e<l;e++)h(o.child(e),r);t&&t.depth==n&&t.textOffset&&h(t.nodeBefore,r)}function m(e,t){return e.type.checkContent(t),e.copy(t)}function g(e,t,n){let r=[];return f(null,e,n,r),e.depth>n&&h(m(p(e,t,n+1),g(e,t,n+1)),r),f(t,null,n,r),new o(r)}u.empty=new u(o.empty,0,0);class y{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 a.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 o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}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 o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].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 x(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,o=t;for(let t=e;;){let{index:e,offset:i}=t.content.findIndex(o),l=o-i;if(n.push(t,e,r+i),!l||(t=t.child(e)).isText)break;o=l-1,r+=i+1}return new y(t,n,o)}
4static resolveCached(e,t){let n=w.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 w.set(e,n=new v);let r=n.elts[n.i]=y.resolve(e,t);return n.i=(n.i+1)%b,r}}class v{constructor(){this.elts=[],this.i=0}}let b=12,w=new WeakMap;class x{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 k=Object.create(null);class C{constructor(e,t,n,r=a.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||o.empty}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,"")}textBetween(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&&s(this.attrs,t||e.defaultAttrs||k)&&a.sameSet(this.marks,n||a.none)}copy(e=null){return e==this.content?this:new C(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new C(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 u.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),l=r.start(i);return new u(r.node(i).content.cut(r.pos-l,o.pos-l),r.depth-i,o.depth-i)}replace(e,t,n){return function(e,t,n){if(n.openStart>e.depth)throw new c("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new c("Inconsistent open depths");return function e(t,n,r,i){let l=t.index(i),s=t.node(i);if(l==n.index(i)&&i<t.depth-r.openStart){let o=e(t,n,r,i+1);return s.copy(s.content.replaceChild(l,o))}if(!r.content.size)return m(s,g(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:e,end:l}=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(o.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return m(s,function e(t,n,r,i,l){let s=t.depth>l&&p(t,n,l+1),a=i.depth>l&&p(r,i,l+1),c=[];return f(null,t,l,c),s&&a&&n.index(l)==r.index(l)?(d(s,a),h(m(s,e(t,n,r,i,l+1)),c)):(s&&h(m(s,g(t,n,l+1)),c),f(n,r,l,c),a&&h(m(a,g(r,i,l+1)),c)),f(i,null,l,c),new o(c)}(t,e,l,n,i))}{let e=t.parent,o=e.content;return m(e,o.cut(0,t.parentOffset).append(r.content).append(o.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 y.resolveCached(this,e)}resolveNoCache(e){return y.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}
4toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),M(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=o.empty,r=0,i=n.childCount){let l=this.contentMatchAt(e).matchFragment(n,r,i),s=l&&l.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 o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.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),this.type.checkAttrs(this.attrs);let e=a.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!a.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.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=o.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}C.prototype.text=void 0;class S extends C{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):M(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 S(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new S(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 M(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class E{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,o=new T(e,t);if(null==o.next)return E.empty;let i=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 o=[];for(let e in n){let r=n[e];r.isInGroup(t)&&o.push(r)}return 0==o.length&&e.err("No node type or group '"+t+"' found"),o})(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=j(e),r=n;return e.eat(",")&&(r="}"!=e.next?j(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}}(o);o.next&&o.err("Unexpected trailing text");let l=(n=function(e){let t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,i)),[]);if("seq"==t.type)for(let r=0;;r++){let l=e(t.exprs[r],i);if(r==t.exprs.length-1)return l;o(l,i=n())}else if("star"==t.type){let l=n();return r(i,l),o(e(t.expr,l),l),[r(l)]}else if("plus"==t.type){let l=n();return o(e(t.expr,i),l),o(e(t.expr,l),l),[r(l)]}else if("opt"==t.type)return[r(i)].concat(e(t.expr,i));else if("range"==t.type){let l=i;for(let r=0;r<t.min;r++){let r=n();o(e(t.expr,l),r),l=r}if(-1==t.max)o(e(t.expr,l),l);else for(let i=t.min;i<t.max;i++){let i=n();r(l,i),o(e(t.expr,l),i),l=i}return[r(l)]}else if("name"==t.type)return[r(i,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 o={term:r,to:n};return t[e].push(o),o}
vendor: 5,547 bytes, line 4
4function o(e,t){e.forEach(e=>e.to=t)}}(i),r=Object.create(null),function e(t){let o=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<o.length;t++)o[t][0]==e&&(r=o[t][1]);A(n,t).forEach(t=>{r||o.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let i=r[t.join(",")]=new E(t.indexOf(n.length-1)>-1);for(let t=0;t<o.length;t++){let n=o[t][1].sort(R);i.next.push({type:o[t][0],next:r[n.join(",")]||e(n)})}return i}(A(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:n,next:l}=e.next[t];i.push(n.name),o&&!(n.isText||n.hasRequiredAttrs())&&(o=!1),-1==r.indexOf(l)&&r.push(l)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(l,o),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}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).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(l,s){let a=l.matchFragment(e,n);if(a&&(!t||a.validEnd))return o.from(s.map(e=>e.createAndFill()));for(let e=0;e<l.next.length;e++){let{type:t,next:n}=l.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(),o=r.match;if(o.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<o.next.length;e++){let{type:i,next:l}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!l.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),t[i.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")}}E.empty=new E(!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 j(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function R(e,t){return t-e}function A(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:i}=o[e];r||-1!=n.indexOf(i)||t(i)}}(t),n.sort(R)}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 O(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(t.hasDefault)o=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function H(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function L(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new _(e,r,t[r]);return n}class I{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=L(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==E.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:O(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new C(this,this.computeAttrs(e),o.from(t),a.setFrom(n))}createChecked(e=null,t,n){return t=o.from(t),this.checkContent(t),new C(this,this.computeAttrs(e),t,a.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=o.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(o.empty,!0);return i?new C(this,e,t.append(i),a.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);
4if(!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){H(this.attrs,e,"node",this.name)}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:a.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new I(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 _{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 o=null===n?"null":typeof n;if(0>r.indexOf(o))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${o}`)}):n.validate}get isRequired(){return!this.hasDefault}}class P{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=L(e,r.attrs),this.excluded=null;let o=N(this.attrs);this.instance=o?new a(this,o):null}create(e=null){return!e&&this.instance?this.instance:new a(this,O(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,o)=>n[e]=new P(e,r++,t,o)),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]}checkAttrs(e){H(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class D{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=I.compile(this.spec.nodes,this),this.marks=P.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||"",o=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=E.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="_"==o?null:o?z(this,o.split(" ")):""!=o&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:z(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof I){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 S(n,n.defaultAttrs,e,a.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return C.fromJSON(this,e)}markFromJSON(e){return a.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function z(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],l=i;if(i)n.push(i);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(l=r)}if(!l)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class V{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];
4t.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 G(this,t,!1);return n.addAll(e,a.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new G(this,t,!0);return n.addAll(e,a.none,t.from,t.to),u.maxOpen(n.finish())}matchTag(e,t,n){for(let o=n?this.tags.indexOf(n)+1:0;o<this.tags.length;o++){var r;let n=this.tags[o];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){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(0==i.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(i.length>e.length)||61==i.charCodeAt(e.length)&&i.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=Y(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=Y(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new V(e,V.schemaRules(e)))}}let F={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},B={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},$={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 W{constructor(e,t,n,r,o,i){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=i,this.content=[],this.activeMarks=a.none,this.match=o||(4&i?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(o.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=o.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(o.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&&!F.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class G{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r=t.topNode,o,i=U(null,t.preserveWhitespace,0)|(n?4:0);o=r?new W(r.type,r.attrs,a.none,!0,t.topMatch||r.type.contentMatch,i):n?new W(null,null,a.none,!0,null,i):new W(e.schema.topNodeType,null,a.none,!0,null,i),this.nodes=[o],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;if(2&r.options||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(1&r.options)n=2&r.options?n.replace(/\r\n?/g,"\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],o=e.previousSibling;(!t||o&&"BR"==o.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=e.nodeName.toLowerCase(),o;$.hasOwnProperty(r)&&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&&$.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));if(i?i.ignore:B.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e,t);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let n,o=this.top,l=this.needsBlock;if(F.hasOwnProperty(r))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),n=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);return}let s=i&&i.skip?t:this.readStyles(e,t);s&&this.addAll(e,s),n&&this.sync(o),this.needsBlock=l}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,i,n,!1===i.consuming?o:void 0)}}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)}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],o=n.getPropertyValue(r);if(o)for(let e;;){let n=this.parser.matchStyle(r,o,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 o,i;
4if(t.node){if((i=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(i.create(t.attrs),n)||this.leafFallback(e,n);else{let e=this.enter(i,t.attrs||null,n,t.preserveWhitespace);e&&(o=!0,n=e)}}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let l=this.top;if(i&&i.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));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)}o&&this.sync(l)&&this.open--}addAll(e,t,n,r){let o=n||0;for(let i=n?e.childNodes[n]:e.firstChild,l=null==r?null:e.childNodes[r];i!=l;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i,t);this.findAtPoint(e,o)}findPlace(e,t){let n,r;for(let t=this.open;t>=0;t--){let o=this.nodes[t],i=o.findWrapping(e);if(i&&(!n||n.length>i.length)&&(n=i,r=o,!i.length)||o.solid)break}if(!n)return null;this.sync(r);for(let e=0;e<n.length;e++)t=this.enterInner(n[e],null,t,!1);return t}insertNode(e,t){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let n=this.findPlace(e,t);if(n){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let r=a.none;for(let o of n.concat(e.marks))(t.type?t.type.allowsMarkType(o.type):Z(o.type,e.type))&&(r=o.addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,n,r){let o=this.findPlace(e.create(t),n);return o&&(o=this.enterInner(e,t,n,!0,r)),o}enterInner(e,t,n,r=!1,o){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(e);let l=U(e,o,i.options);4&i.options&&0==i.content.length&&(l|=4);let s=a.none;return n=n.filter(t=>(i.type?!i.type.allowsMarkType(t.type):!Z(t.type,e))||(s=t.addToSet(s),!1)),this.nodes.push(new W(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;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),o=-(n?n.depth+1:0)+(r?0:1),i=(e,l)=>{for(;e>=0;e--){let s=t[e];if(""==s){if(e==t.length-1||0==e)continue;for(;l>=o;l--)if(i(e-1,l))return!0;return!1}{let e=l>0||0==l&&r?this.nodes[l].type:n&&l>=o?n.node(l-o).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;l--}}return!0};return i(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];if(t.isTextblock&&t.defaultAttrs)return t}}}function Y(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 o=n[r];if(!o.allowsMarkType(e))continue;let i=[],l=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t||0>i.indexOf(o)&&l(o))return!0}};if(l(o.contentMatch))return!0}}class J{constructor(e,t){this.nodes=e,this.marks=t}
4serializeFragment(e,t={},n){n||(n=K(t).createDocumentFragment());let r=n,o=[];return e.forEach(e=>{if(o.length||e.marks.length){let n=0,i=0;for(;n<o.length&&i<e.marks.length;){let t=e.marks[i];if(!this.marks[t.type.name]){i++;continue}if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],l=this.serializeMark(n,e.isInline,t);l&&(o.push([n,r]),r.appendChild(l.dom),r=l.contentDOM||l.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=Q(K(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 o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Q(K(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return Q(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new J(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=q(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return q(e.marks)}}function q(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function K(e){return e.document||window.document}let X=new WeakMap;function Q(e,t,n,r){let o,i,l;if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=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===(i=X.get(r))&&X.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),i=l)),a=i)&&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 c=s.indexOf(" ");c>0&&(n=s.slice(0,c),s=s.slice(c+1));let u=n?e.createElementNS(n,s):e.createElement(s),d=t[1],p=1;if(d&&"object"==typeof d&&null==d.nodeType&&!Array.isArray(d)){for(let e in p=2,d)if(null!=d[e]){let t=e.indexOf(" ");t>0?u.setAttributeNS(e.slice(0,t),e.slice(t+1),d[e]):u.setAttribute(e,d[e])}}for(let i=p;i<t.length;i++){let l=t[i];if(0===l){if(i<t.length-1||i>p)throw RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}{let{dom:t,contentDOM:i}=Q(e,l,n,r);if(u.appendChild(t),i){if(o)throw RangeError("Multiple content holes");o=i}}}return{dom:u,contentDOM:o}}},3452:function(e,t,n){"use strict";n.d(t,{IB:function(){return l},KI:function(){return i},bw:function(){return s}});var r=n(94536),o=n(10121);function i(e,t=null){return function(n,i){let{$from:l,$to:s}=n.selection,a=l.blockRange(s),c=!1,u=a;if(!a)return!1;if(a.depth>=2&&l.node(a.depth-1).type.compatibleContent(e)&&0==a.startIndex){if(0==l.index(a.depth-1))return!1;let e=n.doc.resolve(a.start-2);u=new o.Ts(e,e,a.depth),a.endIndex<a.parent.childCount&&(a=new o.Ts(l,n.doc.resolve(s.end(a.depth)),a.depth)),c=!0}let d=(0,r.nd)(u,e,t,a);return!!d&&(i&&i((function(e,t,n,i,l){let s=o.HY.empty;for(let e=n.length-1;e>=0;e--)s=o.HY.from(n[e].type.create(n[e].attrs,s));e.step(new r.FC(t.start-(i?2:0),t.end,t.start,t.end,new o.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 c=n.length-a,u=t.start+n.length-(i?2:0),d=t.parent;for(let n=t.startIndex,o=t.endIndex,i=!0;n<o;n++,i=!1)!i&&(0,r.Ax)(e.doc,u,c)&&(e.split(u,c),u+=2*c),u+=d.child(n).nodeSize;return e})(n.tr,a,d,c,e).scrollIntoView()),!0)}}function l(e){return function(t,n){let{$from:i,$to:l}=t.selection,s=i.blockRange(l,t=>t.childCount>0&&t.firstChild.type==e);return!!s&&(!n||(i.node(s.depth-1).type==e?function(e,t,n,i){let l=e.tr,s=i.end,a=i.$to.end(i.depth);s<a&&(l.step(new r.FC(s-1,a,s,a,new o.p2(o.HY.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new o.Ts(l.doc.resolve(i.$from.pos),l.doc.resolve(a),i.depth));let c=(0,r.k9)(i);if(null==c)return!1;l.lift(i,c);let u=l.mapping.map(s,-1)-1;return(0,r.Mn)(l.doc,u)&&l.join(u),t(l.scrollIntoView()),!0}(t,n,e,s):function(e,t,n){let i=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,i.delete(e-1,e+1);let s=i.doc.resolve(n.start),a=s.nodeAfter;if(i.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,u=n.endIndex==l.childCount,d=s.node(-1),p=s.index(-1);if(!d.canReplace(p+(c?0:1),p+1,a.content.append(u?o.HY.empty:o.HY.from(l))))return!1;let h=s.pos,f=h+a.nodeSize;return i.step(new r.FC(h-(c?1:0),f+(u?1:0),h+1,f-1,new o.p2((c?o.HY.empty:o.HY.from(l.copy(o.HY.empty))).append(u?o.HY.empty:o.HY.from(l.copy(o.HY.empty))),c?0:1,u?0:1),c?0:1)),t(i.scrollIntoView()),!0}(t,n,s)))}}function s(e){return function(t,n){let{$from:i,$to:l}=t.selection,s=i.blockRange(l,t=>t.childCount>0&&t.firstChild.type==e);if(!s)return!1;let a=s.startIndex;if(0==a)return!1;let c=s.parent,u=c.child(a-1);if(u.type!=e)return!1;
4if(n){let i=u.lastChild&&u.lastChild.type==c.type,l=o.HY.from(i?e.create():null),a=new o.p2(o.HY.from(e.create(null,o.HY.from(c.type.create(null,l)))),i?3:1,0),d=s.start,p=s.end;n(t.tr.step(new r.FC(d-(i?3:1),p,d,p,a,1,!0)).scrollIntoView())}return!0}}},17213:function(e,t,n){"use strict";n.d(t,{Bs:function(){return u},C1:function(){return f},H$:function(){return T},Sy:function(){return S},Y1:function(){return l},qv:function(){return p},xm:function(){return s},yy:function(){return C}});var r=n(10121),o=n(94536);let i=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,o=null;for(let e=0;e<t.openEnd;e++)o=n,n=n.lastChild;let i=e.steps.length,l=this.ranges;for(let s=0;s<l.length;s++){let{$from:a,$to:c}=l[s],u=e.mapping.slice(i);e.replaceRange(u.map(a.pos),u.map(c.pos),s?r.p2.empty:t),0==s&&y(e,i,(n?n.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:l}=r[o],s=e.mapping.slice(n),a=s.map(i.pos),c=s.map(l.pos);o?e.deleteRange(a,c):(e.replaceRangeWith(a,c,t),y(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new u(e):g(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 o=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}
4static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(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=i[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in i)throw RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t}getBookmark(){return u.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 c(e){a||e.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends l{constructor(e,t=e){c(e),c(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 u(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 u&&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 u(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 u(e,t)}}l.jsonID("text",u);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 u.between(e.resolve(this.anchor),e.resolve(this.head))}}class p 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),o=e.resolve(r);return n?l.near(o):new p(o)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(e){return e instanceof p&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new h(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new p(e.resolve(t.anchor))}static create(e,t){return new p(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}p.prototype.visible=!1,l.jsonID("node",p);class h{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new d(n,n):new h(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&p.isSelectable(n)?new p(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 g(e,t,n,r,o,i=!1){if(t.inlineContent)return u.create(e,n);for(let l=r-(o>0?0:1);o>0?l<t.childCount:l>=0;l+=o){let r=t.child(l);if(r.isAtom){if(!i&&p.isSelectable(r))return p.create(e,n-(o<0?r.nodeSize:0))}else{let t=g(e,r,n+o,o<0?r.childCount:0,o,i);if(t)return t}n+=r.nodeSize*o}return null}function y(e,t,n){let r,i=e.steps.length-1;if(i<t)return;let s=e.steps[i];(s instanceof o.Pu||s instanceof o.FC)&&(e.mapping.maps[i].forEach((e,t,n,o)=>{null==r&&(r=o)}),e.setSelection(l.near(e.doc.resolve(r),n)))}class v extends o.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),n=null==n?t:n,!e)return this.deleteRange(t,n);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||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 b(e,t){return t&&e?e.bind(t):e}
4class w{constructor(e,t,n){this.name=e,this.init=b(t.init,n),this.apply=b(t.apply,n)}}let x=[new w("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new w("selection",{init:(e,t)=>e.selection||l.atStart(t.doc),apply:e=>e.selection}),new w("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new w("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class k{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.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 w(e.key,e.spec.state,e))})}}class C{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 o=!1;for(let i=0;i<this.config.plugins.length;i++){let l=this.config.plugins[i];if(l.spec.appendTransaction){let s=r?r[i].n:0,a=r?r[i].state:this,c=s<t.length&&l.spec.appendTransaction.call(l,s?t.slice(s):t,a,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new C(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new v(this)}static create(e){let t=new k(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new C(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 k(this.schema,e.plugins),n=t.fields,r=new C(t);for(let t=0;t<n.length;t++){let o=n[t].name;r[o]=this.hasOwnProperty(o)?this[o]: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],o=r.spec.state;o&&o.toJSON&&(t[n]=o.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 o=new k(e.schema,e.plugins),i=new C(o);return o.fields.forEach(o=>{if("doc"==o.name)i.doc=r.NB.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=l.fromJSON(i.doc,t.selection);else if("storedMarks"==o.name)t.storedMarks&&(i.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==o.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){i[o.name]=s.fromJSON.call(l,e,t[r],i);return}}i[o.name]=o.init(e,i)}}),i}}class S{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let o in t){let i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.key=e.key?e.key.key:E("plugin")}getState(e){return e[this.key]}}let M=Object.create(null);function E(e){return e in M?e+"$"+ ++M[e]:(M[e]=0,e+"$")}class T{constructor(e="key"){this.key=E(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},76167:function(e,t,n){"use strict";n.d(t,{G3:function(){return q},VH:function(){return W},Xc:function(){return w}});
4var r,o,i=n(17213),l=n(10121),s=n(97528),a=n(10258),c=n(94536);if("undefined"!=typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),o=(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]},o=(n,r)=>(10==t&&(t=0),e[t++]=n,e[t++]=r)}var u=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,o=t/this.width|0,i=r+1,l=o+1;for(let e=1;i<this.width&&this.map[t+e]==n;e++)i++;for(let e=1;l<this.height&&this.map[t+this.width*e]==n;e++)l++;return{left:r,top:o,right:i,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:o,top:i,bottom:l}=this.findCell(e);return"horiz"==t?(n<0?0==r:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?0==i:l==this.height)?null:this.map[r+this.width*(n<0?i-1:l)]}rectBetween(e,t){let{left:n,right:r,top:o,bottom:i}=this.findCell(e),{left:l,right:s,top:a,bottom:c}=this.findCell(t);return{left:Math.min(n,l),top:Math.min(o,a),right:Math.max(r,s),bottom:Math.max(i,c)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){let i=r*this.width+o,l=this.map[i];if(!n[l]){if(n[l]=!0,o==e.left&&o&&this.map[i-1]==l||r==e.top&&r&&this.map[i-this.width]==l)continue;t.push(l)}}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){let i=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?i-1:this.map[n]}o=i}}static get(e){return r(e)||o(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 o=e.child(r),i=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let o=n.child(e);t+o.attrs.rowspan>r&&(i+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){let t=o.child(e);i+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,l=[];for(let e=0,o=t*n;e<o;e++)r[e]=0;for(let s=0,a=0;s<n;s++){let c=e.child(s);a++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==c.childCount)break;let u=c.child(e),{colspan:d,rowspan:p,colwidth:h}=u.attrs;for(let e=0;e<p;e++){if(e+s>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:a,n:p-e});break}let c=o+e*t;for(let e=0;e<d;e++){0==r[c+e]?r[c+e]=a:(i||(i=[])).push({type:"collision",row:s,pos:a,n:d-e});let n=h&&h[e];if(n){let r=(c+e)%t*2,o=l[r];null==o||o!=n&&1==l[r+1]?(l[r]=n,l[r+1]=1):o==n&&l[r+1]++}}}o+=d,a+=u.nodeSize}let u=(s+1)*t,d=0;for(;o<u;)0==r[o++]&&d++;d&&(i||(i=[])).push({type:"missing",row:s,n:d}),a++}let s=new u(t,n,r,i),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 o=0;o<e.map.length;o++){let i=e.map[o];if(r[i])continue;r[i]=!0;let l=n.nodeAt(i);if(!l)throw RangeError(`No cell with offset ${i} found`);let s=null,a=l.attrs;for(let n=0;n<a.colspan;n++){let r=t[(o+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:i,colwidth:s})}}(s,l,e),s}(e))}};function d(e){let t=e.cached.tableNodeTypes;if(!t)for(let n in t=e.cached.tableNodeTypes={},e.nodes){let r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}return t}var p=new i.H$("selectingCells");function h(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 f(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 m(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=h(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 g(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function y(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function v(e,t,n){let r=e.node(-1),o=u.get(r),i=e.start(-1),l=o.nextCell(e.pos-i,t,n);return null==l?null:e.node(0).resolve(i+l)}function b(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}var w=class e extends i.Y1{constructor(e,t=e){let n=e.node(-1),r=u.get(n),o=e.start(-1),l=r.rectBetween(e.pos-o,t.pos-o),s=e.node(0),a=r.cellsInRect(l).filter(e=>e!=t.pos-o);a.unshift(t.pos-o);let c=a.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e}
4 found`);let r=o+e+1;return new i.xm(s.resolve(r),s.resolve(r+t.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(g(r)&&g(o)&&y(r,o)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,o):t&&this.isColSelection()?e.colSelection(r,o):new e(r,o)}return i.Bs.between(r,o)}content(){let e=this.$anchorCell.node(-1),t=u.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[];for(let n=r.top;n<r.bottom;n++){let s=[];for(let i=n*t.width+r.left,l=r.left;l<r.right;l++,i++){let n=t.map[i];if(o[n])continue;o[n]=!0;let l=t.findCell(n),a=e.nodeAt(n);if(!a)throw RangeError(`No cell with offset ${n} found`);let c=r.left-l.left,u=l.right-r.right;if(c>0||u>0){let e=a.attrs;if(c>0&&(e=b(e,0,c)),u>0&&(e=b(e,e.colspan-u,u)),l.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(l.top<r.top||l.bottom>r.bottom){let e={...a.attrs,rowspan:Math.min(l.bottom,r.bottom)-Math.max(l.top,r.top)};a=l.top<r.top?a.type.createAndFill(e):a.type.create(e,a.content)}s.push(a)}i.push(e.child(n).copy(l.HY.from(s)))}let s=this.isColSelection()&&this.isRowSelection()?e:i;return new l.p2(l.HY.from(s),1,1)}replace(e,t=l.p2.empty){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],a=e.mapping.slice(n);e.replace(a.map(i.pos),a.map(s.pos),o?l.p2.empty:t)}let o=i.Y1.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new l.p2(l.HY.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=u.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<o.length;n++)e(t.nodeAt(o[n]),r+o[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),o=u.get(r),i=t.start(-1),l=o.findCell(t.pos-i),s=o.findCell(n.pos-i),a=t.node(0);return l.top<=s.top?(l.top>0&&(t=a.resolve(i+o.map[l.left])),s.bottom<o.height&&(n=a.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))):(s.top>0&&(n=a.resolve(i+o.map[s.left])),l.bottom<o.height&&(t=a.resolve(i+o.map[o.width*(o.height-1)+l.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=u.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),o=t.colCount(this.$headCell.pos-n);return!(Math.min(r,o)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.colspan,o+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),o=u.get(r),i=t.start(-1),l=o.findCell(t.pos-i),s=o.findCell(n.pos-i),a=t.node(0);return l.left<=s.left?(l.left>0&&(t=a.resolve(i+o.map[l.top*o.width])),s.right<o.width&&(n=a.resolve(i+o.map[o.width*(s.top+1)-1]))):(s.left>0&&(n=a.resolve(i+o.map[s.top*o.width])),l.right<o.width&&(t=a.resolve(i+o.map[o.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 x(this.$anchorCell.pos,this.$headCell.pos)}};w.prototype.visible=!1,i.Y1.jsonID("cell",w);var x=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&&y(t,n)?new w(t,n):i.Y1.near(n,1)}};function k(e){if(!(e.selection instanceof w))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(s.p.node(n,n+e.nodeSize,{class:"selectedCell"}))}),s.EH.create(e.doc,t)}var C=new i.H$("fix-tables");function S(e){let t=e.selection,n=m(e),r=n.node(-1),o=n.start(-1),i=u.get(r);return{...t instanceof w?i.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function M(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 o=t.table.nodeAt(r[e]);if(o&&o.type!==n.header_cell)return!1}return!0}function E(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(t,n){if(!f(t))return!1;if(n){let r=d(t.schema),o=S(t),i=t.tr,l=o.map.cellsInRect("column"==e?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==e?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=l.map(e=>o.table.nodeAt(e));for(let e=0;e<l.length;e++)s[e].type==r.header_cell&&i.setNodeMarkup(o.tableStart+l[e],r.cell,s[e].attrs);if(0==i.steps.length)for(let e=0;e<l.length;e++)i.setNodeMarkup(o.tableStart+l[e],r.header_cell,s[e].attrs);n(i)}return!0}:function(t,n){if(!f(t))return!1;if(n){let r=d(t.schema),o=S(t),i=t.tr,l=M("row",o,r),s=M("column",o,r),a=("column"===e?l:"row"===e&&s)?1:0,c="column"==e?{left:0,top:a,right:1,bottom:o.map.height}:"row"==e?{left:a,top:0,right:o.map.width,bottom:1}:o,u="column"==e?s?r.cell:r.header_cell:"row"==e?l?r.cell:r.header_cell:r.cell;
4o.map.cellsInRect(c).forEach(e=>{let t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)}),n(i)}return!0}}function T(e,t){let n=e.selection;if(!(n instanceof w))return!1;if(t){let r=e.tr,o=d(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new l.p2(o,0,0))}),r.docChanged&&t(r)}return!0}function j(e,t){let n=e.createAndFill();return new c.wx(n).replace(0,n.content.size,t).doc}function R(e,t,n,r,o,i,l,s){if(0==l||l==t.height)return!1;let a=!1;for(let c=o;c<i;c++){let o=l*t.width+c,i=t.map[o];if(t.map[o-t.width]==i){a=!0;let o=n.nodeAt(i),{top:u,left:d}=t.findCell(i);e.setNodeMarkup(e.mapping.slice(s).map(i+r),null,{...o.attrs,rowspan:l-u}),e.insert(e.mapping.slice(s).map(t.positionAt(l,d,n)),o.type.createAndFill({...o.attrs,rowspan:u+o.attrs.rowspan-l})),c+=o.attrs.colspan-1}}return a}function A(e,t,n,r,o,i,l,s){if(0==l||l==t.width)return!1;let a=!1;for(let c=o;c<i;c++){let o=c*t.width+l,i=t.map[o];if(t.map[o-1]==i){a=!0;let o=n.nodeAt(i),u=t.colCount(i),d=e.mapping.slice(s).map(i+r);e.setNodeMarkup(d,null,b(o.attrs,l-u,o.attrs.colspan-(l-u))),e.insert(d+o.nodeSize,o.type.createAndFill(b(o.attrs,0,l-u))),c+=o.attrs.rowspan-1}}return a}function N(e,t,n,r,o){let i=n?e.doc.nodeAt(n-1):e.doc;if(!i)throw Error("No table found");let s=u.get(i),{top:a,left:c}=r,p=c+o.width,h=a+o.height,f=e.tr,m=0;function g(){if(!(i=n?f.doc.nodeAt(n-1):f.doc))throw Error("No table found");s=u.get(i),m=f.mapping.maps.length}(function(e,t,n,r,o,i,s){let a,c;let u=d(e.doc.type.schema);if(o>t.width)for(let i=0,l=0;i<t.height;i++){let s;let d=n.child(i);l+=d.nodeSize;let p=[];s=null==d.lastChild||d.lastChild.type==u.cell?a||(a=u.cell.createAndFill()):c||(c=u.header_cell.createAndFill());for(let e=t.width;e<o;e++)p.push(s);e.insert(e.mapping.slice(0).map(l-1+r),p)}if(i>t.height){let s=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){let o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==u.header_cell;s.push(o?c||(c=u.header_cell.createAndFill()):a||(a=u.cell.createAndFill()))}let d=u.row.create(null,l.HY.from(s)),p=[];for(let e=t.height;e<i;e++)p.push(d);e.insert(e.mapping.slice(0).map(r+n.nodeSize-2),p)}return!!(a||c)})(f,s,i,n,p,h,0)&&g(),R(f,s,i,n,c,p,a,m)&&g(),R(f,s,i,n,c,p,h,m)&&g(),A(f,s,i,n,a,h,c,m)&&g(),A(f,s,i,n,a,h,p,m)&&g();for(let e=a;e<h;e++){let t=s.positionAt(e,c,i),r=s.positionAt(e,p,i);f.replace(f.mapping.slice(m).map(t+n),f.mapping.slice(m).map(r+n),new l.p2(o.rows[e-a],0,0))}g(),f.setSelection(new w(f.doc.resolve(n+s.positionAt(a,c,i)),f.doc.resolve(n+s.positionAt(h-1,p-1,i)))),t(f)}E("row",{useDeprecatedLogic:!0}),E("column",{useDeprecatedLogic:!0}),E("cell",{useDeprecatedLogic:!0});var O=(0,a.$)({ArrowLeft:L("horiz",-1),ArrowRight:L("horiz",1),ArrowUp:L("vert",-1),ArrowDown:L("vert",1),"Shift-ArrowLeft":I("horiz",-1),"Shift-ArrowRight":I("horiz",1),"Shift-ArrowUp":I("vert",-1),"Shift-ArrowDown":I("vert",1),Backspace:T,"Mod-Backspace":T,Delete:T,"Mod-Delete":T});function H(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function L(e,t){return(n,r,o)=>{if(!o)return!1;let l=n.selection;if(l instanceof w)return H(n,r,i.Y1.near(l.$headCell,t));if("horiz"!=e&&!l.empty)return!1;let s=z(o,e,t);if(null==s)return!1;if("horiz"==e)return H(n,r,i.Y1.near(n.doc.resolve(l.head+t),t));{let o;let l=n.doc.resolve(s),a=v(l,e,t);return o=a?i.Y1.near(a,1):t<0?i.Y1.near(n.doc.resolve(l.before(-1)),-1):i.Y1.near(n.doc.resolve(l.after(-1)),1),H(n,r,o)}}}function I(e,t){return(n,r,o)=>{let i;if(!o)return!1;let l=n.selection;if(l instanceof w)i=l;else{let r=z(o,e,t);if(null==r)return!1;i=new w(n.doc.resolve(r))}let s=v(i.$headCell,e,t);return!!s&&H(n,r,new w(i.$anchorCell,s))}}function _(e,t){let n=h(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new w(n))),!0)}function P(e,t,n){if(!f(e.state))return!1;let r=function(e){if(!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 o=t.child(0),i=o.type.spec.tableRole,s=o.type.schema,a=[];if("row"==i)for(let e=0;e<t.childCount;e++){let o=t.child(e).content,i=e?0:Math.max(0,n-1),c=e<t.childCount-1?0:Math.max(0,r-1);
4(i||c)&&(o=j(d(s).row,new l.p2(o,i,c)).content),a.push(o)}else{if("cell"!=i&&"header_cell"!=i)return null;a.push(n||r?j(d(s).row,new l.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:o,colspan:i}=r.child(t).attrs;for(let t=e;t<e+o;t++)n[t]=(n[t]||0)+i}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(l.HY.empty),n[o]<r){let i=d(e).cell.createAndFill(),s=[];for(let e=n[o];e<r;e++)s.push(i);t[o]=t[o].append(l.HY.from(s))}return{height:t.length,width:r,rows:t}}(s,a)}(n),o=e.state.selection;if(o instanceof w){r||(r={width:1,height:1,rows:[l.HY.from(j(d(e.state.schema).cell,n))]});let t=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),s=u.get(t).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=function({width:e,height:t,rows:n},r,o){if(e!=r){let t=[],o=[];for(let e=0;e<n.length;e++){let i=n[e],s=[];for(let n=t[e]||0,o=0;n<r;o++){let l=i.child(o%i.childCount);n+l.attrs.colspan>r&&(l=l.type.createChecked(b(l.attrs,l.attrs.colspan,n+l.attrs.colspan-r),l.content)),s.push(l),n+=l.attrs.colspan;for(let n=1;n<l.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+l.attrs.colspan}o.push(l.HY.from(s))}n=o,e=r}if(t!=o){let e=[];for(let r=0,i=0;r<o;r++,i++){let s=[],a=n[i%t];for(let e=0;e<a.childCount;e++){let t=a.child(e);r+t.attrs.rowspan>o&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,o-t.attrs.rowspan)},t.content)),s.push(t)}e.push(l.HY.from(s))}n=e,t=o}return{width:e,height:t,rows:n}}(r,s.right-s.left,s.bottom-s.top),N(e.state,e.dispatch,i,s,r),!0}if(!r)return!1;{let t=m(e.state),n=t.start(-1);return N(e.state,e.dispatch,n,u.get(t.node(-1)).findCell(t.pos-n),r),!0}}function D(e,t){var n;let r;if(t.ctrlKey||t.metaKey)return;let o=V(e,t.target);if(t.shiftKey&&e.state.selection instanceof w)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&null!=(r=h(e.state.selection.$anchor))&&(null==(n=F(e,t))?void 0:n.pos)!=r.pos)i(r,t),t.preventDefault();else if(!o)return;function i(t,n){let r=F(e,n),o=null==p.getState(e.state);if(!r||!y(t,r)){if(!o)return;r=t}let i=new w(t,r);if(o||!e.state.selection.eq(i)){let n=e.state.tr.setSelection(i);o&&n.setMeta(p,t.pos),e.dispatch(n)}}function l(){e.root.removeEventListener("mouseup",l),e.root.removeEventListener("dragstart",l),e.root.removeEventListener("mousemove",s),null!=p.getState(e.state)&&e.dispatch(e.state.tr.setMeta(p,-1))}function s(n){let r;let s=p.getState(e.state);if(null!=s)r=e.state.doc.resolve(s);else if(V(e,n.target)!=o&&!(r=F(e,t)))return l();r&&i(r,n)}e.root.addEventListener("mouseup",l),e.root.addEventListener("dragstart",l),e.root.addEventListener("mousemove",s)}function z(e,t,n){if(!(e.state.selection instanceof i.Bs))return null;let{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){let i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))break;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){let i=r.before(o),l="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?i:null}}return null}function V(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function F(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?h(e.state.doc.resolve(n.pos)):null}var B=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.colgroup=this.table.appendChild(document.createElement("colgroup")),$(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,$(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function $(e,t,n,r,o,i){var l;let s=0,a=!0,c=t.firstChild,u=e.firstChild;if(u){for(let e=0,n=0;e<u.childCount;e++){let{colspan:l,colwidth:d}=u.child(e).attrs;for(let e=0;e<l;e++,n++){let l=o==n?i:d&&d[e],u=l?l+"px":"";
4if(s+=l||r,l||(a=!1),c)c.style.width!=u&&(c.style.width=u,c.style.minWidth=u.length?"":r+"px"),c=c.nextSibling;else{let e=document.createElement("col");e.style.width=u,e.style.minWidth=u.length?"":r+"px",t.appendChild(e)}}}for(;c;){let e=c.nextSibling;null==(l=c.parentNode)||l.removeChild(c),c=e}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}var U=new i.H$("tableColumnResizing");function W({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=B,lastColumnResizable:o=!0}={}){let l=new i.Sy({key:U,state:{init(e,t){var o,i;let s=null==(i=null==(o=l.spec)?void 0:o.props)?void 0:i.nodeViews,a=d(t.schema).table.name;return r&&s&&(s[a]=(e,t)=>new r(e,n,t)),new G(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{let t=U.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r){let o=U.getState(e.state);if(o&&!o.dragging){let i=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(i){let{left:r,right:o}=i.getBoundingClientRect();t.clientX-r<=n?l=Y(e,t,"left",n):o-t.clientX<=n&&(l=Y(e,t,"right",n))}if(l!=o.activeHandle){if(!r&&-1!==l){let t=e.state.doc.resolve(l),n=t.node(-1),r=u.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}J(e,l)}}}(t,n,e,o)},mouseleave:e=>{!function(e){let t=U.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&J(e,-1)}(e)},mousedown:(e,r)=>{!function(e,t,n,r){var o;let i=null!=(o=e.dom.ownerDocument.defaultView)?o:window,l=U.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 o=r&&r[r.length-1];if(o)return o;let i=e.domAtPos(t),l=i.node.childNodes[i.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 c(t){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",d);let r=U.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){let r=e.state.doc.resolve(t),o=r.node(-1),i=u.get(o),l=r.start(-1),s=i.colCount(r.pos-l)+r.nodeAfter.attrs.colspan-1,a=e.state.tr;for(let e=0;e<i.height;e++){let t=e*i.width+s;if(e&&i.map[t]==i.map[t-i.width])continue;let r=i.map[t],c=o.nodeAt(r).attrs,u=1==c.colspan?0:s-i.colCount(r);if(c.colwidth&&c.colwidth[u]==n)continue;let d=c.colwidth?c.colwidth.slice():Array(c.colspan).fill(0);d[u]=n,a.setNodeMarkup(l+r,null,{...c,colwidth:d})}a.docChanged&&e.dispatch(a)}(e,r.activeHandle,Z(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(U,{setDragging:null})))}function d(t){if(!t.which)return c(t);let o=U.getState(e.state);if(o&&o.dragging){let i=Z(o.dragging,t,n);!function(e,t,n,r){let o=e.state.doc.resolve(t),i=o.node(-1),l=o.start(-1),s=u.get(i).colCount(o.pos-l)+o.nodeAfter.attrs.colspan-1,a=e.domAtPos(o.start(-1)).node;for(;a&&"TABLE"!=a.nodeName;)a=a.parentNode;a&&$(i,a.firstChild,a,r,s,n)}(e,o.activeHandle,i,r)}}e.dispatch(e.state.tr.setMeta(U,{setDragging:{startX:t.clientX,startWidth:a}})),i.addEventListener("mouseup",c),i.addEventListener("mousemove",d),t.preventDefault()}(e,r,t,n)}},decorations:e=>{let t=U.getState(e);if(t&&t.activeHandle>-1)return function(e,t){let n=[],r=e.doc.resolve(t),o=r.node(-1);if(!o)return s.EH.empty;let i=u.get(o),l=r.start(-1),a=i.colCount(r.pos-l)+r.nodeAfter.attrs.colspan-1;for(let e=0;e<i.height;e++){let t=a+e*i.width;if((a==i.width-1||i.map[t]!=i.map[t+1])&&(0==e||i.map[t]!=i.map[t-i.width])){let e=i.map[t],r=l+e+o.nodeAt(e).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(s.p.widget(r,a))}}return s.EH.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return l}var G=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=t.getMeta(U);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 g(t.doc.resolve(n))||(n=-1),new e(n,this.dragging)}return this}};function Y(e,t,n,r){let o=e.posAtCoords({left:t.clientX+("right"==n?-r:r),top:t.clientY});if(!o)return -1;let{pos:i}=o,l=h(e.state.doc.resolve(i));if(!l)return -1;if("right"==n)return l.pos;let s=u.get(l.node(-1)),a=l.start(-1),c=s.map.indexOf(l.pos-a);return c%s.width==0?-1:a+s.map[c-1]}function Z(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function J(e,t){e.dispatch(e.state.tr.setMeta(U,{setHandle:t}))}function q({allowTableNodeSelection:e=!1}={}){return new i.Sy({key:p,state:{init:()=>null,apply(e,t){let n=e.getMeta(p);if(null!=n)return -1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:k,handleDOMEvents:{mousedown:D},createSelectionBetween:e=>null!=p.getState(e.state)?e.state.selection:null,handleTripleClick:_,handleKeyDown:O,handlePaste:P},appendTransaction:(t,n,r)=>(function(e,t,n){let r,o;let l=(t||e).selection,s=(t||e).doc;if(l instanceof i.qv&&(o=l.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=w.create(s,l.from);else if("row"==o){let e=s.resolve(l.from+1);r=w.rowSelection(e,e)}else if(!n){let e=u.get(l.node),t=l.from+1,n=t+e.map[e.width*e.height-1];r=w.create(s,t+1,n)}}else l instanceof i.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,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,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(o).type.spec.tableRole)}(l)?r=i.Bs.create(s,l.from):l instanceof i.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}(l)&&(r=i.Bs.create(s,l.$from.start(),l.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t})(r,function(e,t){let n;let r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let o,i;let l=u.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 o=l.problems[e];if("collision"==o.type){let e=t.nodeAt(o.pos);if(!e)continue;let i=e.attrs;for(let e=0;e<i.rowspan;e++)s[o.row+e]+=o.n;
4r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,b(i,i.colspan-o.n,o.n))}else if("missing"==o.type)s[o.row]+=o.n;else if("overlong_rowspan"==o.type){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-o.n})}else if("colwidth mismatch"==o.type){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,colwidth:o.colwidth})}}for(let e=0;e<s.length;e++)s[e]&&(null==o&&(o=e),i=e);for(let a=0,c=n+1;a<l.height;a++){let n=t.child(a),l=c+n.nodeSize,u=s[a];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let s=[];for(let n=0;n<u;n++){let n=d(e.schema)[t].createAndFill();n&&s.push(n)}let p=(0==a||o==a-1)&&i==a?c+1:l-1;r.insert(r.mapping.map(p),s)}c=l}return r.setMeta(C,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,o){let i=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(i,s+3);e<n;e++)if(t.child(e)==l){a=e+1,r+=l.nodeSize;continue t}o(l,r),a<i&&t.child(a).sameMarkup(l)?e(t.child(a),l,r+1,o):l.nodesBetween(0,l.content.size,o,r+1),r+=l.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}(r,n),e)})}},94536:function(e,t,n){"use strict";n.d(t,{Ax:function(){return S},FC:function(){return g},GJ:function(){return T},Mn:function(){return M},Pu:function(){return m},dR:function(){return R},k9:function(){return b},nd:function(){return w},nj:function(){return j},vs:function(){return l},wx:function(){return V}});var r=n(10121);class o{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 i{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&i.empty)return i.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,i=this.inverted?2:1,l=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[s+i],u=this.ranges[s+l],d=a+c;if(e<=d){let i=c?e==a?-1:e==d?1:t:t,l=a+r+(i<0?0:u);if(n)return l;let p=e==(t<0?a:d)?null:s/3+(e-a)*65536,h=e==a?2:e==d?1:4;return(t<0?e!=a:e!=d)&&(h|=8),new o(l,h,p)}r+=u-c}return n?e+r:new o(e+r,0,null)}touches(e,t){let n=0,r=65535&t,o=this.inverted?2:1,i=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+o];if(e<=l+s&&t==3*r)return!0;n+=this.ranges[t+i]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],l=i-(this.inverted?o:0),s=i+(this.inverted?0:o),a=this.ranges[r+t],c=this.ranges[r+n];e(l,l+a,s,s+c),o+=c-a}}invert(){return new i(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?i.empty:new i(e<0?[0,-e,0]:[0,0,e])}}i.empty=new i([]);class l{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new l(this.maps,this.mirror,e,t)}copy(){return new l(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){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 o=this.maps[n].mapResult(e,t);if(null!=o.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this.maps[t].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new o(e,r,null)}}let s=Object.create(null);class a{getMap(){return i.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 c{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new c(e,null)}static fail(e){return new c(null,e)}static fromReplace(e,t,n,o){try{return c.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.e4)return c.fail(e.message);throw e}}}function u(e,t,n){let o=[];for(let r=0;r<e.childCount;r++){let i=e.child(r);i.content.size&&(i=i.copy(u(i.content,t,i))),i.isInline&&(i=t(i,n,r)),o.push(i)}return r.HY.fromArray(o)}class d extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}
vendor: 7,523 bytes, line 4
4apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),o=n.node(n.sharedDepth(this.to)),i=new r.p2(u(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,o),t.openStart,t.openEnd);return c.fromReplace(e,this.from,this.to,i)}invert(){return new p(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 p 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=new r.p2(u(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return c.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 p(t.pos,n.pos,this.mark)}merge(e){return e instanceof p&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new p(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 p(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("removeMark",p);class h extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return c.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 h(this.pos,t.marks[n]);return new h(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 h(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 h(t.pos,e.markFromJSON(t.mark))}}a.jsonID("addNodeMark",h);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 c.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return c.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 h(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&&y(e,this.from,this.to)?c.fail("Structure replace would overwrite content"):c.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new i([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.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new m(t.pos,Math.max(t.pos,n.pos),this.slice)}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)}}a.jsonID("replace",m);class g extends a{constructor(e,t,n,r,o,i,l=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=l}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return c.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return c.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?c.fromReplace(e,this.from,this.to,n):c.fail("Content does not fit in gap")}getMap(){return new i([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 g(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),o=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new g(t.pos,n.pos,r,o,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 g(t.from,t.to,t.gapFrom,t.gapTo,r.p2.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let e=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function v(e,t,n,o=n.contentMatch,i=!0){let l=e.doc.nodeAt(t),s=[],a=t+1;for(let t=0;t<l.childCount;t++){let c=l.child(t),u=a+c.nodeSize,d=o.matchType(c.type);if(d){o=d;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new p(a,u,c.marks[t]));if(i&&c.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,o;for(;e=t.exec(c.text);)o||(o=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new m(a+e.index,a+e.index+e[0].length,o))}}else s.push(new m(a,u,r.p2.empty));a=u}
4if(!o.validEnd){let t=o.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 b(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!((0==o||r.canReplace(o,r.childCount))&&(i==r.childCount||r.canReplace(0,i))))break}return null}function w(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let l=i.length?i[0]:t;return n.canReplaceWith(r,o,l)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),l=t.contentMatch.findWrapping(i.type);if(!l)return null;let s=(l.length?l[l.length-1]:t).contentMatch;for(let e=r;s&&e<o;e++)s=s.matchType(n.child(e).type);return s&&s.validEnd?l:null}(r,t);return i?o.map(x).concat({type:t,attrs:n}).concat(i.map(x)):null}function x(e){return{type:e,attrs:null}}function k(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let l,s=/\r?\n|\r/g;for(;l=s.exec(o.text);){let o=e.mapping.slice(r).map(n+1+i+l.index);e.replaceWith(o,o+1,t.type.schema.linebreakReplacement.create())}}})}function C(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let o=e.mapping.slice(r).map(n+1+i);e.replaceWith(o,o+1,t.type.schema.text("\n"))}})}function S(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,l=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!l.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=n-2;e>i;e--,t--){let n=o.node(e),i=o.index(e);if(n.type.spec.isolating)return!1;let l=n.content.cutByIndex(i,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(i+1,n.childCount)||!a.type.validContent(l))return!1}let s=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(s,s,a?a.type:o.node(i+1).type)}function M(e,t){let n=e.resolve(t),r=n.index();return E(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function E(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 o=0;o<t.childCount;o++){let i=t.child(o),l=i.type==r?e.type.schema.nodes.text:i.type;if(!(n=n.matchType(l))||!e.type.allowsMarks(i.marks))return!1}return n.validEnd}(e,t))}function T(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let o,i,l=r.index(e);if(e==r.depth?(o=r.nodeBefore,i=r.nodeAfter):n>0?(o=r.node(e+1),l++,i=r.node(e).maybeChild(l)):(o=r.node(e).maybeChild(l-1),i=r.node(e+1)),o&&!o.isTextblock&&E(o,i)&&r.node(e).canReplace(l,l+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function j(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let e=0;e<n.openStart;e++)o=o.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,i=r.index(t)+(n>0?1:0),l=r.node(t),s=!1;if(1==e)s=l.canReplace(i,i,o);else{let e=l.contentMatchAt(i).findWrapping(o.firstChild.type);s=e&&l.canReplaceWith(i,i,e[0])}if(s)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function R(e,t,n=t,o=r.p2.empty){if(t==n&&!o.size)return null;let i=e.resolve(t),l=e.resolve(n);return A(i,l,o)?new m(t,n,o):new N(i,l,o).fit()}function A(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}a.jsonID("replaceAround",g);class N{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,o=this.close(e<0?this.$to:n.doc.resolve(e));if(!o)return null;let i=this.placed,l=n.depth,s=o.depth;for(;l&&s&&1==i.childCount;)i=i.firstChild.content,l--,s--;let a=new r.p2(i,l,s);return e>-1?new g(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new m(n.pos,o.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 o=t.firstChild;if(t.childCount>1&&(r=0),o.type.spec.isolating&&r<=n){e=n;break}t=o.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,o=(n?(e=L(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let i=this.depth;i>=0;i--){let{type:l,match:s}=this.frontier[i],a,c=null;if(1==t&&(o?s.matchType(o.type)||(c=s.fillBefore(r.HY.from(o),!1)):e&&l.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:i,parent:e,inject:c};if(2==t&&o&&(a=s.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:i,parent:e,wrap:a};if(e&&s.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=L(e,t);return!!o.childCount&&!o.firstChild.isLeaf&&(this.unplaced=new r.p2(e,t+1,Math.max(n,o.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=L(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new r.p2(O(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new r.p2(O(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:o,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let l=this.unplaced,s=n?n.content:l.content,a=l.openStart-e,c=0,u=[],{match:d,type:p}=this.frontier[t];if(o){for(let e=0;e<o.childCount;e++)u.push(o.child(e));d=d.matchFragment(o)}let h=s.size+e-(l.content.size-l.openEnd);for(;c<s.childCount;){let e=s.child(c),t=d.matchType(e.type);if(!t)break;(++c>
vendor: 4,544 bytes, line 4
41||0==a||e.content.size)&&(d=t,u.push(function e(t,n,o){if(n<=0)return t;let i=t.content;return n>1&&(i=i.replaceChild(0,e(i.firstChild,n-1,1==i.childCount?o-1:0))),n>0&&(i=t.type.contentMatch.fillBefore(i).append(i),o<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(r.HY.empty,!0)))),t.copy(i)}(e.mark(p.allowedMarks(e.marks)),1==c?a:0,c==s.childCount?h:-1)))}let f=c==s.childCount;f||(h=-1),this.placed=H(this.placed,t,r.HY.from(u)),this.frontier[t].match=d,f&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<h;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,h<0?l.openEnd:e-1):new r.p2(O(l.content,e,c),l.openStart,l.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!I(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){n:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=I(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=I(e,n,r,t,!0);if(!o||o.childCount)continue n}return{depth:t,fit:i,move:o?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=H(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 o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=H(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=H(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 H(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(H(e.lastChild.content,t-1,n)))}function L(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function I(e,t,n,r,o){let i=e.node(t),l=o?e.indexAfter(t):e.index(t);if(l==i.childCount&&!n.compatibleContent(i.type))return null;let s=r.fillBefore(i.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,i.content,l)?s:null}function _(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let r=e.start(o);if(r<e.pos-(e.depth-o)||t.end(o)>t.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(r==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==r-1)&&n.push(o)}return n}class P 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 c.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 o=t.type.create(n,null,t.marks);return c.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(o),0,t.isLeaf?0:1))}getMap(){return i.empty}invert(e){return new P(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 P(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 P(t.pos,t.attr,t.value)}}a.jsonID("attr",P);class D 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 c.ok(n)}getMap(){return i.empty}invert(e){return new D(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 D(t.attr,t.value)}}a.jsonID("docAttr",D);
4let z=class extends Error{};(z=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),z.prototype.constructor=z,z.prototype.name="TransformError";class V{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 z(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}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 o=R(this.doc,e,t,n);return o&&this.step(o),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,o){if(!o.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),l=e.doc.resolve(n);if(A(i,l,o))return e.step(new m(t,n,o));let s=_(i,e.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(e)>-1?a=e:i.before(e)==t&&s.splice(1,0,-e)}let c=s.indexOf(a),u=[],d=o.openStart;for(let e=o.content,t=0;;t++){let n=e.firstChild;if(u.push(n),t==o.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){var p;let t=u[e],n=(p=t.type).spec.defining||p.spec.definingForContent;if(n&&!t.sameMarkup(i.node(Math.abs(a)-1)))d=e;else if(n||!t.type.isTextblock)break}for(let t=o.openStart;t>=0;t--){let a=(t+d+1)%(o.openStart+1),p=u[a];if(p)for(let t=0;t<s.length;t++){let u=s[(t+c)%s.length],d=!0;u<0&&(d=!1,u=-u);let h=i.node(u-1),f=i.index(u-1);if(h.canReplaceWith(f,f,p.type,p.marks))return e.replace(i.before(u),d?l.after(u):n,new r.p2(function e(t,n,o,i,l){if(n<o){let r=t.firstChild;t=t.replaceChild(0,r.copy(e(r.content,n+1,o,i,r)))}if(n>i){let e=l.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.HY.empty,!0))}return t}(o.content,0,o.openStart,a),a,o.openEnd))}}let h=e.steps.length;for(let r=s.length-1;r>=0&&(e.replace(t,n,o),!(e.steps.length>h));r--){let e=s[r];e<0||(t=i.before(e),n=l.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return!function(e,t,n,o){if(!o.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,o.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.p2(r.HY.from(o),0,0))}(this,e,t,n),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=_(r,o);for(let t=0;t<i.length;t++){let n=i[t],l=t==i.length-1;if(l&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(l||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return e.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i&&r.start(i-1)==o.start(i-1)&&r.node(i-1).canReplace(r.index(i-1),o.index(i-1)))return e.delete(r.before(i),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:o,$to:i,depth:l}=t,s=o.before(l+1),a=i.after(l+1),c=s,u=a,d=r.HY.empty,p=0;for(let e=l,t=!1;e>n;e--)t||o.index(e)>0?(t=!0,d=r.HY.from(o.node(e).copy(d)),p++):c--;let h=r.HY.empty,f=0;for(let e=l,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,h=r.HY.from(i.node(e).copy(h)),f++):u++;e.step(new g(c,u,s,a,new r.p2(d.append(h),p,f),d.size-p,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let o=null,{linebreakReplacement:i}=e.doc.type.schema,l=e.doc.resolve(t-n),s=l.node().type;if(i&&s.inlineContent){let e="pre"==s.whitespace,t=!!s.contentMatch.matchType(i);e&&!t?o=!1:!e&&t&&(o=!0)}let a=e.steps.length;if(!1===o){let r=e.doc.resolve(t+n);C(e,r.node(),r.before(),a)}s.inlineContent&&v(e,t+n-1,s,l.node().contentMatchAt(l.index()),null==o);let c=e.mapping.slice(a),u=c.map(t-n);if(e.step(new m(u,c.map(t+n,-1),r.p2.empty,!0)),!0===o){let t=e.doc.resolve(u);k(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,n){let o=r.HY.empty;for(let e=n.length-1;e>=0;e--){if(o.size){let t=n[e].type.contentMatch.matchFragment(o);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=r.HY.from(n[e].type.create(n[e].attrs,o))}let i=t.start,l=t.end;e.step(new g(i,l,i,l,new r.p2(o,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,o=null){return!function(e,t,n,o,i){if(!o.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 c,u,d="function"==typeof i?i(t):i;if(t.isTextblock&&!t.hasMarkup(o,d)&&(s=e.doc,a=e.mapping.slice(l).map(n),u=(c=s.resolve(a)).index(),c.parent.canReplaceWith(u,u+1,o))){let i=null;if(o.schema.linebreakReplacement){let e="pre"==o.whitespace,t=!!o.contentMatch.matchType(o.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&C(e,t,n,l),v(e,e.mapping.slice(l).map(n,1),o,void 0,null===i);let s=e.mapping.slice(l),a=s.map(n,1),c=s.map(n+t.nodeSize,1);return e.step(new g(a,c,a+1,c-1,new r.p2(r.HY.from(o.create(d,null,t.marks)),0,0),1,!0)),!0===i&&k(e,t,n,l),!1}})}(this,e,t,n,o),this}setNodeMarkup(e,t,n=null,o){return!function(e,t,n,o,i){let l=e.doc.nodeAt(t);if(!l)throw RangeError("No node at given position");n||(n=l.type);let s=n.create(o,null,i||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 g(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,o),this}setNodeAttribute(e,t,n){return this.step(new P(e,t,n)),this}setDocAttribute(e,t){return this.step(new D(e,t)),this}addNodeMark(e,t){return this.step(new h(e,t)),this}
4removeNodeMark(e,t){if(!(t instanceof r.vc)){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(!(t=t.isInSet(n.marks)))return this}return this.step(new f(e,t)),this}split(e,t=1,n){return!function(e,t,n=1,o){let i=e.doc.resolve(t),l=r.HY.empty,s=r.HY.empty;for(let e=i.depth,t=i.depth-n,a=n-1;e>t;e--,a--){l=r.HY.from(i.node(e).copy(l));let t=o&&o[a];s=r.HY.from(t?t.type.create(t.attrs,s):i.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 o,i,l,s;return r=this,l=[],s=[],r.doc.nodesBetween(e,t,(r,a,c)=>{if(!r.isInline)return;let u=r.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){let c=Math.max(a,e),h=Math.min(a+r.nodeSize,t),f=n.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=h:l.push(o=new p(c,h,u[e])));i&&i.to==c?i.to=h:s.push(i=new d(c,h,n))}}),l.forEach(e=>r.step(e)),s.forEach(e=>r.step(e)),this}removeMark(e,t,n){var o;let i,l;return o=this,i=[],l=0,o.doc.nodesBetween(e,t,(o,s)=>{if(!o.isInline)return;l++;let a=null;if(n instanceof r.ZU){let e=o.marks,t;for(;t=n.isInSet(e);)(a||(a=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(o.marks)&&(a=[n]):a=o.marks;if(a&&a.length){let n=Math.min(s+o.nodeSize,t);for(let t=0;t<a.length;t++){let r=a[t],o;for(let e=0;e<i.length;e++){let t=i[e];t.step==l-1&&r.eq(i[e].style)&&(o=t)}o?(o.to=n,o.step=l):i.push({style:r,from:Math.max(s,e),to:n,step:l})}}}
4),i.forEach(e=>o.step(new p(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return v(this,e,t,n),this}}},76517:function(e,t,n){"use strict";n.d(t,{JR:function(){return d},SF:function(){return h},US:function(){return u},wE:function(){return f}});var r=n(29386),o=n(49914),i=n(68253),l=n(97399),s=n(29926);let a=null,c=()=>{let e=a;a=null,e.forEach((e,t)=>{let n=t.state.tr,o=r.Gt.getState(t.state);o&&o.binding&&!o.binding.isDestroyed&&(e.forEach((e,t)=>{n.setMeta(t,e)}),t.dispatch(n))})},u=(e,t,n)=>{a||(a=new Map,s.Vs(0,c)),l.Yu(a,e,l.Ue).set(t,n)},d=(e,t,n)=>{if(0===e)return o.w$(t,0,-1);let r=null===t._first?null:t._first.content.type;for(;null!==r&&t!==r;){if(r instanceof o.eI){if(r._length>=e)return o.w$(r,e,-1);if(e-=r._length,null!==r._item&&null!==r._item.next)r=r._item.next.content.type;else{do r=null===r._item?null:r._item.parent,e--;while(r!==t&&null!==r&&null!==r._item&&null===r._item.next);null!==r&&r!==t&&(r=null===r._item?null:r._item.next.content.type)}}else{let i=(n.get(r)||{nodeSize:0}).nodeSize;if(null!==r._first&&e<i)r=r._first.content.type,e--;else{if(1===e&&0===r._length&&i>1)return new o.Zi(null===r._item?null:r._item.id,null===r._item?o.BW(r):null,null);if(e-=i,null!==r._item&&null!==r._item.next)r=r._item.next.content.type;else{if(0===e)return r=null===r._item?r:r._item.parent,new o.Zi(null===r._item?null:r._item.id,null===r._item?o.BW(r):null,null);do r=r._item.parent,e--;while(r!==t&&null===r._item.next);r!==t&&(r=r._item.next.content.type)}}}if(null===r)throw i.zR();if(0===e&&r.constructor!==o.eI&&r!==t)return p(r._item.parent,r._item)}return o.w$(t,t._length,-1)},p=(e,t)=>{let n=null,r=null;return null===e._item?r=o.BW(e):n=o.at(e._item.id.client,e._item.id.clock),new o.Zi(n,r,t.id)},h=(e,t,n,r)=>{let i=o.or(n,e);if(null===i||i.type!==t&&!o.$4(t,i.type._item))return null;let l=i.type,s=0;if(l.constructor===o.eI)s=i.index;else if(null===l._item||!l._item.deleted){let e=l._first,t=0;for(;t<l._length&&t<i.index&&null!==e;){if(!e.deleted){let n=e.content.type;t++,n instanceof o.eI?s+=n._length:s+=r.get(n).nodeSize}e=e.right}s+=1}for(;l!==t&&null!==l._item;){let e=l._item.parent;if(null===e._item||!e._item.deleted){s+=1;let t=e._first;for(;null!==t;){let e=t.content.type;if(e===l)break;t.deleted||(e instanceof o.eI?s+=e._length:s+=r.get(e).nodeSize),t=t.right}}l=e}return s-1};function f(e){return{type:"doc",content:e.toArray().map(function e(t){let n;if(t.nodeName){n={type:t.nodeName};let r=t.getAttributes();Object.keys(r).length&&(n.attrs=r);let o=t.toArray();o.length&&(n.content=o.map(e).flat())}else n=t.toDelta().map(e=>{let t={type:"text",text:e.insert};return e.attributes&&(t.marks=Object.keys(e.attributes).map(t=>{let n=e.attributes[t],r={type:t};return Object.keys(n)&&(r.attrs=n),r})),t});return n})}}},29386:function(e,t,n){"use strict";n.d(t,{Gk:function(){return i},Gt:function(){return o},uJ:function(){return l}});var r=n(17213);let o=new r.H$("y-sync"),i=new r.H$("y-undo"),l=new r.H$("yjs-cursor")}}]);

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.