@next-bricks/ai 1.32.2 → 1.32.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +3 -3
- package/dist/chunks/{1599.d486042b.js → 1599.59abead2.js} +3 -3
- package/dist/chunks/1599.59abead2.js.map +1 -0
- package/dist/chunks/{1889.a7cfaf0b.js → 1889.b5953bc3.js} +2 -2
- package/dist/chunks/{1889.a7cfaf0b.js.map → 1889.b5953bc3.js.map} +1 -1
- package/dist/chunks/{3171.9780b511.js → 3171.31a91794.js} +2 -2
- package/dist/chunks/{3171.9780b511.js.map → 3171.31a91794.js.map} +1 -1
- package/dist/chunks/3497.7afa0866.js +2 -0
- package/dist/chunks/{3497.57a8e795.js.map → 3497.7afa0866.js.map} +1 -1
- package/dist/chunks/{3933.bf703260.js → 3933.2e3a62a5.js} +2 -2
- package/dist/chunks/{3933.bf703260.js.map → 3933.2e3a62a5.js.map} +1 -1
- package/dist/chunks/{4145.6c95cfd5.js → 4145.0292202d.js} +2 -2
- package/dist/chunks/{4145.6c95cfd5.js.map → 4145.0292202d.js.map} +1 -1
- package/dist/chunks/4306.a80e205b.js +2 -0
- package/dist/chunks/4306.a80e205b.js.map +1 -0
- package/dist/chunks/{4837.036eb2e0.js → 4837.c66a6464.js} +2 -2
- package/dist/chunks/{4837.036eb2e0.js.map → 4837.c66a6464.js.map} +1 -1
- package/dist/chunks/{5552.85cb8ee0.js → 5552.d34acb15.js} +2 -2
- package/dist/chunks/{5552.85cb8ee0.js.map → 5552.d34acb15.js.map} +1 -1
- package/dist/chunks/{6314.4381228e.js → 6314.bd88f388.js} +2 -2
- package/dist/chunks/{6314.4381228e.js.map → 6314.bd88f388.js.map} +1 -1
- package/dist/chunks/{7218.af508ffb.js → 7218.fe78bb98.js} +2 -2
- package/dist/chunks/{7218.af508ffb.js.map → 7218.fe78bb98.js.map} +1 -1
- package/dist/chunks/{7721.2b527d9d.js → 7721.b476f12f.js} +3 -3
- package/dist/chunks/{7721.2b527d9d.js.map → 7721.b476f12f.js.map} +1 -1
- package/dist/chunks/9140.9d5d67d3.js +3 -0
- package/dist/chunks/9140.9d5d67d3.js.map +1 -0
- package/dist/chunks/{9515.ad1df5cd.js → 9515.b748fc98.js} +2 -2
- package/dist/chunks/9515.b748fc98.js.map +1 -0
- package/dist/chunks/{9844.112ed919.js → 9844.1a35968b.js} +2 -2
- package/dist/chunks/{9844.112ed919.js.map → 9844.1a35968b.js.map} +1 -1
- package/dist/chunks/{chat-agent.716d0bbb.js → chat-agent.d0dfeca9.js} +2 -2
- package/dist/chunks/{chat-agent.716d0bbb.js.map → chat-agent.d0dfeca9.js.map} +1 -1
- package/dist/chunks/{main.0ffaf07c.js → main.a41f7ebe.js} +2 -2
- package/dist/chunks/{main.0ffaf07c.js.map → main.a41f7ebe.js.map} +1 -1
- package/dist/{index.7a3b1862.js → index.b563beeb.js} +2 -2
- package/dist/{index.7a3b1862.js.map → index.b563beeb.js.map} +1 -1
- package/dist/manifest.json +99 -99
- package/package.json +2 -2
- package/dist/chunks/1599.d486042b.js.map +0 -1
- package/dist/chunks/3497.57a8e795.js +0 -2
- package/dist/chunks/4185.f5e1f846.js +0 -3
- package/dist/chunks/4185.f5e1f846.js.map +0 -1
- package/dist/chunks/4306.c8f60bac.js +0 -2
- package/dist/chunks/4306.c8f60bac.js.map +0 -1
- package/dist/chunks/9515.ad1df5cd.js.map +0 -1
- /package/dist/chunks/{1599.d486042b.js.LICENSE.txt → 1599.59abead2.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{7721.2b527d9d.js.LICENSE.txt → 7721.b476f12f.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{4185.f5e1f846.js.LICENSE.txt → 9140.9d5d67d3.js.LICENSE.txt} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 1599.
|
|
2
|
-
(globalThis.webpackChunk_next_bricks_ai=globalThis.webpackChunk_next_bricks_ai||[]).push([[1055,1599],{62:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},96:(e,t,n)=>{"use strict";n.d(t,{JJ:()=>a,dv:()=>i,fV:()=>o,tG:()=>s});var r=n(3710);class o{constructor(e,t){var n;this.match=e,this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){let i=n;if(t[1]){let e=t[0].lastIndexOf(t[1]);i+=t[0].slice(e+t[1].length);let n=(r+=e)-o;n>0&&(i=t[0].slice(e-n,e)+i,r=o)}return e.tr.insertText(i,r,o)}):t}}const i=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let o,i=n[r];if(i.spec.isInputRules&&(o=i.getState(e))){if(t){let n=e.tr,r=o.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(o.text){let t=n.doc.resolve(o.from).marks();n.replaceWith(o.from,o.to,e.schema.text(o.text,t))}else n.delete(o.from,o.to);t(n)}return!0}}return!1};function s(e,t,n=null,i){return new o(e,((e,o,s,a)=>{let l=n instanceof Function?n(o):n,c=e.tr.delete(s,a),u=c.doc.resolve(s).blockRange(),d=u&&(0,r.oM)(u,t,l);if(!d)return null;c.wrap(u,d);let p=c.doc.resolve(s-1).nodeBefore;return p&&p.type==t&&(0,r.n9)(c.doc,s-1)&&(!i||i(o,p))&&c.join(s-1),c}))}function a(e,t,n=null){return new o(e,((e,r,o,i)=>{let s=e.doc.resolve(o),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,a):null}))}new o(/--$/,"—"),new o(/\.\.\.$/,"…"),new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new o(/"$/,"”"),new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new o(/'$/,"’")},231:(e,t,n)=>{"use strict";function r(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}n.d(t,{A:()=>r})},258:(e,t,n)=>{"use strict";n.d(t,{vG:()=>m,sb:()=>h,zQ:()=>f});var r=n(8769),o=n.n(r),i=n(5694),s=n(9424),a=n(9154),l=n(6127);const c=(e,t)=>new l.Y(e).setA(t).toRgbString(),u=(e,t)=>new l.Y(e).darken(t).toHexString(),d=e=>{const t=(0,s.cM)(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},p=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:c(r,.88),colorTextSecondary:c(r,.65),colorTextTertiary:c(r,.45),colorTextQuaternary:c(r,.25),colorFill:c(r,.15),colorFillSecondary:c(r,.06),colorFillTertiary:c(r,.04),colorFillQuaternary:c(r,.02),colorBgSolid:c(r,1),colorBgSolidHover:c(r,.75),colorBgSolidActive:c(r,.95),colorBgLayout:u(n,4),colorBgContainer:u(n,0),colorBgElevated:u(n,0),colorBgSpotlight:c(r,.85),colorBgBlur:"transparent",colorBorder:u(n,15),colorBorderSecondary:u(n,6)}},f=(0,i.an)((function(e){s.uy.pink=s.uy.magenta,s.UA.pink=s.UA.magenta;const t=Object.keys(a.r).map((t=>{const n=e[t]===s.uy[t]?s.UA[t]:(0,s.cM)(e[t]);return new Array(10).fill(1).reduce(((e,r,o)=>(e[`${t}-${o+1}`]=n[o],e[`${t}${o+1}`]=n[o],e)),{})})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),function(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:i,colorError:s,colorInfo:a,colorPrimary:c,colorBgBase:u,colorTextBase:d}=e,p=n(c),f=n(o),h=n(i),m=n(s),g=n(a),y=r(u,d),v=n(e.colorLink||e.colorInfo),b=new l.Y(m[1]).mix(new l.Y(m[3]),50).toHexString();return Object.assign(Object.assign({},y),{colorPrimaryBg:p[1],colorPrimaryBgHover:p[2],colorPrimaryBorder:p[3],colorPrimaryBorderHover:p[4],colorPrimaryHover:p[5],colorPrimary:p[6],colorPrimaryActive:p[7],colorPrimaryTextHover:p[8],colorPrimaryText:p[9],colorPrimaryTextActive:p[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:b,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],colorBgMask:new l.Y("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}(e,{generateColorPalettes:d,generateNeutralColorPalettes:p})),(e=>{const t=function(e){const t=new Array(10).fill(null).map(((t,n)=>{const r=n-1,o=e*Math.pow(Math.E,r/5),i=n>1?Math.floor(o):Math.ceil(o);return 2*Math.floor(i/2)}));return t[1]=e,t.map((e=>{return{size:e,lineHeight:(t=e,(t+8)/t)};var t}))}(e),n=t.map((e=>e.size)),r=t.map((e=>e.lineHeight)),o=n[1],i=n[0],s=n[2],a=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:s,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:a,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(a*o),fontHeightLG:Math.round(c*s),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}})(e.fontSize)),function(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}(e)),(e=>{const{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}})(e)),function(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+2*t).toFixed(1)}s`,motionDurationSlow:`${(n+3*t).toFixed(1)}s`,lineWidthBold:o+1},(e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}})(r))}(e))})),h={token:a.A,override:{override:a.A},hashed:!0},m=o().createContext(h)},414:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(1369);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,r.A)(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},536:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>ce,PD:()=>at,hm:()=>Le,Wf:()=>K});var r=n(7268),o=n(5119),i=n(5715),s=n(6090),a=n(7043),l=n(96),c=n(7096);const u=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ","a"],["ُ","u"],["ِ","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]];const d=[["&"," and "],["🦄"," unicorn "],["♥"," love "]];function p(e,t){if("string"!=typeof e)throw new TypeError(`Expected a string, got \`${typeof e}\``);const n=(t={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...t}).preserveLeadingUnderscore&&e.startsWith("_"),r=t.preserveTrailingDash&&e.endsWith("-");e=function(e,t){if("string"!=typeof e)throw new TypeError(`Expected a string, got \`${typeof e}\``);t={customReplacements:[],...t};const n=new Map([...u,...t.customReplacements]);return(e=((e,t)=>{for(const[n,r]of t)e=e.replace(new RegExp((0,c.A)(n),"g"),r);return e})(e=e.normalize(),n)).normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize()}(e,{customReplacements:new Map([...d,...t.customReplacements])}),t.decamelize&&(e=(e=>e.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"))(e));const o=(e=>{let t="a-z\\d";if(t+=e.lowercase?"":"A-Z",e.preserveCharacters.length>0)for(const n of e.preserveCharacters){if(n===e.separator)throw new Error(`The separator character \`${e.separator}\` cannot be included in preserved characters: ${e.preserveCharacters}`);t+=(0,c.A)(n)}return new RegExp(`[^${t}]+`,"g")})(t);return t.lowercase&&(e=e.toLowerCase()),e=(e=(e=e.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3")).replace(o,t.separator)).replace(/\\/g,""),t.separator&&(e=((e,t)=>{const n=(0,c.A)(t);return e.replace(new RegExp(`${n}{2,}`,"g"),t).replace(new RegExp(`^${n}|${n}$`,"g"),"")})(e,t.separator)),n&&(e=`_${e}`),r&&(e=`${e}-`),e}var f=n(1570),h=n(4254),m=n(3710);function g(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!i&&(!n||(r.node(i.depth-1).type==e?function(e,t,n,r){let o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new m.Wg(i-1,a,i,a,new s.Ji(s.FK.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new s.u$(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const l=(0,m.jP)(r);if(null==l)return!1;o.lift(r,l);let c=o.mapping.map(i,-1)-1;return(0,m.n9)(o.doc,c)&&o.join(c),t(o.scrollIntoView()),!0}(t,n,e,i):function(e,t,n){let r=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,i=n.startIndex;t>i;t--)e-=o.child(t).nodeSize,r.delete(e-1,e+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,c=n.endIndex==o.childCount,u=i.node(-1),d=i.index(-1);if(!u.canReplace(d+(l?0:1),d+1,a.content.append(c?s.FK.empty:s.FK.from(o))))return!1;let p=i.pos,f=p+a.nodeSize;return r.step(new m.Wg(p-(l?1:0),f+(c?1:0),p+1,f-1,new s.Ji((l?s.FK.empty:s.FK.from(o.copy(s.FK.empty))).append(c?s.FK.empty:s.FK.from(o.copy(s.FK.empty))),l?0:1,c?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,i)))}}var y=n(3686),v=n(4269);function b(e){return String(e||"").toUpperCase()}var w=n(6197);function k(){return function(e){const t=function(e){const t=new Map;if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return(0,v.YR)(e,"definition",(function(e){const n=b(e.identifier);n&&!t.get(n)&&t.set(n,e)})),function(e){const n=b(e);return t.get(n)}}(e);(0,v.YR)(e,(function(e,n,r){if("definition"===e.type&&void 0!==r&&"number"==typeof n)return r.children.splice(n,1),[w._Z,n];if("imageReference"===e.type||"linkReference"===e.type){const o=t(e.identifier);if(o&&r&&"number"==typeof n)return r.children[n]="imageReference"===e.type?{type:"image",url:o.url,title:o.title,alt:e.alt}:{type:"link",url:o.url,title:o.title,children:e.children},[w._Z,n]}}))}}function x(e,t){var n;if(!(t.childCount>=1&&"hardbreak"===(null==(n=t.lastChild)?void 0:n.type.name)))return void e.next(t.content);const r=[];t.content.forEach(((e,n,o)=>{o!==t.childCount-1&&r.push(e)})),e.next(s.FK.fromArray(r))}function A(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}const S=(0,r.JY)("emphasis");A(S,{displayName:"Attr<emphasis>",group:"Emphasis"});const E=(0,r.hk)("emphasis",(e=>({attrs:{marker:{default:e.get(o.P5).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>"italic"===e}],toDOM:t=>["em",e.get(S.key)(t)],parseMarkdown:{match:e=>"emphasis"===e.type,runner:(e,t,n)=>{e.openMark(n,{marker:t.marker}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"emphasis"===e.type.name,runner:(e,t)=>{e.withMark(t,"emphasis",void 0,{marker:t.attrs.marker})}}})));A(E.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"}),A(E.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const C=(0,r.yu)("ToggleEmphasis",(e=>()=>(0,i.wh)(E.type(e))));A(C,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const O=(0,r.b_)((e=>(0,h.uX)(/(?:^|[^*])\*([^*]+)\*$/,E.type(e),{updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}})));A(O,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const M=(0,r.b_)((e=>(0,h.uX)(/(?:^|[^_])_([^_]+)_$/,E.type(e),{updateCaptured:({fullMatch:e,start:t})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:t+1}})));A(M,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const N=(0,r.pq)("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{const t=e.get(o.MD);return()=>t.call(C.key)}}});A(N.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"}),A(N.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const T=(0,r.JY)("strong");A(T,{displayName:"Attr<strong>",group:"Strong"});const I=(0,r.hk)("strong",(e=>({attrs:{marker:{default:e.get(o.P5).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>"bold"===e}],toDOM:t=>["strong",e.get(T.key)(t)],parseMarkdown:{match:e=>"strong"===e.type,runner:(e,t,n)=>{e.openMark(n,{marker:t.marker}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"strong"===e.type.name,runner:(e,t)=>{e.withMark(t,"strong",void 0,{marker:t.attrs.marker})}}})));A(I.mark,{displayName:"MarkSchema<strong>",group:"Strong"}),A(I.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const R=(0,r.yu)("ToggleStrong",(e=>()=>(0,i.wh)(I.type(e))));A(R,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const D=(0,r.b_)((e=>(0,h.uX)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,I.type(e))));A(D,{displayName:"InputRule<strong>",group:"Strong"});const P=(0,r.pq)("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{const t=e.get(o.MD);return()=>t.call(R.key)}}});A(P.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"}),A(P.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const F=(0,r.JY)("inlineCode");A(F,{displayName:"Attr<inlineCode>",group:"InlineCode"});const L=(0,r.hk)("inlineCode",(e=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(F.key)(t)],parseMarkdown:{match:e=>"inlineCode"===e.type,runner:(e,t,n)=>{e.openMark(n),e.addText(t.value),e.closeMark(n)}},toMarkdown:{match:e=>"inlineCode"===e.type.name,runner:(e,t,n)=>{e.withMark(t,"inlineCode",n.text||"")}}})));A(L.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"}),A(L.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const _=(0,r.yu)("ToggleInlineCode",(e=>()=>(t,n)=>{const{selection:r,tr:o}=t;if(r.empty)return!1;const{from:i,to:s}=r;return t.doc.rangeHasMark(i,s,L.type(e))?(null==n||n(o.removeMark(i,s,L.type(e))),!0):(Object.keys(t.schema.marks).filter((e=>e!==L.type.name)).map((e=>t.schema.marks[e])).forEach((e=>{o.removeMark(i,s,e)})),null==n||n(o.addMark(i,s,L.type(e).create())),!0)}));A(_,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const z=(0,r.b_)((e=>(0,h.uX)(/(?:\`)([^\`]+)(?:\`)$/,L.type(e))));A(z,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const $=(0,r.pq)("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{const t=e.get(o.MD);return()=>t.call(_.key)}}});A($.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"}),A($.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const j=(0,r.JY)("link");A(j,{displayName:"Attr<link>",group:"Link"});const B=(0,r.hk)("link",(e=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(j.key)(t),...t.attrs}],parseMarkdown:{match:e=>"link"===e.type,runner:(e,t,n)=>{const r=t.url,o=t.title;e.openMark(n,{href:r,title:o}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"link"===e.type.name,runner:(e,t)=>{e.withMark(t,"link",void 0,{title:t.attrs.title,url:t.attrs.href})}}})));A(B.mark,{displayName:"MarkSchema<link>",group:"Link"});const H=(0,r.yu)("ToggleLink",(e=>(t={})=>(0,i.wh)(B.type(e),t)));A(H,{displayName:"Command<toggleLinkCommand>",group:"Link"});const V=(0,r.yu)("UpdateLink",(e=>(t={})=>(n,r)=>{if(!r)return!1;let o,i=-1;const{selection:s}=n,{from:a,to:l}=s;if(n.doc.nodesBetween(a,a===l?l+1:l,((t,n)=>{if(B.type(e).isInSet(t.marks))return o=t,i=n,!1})),!o)return!1;const c=o.marks.find((({type:t})=>t===B.type(e)));if(!c)return!1;const u=i,d=i+o.nodeSize,{tr:p}=n,h=B.type(e).create({...c.attrs,...t});return!!h&&(r(p.removeMark(u,d,c).addMark(u,d,h).setSelection(new f.U3(p.selection.$anchor)).scrollIntoView()),!0)}));A(V,{displayName:"Command<updateLinkCommand>",group:"Link"});const U=(0,r.dz)("doc",(()=>({content:"block+",parseMarkdown:{match:({type:e})=>"root"===e,runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>"doc"===e.type.name,runner:(e,t)=>{e.openNode("root"),e.next(t.content)}}})));A(U,{displayName:"NodeSchema<doc>",group:"Doc"});const W=(0,r.YR)("paragraph");A(W,{displayName:"Attr<paragraph>",group:"Paragraph"});const K=(0,r.Yh)("paragraph",(e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(W.key)(t),0],parseMarkdown:{match:e=>"paragraph"===e.type,runner:(e,t,n)=>{e.openNode(n),t.children?e.next(t.children):e.addText(t.value||""),e.closeNode()}},toMarkdown:{match:e=>"paragraph"===e.type.name,runner:(e,t)=>{e.openNode("paragraph"),x(e,t),e.closeNode()}}})));A(K.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"}),A(K.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const q=(0,r.yu)("TurnIntoText",(e=>()=>(0,i.y_)(K.type(e))));A(q,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const G=(0,r.pq)("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{const t=e.get(o.MD);return()=>t.call(q.key)}}});A(G.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"}),A(G.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const Y=Array(6).fill(0).map(((e,t)=>t+1)),J=(0,r.Qx)((function(e){return p(e.textContent)}),"headingIdGenerator");A(J,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const X=(0,r.YR)("heading");A(X,{displayName:"Attr<heading>",group:"Heading"});const Z=(0,r.Yh)("heading",(e=>{const t=e.get(J.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:Y.map((e=>({tag:`h${e}`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw(0,a.Ik)(t);return{level:e,id:t.id}}}))),toDOM:n=>[`h${n.attrs.level}`,{...e.get(X.key)(n),id:n.attrs.id||t(n)},0],parseMarkdown:{match:({type:e})=>"heading"===e,runner:(e,t,n)=>{const r=t.depth;e.openNode(n,{level:r}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>"heading"===e.type.name,runner:(e,t)=>{e.openNode("heading",void 0,{depth:t.attrs.level}),x(e,t),e.closeNode()}}}}));A(Z.node,{displayName:"NodeSchema<heading>",group:"Heading"}),A(Z.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const Q=(0,r.b_)((e=>(0,l.JJ)(/^(?<hashes>#+)\s$/,Z.type(e),(t=>{var n,r;const i=(null==(r=null==(n=t.groups)?void 0:n.hashes)?void 0:r.length)||0,s=e.get(o.kY),{$from:a}=s.state.selection,l=a.node();if("heading"===l.type.name){let e=Number(l.attrs.level)+Number(i);return e>6&&(e=6),{level:e}}return{level:i}}))));A(Q,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const ee=(0,r.yu)("WrapInHeading",(e=>t=>(t??(t=1),t<1?(0,i.y_)(K.type(e)):(0,i.y_)(Z.type(e),{level:t}))));A(ee,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const te=(0,r.yu)("DowngradeHeading",(e=>()=>(t,n,r)=>{const{$from:o}=t.selection,s=o.node();if(s.type!==Z.type(e)||!t.selection.empty||0!==o.parentOffset)return!1;const a=s.attrs.level-1;return a?(null==n||n(t.tr.setNodeMarkup(t.selection.$from.before(),void 0,{...s.attrs,level:a})),!0):(0,i.y_)(K.type(e))(t,n,r)}));A(te,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const ne=(0,r.pq)("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{const t=e.get(o.MD);return()=>t.call(te.key)}}});A(ne.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"}),A(ne.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const re=(0,r.YR)("blockquote");A(re,{displayName:"Attr<blockquote>",group:"Blockquote"});const oe=(0,r.Yh)("blockquote",(e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(re.key)(t),0],parseMarkdown:{match:({type:e})=>"blockquote"===e,runner:(e,t,n)=>{e.openNode(n).next(t.children).closeNode()}},toMarkdown:{match:e=>"blockquote"===e.type.name,runner:(e,t)=>{e.openNode("blockquote").next(t.content).closeNode()}}})));A(oe.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"}),A(oe.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const ie=(0,r.b_)((e=>(0,l.tG)(/^\s*>\s$/,oe.type(e))));A(ie,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const se=(0,r.yu)("WrapInBlockquote",(e=>()=>(0,i.Im)(oe.type(e))));A(se,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const ae=(0,r.pq)("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{const t=e.get(o.MD);return()=>t.call(se.key)}}});A(ae.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"}),A(ae.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const le=(0,r.YR)("codeBlock",(()=>({pre:{},code:{}})));A(le,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const ce=(0,r.Yh)("code_block",(e=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{language:e.dataset.language}}}],toDOM:t=>{const n=e.get(le.key)(t);return["pre",{...n.pre,"data-language":t.attrs.language},["code",n.code,0]]},parseMarkdown:{match:({type:e})=>"code"===e,runner:(e,t,n)=>{const r=t.lang,o=t.value;e.openNode(n,{language:r}),o&&e.addText(o),e.closeNode()}},toMarkdown:{match:e=>"code_block"===e.type.name,runner:(e,t)=>{var n;e.addNode("code",void 0,(null==(n=t.content.firstChild)?void 0:n.text)||"",{lang:t.attrs.language})}}})));A(ce.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"}),A(ce.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const ue=(0,r.b_)((e=>(0,l.JJ)(/^```(?<language>[a-z]*)?[\s\n]$/,ce.type(e),(e=>{var t;return{language:(null==(t=e.groups)?void 0:t.language)??""}}))));A(ue,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const de=(0,r.yu)("CreateCodeBlock",(e=>(t="")=>(0,i.y_)(ce.type(e),{language:t})));A(de,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"}),A((0,r.yu)("UpdateCodeBlockLanguage",(()=>({pos:e,language:t}={pos:-1,language:""})=>(n,r)=>e>=0&&(null==r||r(n.tr.setNodeAttribute(e,"language",t)),!0))),{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const pe=(0,r.pq)("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{const t=e.get(o.MD);return()=>t.call(de.key)}}});A(pe.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"}),A(pe.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const fe=(0,r.YR)("image");A(fe,{displayName:"Attr<image>",group:"Image"});const he=(0,r.Yh)("image",(e=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:""},alt:{default:""},title:{default:""}},parseDOM:[{tag:"img[src]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(fe.key)(t),...t.attrs}],parseMarkdown:{match:({type:e})=>"image"===e,runner:(e,t,n)=>{const r=t.url,o=t.alt,i=t.title;e.addNode(n,{src:r,alt:o,title:i})}},toMarkdown:{match:e=>"image"===e.type.name,runner:(e,t)=>{e.addNode("image",void 0,void 0,{title:t.attrs.title,url:t.attrs.src,alt:t.attrs.alt})}}})));A(he.node,{displayName:"NodeSchema<image>",group:"Image"}),A(he.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const me=(0,r.yu)("InsertImage",(e=>(t={})=>(n,r)=>{if(!r)return!0;const{src:o="",alt:i="",title:s=""}=t,a=he.type(e).create({src:o,alt:i,title:s});return a&&r(n.tr.replaceSelectionWith(a).scrollIntoView()),!0}));A(me,{displayName:"Command<insertImageCommand>",group:"Image"});const ge=(0,r.yu)("UpdateImage",(e=>(t={})=>(n,r)=>{const o=(0,h.UM)(n.selection,he.type(e));if(!o)return!1;const{node:i,pos:s}=o,a={...i.attrs},{src:l,alt:c,title:u}=t;return void 0!==l&&(a.src=l),void 0!==c&&(a.alt=c),void 0!==u&&(a.title=u),null==r||r(n.tr.setNodeMarkup(s,void 0,a).scrollIntoView()),!0}));A(ge,{displayName:"Command<updateImageCommand>",group:"Image"}),A((0,r.b_)((e=>new l.fV(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,((t,n,r,o)=>{const[i,s,a="",l]=n;return i?t.tr.replaceWith(r,o,he.type(e).create({src:a,alt:s,title:l})):null})))),{displayName:"InputRule<insertImageInputRule>",group:"Image"});const ye=(0,r.YR)("hardbreak",(e=>({"data-is-inline":e.attrs.isInline})));A(ye,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const ve=(0,r.Yh)("hardbreak",(e=>({inline:!0,group:"inline",attrs:{isInline:{default:!1}},selectable:!1,parseDOM:[{tag:"br"}],toDOM:t=>["br",e.get(ye.key)(t)],parseMarkdown:{match:({type:e})=>"break"===e,runner:(e,t,n)=>{var r;e.addNode(n,{isInline:!(null==(r=t.data)||!r.isInline)})}},leafText:()=>"\n",toMarkdown:{match:e=>"hardbreak"===e.type.name,runner:(e,t)=>{t.attrs.isInline?e.addNode("text",void 0,"\n"):e.addNode("break")}}})));A(ve.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"}),A(ve.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const be=(0,r.yu)("InsertHardbreak",(e=>()=>(t,n)=>{var r;const{selection:o,tr:i}=t;if(!(o instanceof f.U3))return!1;if(o.empty){const e=o.$from.node();if(e.childCount>0&&"hardbreak"===(null==(r=e.lastChild)?void 0:r.type.name))return null==n||n(i.replaceRangeWith(o.to-1,o.to,t.schema.node("paragraph")).setSelection(f.LN.near(i.doc.resolve(o.to))).scrollIntoView()),!0}return null==n||n(i.setMeta("hardbreak",!0).replaceSelectionWith(ve.type(e).create()).scrollIntoView()),!0}));A(be,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const we=(0,r.pq)("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{const t=e.get(o.MD);return()=>t.call(be.key)}}});A(we.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"}),A(we.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const ke=(0,r.YR)("hr");A(ke,{displayName:"Attr<hr>",group:"Hr"});const xe=(0,r.Yh)("hr",(e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(ke.key)(t)],parseMarkdown:{match:({type:e})=>"thematicBreak"===e,runner:(e,t,n)=>{e.addNode(n)}},toMarkdown:{match:e=>"hr"===e.type.name,runner:e=>{e.addNode("thematicBreak")}}})));A(xe.node,{displayName:"NodeSchema<hr>",group:"Hr"}),A(xe.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const Ae=(0,r.b_)((e=>new l.fV(/^(?:---|___\s|\*\*\*\s)$/,((t,n,r,o)=>{const{tr:i}=t;return n[0]&&i.replaceWith(r-1,o,xe.type(e).create()),i}))));A(Ae,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const Se=(0,r.yu)("InsertHr",(e=>()=>(t,n)=>{if(!n)return!0;const r=K.node.type(e).create(),{tr:o,selection:i}=t,{from:s}=i,a=xe.type(e).create();if(!a)return!0;const l=o.replaceSelectionWith(a).insert(s,r),c=f.LN.findFrom(l.doc.resolve(s),1,!0);return c&&n(l.setSelection(c).scrollIntoView()),!0}));A(Se,{displayName:"Command<insertHrCommand>",group:"Hr"});const Ee=(0,r.YR)("bulletList");A(Ee,{displayName:"Attr<bulletList>",group:"BulletList"});const Ce=(0,r.Yh)("bullet_list",(e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{spread:e.dataset.spread}}}],toDOM:t=>["ul",{...e.get(Ee.key)(t),"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:t})=>"list"===e&&!t,runner:(e,t,n)=>{const r=null!=t.spread?`${t.spread}`:"false";e.openNode(n,{spread:r}).next(t.children).closeNode()}},toMarkdown:{match:e=>"bullet_list"===e.type.name,runner:(e,t)=>{e.openNode("list",void 0,{ordered:!1,spread:"true"===t.attrs.spread}).next(t.content).closeNode()}}})));A(Ce.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"}),A(Ce.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const Oe=(0,r.b_)((e=>(0,l.tG)(/^\s*([-+*])\s$/,Ce.type(e))));A(Oe,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const Me=(0,r.yu)("WrapInBulletList",(e=>()=>(0,i.Im)(Ce.type(e))));A(Me,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const Ne=(0,r.pq)("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{const t=e.get(o.MD);return()=>t.call(Me.key)}}});A(Ne.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"}),A(Ne.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const Te=(0,r.YR)("orderedList");A(Te,{displayName:"Attr<orderedList>",group:"OrderedList"});const Ie=(0,r.Yh)("ordered_list",(e=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{spread:e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(Te.key)(t),...1===t.attrs.order?{}:t.attrs.order,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:t})=>"list"===e&&!!t,runner:(e,t,n)=>{const r=null!=t.spread?`${t.spread}`:"true";e.openNode(n,{spread:r}).next(t.children).closeNode()}},toMarkdown:{match:e=>"ordered_list"===e.type.name,runner:(e,t)=>{e.openNode("list",void 0,{ordered:!0,start:1,spread:"true"===t.attrs.spread}),e.next(t.content),e.closeNode()}}})));A(Ie.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"}),A(Ie.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const Re=(0,r.b_)((e=>(0,l.tG)(/^\s*(\d+)\.\s$/,Ie.type(e),(e=>({order:Number(e[1])})),((e,t)=>t.childCount+t.attrs.order===Number(e[1])))));A(Re,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const De=(0,r.yu)("WrapInOrderedList",(e=>()=>(0,i.Im)(Ie.type(e))));A(De,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const Pe=(0,r.pq)("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{const t=e.get(o.MD);return()=>t.call(De.key)}}});A(Pe.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"}),A(Pe.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const Fe=(0,r.YR)("listItem");A(Fe,{displayName:"Attr<listItem>",group:"ListItem"});const Le=(0,r.Yh)("list_item",(e=>({group:"listItem",content:"paragraph block*",attrs:{label:{default:"•"},listType:{default:"bullet"},spread:{default:"true"}},defining:!0,parseDOM:[{tag:"li",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{label:e.dataset.label,listType:e.dataset["list-type"],spread:e.dataset.spread}}}],toDOM:t=>["li",{...e.get(Fe.key)(t),"data-label":t.attrs.label,"data-list-type":t.attrs.listType,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:e})=>"listItem"===e,runner:(e,t,n)=>{const r=null!=t.label?`${t.label}.`:"•",o=null!=t.label?"ordered":"bullet",i=null!=t.spread?`${t.spread}`:"true";e.openNode(n,{label:r,listType:o,spread:i}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>"list_item"===e.type.name,runner:(e,t)=>{e.openNode("listItem",void 0,{spread:"true"===t.attrs.spread}),e.next(t.content),e.closeNode()}}})));A(Le.node,{displayName:"NodeSchema<listItem>",group:"ListItem"}),A(Le.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const _e=(0,r.yu)("SinkListItem",(e=>()=>{return t=Le.type(e),function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,(e=>e.childCount>0&&e.firstChild.type==t));if(!i)return!1;let a=i.startIndex;if(0==a)return!1;let l=i.parent,c=l.child(a-1);if(c.type!=t)return!1;if(n){let r=c.lastChild&&c.lastChild.type==l.type,o=s.FK.from(r?t.create():null),a=new s.Ji(s.FK.from(t.create(null,s.FK.from(l.type.create(null,o)))),r?3:1,0),u=i.start,d=i.end;n(e.tr.step(new m.Wg(u-(r?3:1),d,u,d,a,1,!0)).scrollIntoView())}return!0};var t}));A(_e,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const ze=(0,r.yu)("SplitListItem",(e=>()=>g(Le.type(e))));A(ze,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const $e=(0,r.yu)("SplitListItem",(e=>()=>{return t=Le.type(e),function(e,n){let{$from:r,$to:o,node:i}=e.selection;if(i&&i.isBlock||r.depth<2||!r.sameParent(o))return!1;let a=r.node(-1);if(a.type!=t)return!1;if(0==r.parent.content.size&&r.node(-1).childCount==r.indexAfter(-1)){if(3==r.depth||r.node(-3).type!=t||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let o=s.FK.empty,i=r.index(-1)?1:r.index(-2)?2:3;for(let e=r.depth-i;e>=r.depth-3;e--)o=s.FK.from(r.node(e).copy(o));let a=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;o=o.append(s.FK.from(t.createAndFill()));let l=r.before(r.depth-(i-1)),c=e.tr.replace(l,r.after(-a),new s.Ji(o,4-i,0)),u=-1;c.doc.nodesBetween(l,c.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0==e.content.size&&(u=t+1)})),u>-1&&c.setSelection(f.LN.near(c.doc.resolve(u))),n(c.scrollIntoView())}return!0}let l=o.pos==r.end()?a.contentMatchAt(0).defaultType:null,c=e.tr.delete(r.pos,o.pos),u=l?[null,{type:l}]:void 0;return!!(0,m.zy)(c.doc,r.pos,2,u)&&(n&&n(c.split(r.pos,2,u).scrollIntoView()),!0)};var t}));A($e,{displayName:"Command<splitListItemCommand>",group:"ListItem"});const je=(0,r.yu)("LiftFirstListItem",(e=>()=>function(e){return(t,n,r)=>{const{selection:o}=t;if(!(o instanceof f.U3))return!1;const{empty:i,$from:s}=o;if(!i||0!==s.parentOffset)return!1;const a=s.node(-1);return!(a.type!==Le.type(e)||a.firstChild!==s.node()||s.node(-2).childCount>1)&&g(Le.type(e))(t,n,r)}}(e)));A(je,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const Be=(0,r.pq)("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{const t=e.get(o.MD);return()=>t.call($e.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{const t=e.get(o.MD);return()=>t.call(_e.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{const t=e.get(o.MD);return()=>t.call(ze.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{const t=e.get(o.MD);return()=>t.call(je.key)}}});A(Be.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"}),A(Be.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const He=(0,r.dz)("text",(()=>({group:"inline",parseMarkdown:{match:({type:e})=>"text"===e,runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>"text"===e.type.name,runner:(e,t)=>{e.addNode("text",void 0,t.text)}}})));A(He,{displayName:"NodeSchema<text>",group:"Text"});const Ve=(0,r.YR)("html");A(Ve,{displayName:"Attr<html>",group:"Html"});const Ue=(0,r.Yh)("html",(e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:t=>{const n=document.createElement("span"),r={...e.get(Ve.key)(t),"data-value":t.attrs.value,"data-type":"html"};return n.textContent=t.attrs.value,["span",r,t.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:e=>({value:e.dataset.value??""})}],parseMarkdown:{match:({type:e})=>"html"===e,runner:(e,t,n)=>{e.addNode(n,{value:t.value})}},toMarkdown:{match:e=>"html"===e.type.name,runner:(e,t)=>{e.addNode("html",void 0,t.attrs.value)}}})));A(Ue.node,{displayName:"NodeSchema<html>",group:"Html"}),A(Ue.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const We=[U,W,K,J,X,Z,ye,ve,re,oe,le,ce,ke,xe,fe,he,Ee,Ce,Te,Ie,Fe,Le,S,E,T,I,F,L,j,B,Ve,Ue,He].flat(),Ke=[ie,Oe,Re,ue,Ae,Q].flat(),qe=[O,M,z,D],Ge=[q,se,ee,te,de,be,Se,me,ge,De,Me,_e,$e,ze,je,C,_,R,H,V],Ye=[ae,pe,we,ne,Be,Pe,Ne,G,N,$,P].flat(),Je=(0,r.lz)("remarkAddOrderInList",(()=>()=>e=>{(0,v.YR)(e,"list",(e=>{if(e.ordered){const t=e.start??1;e.children.forEach(((e,n)=>{e.label=n+t}))}}))}));A(Je.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"}),A(Je.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const Xe=(0,r.lz)("remarkLineBreak",(()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;(0,v.YR)(e,"text",((e,n,r)=>{if(!e.value||"string"!=typeof e.value)return;const o=[];let i=0;t.lastIndex=0;let s=t.exec(e.value);for(;s;){const n=s.index;i!==n&&o.push({type:"text",value:e.value.slice(i,n)}),o.push({type:"break",data:{isInline:!0}}),i=n+s[0].length,s=t.exec(e.value)}return o.length>0&&r&&"number"==typeof n?(i<e.value.length&&o.push({type:"text",value:e.value.slice(i)}),r.children.splice(n,1,...o),n+o.length):void 0}))}));A(Xe.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"}),A(Xe.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const Ze=(0,r.lz)("remarkInlineLink",(()=>k));A(Ze.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"}),A(Ze.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const Qe=(0,r.lz)("remarkHTMLTransformer",(()=>()=>e=>{!function(e){(function e(t,n,r){if((e=>!!e.children)(t)){const n=[];for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r];if(o){const i=e(o,r,t);if(i)for(let e=0,t=i.length;e<t;e++){const t=i[e];t&&n.push(t)}}}t.children=n}return((e,t,n)=>(e=>"html"===e.type)(e)?("root"===(null==n?void 0:n.type)&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]):[e])(t,0,r)})(e,0,null)[0]}(e)}));A(Qe.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"}),A(Qe.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const et=(0,r.lz)("remarkMarker",(()=>()=>(e,t)=>{(0,v.YR)(e,(e=>["strong","emphasis"].includes(e.type)),(e=>{e.marker=(e=>t.value.charAt(e.position.start.offset))(e)}))}));A(et.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"}),A(et.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const tt=(0,r.Gf)((()=>{let e=!1;const t=new f.hs("MILKDOWN_INLINE_NODES_CURSOR"),n=new f.k_({key:t,state:{init:()=>!1,apply(e){if(!e.selection.empty)return!1;const t=e.selection.$from,n=t.nodeBefore,r=t.nodeAfter;return!(!(n&&r&&n.isInline&&!n.isText&&r.isInline)||r.isText)}},props:{handleDOMEvents:{compositionend:(t,r)=>!!e&&(e=!1,requestAnimationFrame((()=>{if(n.getState(t.state)){const e=t.state.selection.from;r.preventDefault(),t.dispatch(t.state.tr.insertText(r.data||"",e))}})),!0),compositionstart:t=>(n.getState(t.state)&&(e=!0),!1),beforeinput:(t,r)=>{if(n.getState(t.state)&&r instanceof InputEvent&&r.data&&!e){const e=t.state.selection.from;return r.preventDefault(),t.dispatch(t.state.tr.insertText(r.data||"",e)),!0}return!1}},decorations(e){if(n.getState(e)){const t=e.selection.$from.pos,n=document.createElement("span"),r=y.NZ.widget(t,n,{side:-1}),o=document.createElement("span"),i=y.NZ.widget(t,o);return setTimeout((()=>{n.contentEditable="true",o.contentEditable="true"})),y.zF.create(e.doc,[r,i])}return y.zF.empty}}});return n}));A(tt,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const nt=(0,r.Gf)((e=>new f.k_({key:new f.hs("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,r)=>{if(!t.length)return;const[o]=t;if(!o)return;const[i]=o.steps;if(o.getMeta("hardbreak")){if(!(i instanceof m.Ln))return;const{from:t}=i;return r.tr.setNodeMarkup(t,ve.type(e),void 0,[])}if(i instanceof m.XE){let t=r.tr;const{from:n,to:o}=i;return r.doc.nodesBetween(n,o,((n,r)=>{n.type===ve.type(e)&&(t=t.setNodeMarkup(r,ve.type(e),void 0,[]))})),t}}})));A(nt,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const rt=(0,r.Qx)(["table","code_block"],"hardbreakFilterNodes");A(rt,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const ot=(0,r.Gf)((e=>{const t=e.get(rt.key);return new f.k_({key:new f.hs("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(e,n)=>{const r=e.getMeta("hardbreak"),[o]=e.steps;if(r&&o){const{from:e}=o,r=n.doc.resolve(e);let i=r.depth,s=!0;for(;i>0;)t.includes(r.node(i).type.name)&&(s=!1),i--;return s}return!0}})}));A(ot,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const it=(0,r.Gf)((e=>{const t=new f.hs("MILKDOWN_HEADING_ID"),n=n=>{if(n.composing||!n.editable)return;const r=e.get(J.key),o=n.state.tr.setMeta("addToHistory",!1);let i=!1;n.state.doc.descendants(((n,s)=>{if(n.type===Z.type(e)){if(0===n.textContent.trim().length)return;const e=n.attrs,a=r(n);e.id!==a&&(i=!0,o.setMeta(t,!0).setNodeMarkup(s,void 0,{...e,id:a}))}})),i&&n.dispatch(o)};return new f.k_({key:t,view:e=>(n(e),{update:e=>{n(e)}})})}));A(it,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const st=(0,r.Gf)((e=>{const t=t=>{if(t.composing||!t.editable)return;const n=Ie.type(e),r=Ce.type(e),o=Le.type(e),i=t.state,s=(e,t)=>{let n=!1;const r=`${t+1}.`;return e.label!==r&&(e.label=r,n=!0),n};let a=i.tr,l=!1;i.doc.descendants(((e,t,i,c)=>{if(e.type===r){const r=e.maybeChild(0);(null==r?void 0:r.type)===o&&"ordered"===r.attrs.listType&&(l=!0,a.setNodeMarkup(t,n,{spread:"true"}),e.descendants(((e,t,n,r)=>{if(e.type===o){const n={...e.attrs};s(n,r)&&(a=a.setNodeMarkup(t,void 0,n))}return!1})))}else if(e.type===o&&(null==i?void 0:i.type)===n){const n={...e.attrs};let r=!1;"ordered"!==n.listType&&(n.listType="ordered",r=!0),(null==i?void 0:i.maybeChild(0))&&(r=s(n,c)),r&&(a=a.setNodeMarkup(t,void 0,n),l=!0)}})),l&&t.dispatch(a.setMeta("addToHistory",!1))};return new f.k_({key:new f.hs("MILKDOWN_KEEP_LIST_ORDER"),view:e=>(t(e),{update:e=>{t(e)}})})}));A(st,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const at=[We,Ke,qe,Ge,Ye,[nt,rt,ot,tt,Je,Ze,Xe,Qe,et,it,st].flat()].flat()},689:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6488),o=n(7985),i=n(5405);function s(e,t){return(0,r.A)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||(0,o.A)(e,t)||(0,i.A)()}},785:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(7545),o=Symbol.for("react.element"),i=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function a(e){return e&&"object"===(0,r.A)(e)&&(e.$$typeof===o||e.$$typeof===i)&&e.type===s}},829:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2559);function o(e,t){return e.get((0,r.A)(e,t))}},855:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},857:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(2715),o=n(9105),i=n(5309);function s(e){var t=(0,o.A)();return function(){var n,o=(0,r.A)(e);if(t){var s=(0,r.A)(this).constructor;n=Reflect.construct(o,arguments,s)}else n=o.apply(this,arguments);return(0,i.A)(this,n)}}},918:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2016);function o(e,t,n){(0,r.A)(e,t),t.set(e,n)}},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},1087:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},1136:(e,t,n)=>{"use strict";n.d(t,{_n:()=>i,rJ:()=>s});var r=n(8769);function o(){}n(4445);const i=r.createContext({}),s=()=>{const e=()=>{};return e.deprecated=o,e}},1157:(e,t,n)=>{"use strict";n.d(t,{s:()=>o});const r=document.createElement("i");function o(e){const t="&"+e+";";r.innerHTML=t;const n=r.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}},1258:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7545);function o(){o=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),a=new R(r||[]);return s(i,"_invoke",{value:M(e,n,a)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",m="suspendedYield",g="executing",y="completed",v={};function b(){}function w(){}function k(){}var x={};d(x,l,(function(){return this}));var A=Object.getPrototypeOf,S=A&&A(A(D([])));S&&S!==n&&i.call(S,l)&&(x=S);var E=k.prototype=b.prototype=Object.create(x);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,s,a,l){var c=f(e[o],e,s);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==(0,r.A)(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(c.arg)}var o;s(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function M(t,n,r){var o=h;return function(i,s){if(o===g)throw Error("Generator is already running");if(o===y){if("throw"===i)throw s;return{value:e,done:!0}}for(r.method=i,r.arg=s;;){var a=r.delegate;if(a){var l=N(a,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var c=f(t,n,r);if("normal"===c.type){if(o=r.done?y:m,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=y,r.method="throw",r.arg=c.arg)}}}function N(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,N(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var s=i.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function n(){for(;++o<t.length;)if(i.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return s.next=s}}throw new TypeError((0,r.A)(t)+" is not iterable")}return w.prototype=k,s(E,"constructor",{value:k,configurable:!0}),s(k,"constructor",{value:w,configurable:!0}),w.displayName=d(k,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,d(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},C(O.prototype),d(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new O(p(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},C(E),d(E,u,"Generator"),d(E,l,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=D,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}},1369:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7545);function o(e){var t=function(e){if("object"!=(0,r.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=(0,r.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,r.A)(t)?t:t+""}},1382:(e,t,n)=>{"use strict";n.d(t,{aF:()=>ke,Kq:()=>m,Ay:()=>xe});var r=n(4586),o=n(9740),i=n(689),s=n(7545),a=n(3373),l=n.n(a),c=n(8299),u=n(9284),d=n(8769),p=n(4223),f=["children"],h=d.createContext({});function m(e){var t=e.children,n=(0,p.A)(e,f);return d.createElement(h.Provider,{value:n},t)}var g=n(5152),y=n(414),v=n(9296),b=n(857);const w=function(e){(0,v.A)(n,e);var t=(0,b.A)(n);function n(){return(0,g.A)(this,n),t.apply(this,arguments)}return(0,y.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(d.Component);var k=n(9973),x=n(9348),A=n(9449),S="none",E="appear",C="enter",O="leave",M="none",N="prepare",T="start",I="active",R="end",D="prepared",P=n(7169);function F(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var L,_,z,$=(L=(0,P.A)(),_="undefined"!=typeof window?window:{},z={animationend:F("Animation","AnimationEnd"),transitionend:F("Transition","TransitionEnd")},L&&("AnimationEvent"in _||delete z.animationend.animation,"TransitionEvent"in _||delete z.transitionend.transition),z),j={};if((0,P.A)()){var B=document.createElement("div");j=B.style}var H={};function V(e){if(H[e])return H[e];var t=$[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in j)return H[e]=t[i],H[e]}return""}var U=V("animationend"),W=V("transitionend"),K=!(!U||!W),q=U||"animationend",G=W||"transitionend";function Y(e,t){return e?"object"===(0,s.A)(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}const J=(0,P.A)()?d.useLayoutEffect:d.useEffect;var X=function(e){return+setTimeout(e,16)},Z=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(X=function(e){return window.requestAnimationFrame(e)},Z=function(e){return window.cancelAnimationFrame(e)});var Q=0,ee=new Map;function te(e){ee.delete(e)}var ne=function(e){var t=Q+=1;return function n(r){if(0===r)te(t),e();else{var o=X((function(){n(r-1)}));ee.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};ne.cancel=function(e){var t=ee.get(e);return te(e),Z(t)};const re=ne;var oe=[N,T,I,R],ie=[N,D],se=!1;function ae(e){return e===I||e===R}function le(e,t,n,s){var a,l,c,u,p=s.motionEnter,f=void 0===p||p,h=s.motionAppear,m=void 0===h||h,g=s.motionLeave,y=void 0===g||g,v=s.motionDeadline,b=s.motionLeaveImmediately,w=s.onAppearPrepare,P=s.onEnterPrepare,F=s.onLeavePrepare,L=s.onAppearStart,_=s.onEnterStart,z=s.onLeaveStart,$=s.onAppearActive,j=s.onEnterActive,B=s.onLeaveActive,H=s.onAppearEnd,V=s.onEnterEnd,U=s.onLeaveEnd,W=s.onVisibleChanged,K=(0,x.A)(),Y=(0,i.A)(K,2),X=Y[0],Z=Y[1],Q=(a=S,l=d.useReducer((function(e){return e+1}),0),c=(0,i.A)(l,2)[1],u=d.useRef(a),[(0,A.A)((function(){return u.current})),(0,A.A)((function(e){u.current="function"==typeof e?e(u.current):e,c()}))]),ee=(0,i.A)(Q,2),te=ee[0],ne=ee[1],le=(0,x.A)(null),ce=(0,i.A)(le,2),ue=ce[0],de=ce[1],pe=te(),fe=(0,d.useRef)(!1),he=(0,d.useRef)(null);function me(){return n()}var ge=(0,d.useRef)(!1);function ye(){ne(S),de(null,!0)}var ve=(0,k._q)((function(e){var t=te();if(t!==S){var n=me();if(!e||e.deadline||e.target===n){var r,o=ge.current;t===E&&o?r=null==H?void 0:H(n,e):t===C&&o?r=null==V?void 0:V(n,e):t===O&&o&&(r=null==U?void 0:U(n,e)),o&&!1!==r&&ye()}}})),be=function(e){var t=(0,d.useRef)();function n(t){t&&(t.removeEventListener(G,e),t.removeEventListener(q,e))}return d.useEffect((function(){return function(){n(t.current)}}),[]),[function(r){t.current&&t.current!==r&&n(t.current),r&&r!==t.current&&(r.addEventListener(G,e),r.addEventListener(q,e),t.current=r)},n]}(ve),we=(0,i.A)(be,1)[0],ke=function(e){switch(e){case E:return(0,r.A)((0,r.A)((0,r.A)({},N,w),T,L),I,$);case C:return(0,r.A)((0,r.A)((0,r.A)({},N,P),T,_),I,j);case O:return(0,r.A)((0,r.A)((0,r.A)({},N,F),T,z),I,B);default:return{}}},xe=d.useMemo((function(){return ke(pe)}),[pe]),Ae=function(e,t,n){var r=(0,x.A)(M),o=(0,i.A)(r,2),s=o[0],a=o[1],l=function(){var e=d.useRef(null);function t(){re.cancel(e.current)}return d.useEffect((function(){return function(){t()}}),[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var i=re((function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)}));e.current=i},t]}(),c=(0,i.A)(l,2),u=c[0],p=c[1],f=t?ie:oe;return J((function(){if(s!==M&&s!==R){var e=f.indexOf(s),t=f[e+1],r=n(s);r===se?a(t,!0):t&&u((function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,s]),d.useEffect((function(){return function(){p()}}),[]),[function(){a(N,!0)},s]}(pe,!e,(function(e){if(e===N){var t=xe[N];return t?t(me()):se}var n;return Ce in xe&&de((null===(n=xe[Ce])||void 0===n?void 0:n.call(xe,me(),null))||null),Ce===I&&pe!==S&&(we(me()),v>0&&(clearTimeout(he.current),he.current=setTimeout((function(){ve({deadline:!0})}),v))),Ce===D&&ye(),!0})),Se=(0,i.A)(Ae,2),Ee=Se[0],Ce=Se[1],Oe=ae(Ce);ge.current=Oe;var Me=(0,d.useRef)(null);J((function(){if(!fe.current||Me.current!==t){Z(t);var n,r=fe.current;fe.current=!0,!r&&t&&m&&(n=E),r&&t&&f&&(n=C),(r&&!t&&y||!r&&b&&!t&&y)&&(n=O);var o=ke(n);n&&(e||o[N])?(ne(n),Ee()):ne(S),Me.current=t}}),[t]),(0,d.useEffect)((function(){(pe===E&&!m||pe===C&&!f||pe===O&&!y)&&ne(S)}),[m,f,y]),(0,d.useEffect)((function(){return function(){fe.current=!1,clearTimeout(he.current)}}),[]);var Ne=d.useRef(!1);(0,d.useEffect)((function(){X&&(Ne.current=!0),void 0!==X&&pe===S&&((Ne.current||X)&&(null==W||W(X)),Ne.current=!0)}),[X,pe]);var Te=ue;return xe[N]&&Ce===T&&(Te=(0,o.A)({transition:"none"},Te)),[pe,Ce,Te,null!=X?X:t]}const ce=function(e){var t=e;"object"===(0,s.A)(e)&&(t=e.transitionSupport);var n=d.forwardRef((function(e,n){var s=e.visible,a=void 0===s||s,p=e.removeOnLeave,f=void 0===p||p,m=e.forceRender,g=e.children,y=e.motionName,v=e.leavedClassName,b=e.eventProps,k=function(e,n){return!(!e.motionName||!t||!1===n)}(e,d.useContext(h).motion),x=(0,d.useRef)(),A=(0,d.useRef)(),E=le(k,a,(function(){try{return x.current instanceof HTMLElement?x.current:(0,c.Ay)(A.current)}catch(e){return null}}),e),C=(0,i.A)(E,4),O=C[0],M=C[1],I=C[2],R=C[3],D=d.useRef(R);R&&(D.current=!0);var P,F=d.useCallback((function(e){x.current=e,(0,u.Xf)(n,e)}),[n]),L=(0,o.A)((0,o.A)({},b),{},{visible:a});if(g)if(O===S)P=R?g((0,o.A)({},L),F):!f&&D.current&&v?g((0,o.A)((0,o.A)({},L),{},{className:v}),F):m||!f&&!v?g((0,o.A)((0,o.A)({},L),{},{style:{display:"none"}}),F):null;else{var _;M===N?_="prepare":ae(M)?_="active":M===T&&(_="start");var z=Y(y,"".concat(O,"-").concat(_));P=g((0,o.A)((0,o.A)({},L),{},{className:l()(Y(y,O),(0,r.A)((0,r.A)({},z,z&&_),y,"string"==typeof y)),style:I}),F)}else P=null;return d.isValidElement(P)&&(0,u.f3)(P)&&((0,u.A9)(P)||(P=d.cloneElement(P,{ref:F}))),d.createElement(w,{ref:A},P)}));return n.displayName="CSSMotion",n}(K);var ue=n(9575),de=n(2474),pe="add",fe="keep",he="remove",me="removed";function ge(e){var t;return t=e&&"object"===(0,s.A)(e)&&"key"in e?e:{key:e},(0,o.A)((0,o.A)({},t),{},{key:String(t.key)})}function ye(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(ge)}var ve=["component","children","onVisibleChanged","onAllRemoved"],be=["status"],we=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];const ke=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ce,t=function(t){(0,v.A)(i,t);var n=(0,b.A)(i);function i(){var e;(0,g.A)(this,i);for(var t=arguments.length,s=new Array(t),a=0;a<t;a++)s[a]=arguments[a];return e=n.call.apply(n,[this].concat(s)),(0,r.A)((0,de.A)(e),"state",{keyEntities:[]}),(0,r.A)((0,de.A)(e),"removeKey",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:(0,o.A)((0,o.A)({},e),{},{status:me})}))}}),(function(){0===e.state.keyEntities.filter((function(e){return e.status!==me})).length&&e.props.onAllRemoved&&e.props.onAllRemoved()}))})),e}return(0,y.A)(i,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,r=this.props,i=r.component,s=r.children,a=r.onVisibleChanged,l=(r.onAllRemoved,(0,p.A)(r,ve)),c=i||d.Fragment,u={};return we.forEach((function(e){u[e]=l[e],delete l[e]})),delete l.keys,d.createElement(c,l,n.map((function(n,r){var i=n.status,l=(0,p.A)(n,be),c=i===pe||i===fe;return d.createElement(e,(0,ue.A)({},u,{key:l.key,visible:c,eventProps:l,onVisibleChanged:function(e){null==a||a(e,{key:l.key}),e||t.removeKey(l.key)}}),(function(e,t){return s((0,o.A)((0,o.A)({},e),{},{index:r}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=ye(n),s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,s=ye(e),a=ye(t);s.forEach((function(e){for(var t=!1,s=r;s<i;s+=1){var l=a[s];if(l.key===e.key){r<s&&(n=n.concat(a.slice(r,s).map((function(e){return(0,o.A)((0,o.A)({},e),{},{status:pe})}))),r=s),n.push((0,o.A)((0,o.A)({},l),{},{status:fe})),r+=1,t=!0;break}}t||n.push((0,o.A)((0,o.A)({},e),{},{status:he}))})),r<i&&(n=n.concat(a.slice(r).map((function(e){return(0,o.A)((0,o.A)({},e),{},{status:pe})}))));var l={};return n.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1})),Object.keys(l).filter((function(e){return l[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==he}))).forEach((function(t){t.key===e&&(t.status=fe)}))})),n}(r,i);return{keyEntities:s.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==me||e.status!==he}))}}}]),i}(d.Component);return(0,r.A)(t,"defaultProps",{component:"div"}),t}(K),xe=ce},1440:(e,t,n)=>{"use strict";n.d(t,{$D:()=>d,TR:()=>p,XM:()=>l,Xm:()=>f,_K:()=>h,dI:()=>u,nr:()=>c});var r=Object.defineProperty,o=(e=>(e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e))(o||{});class i extends Error{constructor(e,t){super(t),((e,t,n)=>{((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})(this,"code"),this.name="MilkdownError",this.code=e}}const s=(e,t)=>"function"==typeof t?"[Function]":t,a=e=>JSON.stringify(e,s),l=e=>new i(o.contextNotFound,`Context "${e}" not found, do you forget to inject it?`),c=e=>new i(o.timerNotFound,`Timer "${e}" not found, do you forget to record it?`),u=()=>new i(o.ctxCallOutOfScope,"Should not call a context out of the plugin."),d=(...e)=>{const t=e.reduce(((e,t)=>{if(!t)return e;const n=e=>Array.isArray(e)?e.map((e=>n(e))).join(", "):e.toJSON?a(e.toJSON()):e.spec?a(e.spec):e.toString();return`${e}, ${n(t)}`}),"Create prosemirror node from remark failed in parser");return new i(o.createNodeInParserFail,t)},p=()=>new i(o.stackOverFlow,"Stack over flow, cannot pop on an empty stack."),f=e=>new i(o.parserMatchError,`Cannot match target parser for node: ${a(e)}.`),h=e=>new i(o.serializerMatchError,`Cannot match target serializer for node: ${a(e)}.`)},1570:(e,t,n)=>{"use strict";n.d(t,{$t:()=>A,LN:()=>s,U3:()=>u,hs:()=>M,i5:()=>h,k_:()=>E,nh:()=>p,yn:()=>a});var r=n(6090),o=n(3710);const i=Object.create(null);class s{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new a(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.Ji.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,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=e.mapping.slice(i);e.replaceRange(u.map(l.pos),u.map(c.pos),a?r.Ji.empty:t),0==a&&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:s}=r[o],a=e.mapping.slice(n),l=a.map(i.pos),c=a.map(s.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,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}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new h(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new h(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new h(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=i[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in i)throw new 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()}}s.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends s{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 s.near(n);let r=e.resolve(t.map(this.anchor));return new u(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.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 new 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=s.findFrom(t,n,!0)||s.findFrom(t,-n,!0);if(!e)return s.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(s.findFrom(e,-n,!0)||s.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new u(e,t)}}s.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 s{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?s.near(o):new p(o)}content(){return new r.Ji(r.FK.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 f(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new 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,s.jsonID("node",p);class f{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new d(n,n):new f(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&p.isSelectable(n)?new p(t):s.near(t)}}class h extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=s.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new h(e)}map(e){return new h(e)}eq(e){return e instanceof h}getBookmark(){return m}}s.jsonID("all",h);const m={map(){return this},resolve:e=>new h(e)};function g(e,t,n,r,o,i=!1){if(t.inlineContent)return u.create(e,n);for(let s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){let r=t.child(s);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=e.steps.length-1;if(r<t)return;let i,a=e.steps[r];(a instanceof o.Ln||a instanceof o.Wg)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==i&&(i=r)})),e.setSelection(s.near(e.doc.resolve(i),n)))}class v extends o.dL{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 new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,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.CU.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.CU.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(s.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}class w{constructor(e,t,n){this.name=e,this.init=b(t.init,n),this.apply=b(t.apply,n)}}const k=[new w("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new w("selection",{init:(e,t)=>e.selection||s.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 x{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=k.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new 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 A{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 s=this.config.plugins[i];if(s.spec.appendTransaction){let a=r?r[i].n:0,l=r?r[i].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,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 new RangeError("Applying a mismatched transaction");let t=new A(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 x(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new A(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 x(this.schema,e.plugins),n=t.fields,r=new A(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 new 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 new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new x(e.schema,e.plugins),i=new A(o);return o.fields.forEach((o=>{if("doc"==o.name)i.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=s.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 s=n[r],a=s.spec.state;if(s.key==o.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r))return void(i[o.name]=a.fromJSON.call(s,e,t[r],i))}i[o.name]=o.init(e,i)}})),i}}function S(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=S(o,t,{})),n[r]=o}return n}class E{constructor(e){this.spec=e,this.props={},e.props&&S(e.props,this,this.props),this.key=e.key?e.key.key:O("plugin")}getState(e){return e[this.key]}}const C=Object.create(null);function O(e){return e in C?e+"$"+ ++C[e]:(C[e]=0,e+"$")}class M{constructor(e="key"){this.key=O(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},1697:(e,t,n)=>{"use strict";n.d(t,{f:()=>s});var r=n(4269),o=n(6197),i=n(1807);function s(e,t){let n=!1;return(0,r.YR)(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,o.dc})),Boolean((!e.depth||e.depth<3)&&(0,i.d)(e)&&(t.options.setext||n))}},1740:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1807:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});const r={};function o(e,t){const n=t||r;return i(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function i(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return s(e.children,t,n)}return Array.isArray(e)?s(e,t,n):""}function s(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=i(e[o],t,n);return r.join("")}},2016:(e,t,n)=>{"use strict";function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>r})},2110:(e,t,n)=>{"use strict";n.d(t,{y:()=>a});var r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const o="text/event-stream",i=1e3,s="last-event-id";function a(e,t){var{signal:n,headers:a,onopen:c,onmessage:u,onclose:d,onerror:p,openWhenHidden:f,fetch:h}=t,m=r(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,r)=>{const g=Object.assign({},a);let y;function v(){y.abort(),document.hidden||S()}g.accept||(g.accept=o),f||document.addEventListener("visibilitychange",v);let b=i,w=0;function k(){document.removeEventListener("visibilitychange",v),window.clearTimeout(w),y.abort()}null==n||n.addEventListener("abort",(()=>{k(),t()}));const x=null!=h?h:window.fetch,A=null!=c?c:l;async function S(){var n;y=new AbortController;try{const n=await x(e,Object.assign(Object.assign({},m),{headers:g,signal:y.signal}));await A(n),await async function(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}(n.body,function(e){let t,n,r,o=!1;return function(i){void 0===t?(t=i,n=0,r=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,i);const s=t.length;let a=0;for(;n<s;){o&&(10===t[n]&&(a=++n),o=!1);let i=-1;for(;n<s&&-1===i;++n)switch(t[n]){case 58:-1===r&&(r=n-a);break;case 13:o=!0;case 10:i=n}if(-1===i)break;e(t.subarray(a,i),r),a=n,r=-1}a===s?t=void 0:0!==a&&(t=t.subarray(a),n-=a)}}(function(e,t,n){let r={data:"",event:"",id:"",retry:void 0};const o=new TextDecoder;return function(e,t){if(0===e.length)null==n||n(r),r={data:"",event:"",id:"",retry:void 0};else if(t>0){const n=o.decode(e.subarray(0,t)),a=t+(32===e[t+1]?2:1),l=o.decode(e.subarray(a));switch(n){case"data":r.data=r.data?r.data+"\n"+l:l;break;case"event":r.event=l;break;case"id":(i=r.id=l)?g[s]=i:delete g[s];break;case"retry":const e=parseInt(l,10);isNaN(e)||(e=>{b=e})(r.retry=e)}}var i}}(0,0,u))),null==d||d(),k(),t()}catch(e){if(!y.signal.aborted)try{const t=null!==(n=null==p?void 0:p(e))&&void 0!==n?n:b;window.clearTimeout(w),w=window.setTimeout(S,t)}catch(e){k(),r(e)}}}S()}))}function l(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(o)))throw new Error(`Expected content-type to be ${o}, Actual: ${t}`)}},2257:(e,t,n)=>{"use strict";n.d(t,{OF:()=>l});var r=n(8769),o=n(8764),i=n(9642),s=n(8408),a=n(7652);const{genStyleHooks:l,genComponentStyleHook:c,genSubStyleComponent:u}=(0,o.L_)({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=(0,r.useContext)(i.QO);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o]=(0,a.Ay)();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o}},useCSP:()=>{const{csp:e}=(0,r.useContext)(i.QO);return null!=e?e:{}},getResetStyles:(e,t)=>{var n;return[{"&":(0,s.av)(e)},(0,s.jz)(null!==(n=null==t?void 0:t.prefix.iconPrefixCls)&&void 0!==n?n:i.pM)]},getCommonStyle:s.vj,getCompUnitless:()=>a.Is})},2474:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},2559:(e,t,n)=>{"use strict";function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>r})},2591:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},s=[],a=0;a<e.length;a++){var l=e[a],c=r.base?l[0]+r.base:l[0],u=i[c]||0,d="".concat(c," ").concat(u);i[c]=u+1;var p=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var h=o(f,r);r.byIndex=a,t.splice(a,0,{identifier:d,updater:h,references:1})}s.push(d)}return s}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<i.length;s++){var a=n(i[s]);t[a].references--}for(var l=r(e,o),c=0;c<i.length;c++){var u=n(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=l}}},2715:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{A:()=>r})},2740:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(7545),o=n(6902);function i(e,t,n){"symbol"==(0,r.A)(t)&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+" "+t:t})}catch(e){}return e}var s=n(1369);function a(e,t,n,a,l,c){var u,d,p,f,h,m,g,y=Symbol.metadata||Symbol.for("Symbol.metadata"),v=Object.defineProperty,b=Object.create,w=[b(null),b(null)],k=t.length;function x(t,n,r){return function(o,i){n&&(i=o,o=e);for(var s=0;s<t.length;s++)i=t[s].apply(o,r?[i]:[]);return r?i:o}}function A(e,t,n,r){if("function"!=typeof e&&(r||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return e}function S(e,t,n,o,s,a,l,c,p,f,h){function m(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var g=[].concat(t[0]),y=t[3],b=!l,k=1===s,S=3===s,E=4===s,C=2===s;function O(t,n,r){return function(o,i){return n&&(i=o,o=e),r&&r(o),M[t].call(o,i)}}if(!b){var M={},N=[],T=S?"get":E||k?"set":"value";if(p?(f||k?M={get:i((function(){return y(this)}),o,"get"),set:function(e){t[4](this,e)}}:M[T]=y,f||i(M[T],o,C?"":T)):f||(M=Object.getOwnPropertyDescriptor(e,o)),!f&&!p){if((d=w[+c][o])&&7!=(d^s))throw Error("Decorating two elements with the same name ("+M[T].name+") is not supported yet");w[+c][o]=s<3?1:s}}for(var I=e,R=g.length-1;R>=0;R-=n?2:1){var D=A(g[R],"A decorator","be",!0),P=n?g[R-1]:void 0,F={},L={kind:["field","accessor","method","getter","setter","class"][s],name:o,metadata:u,addInitializer:function(e,t){if(e.v)throw Error("attempted to call addInitializer after decoration was finished");A(t,"An initializer","be",!0),a.push(t)}.bind(null,F)};if(b)d=D.call(P,I,L),F.v=1,A(d,"class decorators","return")&&(I=d);else if(L.static=c,L.private=p,d=L.access={has:p?h.bind():function(e){return o in e}},E||(d.get=p?C?function(e){return m(e),M.value}:O("get",0,m):function(e){return e[o]}),C||S||(d.set=p?O("set",0,m):function(e,t){e[o]=t}),I=D.call(P,k?{get:M.get,set:M.set}:M[T],L),F.v=1,k){if("object"==(0,r.A)(I)&&I)(d=A(I.get,"accessor.get"))&&(M.get=d),(d=A(I.set,"accessor.set"))&&(M.set=d),(d=A(I.init,"accessor.init"))&&N.unshift(d);else if(void 0!==I)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else A(I,(f?"field":"method")+" decorators","return")&&(f?N.unshift(I):M[T]=I)}return s<2&&l.push(x(N,c,1),x(a,c,0)),f||b||(p?k?l.splice(-1,0,O("get",c),O("set",c)):l.push(C?M[T]:A.call.bind(M[T])):v(e,o,M)),I}function E(e){return v(e,y,{configurable:!0,enumerable:!0,value:u})}return void 0!==c&&(u=c[y]),u=b(null==u?null:u),h=[],m=function(e){e&&h.push(x(e))},g=function(t,r){for(var i=0;i<n.length;i++){var a=n[i],c=a[1],u=7&c;if((8&c)==t&&!u==r){var d=a[2],m=!!a[3],g=16&c;S(t?e:e.prototype,a,g,m?"#"+d:(0,s.A)(d),u,u<2?[]:t?f=f||[]:p=p||[],h,!!t,m,r,t&&m?function(t){return(0,o.A)(t)===e}:l)}}},g(8,0),g(0,0),g(8,1),g(0,1),m(p),m(f),d=h,k||E(e),{e:d,get c(){var n=[];return k&&[E(e=S(e,[t],a,e.name,5,n)),x(n,1)]}}}},2762:(e,t,n)=>{"use strict";n.d(t,{Wj:()=>it});var r={};n.r(r),n.d(r,{boolean:()=>q,booleanish:()=>G,commaOrSpaceSeparated:()=>Q,commaSeparated:()=>Z,number:()=>J,overloadedBoolean:()=>Y,spaceSeparated:()=>X});var o=n(4254),i=n(1570);function s(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}function a(e){e.register(s),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}function l(e){e.register(a),function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(e)}function c(e){e.register(l),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}function u(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,s=0;s<o.length;s++)i[o[s]]=e.languages.bash[o[s]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(e)}function d(e){e.register(s),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",s="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",a="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(i),u=RegExp(l(o+" "+i+" "+s+" "+a)),d=l(i+" "+s+" "+a),p=l(o+" "+i+" "+a),f=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,g=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,g]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,h,v]),k=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),x=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[k,y,v]),A={keyword:u,punctuation:/[<>()?,.:[\]]/},S=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,E=/"(?:\\.|[^\\"\r\n])*"/.source,C=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[C]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:A},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,x]),lookbehind:!0,inside:A},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,g]),lookbehind:!0,inside:A},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:A},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:A},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[x,p,m]),inside:A}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:A},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[x,y]),inside:A,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[x]),lookbehind:!0,inside:A,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:A}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,g,m,x,u.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[g,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(x),greedy:!0,inside:A},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var O=E+"|"+S,M=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[O]),N=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[M]),2),T=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,N]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[T,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[T]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[N]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var R=/:[^}\r\n]+/.source,D=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[M]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[D,R]),F=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[O]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[F,R]);function _(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,R]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:_(P,D)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:_(L,F)}],char:{pattern:RegExp(S),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(e)}function p(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var i={};i[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}function f(e){!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(e)}function h(e){!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(e)}function m(e){e.register(s),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}function g(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}function y(e){e.register(s),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(e)}function v(e){!function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",o=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:o,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(e)}function b(e){e.register(s),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}function w(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}function k(e){e.register(s),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(e)}function x(e){e.register(f),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}function A(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}function S(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}function E(e){!function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),i=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+o+"|"+i+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(i),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(e)}function C(e){e.register(p),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],s=o.content[3];if(i&&s&&"code-language"===i.type&&"code-block"===s.type&&"string"==typeof i.content){var a=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(a=(/[a-z][\w-]*/i.exec(a)||[""])[0].toLowerCase());s.alias?"string"==typeof s.alias?s.alias=[s.alias,l]:s.alias.push(l):s.alias=[l]}}else e(o.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],s=/language-(.+)/.exec(i);if(s){n=s[1];break}}var a=e.languages[n];if(a)t.content=e.highlight(t.content.value,a,n);else if(n&&"none"!==n&&e.plugins.autoloader){var l="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=l,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(l);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}})),RegExp(e.languages.markup.tag.pattern.source,"gi"),String.fromCodePoint||String.fromCharCode,e.languages.md=e.languages.markdown}(e)}function O(e){e.register(a),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}function M(e){!function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(e)}function N(e){e.register(p),function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,i){if(n.language===r){var s=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof i&&!i(e))return e;for(var o,a=s.length;-1!==n.code.indexOf(o=t(r,a));)++a;return s[a]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,i=Object.keys(n.tokenStack);!function s(a){for(var l=0;l<a.length&&!(o>=i.length);l++){var c=a[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=i[o],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),h=p.indexOf(f);if(h>-1){++o;var m=p.substring(0,h),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=p.substring(h+f.length),v=[];m&&v.push.apply(v,s([m])),v.push(g),y&&v.push.apply(v,s([y])),"string"==typeof c?a.splice.apply(a,[l,1].concat(v)):c.content=v}}else c.content&&s(c.content)}return a}(n.tokens)}}}})}(e)}function T(e){e.register(N),function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];e.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(e)}function I(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}function R(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}function D(e){e.register(s),function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(e)}function P(e){!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(e)}function F(e){e.register(f),function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(e)}function L(e){e.register(f),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}function _(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}function z(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach((function(t){t.inside.interpolation.inside=e.languages.swift}))}function $(e){e.register(b),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(e)}function j(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}function B(e){e.register(j),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}s.displayName="clike",s.aliases=[],a.displayName="c",a.aliases=[],l.displayName="cpp",l.aliases=[],c.displayName="arduino",c.aliases=["ino"],u.displayName="bash",u.aliases=["sh","shell"],d.displayName="csharp",d.aliases=["cs","dotnet"],p.displayName="markup",p.aliases=["atom","html","mathml","rss","ssml","svg","xml"],f.displayName="css",f.aliases=[],h.displayName="diff",h.aliases=[],m.displayName="go",m.aliases=[],g.displayName="ini",g.aliases=[],y.displayName="java",y.aliases=[],v.displayName="regex",v.aliases=[],b.displayName="javascript",b.aliases=["js"],w.displayName="json",w.aliases=["webmanifest"],k.displayName="kotlin",k.aliases=["kt","kts"],x.displayName="less",x.aliases=[],A.displayName="lua",A.aliases=[],S.displayName="makefile",S.aliases=[],E.displayName="yaml",E.aliases=["yml"],C.displayName="markdown",C.aliases=["md"],O.displayName="objectivec",O.aliases=["objc"],M.displayName="perl",M.aliases=[],N.displayName="markup-templating",N.aliases=[],T.displayName="php",T.aliases=[],I.displayName="python",I.aliases=["py"],R.displayName="r",R.aliases=[],D.displayName="ruby",D.aliases=["rb"],P.displayName="rust",P.aliases=[],F.displayName="sass",F.aliases=[],L.displayName="scss",L.aliases=[],_.displayName="sql",_.aliases=[],z.displayName="swift",z.aliases=[],$.displayName="typescript",$.aliases=["ts"],j.displayName="basic",j.aliases=[],B.displayName="vbnet",B.aliases=[];class H{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function V(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new H(n,r,t)}function U(e){return e.toLowerCase()}H.prototype.property={},H.prototype.normal={},H.prototype.space=null;class W{constructor(e,t){this.property=e,this.attribute=t}}W.prototype.space=null,W.prototype.boolean=!1,W.prototype.booleanish=!1,W.prototype.overloadedBoolean=!1,W.prototype.number=!1,W.prototype.commaSeparated=!1,W.prototype.spaceSeparated=!1,W.prototype.commaOrSpaceSeparated=!1,W.prototype.mustUseProperty=!1,W.prototype.defined=!1;let K=0;const q=ee(),G=ee(),Y=ee(),J=ee(),X=ee(),Z=ee(),Q=ee();function ee(){return 2**++K}const te=Object.keys(r);class ne extends W{constructor(e,t,n,o){let i=-1;if(super(e,t),re(this,"space",o),"number"==typeof n)for(;++i<te.length;){const e=te[i];re(this,te[i],(n&r[e])===r[e])}}}function re(e,t,n){n&&(e[t]=n)}ne.prototype.defined=!0;const oe={}.hasOwnProperty;function ie(e){const t={},n={};let r;for(r in e.properties)if(oe.call(e.properties,r)){const o=e.properties[r],i=new ne(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[U(r)]=r,n[U(i.attribute)]=r}return new H(t,n,e.space)}const se=ie({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ae=ie({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function le(e,t){return t in e?e[t]:t}function ce(e,t){return le(e,t.toLowerCase())}const ue=ie({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ce,properties:{xmlns:null,xmlnsXLink:null}}),de=ie({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:G,ariaAutoComplete:null,ariaBusy:G,ariaChecked:G,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:X,ariaCurrent:null,ariaDescribedBy:X,ariaDetails:null,ariaDisabled:G,ariaDropEffect:X,ariaErrorMessage:null,ariaExpanded:G,ariaFlowTo:X,ariaGrabbed:G,ariaHasPopup:null,ariaHidden:G,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:X,ariaLevel:J,ariaLive:null,ariaModal:G,ariaMultiLine:G,ariaMultiSelectable:G,ariaOrientation:null,ariaOwns:X,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:G,ariaReadOnly:G,ariaRelevant:null,ariaRequired:G,ariaRoleDescription:X,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:G,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null}}),pe=ie({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ce,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Z,acceptCharset:X,accessKey:X,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:X,autoFocus:q,autoPlay:q,capture:q,charSet:null,checked:q,cite:null,className:X,cols:J,colSpan:null,content:null,contentEditable:G,controls:q,controlsList:X,coords:J|Z,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:Y,draggable:G,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:X,height:J,hidden:q,high:J,href:null,hrefLang:null,htmlFor:X,httpEquiv:X,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:X,itemRef:X,itemScope:q,itemType:X,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:q,optimum:J,pattern:null,ping:X,placeholder:null,playsInline:q,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:X,required:q,reversed:q,rows:J,rowSpan:J,sandbox:X,scope:null,scoped:q,seamless:q,selected:q,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:G,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:G,width:J,wrap:null,align:null,aLink:null,archive:X,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:G,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:q,disableRemotePlayback:q,prefix:null,property:null,results:J,security:null,unselectable:null}}),fe=ie({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:le,properties:{about:Q,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:X,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Z,g2:Z,glyphName:Z,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:Q,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:J,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:X,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Q,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Q,rev:Q,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Q,requiredFeatures:Q,requiredFonts:Q,requiredFormats:Q,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:Q,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Q,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Q,to:null,transform:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),he=V([ae,se,ue,de,pe],"html"),me=(V([ae,se,ue,de,fe],"svg"),/^data[-\w.:]+$/i),ge=/-[a-z]/g,ye=/[A-Z]/g;function ve(e){return"-"+e.toLowerCase()}function be(e){return e.charAt(1).toUpperCase()}const we=/[#.]/g;function ke(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function xe(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,i=!1;for(;!i;){-1===r&&(r=n.length,i=!0);const e=n.slice(o,r).trim();!e&&i||t.push(e),o=r+1,r=n.indexOf(",",o)}return t}const Ae=new Set(["menu","submit","reset","button"]),Se={}.hasOwnProperty;function Ee(e,t,n,r){const o=function(e,t){const n=U(t);let r=t,o=W;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&me.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ge,be);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ge.test(e)){let n=e.replace(ye,ve);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=ne}return new o(r,t)}(e,n);let i,s=-1;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;i=r}else i="boolean"==typeof r?r:"string"==typeof r?o.spaceSeparated?ke(r):o.commaSeparated?xe(r):o.commaOrSpaceSeparated?ke(xe(r).join(" ")):Oe(o,o.property,r):Array.isArray(r)?r.concat():"style"===o.property?function(e){const t=[];let n;for(n in e)Se.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(i)){const e=[];for(;++s<i.length;)e[s]=Oe(o,o.property,i[s]);i=e}"className"===o.property&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}function Ce(e,t){let n=-1;if(null==t);else if("string"==typeof t||"number"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Ce(e,t[n]);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?Ce(e,t.children):e.push(t)}}function Oe(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||U(n)===U(t)))return!0}return n}const Me=(Ie=he,function(e,t,...n){let r,o=-1;if(null==e)r={type:"root",children:[]},n.unshift(t);else if(r=function(e){const t=e||"",n={};let r,o,i=0;for(;i<t.length;){we.lastIndex=i;const e=we.exec(t),s=t.slice(i,e?e.index:t.length);s&&(r?"#"===r?n.id=s:Array.isArray(n.className)?n.className.push(s):n.className=[s]:o=s,i+=s.length),e&&(r=e[0],i++)}return{type:"element",tagName:o||"div",properties:n,children:[]}}(e),r.tagName=r.tagName.toLowerCase(),i=t,s=r.tagName,null==i||"object"!=typeof i||Array.isArray(i)||"input"!==s&&i.type&&"string"==typeof i.type&&("children"in i&&Array.isArray(i.children)||("button"===s?!Ae.has(i.type.toLowerCase()):"value"in i)))n.unshift(t);else{let e;for(e in t)Se.call(t,e)&&Ee(Ie,r.properties,e,t[e])}for(var i,s;++o<n.length;)Ce(r.children,n[o]);return"element"===r.type&&"template"===r.tagName&&(r.content={type:"root",children:r.children},r.children=[]),r}),Ne=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Te={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};var Ie;function Re(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function De(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Pe(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||Re(e)}var Fe=n(1157);const Le=String.fromCharCode,_e=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function ze(e,t={}){const n="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,r=[];let o,i,s=0,a=-1,l="";t.position&&("start"in t.position||"indent"in t.position?(i=t.position.indent,o=t.position.start):o=t.position);let c,u=(o?o.line:0)||1,d=(o?o.column:0)||1,p=h();for(s--;++s<=e.length;)if(10===c&&(d=(i?i[a]:0)||1),c=e.charCodeAt(s),38===c){const o=e.charCodeAt(s+1);if(9===o||10===o||12===o||32===o||38===o||60===o||Number.isNaN(o)||n&&o===n){l+=Le(c),d++;continue}const i=s+1;let a,u=i,y=i;if(35===o){y=++u;const t=e.charCodeAt(y);88===t||120===t?(a="hexadecimal",y=++u):a="decimal"}else a="named";let v="",b="",w="";const k="named"===a?Pe:"decimal"===a?Re:De;for(y--;++y<=e.length;){const t=e.charCodeAt(y);if(!k(t))break;w+=Le(t),"named"===a&&Ne.includes(w)&&(v=w,b=(0,Fe.s)(w))}let x=59===e.charCodeAt(y);if(x){y++;const e="named"===a&&(0,Fe.s)(w);e&&(v=w,b=e)}let A=1+y-i,S="";if(x||!1!==t.nonTerminated)if(w)if("named"===a){if(x&&!b)m(5,1);else if(v!==w&&(y=u+v.length,A=1+y-u,x=!1),!x){const n=v?1:3;if(t.attribute){const t=e.charCodeAt(y);61===t?(m(n,A),b=""):Pe(t)?b="":m(n,A)}else m(n,A)}S=b}else{x||m(2,A);let e=Number.parseInt(w,"hexadecimal"===a?16:10);if((f=e)>=55296&&f<=57343||f>1114111)m(7,A),S=Le(65533);else if(e in Te)m(6,A),S=Te[e];else{let t="";$e(e)&&m(6,A),e>65535&&(e-=65536,t+=Le(e>>>10|55296),e=56320|1023&e),S=t+Le(e)}}else"named"!==a&&m(4,A);if(S){g(),p=h(),s=y-1,d+=y-i+1,r.push(S);const n=h();n.offset++,t.reference&&t.reference.call(t.referenceContext,S,{start:p,end:n},e.slice(i-1,y)),p=n}else w=e.slice(i-1,y),l+=w,d+=w.length,s=y-1}else 10===c&&(u++,a++,d=0),Number.isNaN(c)?g():(l+=Le(c),d++);var f;return r.join("");function h(){return{line:u,column:d,offset:s+((o?o.offset:0)||0)}}function m(e,n){let r;t.warning&&(r=h(),r.column+=n,r.offset+=n,t.warning.call(t.warningContext,_e[e],r,e))}function g(){l&&(r.push(l),t.text&&t.text.call(t.textContext,l,{start:p,end:h()}),l="")}}function $e(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}var je=0,Be={},He={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++je}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},He.util.type(t)){case"Object":if(o=He.util.objId(t),n[o])return n[o];for(var i in r={},n[o]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return o=He.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}}},languages:{plain:Be,plaintext:Be,text:Be,txt:Be,extend:function(e,t){var n=He.util.clone(He.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||He.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a]);n.hasOwnProperty(s)||(i[s]=o[s])}var l=r[e];return r[e]=i,He.languages.DFS(He.languages,(function(t,n){n===l&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,r,o){o=o||{};var i=He.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var a=t[s],l=He.util.type(a);"Object"!==l||o[i(a)]?"Array"!==l||o[i(a)]||(o[i(a)]=!0,e(a,n,s,o)):(o[i(a)]=!0,e(a,n,null,o))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(He.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=He.tokenize(r.code,r.grammar),He.hooks.run("after-tokenize",r),Ve.stringify(He.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new Ke;return qe(o,o.head,e),We(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=He.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=He.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:Ve};function Ve(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function Ue(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function We(e,t,n,r,o,i){for(var s in n)if(n.hasOwnProperty(s)&&n[s]){var a=n[s];a=Array.isArray(a)?a:[a];for(var l=0;l<a.length;++l){if(i&&i.cause==s+","+l)return;var c=a[l],u=c.inside,d=!!c.lookbehind,p=!!c.greedy,f=c.alias;if(p&&!c.pattern.global){var h=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,h+"g")}for(var m=c.pattern||c,g=r.next,y=o;g!==t.tail&&!(i&&y>=i.reach);y+=g.value.length,g=g.next){var v=g.value;if(t.length>e.length)return;if(!(v instanceof Ve)){var b,w=1;if(p){if(!(b=Ue(m,y,e,d))||b.index>=e.length)break;var k=b.index,x=b.index+b[0].length,A=y;for(A+=g.value.length;k>=A;)A+=(g=g.next).value.length;if(y=A-=g.value.length,g.value instanceof Ve)continue;for(var S=g;S!==t.tail&&(A<x||"string"==typeof S.value);S=S.next)w++,A+=S.value.length;w--,v=e.slice(y,A),b.index-=y}else if(!(b=Ue(m,0,v,d)))continue;k=b.index;var E=b[0],C=v.slice(0,k),O=v.slice(k+E.length),M=y+v.length;i&&M>i.reach&&(i.reach=M);var N=g.prev;if(C&&(N=qe(t,N,C),y+=C.length),Ge(t,N,w),g=qe(t,N,new Ve(s,u?He.tokenize(E,u):E,f,E)),O&&qe(t,g,O),w>1){var T={cause:s+","+l,reach:M};We(e,t,n,g.prev,y,T),i&&T.reach>i.reach&&(i.reach=T.reach)}}}}}}function Ke(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function qe(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function Ge(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}const Ye=He,Je={}.hasOwnProperty;function Xe(){}Xe.prototype=Ye;const Ze=new Xe;Ze.highlight=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&"object"==typeof t)n=t;else{if(r=t,"string"!=typeof r)throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!Je.call(Ze.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=Ze.languages[r]}return{type:"root",children:Ye.highlight.call(Ze,e,n,r)}},Ze.register=function(e){if("function"!=typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Je.call(Ze.languages,e.displayName)||e(Ze)},Ze.alias=function(e,t){const n=Ze.languages;let r,o={};for(r in"string"==typeof e?t&&(o[e]=t):o=e,o)if(Je.call(o,r)){const e=o[r],t="string"==typeof e?[e]:e;let i=-1;for(;++i<t.length;)n[t[i]]=n[r]}},Ze.registered=function(e){if("string"!=typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Je.call(Ze.languages,e)},Ze.listLanguages=function(){const e=Ze.languages,t=[];let n;for(n in e)Je.call(e,n)&&"object"==typeof e[n]&&t.push(n);return t},Ze.util.encode=function(e){return e},Ze.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){const r=[];let o=-1;for(;++o<t.length;)""!==t[o]&&null!==t[o]&&void 0!==t[o]&&r.push(e(t[o],n));return r}const r={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),Ze.hooks.run("wrap",r),Me(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)Je.call(e,t)&&(e[t]=ze(e[t]));return e}(r.attributes),r.content)},Ze.register(s),Ze.register(a),Ze.register(l),Ze.register(c),Ze.register(u),Ze.register(d),Ze.register(p),Ze.register(f),Ze.register(h),Ze.register(m),Ze.register(g),Ze.register(y),Ze.register(v),Ze.register(b),Ze.register(w),Ze.register(k),Ze.register(x),Ze.register(A),Ze.register(S),Ze.register(E),Ze.register(C),Ze.register(O),Ze.register(M),Ze.register(N),Ze.register(T),Ze.register(I),Ze.register(R),Ze.register(D),Ze.register(P),Ze.register(F),Ze.register(L),Ze.register(_),Ze.register(z),Ze.register($),Ze.register(j),Ze.register(B);var Qe=n(7268),et=n(3686);function tt(e,t=[]){return e.flatMap((e=>{var n;return"element"===e.type?tt(e.children,[...t,...(null==(n=e.properties)?void 0:n.className)||[]]):[{text:e.value,className:t}]}))}function nt(e,t,n){const{highlight:r,listLanguages:i}=n,s=i(),a=[];return(0,o.xe)((e=>e.type.name===t))(e).forEach((e=>{let t=e.pos+1;const{language:n}=e.node.attrs;n&&s.includes(n)?tt(r(e.node.textContent,n).children).forEach((e=>{const n=t+e.text.length;if(e.className.length){const r=et.NZ.inline(t,n,{class:e.className.join(" ")});a.push(r)}t=n})):console.warn("Unsupported language detected, this language has not been supported by current prism config: ",n)})),et.zF.create(e,a)}const rt=(0,Qe.Qx)({configureRefractor:()=>{}},"prismConfig");rt.meta={package:"@milkdown/plugin-prism",displayName:"Ctx<prism>"};const ot=(0,Qe.Gf)((e=>{const{configureRefractor:t}=e.get(rt.key),n="code_block";return new i.k_({key:new i.hs("MILKDOWN_PRISM"),state:{init:(e,{doc:r})=>{const o=t(Ze);return nt(r,n,o??Ze)},apply:(e,t,r,i)=>{var s,a;const l=i.selection.$head.parent.type.name===n,c=r.selection.$head.parent.type.name===n,u=(0,o.xe)((e=>e.type.name===n))(r.doc),d=(0,o.xe)((e=>e.type.name===n))(i.doc);return e.docChanged&&(l||c||u.length!==d.length||(null==(s=u[0])?void 0:s.node.attrs.language)!==(null==(a=d[0])?void 0:a.node.attrs.language)||e.steps.some((e=>{const t=e;return void 0!==t.from&&void 0!==t.to&&u.some((e=>e.pos>=t.from&&e.pos+e.node.nodeSize<=t.to))})))?nt(e.doc,n,Ze):t.map(e.mapping,e.doc)}},props:{decorations(e){return this.getState(e)}}})}));ot.meta={package:"@milkdown/plugin-prism",displayName:"Prose<prism>"};const it=[ot,rt]},3051:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3219:(e,t,n)=>{"use strict";function r(e,t){return o(e,t.inConstruct,!0)&&!o(e,t.notInConstruct,!1)}function o(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}n.d(t,{q:()=>r})},3319:(e,t,n)=>{"use strict";n.d(t,{vo:()=>O,e2:()=>y,$X:()=>b});var r,o,i,s,a=n(8769),l=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},c=(e,t,n)=>(((e,t)=>{if(!t.has(e))throw TypeError("Cannot access private method")})(e,t),n);class u{constructor({node:e,view:t,getPos:n,decorations:o,innerDecorations:i,options:s}){l(this,r),this.selected=!1,this.selectNode=()=>{var e,t;this.selected=!0,null==(t=(e=this.options).selectNode)||t.call(e)},this.deselectNode=()=>{var e,t;this.selected=!1,null==(t=(e=this.options).deselectNode)||t.call(e)},this.shouldUpdate=e=>!(e.type!==this.node.type||e.sameMarkup(this.node)&&e.content.eq(this.node.content)),this.update=(e,t,n)=>{var r,o;const i=this.options.update;let s;return i&&(s=i(e,t,n)),"boolean"!=typeof s&&(s=this.shouldUpdate(e)),this.node=e,this.decorations=t,this.innerDecorations=n,s&&(null==(o=(r=this.options).onUpdate)||o.call(r)),s},this.shouldIgnoreMutation=e=>!(this.dom&&this.contentDOM&&!this.node.isLeaf&&!this.node.isAtom)||"selection"!==e.type&&(this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)),this.ignoreMutation=e=>{if(!this.dom||!this.contentDOM)return!0;let t;const n=this.options.ignoreMutation;return n&&(t=n(e)),"boolean"!=typeof t&&(t=this.shouldIgnoreMutation(e)),t},this.destroy=()=>{var e,t,n;null==(t=(e=this.options).destroy)||t.call(e),this.dom.remove(),null==(n=this.contentDOM)||n.remove()},this.setAttrs=e=>{const{dispatch:t,state:n}=this.view,r=this.getPos();if("number"==typeof r)return t(n.tr.setNodeMarkup(r,void 0,{...this.node.attrs,...e}))},this.node=e,this.view=t,this.getPos=n,this.decorations=o,this.innerDecorations=i,this.options=s,this.dom=this.createDOM(s.as),this.contentDOM=e.isLeaf?null:this.createContentDOM(s.contentAs),this.dom.setAttribute("data-node-view-root","true"),this.contentDOM&&(this.contentDOM.setAttribute("data-node-view-content","true"),this.contentDOM.style.whiteSpace="inherit"),this.setSelection=s.setSelection,this.stopEvent=s.stopEvent}createDOM(e){return c(this,r,o).call(this,e)}createContentDOM(e){return c(this,r,o).call(this,e)}get component(){return this.options.component}}r=new WeakSet,o=function(e){const{node:t}=this;return null==e?document.createElement(t.isInline?"span":"div"):e instanceof HTMLElement?e:e instanceof Function?e(t):document.createElement(e)};class d{constructor(e){this.view=e.view,this.options=e.options}get component(){return this.options.component}get root(){var e,t;let n=null==(t=(e=this.options).root)?void 0:t.call(e,this.view.dom);return n||(n=this.view.dom.parentElement??document.body),n}update(e,t){var n,r;this.view=e,this.prevState=t,null==(r=(n=this.options).update)||r.call(n,e,t)}destroy(){var e,t;null==(t=(e=this.options).destroy)||t.call(e)}}class p{constructor({pos:e,spec:t,options:n}){l(this,i),this.pos=e,this.options=n,this.spec=t,this.dom=c(this,i,s).call(this,n.as),this.dom.setAttribute("data-widget-view-root","true")}bind(e,t){this.view=e,this.getPos=t}get component(){return this.options.component}}i=new WeakSet,s=function(e){return e instanceof HTMLElement?e:document.createElement(e)};let f=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),"");var h=n(9435),m=n(3686);const g=(0,a.createContext)({contentRef:()=>{},view:null,getPos:()=>0,setAttrs:()=>{},node:null,selected:!1,decorations:[],innerDecorations:null}),y=()=>(0,a.useContext)(g),v=(0,a.createContext)((e=>{throw new Error("out of scope")})),b=()=>(0,a.useContext)(v);class w extends u{constructor(){super(...arguments),this.key=f(),this.context={contentRef:e=>{e&&this.contentDOM&&e.firstChild!==this.contentDOM&&e.appendChild(this.contentDOM)},view:this.view,getPos:this.getPos,setAttrs:this.setAttrs,node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations},this.updateContext=()=>{Object.assign(this.context,{node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations})},this.render=()=>{const e=this.component;return(0,h.createPortal)(a.createElement(g.Provider,{value:this.context},a.createElement(e,null)),this.dom,this.key)}}}const k=(0,a.createContext)({view:null}),x=(0,a.createContext)((e=>{throw new Error("out of scope")}));class A extends d{constructor(){super(...arguments),this.key=f(),this.context={view:this.view,prevState:this.prevState},this.updateContext=()=>{Object.assign(this.context,{view:this.view,prevState:this.prevState})},this.render=()=>{const e=this.component;return(0,h.createPortal)(a.createElement(k.Provider,{value:this.context},a.createElement(e,null)),this.root,this.key)}}}const S=(0,a.createContext)({view:null,getPos:()=>{}}),E=(0,a.createContext)((e=>{throw new Error("out of scope")}));class C extends p{constructor(){super(...arguments),this.key=f(),this.context={view:this.view,getPos:this.getPos,spec:this.spec},this.updateContext=()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})},this.render=()=>{const e=this.component;return(0,h.createPortal)(a.createElement(S.Provider,{value:this.context},a.createElement(e,null)),this.dom,this.key)}}}const O=({children:e})=>{const{renderReactRenderer:t,removeReactRenderer:n,portals:r}=(()=>{const[e,t]=(0,a.useState)({}),n=(0,a.useRef)(!1);(0,a.useEffect)((()=>(requestAnimationFrame((()=>{n.current=!0})),()=>{n.current=!1})),[]);const r=(0,a.useCallback)((e=>{n.current?(0,h.flushSync)(e):e()}),[]);return{portals:e,renderReactRenderer:(0,a.useCallback)(((e,n=!0)=>{r((()=>{n&&e.updateContext(),t((t=>({...t,[e.key]:e.render()})))}))}),[r]),removeReactRenderer:(0,a.useCallback)((e=>{r((()=>{t((t=>{const n={...t};return delete n[e.key],n}))}))}),[r])}})(),o=((e,t)=>(0,a.useCallback)((n=>(r,o,i,s,a)=>{const l=new w({node:r,view:o,getPos:i,decorations:s,innerDecorations:a,options:{...n,onUpdate(){var t;null==(t=n.onUpdate)||t.call(n),e(l)},selectNode(){var t;null==(t=n.selectNode)||t.call(n),e(l)},deselectNode(){var t;null==(t=n.deselectNode)||t.call(n),e(l)},destroy(){var e;null==(e=n.destroy)||e.call(n),t(l)}}});return e(l,!1),l}),[t,e]))(t,n),i=((e,t)=>(0,a.useCallback)((n=>r=>{const o=new A({view:r,options:{...n,update:(t,r)=>{var i;null==(i=n.update)||i.call(n,t,r),e(o)},destroy:()=>{var e;null==(e=n.destroy)||e.call(n),t(o)}}});return e(o,!1),o}),[t,e]))(t,n),s=((e,t)=>(0,a.useCallback)((n=>(r,o={})=>{const i=new C({pos:r,options:n}),s={...o,destroy:e=>{var n;null==(n=o.destroy)||n.call(o,e),t(i)}};return i.spec=s,m.NZ.widget(r,((t,n)=>(i.bind(t,n),e(i),i.dom)),s)}),[t,e]))(t,n),l=(0,a.useMemo)((()=>Object.values(r)),[r]);return a.createElement(v.Provider,{value:o},a.createElement(x.Provider,{value:i},a.createElement(E.Provider,{value:s},e,l)))}},3373:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},3656:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3686:(e,t,n)=>{"use strict";n.d(t,{Lz:()=>an,NZ:()=>Lt,zF:()=>$t});var r=n(1570),o=n(6090),i=n(3710);const s=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},a=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let l=null;const c=function(e,t,n){let r=l||(l=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},u=function(e,t,n,r){return n&&(p(e,t,n,r,-1)||p(e,t,n,r,1))},d=/^(img|br|input|textarea|hr)$/i;function p(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:f(e))){let n=e.parentNode;if(!n||1!=n.nodeType||h(e)||d.test(e.nodeName)||"false"==e.contentEditable)return!1;t=s(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?f(e):0}}}function f(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function h(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const m=function(e){return e.focusNode&&u(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function g(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const y="undefined"!=typeof navigator?navigator:null,v="undefined"!=typeof document?document:null,b=y&&y.userAgent||"",w=/Edge\/(\d+)/.exec(b),k=/MSIE \d/.exec(b),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),A=!!(k||x||w),S=k?document.documentMode:x?+x[1]:w?+w[1]:0,E=!A&&/gecko\/(\d+)/i.test(b);E&&(/Firefox\/(\d+)/.exec(b)||[0,0])[1];const C=!A&&/Chrome\/(\d+)/.exec(b),O=!!C,M=C?+C[1]:0,N=!A&&!!y&&/Apple Computer/.test(y.vendor),T=N&&(/Mobile\/\w+/.test(b)||!!y&&y.maxTouchPoints>2),I=T||!!y&&/Mac/.test(y.platform),R=!!y&&/Win/.test(y.platform),D=/Android \d/.test(b),P=!!v&&"webkitFontSmoothing"in v.documentElement.style,F=P?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function L(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function _(e,t){return"number"==typeof e?e:e[t]}function z(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function $(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;s=a(s)){if(1!=s.nodeType)continue;let e=s,n=e==i.body,a=n?L(i):z(e),l=0,c=0;if(t.top<a.top+_(r,"top")?c=-(a.top-t.top+_(o,"top")):t.bottom>a.bottom-_(r,"bottom")&&(c=t.bottom-a.bottom+_(o,"bottom")),t.left<a.left+_(r,"left")?l=-(a.left-t.left+_(o,"left")):t.right>a.right-_(r,"right")&&(l=t.right-a.right+_(o,"right")),l||c)if(n)i.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let o=e.scrollLeft-n,i=e.scrollTop-r;t={left:t.left-o,top:t.top-i,right:t.right-o,bottom:t.bottom-i}}if(n)break}}function j(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=a(r));return t}function B(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let H=null;function V(e,t){let n,r,o,i,s=2e8,a=0,l=t.top,u=t.top;for(let d=e.firstChild,p=0;d;d=d.nextSibling,p++){let e;if(1==d.nodeType)e=d.getClientRects();else{if(3!=d.nodeType)continue;e=c(d).getClientRects()}for(let c=0;c<e.length;c++){let f=e[c];if(f.top<=l&&f.bottom>=u){l=Math.max(f.bottom,l),u=Math.min(f.top,u);let e=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(e<s){n=d,s=e,r=e&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==d.nodeType&&e&&(a=p+(t.left>=(f.left+f.right)/2?1:0));continue}}else f.top>t.top&&!o&&f.left<=t.left&&f.right>=t.left&&(o=d,i={left:Math.max(f.left,Math.min(f.right,t.left)),top:f.top});!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(a=p+1)}}return!n&&o&&(n=o,r=i,s=0),n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=G(r,1);if(n.top!=n.bottom&&U(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||s&&1==n.nodeType?{node:e,offset:a}:V(n,r)}function U(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function W(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=e.childNodes[i];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let o=e[r];if(U(t,o))return W(n,t,o)}}if((i=(i+1)%r)==o)break}return e}function K(e,t){let n,r=e.dom.ownerDocument,o=0,i=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch(e){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}(r,t.left,t.top);i&&({node:n,offset:o}=i);let s,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=e.dom.getBoundingClientRect();if(!U(t,n))return null;if(l=W(e.dom,t,n),!l)return null}if(N)for(let e=l;n&&e;e=a(e))e.draggable&&(n=void 0);if(l=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(E&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let e,r=n.childNodes[o];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){let o=-1;for(let n=t,i=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent&&!i||!t.contentDOM)){let e=t.dom.getBoundingClientRect();if(t.node.isBlock&&t.parent&&!i&&(i=!0,e.left>r.left||e.top>r.top?o=t.posBefore:(e.right<r.left||e.bottom<r.top)&&(o=t.posAfter)),!t.contentDOM&&o<0)return(t.node.isBlock?r.top<(e.top+e.bottom)/2:r.left<(e.left+e.right)/2)?t.posBefore:t.posAfter}n=t.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}(e,n,o,t))}null==s&&(s=function(e,t,n){let{node:r,offset:o}=V(t,n),i=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();i=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}(e,l,t));let c=e.docView.nearestDesc(l,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function q(e){return e.top<e.bottom||e.left<e.right}function G(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(q(e))return e}return Array.prototype.find.call(n,q)||e.getBoundingClientRect()}const Y=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function J(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),s=P||E;if(3==r.nodeType){if(!s||!Y.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let e=o,t=o,i=n<0?1:-1;return n<0&&!o?(t++,i=-1):n>=0&&o==r.nodeValue.length?(e--,i=1):n<0?e--:t++,X(G(c(r,e,t),i),i<0)}{let e=G(c(r,o,o),n);if(E&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=G(c(r,o-1,o-1),-1);if(t.top==e.top){let n=G(c(r,o,o+1),-1);if(n.top!=e.top)return X(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(null==i&&o&&(n<0||o==f(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return Z(e.getBoundingClientRect(),!1)}if(null==i&&o<f(r)){let e=r.childNodes[o];if(1==e.nodeType)return Z(e.getBoundingClientRect(),!0)}return Z(r.getBoundingClientRect(),n>=0)}if(null==i&&o&&(n<0||o==f(r))){let e=r.childNodes[o-1],t=3==e.nodeType?c(e,f(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return X(G(t,1),!1)}if(null==i&&o<f(r)){let e=r.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?c(e,0,s?0:1):1==e.nodeType?e:null:null;if(t)return X(G(t,-1),!0)}return X(G(3==r.nodeType?c(r):r,-n),n>=0)}function X(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Z(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Q(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}const ee=/[\u0590-\u08ac]/;let te=null,ne=null,re=!1;class oe{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>s(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!t||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return i;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let o=this.children[n],i=t+o.size;if(i>e||o instanceof de){r=e-t;break}t=i}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof ie&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?s(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?s(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,a=0;;a++){let n=this.children[a],l=i+n.size;if(-1==r&&e<=l){let o=i+n.border;if(e>=o&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=i;for(let t=a;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=s(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(let e=a+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=s(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),i=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(o>a&&i<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let s=this.domFromPos(e,e?-1:1),a=t==e?s:this.domFromPos(t,t?-1:1),l=n.getSelection(),c=!1;if((E||N)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType)c=!(!t||"\n"!=e.nodeValue[t-1]);else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(E&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let e=l.focusNode.childNodes[l.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&N)&&u(s.node,s.offset,l.anchorNode,l.anchorOffset)&&u(a.node,a.offset,l.focusNode,l.focusOffset))return;let d=!1;if((l.extend||e==t)&&!c){l.collapse(s.node,s.offset);try{e!=t&&l.extend(a.node,a.offset),d=!0}catch(e){}}if(!d){if(e>t){let e=s;s=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){let r=n+o.border,s=i-o.border;if(e>=r&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=r||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-r,t-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class ie extends oe{constructor(e,t,n,r){let o,i=t.type.toDOM;if("function"==typeof i&&(i=i(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!t.type.spec.raw){if(1!=i.nodeType){let e=document.createElement("span");e.appendChild(i),i=e}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class se extends oe{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class ae extends oe{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let i=r.nodeViews[t.type.name],s=i&&i(t,r,n);return s&&s.dom||(s=o.ZF.renderSpec(document,t.type.spec.toDOM(t,n))),new ae(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=ae.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;t<i&&(o=Se(o,t,i,n)),e>0&&(o=Se(o,0,e,n));for(let e=0;e<o.length;e++)o[e].parent=r;return r.children=o,r}}class le extends oe{constructor(e,t,n,r,o,i,s,a,l){super(e,[],o,i),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(e,t,n,r,i,s){let a,l=i.nodeViews[t.type.name],c=l&&l(t,i,(()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s),n,r),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(t.text);else u||({dom:u,contentDOM:d}=o.ZF.renderSpec(document,t.type.spec.toDOM(t)));d||t.isText||"BR"==u.nodeName||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let p=u;return u=be(u,n,t),c?a=new pe(e,t,n,r,u,d||null,p,c,i,s+1):t.isText?new ue(e,t,n,r,u,p,i):new le(e,t,n,r,u,d||null,p,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>o.FK.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&we(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new xe(this,s&&s.node,e);!function(e,t,n,r){let o=t.locals(e),i=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,o,t.forChild(i,s),n),i+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){if(s<o.length&&o[s].to==i){let e,t=o[s++];for(;s<o.length&&o[s].to==i;)(e||(e=[t])).push(o[s++]);if(e){e.sort(Ae);for(let t=0;t<e.length;t++)n(e[t],c,!!l)}else n(t,c,!!l)}let u,d;if(l)d=-1,u=l,l=null;else{if(!(c<e.childCount))break;d=c,u=e.child(c++)}for(let e=0;e<a.length;e++)a[e].to<=i&&a.splice(e--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let p=i+u.nodeSize;if(u.isText){let e=p;s<o.length&&o[s].from<e&&(e=o[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<p&&(l=u.cut(e-i),u=u.cut(0,e-i),p=e,d=-1)}r(u,u.isInline&&!u.isLeaf?a.filter((e=>!e.inline)):a.slice(),t.forChild(i,u),d),i=p}}(this.node,this.innerDeco,((t,i,s)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!s&&l.syncToMarks(i==this.node.childCount?o.CU.none:this.node.child(i).marks,n,e),l.placeWidget(t,e,r)}),((t,o,s,c)=>{let u;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,o,s,c)||a&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,o,s,u,e)||l.updateNextNode(t,o,s,e,c,r)||l.addNode(t,o,s,e,r),r+=t.nodeSize})),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),fe(this.contentDOM,this.children,e),T&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:o}=e.state.selection;if(!(e.state.selection instanceof r.U3)||n<t||o>t+this.node.content.size)return null;let i=e.domSelectionRange(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=f(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let e=s.nodeValue,r=function(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let s=e.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<e.childCount;){let t=e.child(o++);if(i+=t.nodeSize,!t.isText)break;l+=t.text}if(i>=n){let e=a<r?l.lastIndexOf(t,r-a-1):-1;if(e>=0&&e+t.length+a>=n)return a+e;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}(this.node.content,e,n-t,o-t);return r<0?null:{node:s,pos:r,text:e}}return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new se(this,o,t,r);e.input.compositionNodes.push(i),this.children=Se(this.children,n,n+r.length,e,i)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node)||(this.updateInner(e,t,n,r),0))}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(we(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=ye(this.dom,this.nodeDOM,ge(this.outerDeco,this.node,t),ge(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ce(e,t,n,r,o){be(r,t,e);let i=new le(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class ue extends le{constructor(e,t,n,r,o,i,s){super(e,t,n,r,o,null,i,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node)||(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,0))}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new ue(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class de extends oe{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class pe extends le{constructor(e,t,n,r,o,i,s,a,l,c){super(e,t,n,r,o,i,s,l,c),this.spec=a}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function fe(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let s=t[i],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=ke(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(a,r);if(s instanceof ae){let t=r?r.previousSibling:e.lastChild;fe(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=ke(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const he=function(e){e&&(this.nodeName=e)};he.prototype=Object.create(null);const me=[new he];function ge(e,t,n){if(0==e.length)return me;let r=n?me[0]:new he,o=[r];for(let i=0;i<e.length;i++){let s=e[i].type.attrs;if(s){s.nodeName&&o.push(r=new he(s.nodeName));for(let e in s){let i=s[e];null!=i&&(n&&1==o.length&&o.push(r=new he(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+i:"style"==e?r.style=(r.style?r.style+";":"")+i:"nodeName"!=e&&(r[e]=i))}}}return o}function ye(e,t,n,r){if(n==me&&r==me)return t;let o=t;for(let t=0;t<r.length;t++){let i=r[t],s=n[t];if(t){let t;s&&s.nodeName==i.nodeName&&o!=e&&(t=o.parentNode)&&t.nodeName.toLowerCase()==i.nodeName||(t=document.createElement(i.nodeName),t.pmIsDeco=!0,t.appendChild(o),s=me[0]),o=t}ve(o,s||me[0],i)}return o}function ve(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function be(e,t,n){return ye(e,e,me,ge(t,n,1!=e.nodeType))}function we(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function ke(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class xe{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,o=e.childCount,i=new Map,s=[];e:for(;o>0;){let a;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof ae)){a=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,i=Math.min(o,e.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++){let n=this.top.children[t];if(n.matchesMark(e[o])&&!this.isLocked(n.dom)){r=t;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=ae.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r<o;r++){let o=this.top.children[r];if(o.matchesNode(e,t,n)&&!this.preMatch.matched.has(o)){i=r;break}}return!(i<0||(this.destroyBetween(this.index,i),this.index++,0))}updateNodeAt(e,t,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,o,i){for(let s=this.index;s<this.top.children.length;s++){let a=this.top.children[s];if(a instanceof le){let l=this.preMatch.matched.get(a);if(null!=l&&l!=o)return!1;let c,u=a.dom,d=this.isLocked(u)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&we(t,a.outerDeco));if(!d&&a.update(e,t,n,r))return this.destroyBetween(this.index,s),a.dom!=u&&(this.changed=!0),this.index++,!0;if(!d&&(c=this.recreateWrapper(a,e,t,n,r,i)))return this.top.children[this.index]=c,c.dirty=2,c.updateChildren(r,i+1),c.dirty=0,this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,o,i){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let s=le.create(this.top,t,n,r,o,i);if(!s.contentDOM)return null;s.children=e.children,e.children=[];for(let e of s.children)e.parent=s;return s}addNode(e,t,n,r,o){let i=le.create(this.top,e,t,n,r,o);i.contentDOM&&i.updateChildren(r,o+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new ie(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof ae;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof ue)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((N||O)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new de(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function Ae(e,t){return e.type.side-t.type.side}function Se(e,t,n,r,o){let i=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function Ee(e,t=null){let n=e.domSelectionRange(),o=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&0==i.size,l=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c,u,d=o.resolve(l);if(m(n)){for(c=d;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&r.nh.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==f(e);r||o;){if(e==n)return!0;let t=s(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==f(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;u=new r.nh(l==e?d:o.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;c=o.resolve(t)}return u||(u=Pe(e,c,d,"pointer"==t||e.state.selection.head<d.pos&&!a?1:-1)),u}function Ce(e){return e.editable?e.hasFocus():Le(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Oe(e,t=!1){let n=e.state.selection;if(Re(e,n),Ce(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&O){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&u(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,s(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&A&&S<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let o,i,{anchor:s,head:a}=n;!Me||n instanceof r.U3||(n.$from.parent.inlineContent||(o=Ne(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Ne(e,n.to))),e.docView.setSelection(s,a,e.root,t),Me&&(o&&Ie(o),i&&Ie(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Ce(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Me=N||O&&M<63;function Ne(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(N&&o&&"false"==o.contentEditable)return Te(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return Te(o);if(i)return Te(i)}}function Te(e){return e.contentEditable="true",N&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ie(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Re(e,t){if(t instanceof r.nh){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(De(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else De(e)}function De(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Pe(e,t,n,o){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||r.U3.between(t,n,o)}function Fe(e){return!(e.editable&&!e.hasFocus())&&Le(e)}function Le(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function _e(e,t){let{$anchor:n,$head:o}=e.selection,i=t>0?n.max(o):n.min(o),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&r.LN.findFrom(s,t)}function ze(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function $e(e,t,n){let o=e.state.selection;if(!(o instanceof r.U3)){if(o instanceof r.nh&&o.node.isInline)return ze(e,new r.U3(t>0?o.$to:o.$from));{let n=_e(e.state,t);return!!n&&ze(e,n)}}if(!o.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let n=_e(e.state,t);return!!(n&&n instanceof r.nh)&&ze(e,n)}if(!(I&&n.indexOf("m")>-1)){let n,i=o.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText)return!1;let a=t<0?i.pos-s.nodeSize:i.pos;return!!(s.isAtom||(n=e.docView.descAt(a))&&!n.contentDOM)&&(r.nh.isSelectable(s)?ze(e,new r.nh(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):!!P&&ze(e,new r.U3(e.state.doc.resolve(t<0?a:a+s.nodeSize))))}}function je(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Be(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function He(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=!1;for(E&&1==n.nodeType&&r<je(n)&&Be(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(Be(e))o=n,i=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Ue(n))break;{let t=n.previousSibling;for(;t&&Be(t);)o=n.parentNode,i=s(t),t=t.previousSibling;if(t)n=t,r=je(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?We(e,n,r):o&&We(e,o,i)}(e):Ve(e)}function Ve(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=je(n);for(;;)if(r<a){if(1!=n.nodeType)break;if(!Be(n.childNodes[r]))break;o=n,i=++r}else{if(Ue(n))break;{let t=n.nextSibling;for(;t&&Be(t);)o=t.parentNode,i=s(t)+1,t=t.nextSibling;if(t)n=t,r=0,a=je(n);else{if(n=n.parentNode,n==e.dom)break;r=a=0}}}o&&We(e,o,i)}function Ue(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function We(e,t,n){let r=e.domSelection();if(m(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&Oe(e)}),50)}function Ke(e,t){let n=e.state.doc.resolve(t);if(!O&&!R&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function qe(e,t,n){let o=e.state.selection;if(o instanceof r.U3&&!o.empty||n.indexOf("s")>-1)return!1;if(I&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=o;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=_e(e.state,t);if(n&&n instanceof r.nh)return ze(e,n)}if(!i.parent.inlineContent){let n=t<0?i:s,a=o instanceof r.i5?r.LN.near(n,t):r.LN.findFrom(n,t);return!!a&&ze(e,a)}return!1}function Ge(e,t){if(!(e.state.selection instanceof r.U3))return!0;let{$head:n,$anchor:o,empty:i}=e.state.selection;if(!n.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=e.state.tr;return t<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),e.dispatch(r),!0}return!1}function Ye(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Je(e,t){e.someProp("transformCopied",(n=>{t=n(t,e)}));let n=[],{content:r,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,s--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let a=e.someProp("clipboardSerializer")||o.ZF.fromSchema(e.state.schema),l=st(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));let u,d=c.firstChild,p=0;for(;d&&1==d.nodeType&&(u=ot[d.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=l.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),p++}d=c.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",`${i} ${s}${p?` -${p}`:""} ${JSON.stringify(n)}`),{dom:c,text:e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n")}}function Xe(e,t,n,r,i){let s,a,l=i.parent.type.spec.code;if(!n&&!t)return null;let c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",(n=>{t=n(t,l||r,e)})),l)return t?new o.Ji(o.FK.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):o.Ji.empty;let n=e.someProp("clipboardTextParser",(n=>n(t,i,r,e)));if(n)a=n;else{let n=i.marks(),{schema:r}=e.state,a=o.ZF.fromSchema(r);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=s.appendChild(document.createElement("p"));e&&t.appendChild(a.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(t=>{n=t(n,e)})),s=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=st().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);if((n=o&&ot[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join("")),r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),P&&function(e){let t=e.querySelectorAll(O?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(s);let u=s&&s.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let e=+d[3];e>0;e--){let e=s.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;s=e}if(!a){let t=e.someProp("clipboardParser")||e.someProp("domParser")||o.S4.fromSchema(e.state.schema);a=t.parseSlice(s,{preserveWhitespace:!(!c&&!d),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Ze.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(d)a=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:i,openStart:s,openEnd:a}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;i=o.FK.from(t.create(n[e+1],i)),s++,a++}return new o.Ji(i,s,a)}(rt(a,+d[1],+d[2]),d[4]);else if(a=o.Ji.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),s=[];if(e.forEach((e=>{if(!s)return;let t,n=i.findWrapping(e.type);if(!n)return s=null;if(t=s.length&&r.length&&et(n,r,e,s[s.length-1],0))s[s.length-1]=t;else{s.length&&(s[s.length-1]=tt(s[s.length-1],r.length));let t=Qe(e,n);s.push(t),i=i.matchType(t.type),r=n}})),s)return o.FK.from(s)}return e}(a.content,i),!0),a.openStart||a.openEnd){let e=0,t=0;for(let t=a.content.firstChild;e<a.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=a.content.lastChild;t<a.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);a=rt(a,e,t)}return e.someProp("transformPasted",(t=>{a=t(a,e)})),a}const Ze=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Qe(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,o.FK.from(e));return e}function et(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let s=et(e,t,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(o.FK.from(Qe(n,e,i+1))))}}function tt(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,tt(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(o.FK.empty,!0);return e.copy(n.append(r))}function nt(e,t,n,r,i,s){let a=t<0?e.firstChild:e.lastChild,l=a.content;return e.childCount>1&&(s=0),i<r-1&&(l=nt(l,t,n,r,i+1,s)),i>=n&&(l=t<0?a.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(o.FK.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(l))}function rt(e,t,n){return t<e.openStart&&(e=new o.Ji(nt(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new o.Ji(nt(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const ot={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let it=null;function st(){return it||(it=document.implementation.createHTMLDocument("title"))}const at={},lt={},ct={touchstart:!0,touchmove:!0};class ut{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function dt(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function pt(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>ft(e,t))}))}function ft(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function ht(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function mt(e){return{left:e.clientX,top:e.clientY}}function gt(e,t,n,r,o){if(-1==r)return!1;let i=e.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(e.someProp(t,(t=>r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function yt(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function vt(e,t,n,r){return gt(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function bt(e,t,n,o){return gt(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(n=>n(e,t,o)))||function(e,t,n){if(0!=n.button)return!1;let o=e.state.doc;if(-1==t)return!!o.inlineContent&&(yt(e,r.U3.create(o,0,o.content.size),"pointer"),!0);let i=o.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),s=i.before(t);if(n.inlineContent)yt(e,r.U3.create(o,s+1,s+1+n.content.size),"pointer");else{if(!r.nh.isSelectable(n))continue;yt(e,r.nh.create(o,s),"pointer")}return!0}}(e,n,o)}function wt(e){return Ot(e)}lt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!At(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!D||!O||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!T||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||function(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);if(8==n||I&&72==n&&"c"==r)return Ge(e,-1)||He(e,-1);if(46==n||I&&68==n&&"c"==r)return Ge(e,1)||He(e,1);if(13==n||27==n)return!0;if(37==n||I&&66==n&&"c"==r){let t=37==n?"ltr"==Ke(e,e.state.selection.from)?-1:1:-1;return $e(e,t,r)||He(e,t)}if(39==n||I&&70==n&&"c"==r){let t=39==n?"ltr"==Ke(e,e.state.selection.from)?1:-1:1;return $e(e,t,r)||He(e,t)}return 38==n||I&&80==n&&"c"==r?qe(e,-1,r)||He(e,-1):40==n||I&&78==n&&"c"==r?function(e){if(!N||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Ye(e,n,"true"),setTimeout((()=>Ye(e,n,"false")),20)}return!1}(e)||qe(e,1,r)||Ve(e):r==(I?"m":"c")&&(66==n||73==n||89==n||90==n)}(e,n)?n.preventDefault():dt(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},lt.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},lt.keypress=(e,t)=>{let n=t;if(At(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||I&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let o=e.state.selection;if(!(o instanceof r.U3&&o.$from.sameParent(o.$to))){let t=String.fromCharCode(n.charCode);/[\r\n]/.test(t)||e.someProp("handleTextInput",(n=>n(e,o.$from.pos,o.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const kt=I?"metaKey":"ctrlKey";at.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=wt(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[kt]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(mt(n));s&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new xt(e,s,n,!!r)):("doubleClick"==i?vt:bt)(e,s.pos,s.inside,n)?n.preventDefault():dt(e,"pointer"))};class xt{constructor(e,t,n,o){let i,s;if(this.view=e,this.pos=t,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[kt],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,s=n.depth?n.before():0}const a=o?null:n.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||c instanceof r.nh&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!E||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),dt(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Oe(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(mt(e))),this.updateAllowDefault(e),this.allowDefault||!t?dt(this.view,"pointer"):function(e,t,n,o,i){return gt(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(n=>n(e,t,o)))||(i?function(e,t){if(-1==t)return!1;let n,o,i=e.state.selection;i instanceof r.nh&&(n=i.node);let s=e.state.doc.resolve(t);for(let e=s.depth+1;e>0;e--){let t=e>s.depth?s.nodeAfter:s.node(e);if(r.nh.isSelectable(t)){o=n&&i.$from.depth>0&&e>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(e);break}}return null!=o&&(yt(e,r.nh.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.nh.isSelectable(o))&&(yt(e,new r.nh(n),"pointer"),!0)}(e,n))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||N&&this.mightDrag&&!this.mightDrag.node.isAtom||O&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(yt(this.view,r.LN.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):dt(this.view,"pointer")}move(e){this.updateAllowDefault(e),dt(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function At(e,t){return!!e.composing||!!(N&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}at.touchstart=e=>{e.input.lastTouch=Date.now(),wt(e),dt(e,"pointer")},at.touchmove=e=>{e.input.lastTouch=Date.now(),dt(e,"pointer")},at.contextmenu=e=>wt(e);const St=D?5e3:-1;function Et(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>Ot(e)),t))}function Ct(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Ot(e,t=!1){if(!(D&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ct(e),t||e.docView&&e.docView.dirty){let t=Ee(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}lt.compositionstart=lt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),Ot(e,!0),e.markCursor=null;else if(Ot(e),E&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}Et(e,St)},lt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionID++,Et(e,20))};const Mt=A&&S<15||T&&F<604;function Nt(e,t,n,r,i){let s=Xe(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,i,s||o.Ji.empty))))return!0;if(!s)return!1;let a=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(s),l=a?e.state.tr.replaceSelectionWith(a,e.input.shiftKey):e.state.tr.replaceSelection(s);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}at.copy=lt.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let i=Mt?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Je(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},lt.paste=(e,t)=>{let n=t;if(e.composing&&!D)return;let r=Mt?null:n.clipboardData;r&&Nt(e,r.getData("text/plain"),r.getData("text/html"),e.input.shiftKey,n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Nt(e,r.value,null,e.input.shiftKey,t):Nt(e,r.textContent,r.innerHTML,e.input.shiftKey,t)}),50)}(e,n)};class Tt{constructor(e,t){this.slice=e,this.move=t}}const It=I?"altKey":"ctrlKey";at.dragstart=(e,t)=>{let n=t,o=e.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(mt(n));if(s&&s.pos>=i.from&&s.pos<=(i instanceof r.nh?i.to-1:i.to));else if(o&&o.mightDrag)e.dispatch(e.state.tr.setSelection(r.nh.create(e.state.doc,o.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(r.nh.create(e.state.doc,t.posBefore)))}let a=e.state.selection.content(),{dom:l,text:c}=Je(e,a);n.dataTransfer.clearData(),n.dataTransfer.setData(Mt?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Mt||n.dataTransfer.setData("text/plain",c),e.dragging=new Tt(a,!n[It])},at.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},lt.dragover=lt.dragenter=(e,t)=>t.preventDefault(),lt.drop=(e,t)=>{let n=t,s=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let a=e.posAtCoords(mt(n));if(!a)return;let l=e.state.doc.resolve(a.pos),c=s&&s.slice;c?e.someProp("transformPasted",(t=>{c=t(c,e)})):c=Xe(e,n.dataTransfer.getData(Mt?"Text":"text/plain"),Mt?null:n.dataTransfer.getData("text/html"),!1,l);let u=!(!s||n[It]);if(e.someProp("handleDrop",(t=>t(e,n,c||o.Ji.empty,u))))return void n.preventDefault();if(!c)return;n.preventDefault();let d=c?(0,i.Um)(e.state.doc,l.pos,c):l.pos;null==d&&(d=l.pos);let p=e.state.tr;u&&p.deleteSelection();let f=p.mapping.map(d),h=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=p.doc;if(h?p.replaceRangeWith(f,f,c.content.firstChild):p.replaceRange(f,f,c),p.doc.eq(m))return;let g=p.doc.resolve(f);if(h&&r.nh.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))p.setSelection(new r.nh(g));else{let t=p.mapping.map(d);p.mapping.maps[p.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),p.setSelection(Pe(e,g,p.doc.resolve(t)))}e.focus(),e.dispatch(p.setMeta("uiEvent","drop"))},at.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Oe(e)}),20))},at.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},at.beforeinput=(e,t)=>{if(O&&D&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,g(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in lt)at[e]=lt[e];function Rt(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Dt{constructor(e,t){this.toDOM=e,this.spec=t||zt,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:i}=e.mapResult(t.from+r,this.side<0?-1:1);return i?null:new Lt(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Dt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Rt(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Pt{constructor(e,t){this.attrs=e,this.spec=t||zt}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Lt(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Pt&&Rt(this.attrs,e.attrs)&&Rt(this.spec,e.spec)}static is(e){return e.type instanceof Pt}destroy(){}}class Ft{constructor(e,t){this.attrs=e,this.spec=t||zt}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Lt(o.pos-n,i.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof Ft&&Rt(this.attrs,e.attrs)&&Rt(this.spec,e.spec)}destroy(){}}class Lt{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Lt(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Lt(e,e,new Dt(t,n))}static inline(e,t,n,r){return new Lt(e,t,new Pt(n,r))}static node(e,t,n,r){return new Lt(e,t,new Ft(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pt}}const _t=[],zt={};class $t{constructor(e,t){this.local=e.length?e:_t,this.children=t.length?t:_t}static create(e,t){return t.length?Wt(t,e,0,zt):jt}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let s=this.children[i]+1;this.children[i+2].findInner(e-s,t-s,n,r+s,o)}}map(e,t,n){return this==jt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||zt)}mapInner(e,t,n,r,o){let i;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,s){let a=e.slice();for(let e=0,t=i;e<n.maps.length;e++){let r=0;n.maps[e].forEach(((e,n,i,s)=>{let l=s-i-(n-e);for(let s=0;s<a.length;s+=3){let c=a[s+1];if(c<0||e>c+t-r)continue;let u=a[s]+t-r;n>=u?a[s+1]=e<=u?-2:-1:i>=o&&l&&(a[s]+=l,a[s+1]+=l)}r+=l})),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){l=!0,a[t+1]=-1;continue}let c=n.map(e[t]+i),u=c-o;if(u<0||u>=r.content.size){l=!0;continue}let d=n.map(e[t+1]+i,-1)-o,{index:p,offset:f}=r.content.findIndex(u),h=r.maybeChild(p);if(h&&f==u&&f+h.nodeSize==d){let r=a[t+2].mapInner(n,h,c+1,e[t]+i+1,s);r!=jt?(a[t]=u,a[t+1]=d,a[t+2]=r):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=function(e,t,n,r,o,i,s){function a(e,t){for(let i=0;i<e.local.length;i++){let a=e.local[i].map(r,o,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[i].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+i+1);return n}(a,e,t,n,o,i,s),c=Wt(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new $t(t.sort(Kt),a)}(this.children,i||[],e,t,n,r,o):i?new $t(i.sort(Kt),_t):jt}add(e,t){return t.length?this==jt?$t.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,i)=>{let s,a=i+n;if(s=Vt(t,e,a)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(e,s,a+1):r.splice(o,0,i,i+e.nodeSize,Wt(s,e,a+1,zt)),o+=3}}));let i=Ht(o?Ut(t):t,-n);for(let t=0;t<i.length;t++)i[t].type.valid(e,i[t])||i.splice(t--,1);return new $t(i.length?this.local.concat(i).sort(Kt):this.local,r||this.children)}remove(e){return 0==e.length||this==jt?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o,i=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>i&&t.to<s&&(e[n]=null,(o||(o=[])).push(t));if(!o)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(o,i+1);a!=jt?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,o=0;o<e.length;o++)if(n=e[o])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new $t(r,n):jt}forChild(e,t){if(this==jt)return this;if(t.isLeaf)return $t.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let o=e+1,i=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<i&&t.to>o&&t.type instanceof Pt){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new $t(r.sort(Kt),_t);return n?new Bt([e,n]):e}return n||jt}eq(e){if(this==e)return!0;if(!(e instanceof $t)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return qt(this.localsInner(e))}localsInner(e){if(this==jt)return _t;if(e.inlineContent||!this.local.some(Pt.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Pt||t.push(this.local[e]);return t}}$t.empty=new $t([],[]),$t.removeOverlap=qt;const jt=$t.empty;class Bt{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,zt)));return Bt.from(n)}forChild(e,t){if(t.isLeaf)return $t.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=jt&&(o instanceof Bt?n=n.concat(o.members):n.push(o))}return Bt.from(n)}eq(e){if(!(e instanceof Bt)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?qt(n?t:t.sort(Kt)):_t}static from(e){switch(e.length){case 0:return jt;case 1:return e[0];default:return new Bt(e.every((e=>e instanceof $t))?e:e.reduce(((e,t)=>e.concat(t instanceof $t?t:t.members)),[]))}}}function Ht(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new Lt(o.from+t,o.to+t,o.type))}return n}function Vt(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let t,i=0;i<e.length;i++)(t=e[i])&&t.from>n&&t.to<r&&((o||(o=[])).push(t),e[i]=null);return o}function Ut(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Wt(e,t,n,r){let o=[],i=!1;t.forEach(((t,s)=>{let a=Vt(e,t,s+n);if(a){i=!0;let e=Wt(a,t,n+s+1,r);e!=jt&&o.push(s,s+t.nodeSize,e)}}));let s=Ht(i?Ut(e):e,-n).sort(Kt);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||o.length?new $t(s,o):jt}function Kt(e,t){return e.from-t.from||e.to-t.to}function qt(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Gt(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Gt(t,o+1,i.copy(r.to,i.to)))}}return t}function Gt(e,t,n){for(;t<e.length&&Kt(n,e[t])>0;)t++;e.splice(t,0,n)}function Yt(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=jt&&t.push(r)})),e.cursorWrapper&&t.push($t.create(e.state.doc,[e.cursorWrapper.deco])),Bt.from(t)}const Jt={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Xt=A&&S<=11;class Zt{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Qt{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Zt,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);A&&S<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Xt&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Jt)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Fe(this.view)){if(this.suppressingSelectionUpdates)return Oe(this.view);if(A&&S<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&u(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let t=e.focusNode;t;t=a(t))n.add(t);for(let r=e.anchorNode;r;r=a(r))if(n.has(r)){t=r;break}let r=t&&this.view.docView.nearestDesc(t);return r&&r.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let n=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Fe(e)&&!this.ignoreSelectionChange(n),i=-1,s=-1,a=!1,l=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],l);n&&(i=i<0?n.from:Math.min(n.from,i),s=s<0?n.to:Math.max(n.to,s),n.typeOver&&(a=!0))}if(E&&l.length>1){let e=l.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let c=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&m(n)&&(c=Ee(e))&&c.eq(r.LN.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Oe(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),function(e){if(!en.has(e)&&(en.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))){if(e.requiresGeckoHackNode=E,tn)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),tn=!0}}(e)),this.handleDOMChange(i,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Oe(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(A&&S<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:i}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(e.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==e.target?s(r)+1:0,a=n.localPosFromDOM(e.target,i,-1),l=o&&o.parentNode==e.target?s(o):e.target.childNodes.length;return{from:a,to:n.localPosFromDOM(e.target,l,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let en=new WeakMap,tn=!1;function nn(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(N&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||N&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const rn=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function on(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Pe(e,t.resolve(n.anchor),t.resolve(n.head))}function sn(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}class an{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ut,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(pn),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=un(this),cn(this),this.nodeViews=dn(this),this.docView=ce(this.state.doc,ln(this),Yt(this),this.dom,this),this.domObserver=new Qt(this,((e,t,n,i)=>function(e,t,n,i,s){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Ee(e,t);if(n&&!e.state.selection.eq(n)){if(O&&D&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))))return;let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.composing&&r.setMeta("composition",e.input.compositionID),e.dispatch(r)}return}let a=e.state.doc.resolve(t),l=a.sharedDepth(n);t=a.before(l+1),n=e.state.doc.resolve(n).after(l+1);let c,u,d=e.state.selection,p=function(e,t,n){let r,{node:i,fromOffset:s,toOffset:a,from:l,to:c}=e.docView.parseRange(t,n),u=e.domSelectionRange(),d=u.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:u.anchorOffset}],m(u)||r.push({node:u.focusNode,offset:u.focusOffset})),O&&8===e.input.lastKeyCode)for(let e=a;e>s;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){a=e;break}if(!n||n.size)break}let p=e.state.doc,f=e.someProp("domParser")||o.S4.fromSchema(e.state.schema),h=p.resolve(l),g=null,y=f.parse(i,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:s,to:a,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:nn,context:h});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),g={anchor:e+l,head:t+l}}return{doc:y,sel:g,from:l,to:c}}(e,t,n),f=e.state.doc,h=f.slice(p.from,p.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(c=e.state.selection.to,u="end"):(c=e.state.selection.from,u="start"),e.input.lastKeyCode=null;let y=function(e,t,n,r,o){let i=e.findDiffStart(t,n);if(null==i)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);return"end"==o&&(r-=s+Math.max(0,i-Math.min(s,a))-i),s<i&&e.size<t.size?(i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i):a<i&&(i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i),{start:i,endA:s,endB:a}}(h.content,p.doc.content,p.from,c,u);if((T&&e.input.lastIOSEnter>Date.now()-225||D)&&s.some((e=>1==e.nodeType&&!rn.test(e.nodeName)))&&(!y||y.endA>=y.endB)&&e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!y){if(!(i&&d instanceof r.U3&&!d.empty&&d.$head.sameParent(d.$anchor))||e.composing||p.sel&&p.sel.anchor!=p.sel.head){if(p.sel){let t=on(e,e.state.doc,p.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);e.composing&&n.setMeta("composition",e.input.compositionID),e.dispatch(n)}}return}y={start:d.from,endA:d.to,endB:d.to}}if(O&&e.cursorWrapper&&p.sel&&p.sel.anchor==e.cursorWrapper.deco.from&&p.sel.head==p.sel.anchor){let e=y.endB-y.start;p.sel={anchor:p.sel.anchor+e,head:p.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&y.start==y.endB&&e.state.selection instanceof r.U3&&(y.start>e.state.selection.from&&y.start<=e.state.selection.from+2&&e.state.selection.from>=p.from?y.start=e.state.selection.from:y.endA<e.state.selection.to&&y.endA>=e.state.selection.to-2&&e.state.selection.to<=p.to&&(y.endB+=e.state.selection.to-y.endA,y.endA=e.state.selection.to)),A&&S<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>p.from&&" "==p.doc.textBetween(y.start-p.from-1,y.start-p.from+1)&&(y.start--,y.endA--,y.endB--);let v,b=p.doc.resolveNoCache(y.start-p.from),w=p.doc.resolveNoCache(y.endB-p.from),k=f.resolve(y.start),x=b.sameParent(w)&&b.parent.inlineContent&&k.end()>=y.endA;if((T&&e.input.lastIOSEnter>Date.now()-225&&(!x||s.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!x&&b.pos<p.doc.content.size&&(v=r.LN.findFrom(p.doc.resolve(b.pos+1),1,!0))&&v.head==w.pos)&&e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>y.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||sn(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=e.resolve(sn(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||sn(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(f,y.start,y.endA,b,w)&&e.someProp("handleKeyDown",(t=>t(e,g(8,"Backspace")))))return void(D&&O&&e.domObserver.suppressSelectionUpdates());O&&D&&y.endB==y.start&&(e.input.lastAndroidDelete=Date.now()),D&&!x&&b.start()!=w.start()&&0==w.parentOffset&&b.depth==w.depth&&p.sel&&p.sel.anchor==p.sel.head&&p.sel.head==y.endA&&(y.endB-=2,w=p.doc.resolveNoCache(y.endB-p.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,g(13,"Enter"))}))}),20));let E,C,M,N=y.start,I=y.endA;if(x)if(b.pos==w.pos)A&&S<=11&&0==b.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Oe(e)),20)),E=e.state.tr.delete(N,I),C=f.resolve(y.start).marksAcross(f.resolve(y.endA));else if(y.endA==y.endB&&(M=function(e,t){let n,r,i,s=e.firstChild.marks,a=t.firstChild.marks,l=s,c=a;for(let e=0;e<a.length;e++)l=a[e].removeFromSet(l);for(let e=0;e<s.length;e++)c=s[e].removeFromSet(c);if(1==l.length&&0==c.length)r=l[0],n="add",i=e=>e.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",i=e=>e.mark(r.removeFromSet(e.marks))}let u=[];for(let e=0;e<t.childCount;e++)u.push(i(t.child(e)));if(o.FK.from(u).eq(e))return{mark:r,type:n}}(b.parent.content.cut(b.parentOffset,w.parentOffset),k.parent.content.cut(k.parentOffset,y.endA-k.start()))))E=e.state.tr,"add"==M.type?E.addMark(N,I,M.mark):E.removeMark(N,I,M.mark);else if(b.parent.child(b.index()).isText&&b.index()==w.index()-(w.textOffset?0:1)){let t=b.parent.textBetween(b.parentOffset,w.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,N,I,t))))return;E=e.state.tr.insertText(t,N,I)}if(E||(E=e.state.tr.replace(N,I,p.doc.slice(y.start-p.from,y.endB-p.from))),p.sel){let t=on(e,E.doc,p.sel);t&&!(O&&D&&e.composing&&t.empty&&(y.start!=y.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==N||t.head==E.mapping.map(I)-1)||A&&t.empty&&t.head==N)&&E.setSelection(t)}C&&E.ensureMarks(C),e.composing&&E.setMeta("composition",e.input.compositionID),e.dispatch(E.scrollIntoView())}(this,e,t,n,i))),this.domObserver.start(),function(e){for(let t in at){let n=at[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!ht(e,t)||ft(e,t)||!e.editable&&t.type in lt||n(e,t)},ct[t]?{passive:!0}:void 0)}N&&e.dom.addEventListener("input",(()=>null)),pt(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&pt(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(pn),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,o=!1;e.storedMarks&&this.composing&&(Ct(this),o=!0),this.state=e;let i=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(i||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=dn(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(i||t.handleDOMEvents!=this._props.handleDOMEvents)&&pt(this),this.editable=un(this),cn(this);let s=Yt(this),a=ln(this),l=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(e.doc,a,s);!c&&e.selection.eq(n.selection)||(o=!0);let d="preserve"==l&&o&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(i,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=o-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:j(e.dom)}}(this);if(o){this.domObserver.stop();let t=c&&(A||O)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(c){let n=O?this.trackWrites=this.domSelectionRange().focusNode:null;!r&&this.docView.update(e.doc,a,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ce(e.doc,a,s,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return u(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Oe(this,t):(Re(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():d&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;B(n,0==r?0:r-t)}(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof r.nh){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&$(this,t.getBoundingClientRect(),e)}else $(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let o=this.directPlugins[r].props[e];if(null!=o&&(n=t?t(o):o))return n}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let i=o[r].props[e];if(null!=i&&(n=t?t(i):i))return n}}hasFocus(){if(A){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(H)return e.focus(H);let t=j(e);e.focus(null==H?{get preventScroll(){return H={preventScroll:!0},!0}}:void 0),H||(H=!1,B(t,0))}(this.dom),Oe(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}posAtCoords(e){return K(this,e)}coordsAtPos(e,t=1){return J(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){return te==t&&ne==n?re:(te=t,ne=n,re="up"==n||"down"==n?function(e,t,n){let r=t.selection,o="up"==n?r.$from:r.$to;return Q(e,t,(()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=J(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=c(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return ee.test(r.parent.textContent)&&a.modify?Q(e,t,(()=>{let{focusNode:t,focusOffset:o,anchorNode:i,anchorOffset:s}=e.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),p=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&o==d;try{a.collapse(i,s),t&&(t!=i||o!=s)&&a.extend&&a.extend(t,o)}catch(e){}return null!=l&&(a.caretBidiLevel=l),p})):"left"==n||"backward"==n?i:s}(e,t,n))}(this,t||this.state,e)}pasteHTML(e,t){return Nt(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Nt(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Yt(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){ft(e,t)||!at[t.type]||!e.editable&&t.type in lt||at[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return N&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom?function(e){let t;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}e.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",n,!0);let r=t.startContainer,o=t.startOffset,i=t.endContainer,s=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return u(a.node,a.offset,i,s)&&([r,o,i,s]=[i,s,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function ln(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),t.translate||(t.translate="no"),[Lt.node(0,e.state.doc.content.size,t)]}function cn(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Lt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function un(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function dn(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function pn(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}},3705:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6284),o=n(4430),i=n(7985);function s(e){return function(e){if(Array.isArray(e))return(0,r.A)(e)}(e)||(0,o.A)(e)||(0,i.A)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},3710:(e,t,n)=>{"use strict";n.d(t,{$L:()=>O,Ln:()=>y,Um:()=>C,Wg:()=>v,XE:()=>f,dL:()=>j,jP:()=>k,n9:()=>E,oM:()=>x,zy:()=>S});var r=n(6090);const o=Math.pow(2,16);function i(e){return 65535&e}class s{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 a{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&a.empty)return a.empty}recover(e){let t=0,n=i(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+function(e){return(e-(65535&e))/o}(e)}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,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;let u=this.ranges[l+i],d=this.ranges[l+a],p=c+u;if(e<=p){let i=c+r+((u?e==c?-1:e==p?1:t:t)<0?0:d);if(n)return i;let a=e==c?2:e==p?1:4;return(t<0?e!=c:e!=p)&&(a|=8),new s(i,a,e==(t<0?c:p)?null:l/3+(e-c)*o)}r+=d-u}return n?e+r:new s(e+r,0,null)}touches(e,t){let n=0,r=i(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let i=this.ranges[t]-(this.inverted?n:0);if(i>e)break;let a=this.ranges[t+o];if(e<=i+a&&t==3*r)return!0;n+=this.ranges[t+s]-a}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],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),o+=c-l}}invert(){return new a(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?a.empty:new a(e<0?[0,-e,0]:[0,0,e])}}a.empty=new a([]);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 s(e,r,null)}}const c=Object.create(null);class u{getMap(){return a.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=c[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in c)throw new RangeError("Duplicate use of step JSON ID "+e);return c[e]=t,t.prototype.jsonID=e,t}}class d{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new d(e,null)}static fail(e){return new d(null,e)}static fromReplace(e,t,n,o){try{return d.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.vI)return d.fail(e.message);throw e}}}function p(e,t,n){let o=[];for(let r=0;r<e.childCount;r++){let i=e.child(r);i.content.size&&(i=i.copy(p(i.content,t,i))),i.isInline&&(i=t(i,n,r)),o.push(i)}return r.FK.fromArray(o)}class f extends u{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),o=n.node(n.sharedDepth(this.to)),i=new r.Ji(p(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 d.fromReplace(e,this.from,this.to,i)}invert(){return new h(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new f(t.pos,n.pos,this.mark)}merge(e){return e instanceof f&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new f(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 new RangeError("Invalid input for AddMarkStep.fromJSON");return new f(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("addMark",f);class h extends u{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.Ji(p(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return d.fromReplace(e,this.from,this.to,n)}invert(){return new f(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new h(t.pos,n.pos,this.mark)}merge(e){return e instanceof h&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new h(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new h(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("removeMark",h);class m extends u{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return d.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return d.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.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 m(this.pos,t.marks[n]);return new m(this.pos,this.mark)}}return new g(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new m(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 new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new m(t.pos,e.markFromJSON(t.mark))}}u.jsonID("addNodeMark",m);class g extends u{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return d.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return d.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new m(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new g(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 new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new g(t.pos,e.markFromJSON(t.mark))}}u.jsonID("removeNodeMark",g);class y extends u{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&b(e,this.from,this.to)?d.fail("Structure replace would overwrite content"):d.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new a([this.from,this.to-this.from,this.slice.size])}invert(e){return new y(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 y(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof y)||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.Ji.empty:new r.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new y(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new y(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 new RangeError("Invalid input for ReplaceStep.fromJSON");return new y(t.from,t.to,r.Ji.fromJSON(e,t.slice),!!t.structure)}}u.jsonID("replace",y);class v extends u{constructor(e,t,n,r,o,i,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(e){if(this.structure&&(b(e,this.from,this.gapFrom)||b(e,this.gapTo,this.to)))return d.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return d.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?d.fromReplace(e,this.from,this.to,n):d.fail("Content does not fit in gap")}getMap(){return new a([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 v(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=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new v(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 new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new v(t.from,t.to,t.gapFrom,t.gapTo,r.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function b(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 w(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function k(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||!w(r,o,i))break}return null}function x(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 s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<o;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return i?o.map(A).concat({type:t,attrs:n}).concat(i.map(A)):null}function A(e){return{type:e,attrs:null}}function S(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.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 s=n.content.cutByIndex(i,n.childCount),a=r&&r[t]||n;if(a!=n&&(s=s.replaceChild(0,a.type.create(a.attrs))),!n.canReplace(i+1,n.childCount)||!a.type.validContent(s))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function E(e,t){let n=e.resolve(t),r=n.index();return o=n.nodeBefore,i=n.nodeAfter,!(!o||!i||o.isLeaf||!o.canAppend(i))&&n.parent.canReplace(r,r+1);var o,i}function C(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),s=r.node(t),a=!1;if(1==e)a=s.canReplace(i,i,o);else{let e=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=e&&s.canReplaceWith(i,i,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function O(e,t,n=t,o=r.Ji.empty){if(t==n&&!o.size)return null;let i=e.resolve(t),s=e.resolve(n);return M(i,s,o)?new y(t,n,o):new N(i,s,o).fit()}function M(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}u.jsonID("replaceAround",v);class N{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.FK.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.FK.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,s=n.depth,a=o.depth;for(;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;let l=new r.Ji(i,s,a);return e>-1?new v(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new y(n.pos,o.pos,l):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,o=null;n?(o=R(this.unplaced.content,n-1).firstChild,e=o.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let s,{type:a,match:l}=this.frontier[e],c=null;if(1==t&&(i?l.matchType(i.type)||(c=l.fillBefore(r.FK.from(i),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:e,parent:o,inject:c};if(2==t&&i&&(s=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:o,wrap:s};if(o&&l.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=R(e,t);return!(!o.childCount||o.firstChild.isLeaf||(this.unplaced=new r.Ji(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=R(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new r.Ji(T(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new r.Ji(T(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 s=this.unplaced,a=n?n.content:s.content,l=s.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 f=a.size+e-(s.content.size-s.openEnd);for(;c<a.childCount;){let e=a.child(c),t=d.matchType(e.type);if(!t)break;c++,(c>1||0==l||e.content.size)&&(d=t,u.push(D(e.mark(p.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?f:-1)))}let h=c==a.childCount;h||(f=-1),this.placed=I(this.placed,t,r.FK.from(u)),this.frontier[t].match=d,h&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=h?0==e?r.Ji.empty:new r.Ji(T(s.content,e-1,1),e-1,f<0?s.openEnd:e-1):new r.Ji(T(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!P(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e: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=P(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=P(e,n,r,t,!0);if(!o||o.childCount)continue e}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=I(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=I(this.placed,this.depth,r.FK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.FK.empty,!0);e.childCount&&(this.placed=I(this.placed,this.frontier.length,e))}}function T(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(T(e.firstChild.content,t-1,n)))}function I(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(I(e.lastChild.content,t-1,n)))}function R(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function D(e,t,n){if(t<=0)return e;let o=e.content;return t>1&&(o=o.replaceChild(0,D(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.FK.empty,!0)))),e.copy(o)}function P(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!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,s)?a:null}function F(e){return e.spec.defining||e.spec.definingForContent}function L(e,t,n,o,i){if(t<n){let r=e.firstChild;e=e.replaceChild(0,r.copy(L(r.content,t+1,n,o,r)))}if(t>o){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.FK.empty,!0))}return e}function _(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}class z extends u{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 d.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 d.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(o),0,t.isLeaf?0:1))}getMap(){return a.empty}invert(e){return new z(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new z(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new z(t.pos,t.attr,t.value)}}u.jsonID("attr",z);let $=class extends Error{};$=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},($.prototype=Object.create(Error.prototype)).constructor=$,$.prototype.name="TransformError";class j{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 $(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.Ji.empty){let o=O(this.doc,e,t,n);return o&&this.step(o),this}replaceWith(e,t,n){return this.replace(e,t,new r.Ji(r.FK.from(n),0,0))}delete(e,t){return this.replace(e,t,r.Ji.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),s=e.doc.resolve(n);if(M(i,s,o))return e.step(new y(t,n,o));let a=_(i,e.doc.resolve(n));0==a[a.length-1]&&a.pop();let l=-(i.depth+1);a.unshift(l);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;a.indexOf(e)>-1?l=e:i.before(e)==t&&a.splice(1,0,-e)}let c=a.indexOf(l),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--){let t=u[e].type,n=F(t);if(n&&i.node(c).type!=t)d=e;else if(n||!t.isTextblock)break}for(let t=o.openStart;t>=0;t--){let l=(t+d+1)%(o.openStart+1),p=u[l];if(p)for(let t=0;t<a.length;t++){let u=a[(t+c)%a.length],d=!0;u<0&&(d=!1,u=-u);let f=i.node(u-1),h=i.index(u-1);if(f.canReplaceWith(h,h,p.type,p.marks))return e.replace(i.before(u),d?s.after(u):n,new r.Ji(L(o.content,0,o.openStart,l),l,o.openEnd))}}let p=e.steps.length;for(let r=a.length-1;r>=0&&(e.replace(t,n,o),!(e.steps.length>p));r--){let e=a[r];e<0||(t=i.before(e),n=s.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)return null}return null}(e.doc,t,o.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.Ji(r.FK.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],s=t==i.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(s||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)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:s}=t,a=o.before(s+1),l=i.after(s+1),c=a,u=l,d=r.FK.empty,p=0;for(let e=s,t=!1;e>n;e--)t||o.index(e)>0?(t=!0,d=r.FK.from(o.node(e).copy(d)),p++):c--;let f=r.FK.empty,h=0;for(let e=s,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=r.FK.from(i.node(e).copy(f)),h++):u++;e.step(new v(c,u,a,l,new r.Ji(d.append(f),p,h),d.size-p,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let o=new y(t-n,t+n,r.Ji.empty,!0);e.step(o)}(this,e,t),this}wrap(e,t){return function(e,t,n){let o=r.FK.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 new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=r.FK.from(n[e].type.create(n[e].attrs,o))}let i=t.start,s=t.end;e.step(new v(i,s,i,s,new r.Ji(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 new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(o,i)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(s).map(n),o)){e.clearIncompatible(e.mapping.slice(s).map(n,1),o);let a=e.mapping.slice(s),l=a.map(n,1),c=a.map(n+t.nodeSize,1);return e.step(new v(l,c,l+1,c-1,new r.Ji(r.FK.from(o.create(i,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,o),this}setNodeMarkup(e,t,n=null,o){return function(e,t,n,o,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(o,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new v(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new r.Ji(r.FK.from(a),0,0),1,!0))}(this,e,t,n,o),this}setNodeAttribute(e,t,n){return this.step(new z(e,t,n)),this}addNodeMark(e,t){return this.step(new m(e,t)),this}removeNodeMark(e,t){if(!(t instanceof r.CU)){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(n.marks)))return this}return this.step(new g(e,t)),this}split(e,t=1,n){return function(e,t,n=1,o){let i=e.doc.resolve(t),s=r.FK.empty,a=r.FK.empty;for(let e=i.depth,t=i.depth-n,l=n-1;e>t;e--,l--){s=r.FK.from(i.node(e).copy(s));let t=o&&o[l];a=r.FK.from(t?t.type.create(t.attrs,a):i.node(e).copy(a))}e.step(new y(t,t,new r.Ji(s.append(a),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,i,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),d=Math.min(l+e.nodeSize,n),p=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(p)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=d:s.push(o=new h(c,d,u[e])));i&&i.to==c?i.to=d:a.push(i=new f(c,d,r))}})),s.forEach((t=>e.step(t))),a.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,o){let i=[],s=0;e.doc.nodesBetween(t,n,((e,a)=>{if(!e.isInline)return;s++;let l=null;if(o instanceof r.sX){let t,n=e.marks;for(;t=o.isInSet(n);)(l||(l=[])).push(t),n=t.removeFromSet(n)}else o?o.isInSet(e.marks)&&(l=[o]):l=e.marks;if(l&&l.length){let r=Math.min(a+e.nodeSize,n);for(let e=0;e<l.length;e++){let n,o=l[e];for(let e=0;e<i.length;e++){let t=i[e];t.step==s-1&&o.eq(i[e].style)&&(n=t)}n?(n.to=r,n.step=s):i.push({style:o,from:Math.max(a,t),to:r,step:s})}}})),i.forEach((t=>e.step(new h(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,o=n.contentMatch){let i=e.doc.nodeAt(t),s=[],a=t+1;for(let t=0;t<i.childCount;t++){let l=i.child(t),c=a+l.nodeSize,u=o.matchType(l.type);if(u){o=u;for(let t=0;t<l.marks.length;t++)n.allowsMarkType(l.marks[t].type)||e.step(new h(a,c,l.marks[t]))}else s.push(new y(a,c,r.Ji.empty));a=c}if(!o.validEnd){let t=o.fillBefore(r.FK.empty,!0);e.replace(a,a,new r.Ji(t,0,0))}for(let t=s.length-1;t>=0;t--)e.step(s[t])}(this,e,t,n),this}}},3790:(e,t,n)=>{"use strict";e.exports=n(4898)},3795:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,h:()=>p});var r=n(7545),o=n(9740),i=n(3705),s=n(7756),a=n(231);function l(e,t,n,r){if(!t.length)return n;var a,c=(0,s.A)(t),u=c[0],d=c.slice(1);return a=e||"number"!=typeof u?Array.isArray(e)?(0,i.A)(e):(0,o.A)({},e):[],r&&void 0===n&&1===d.length?delete a[u][d[0]]:a[u]=l(a[u],d,n,r),a}function c(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!(0,a.A)(e,t.slice(0,-1))?e:l(e,t,n,r)}function u(e){return Array.isArray(e)?[]:{}}var d="undefined"==typeof Reflect?Object.keys:Reflect.ownKeys;function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=u(t[0]);return t.forEach((function(e){!function t(n,s){var l,p=new Set(s),f=(0,a.A)(e,n),h=Array.isArray(f);if(h||(l=f,"object"===(0,r.A)(l)&&null!==l&&Object.getPrototypeOf(l)===Object.prototype)){if(!p.has(f)){p.add(f);var m=(0,a.A)(o,n);h?o=c(o,n,[]):m&&"object"===(0,r.A)(m)||(o=c(o,n,u(f))),d(f).forEach((function(e){t([].concat((0,i.A)(n),[e]),p)}))}}else o=c(o,n,f)}([])})),o}},4001:(e,t,n)=>{"use strict";n.d(t,{hG:()=>a,pb:()=>s,y5:()=>i});var r=n(8769);const o=(0,r.createContext)({}),i=()=>{const e=function(){const{dom:e,editor:t,setLoading:n,editorFactory:i}=(0,r.useContext)(o),s=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const r=s.current;if(!i||!r)return;e.current=r;const o=i(r);return o?(n(!0),o.create().then((e=>{t.current=e})).finally((()=>{n(!1)})).catch(console.error),()=>{var e;null==(e=t.current)||e.destroy()}):void 0}),[e,t,i,n]),s}();return r.createElement("div",{"data-milkdown-root":!0,ref:e})},s=({children:e})=>{const t=(0,r.useRef)(void 0),[n,i]=(0,r.useState)(void 0),s=(0,r.useRef)(),[a,l]=(0,r.useState)(!0),c=(0,r.useMemo)((()=>({loading:a,dom:t,editor:s,setLoading:l,editorFactory:n,setEditorFactory:i})),[a,n]);return r.createElement(o.Provider,{value:c},e)};function a(e,t=[]){const n=(0,r.useContext)(o),i=(0,r.useCallback)(e,t);return(0,r.useLayoutEffect)((()=>{n.setEditorFactory((()=>i))}),[n,i]),{loading:n.loading,get:()=>n.editor.current}}},4223:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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}n.d(t,{A:()=>r})},4229:(e,t,n)=>{"use strict";n.d(t,{A:()=>_n});var r=n(8769),o=n.n(r),i=n(3373),s=n.n(i);function a(e){var t=e.children,n=e.prefixCls,o=e.id,i=e.overlayInnerStyle,a=e.bodyClassName,l=e.className,c=e.style;return r.createElement("div",{className:s()("".concat(n,"-content"),l),style:c},r.createElement("div",{className:s()("".concat(n,"-inner"),a),id:o,role:"tooltip",style:i},"function"==typeof t?t():t))}var l=n(9575),c=n(9740),u=n(4223),d=n(689),p=n(9435),f=n(7169),h=n(4445),m=n(9284);const g=r.createContext(null);var y=n(3705),v=n(4238),b=[],w=n(9055);var k="rc-util-locker-".concat(Date.now()),x=0;function A(e){var t=!!e,n=r.useState((function(){return x+=1,"".concat(k,"_").concat(x)})),o=(0,d.A)(n,1)[0];(0,v.A)((function(){if(t){var e=(r=document.body,"undefined"!=typeof document&&r&&r instanceof Element?function(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r,o,i=n.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var s=getComputedStyle(e);i.scrollbarColor=s.scrollbarColor,i.scrollbarWidth=s.scrollbarWidth;var a=getComputedStyle(e,"::-webkit-scrollbar"),l=parseInt(a.width,10),c=parseInt(a.height,10);try{var u=l?"width: ".concat(a.width,";"):"",d=c?"height: ".concat(a.height,";"):"";(0,w.BD)("\n#".concat(t,"::-webkit-scrollbar {\n").concat(u,"\n").concat(d,"\n}"),t)}catch(e){console.error(e),r=l,o=c}}document.body.appendChild(n);var p=e&&r&&!isNaN(r)?r:n.offsetWidth-n.clientWidth,f=e&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),(0,w.m6)(t),{width:p,height:f}}(r):{width:0,height:0}).width,n=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;(0,w.BD)("\nhtml body {\n overflow-y: hidden;\n ".concat(n?"width: calc(100% - ".concat(e,"px);"):"","\n}"),o)}else(0,w.m6)(o);var r;return function(){(0,w.m6)(o)}}),[t,o])}var S=!1,E=function(e){return!1!==e&&((0,f.A)()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)};const C=r.forwardRef((function(e,t){var n=e.open,o=e.autoLock,i=e.getContainer,s=(e.debug,e.autoDestroy),a=void 0===s||s,l=e.children,c=r.useState(n),u=(0,d.A)(c,2),h=u[0],w=u[1],k=h||n;r.useEffect((function(){(a||n)&&w(n)}),[n,a]);var x=r.useState((function(){return E(i)})),C=(0,d.A)(x,2),O=C[0],M=C[1];r.useEffect((function(){var e=E(i);M(null!=e?e:null)}));var N=function(e){var t=r.useState((function(){return(0,f.A)()?document.createElement("div"):null})),n=(0,d.A)(t,1)[0],o=r.useRef(!1),i=r.useContext(g),s=r.useState(b),a=(0,d.A)(s,2),l=a[0],c=a[1],u=i||(o.current?void 0:function(e){c((function(t){return[e].concat((0,y.A)(t))}))});function p(){n.parentElement||document.body.appendChild(n),o.current=!0}function h(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),o.current=!1}return(0,v.A)((function(){return e?i?i(p):p():h(),h}),[e]),(0,v.A)((function(){l.length&&(l.forEach((function(e){return e()})),c(b))}),[l]),[n,u]}(k&&!O),T=(0,d.A)(N,2),I=T[0],R=T[1],D=null!=O?O:I;A(o&&n&&(0,f.A)()&&(D===I||D===document.body));var P=null;l&&(0,m.f3)(l)&&t&&(P=l.ref);var F=(0,m.xK)(P,t);if(!k||!(0,f.A)()||void 0===O)return null;var L=!1===D||S,_=l;return t&&(_=r.cloneElement(l,{ref:F})),r.createElement(g.Provider,{value:R},L?_:(0,p.createPortal)(_,D))}));var O=n(785);function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return o().Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(M(e)):(0,O.A)(e)&&e.props?n=n.concat(M(e.props.children,t)):n.push(e))})),n}var N=n(7545),T=n(8299),I=r.createContext(null),R=n(9126),D=new Map,P=new R.A((function(e){e.forEach((function(e){var t,n=e.target;null===(t=D.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))})),F=n(5152),L=n(414),_=n(9296),z=n(857),$=function(e){(0,_.A)(n,e);var t=(0,z.A)(n);function n(){return(0,F.A)(this,n),t.apply(this,arguments)}return(0,L.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);function j(e,t){var n=e.children,o=e.disabled,i=r.useRef(null),s=r.useRef(null),a=r.useContext(I),l="function"==typeof n,u=l?n(i):n,d=r.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),p=!l&&r.isValidElement(u)&&(0,m.f3)(u),f=p?(0,m.A9)(u):null,h=(0,m.xK)(f,i),g=function(){var e;return(0,T.Ay)(i.current)||(i.current&&"object"===(0,N.A)(i.current)?(0,T.Ay)(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||(0,T.Ay)(s.current)};r.useImperativeHandle(t,(function(){return g()}));var y=r.useRef(e);y.current=e;var v=r.useCallback((function(e){var t=y.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),i=o.width,s=o.height,l=e.offsetWidth,u=e.offsetHeight,p=Math.floor(i),f=Math.floor(s);if(d.current.width!==p||d.current.height!==f||d.current.offsetWidth!==l||d.current.offsetHeight!==u){var h={width:p,height:f,offsetWidth:l,offsetHeight:u};d.current=h;var m=l===Math.round(i)?i:l,g=u===Math.round(s)?s:u,v=(0,c.A)((0,c.A)({},h),{},{offsetWidth:m,offsetHeight:g});null==a||a(v,e,r),n&&Promise.resolve().then((function(){n(v,e)}))}}),[]);return r.useEffect((function(){var e,t,n=g();return n&&!o&&(e=n,t=v,D.has(e)||(D.set(e,new Set),P.observe(e)),D.get(e).add(t)),function(){return function(e,t){D.has(e)&&(D.get(e).delete(t),D.get(e).size||(P.unobserve(e),D.delete(e)))}(n,v)}}),[i.current,o]),r.createElement($,{ref:s},p?r.cloneElement(u,{ref:h}):u)}const B=r.forwardRef(j);function H(e,t){var n=e.children;return("function"==typeof n?[n]:M(n)).map((function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return r.createElement(B,(0,l.A)({},e,{key:i,ref:0===o?t:void 0}),n)}))}var V=r.forwardRef(H);V.Collection=function(e){var t=e.children,n=e.onBatchResize,o=r.useRef(0),i=r.useRef([]),s=r.useContext(I),a=r.useCallback((function(e,t,r){o.current+=1;var a=o.current;i.current.push({size:e,element:t,data:r}),Promise.resolve().then((function(){a===o.current&&(null==n||n(i.current),i.current=[])})),null==s||s(e,t,r)}),[n,s]);return r.createElement(I.Provider,{value:a},t)};const U=V;var W=n(9116),K=n(9449),q=0,G=(0,c.A)({},r).useId;const Y=G?function(e){var t=G();return e||t}:function(e){var t=r.useState("ssr-id"),n=(0,d.A)(t,2),o=n[0],i=n[1];return r.useEffect((function(){var e=q;q+=1,i("rc_unique_".concat(e))}),[]),e||o};var J=n(1382);function X(e){var t=e.prefixCls,n=e.align,o=e.arrow,i=e.arrowPos,a=o||{},l=a.className,c=a.content,u=i.x,d=void 0===u?0:u,p=i.y,f=void 0===p?0:p,h=r.useRef();if(!n||!n.points)return null;var m={position:"absolute"};if(!1!==n.autoArrow){var g=n.points[0],y=n.points[1],v=g[0],b=g[1],w=y[0],k=y[1];v!==w&&["t","b"].includes(v)?"t"===v?m.top=0:m.bottom=0:m.top=f,b!==k&&["l","r"].includes(b)?"l"===b?m.left=0:m.right=0:m.left=d}return r.createElement("div",{ref:h,className:s()("".concat(t,"-arrow"),l),style:m},c)}function Z(e){var t=e.prefixCls,n=e.open,o=e.zIndex,i=e.mask,a=e.motion;return i?r.createElement(J.Ay,(0,l.A)({},a,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return r.createElement("div",{style:{zIndex:o},className:s()("".concat(t,"-mask"),n)})})):null}const Q=r.memo((function(e){return e.children}),(function(e,t){return t.cache}));var ee=r.forwardRef((function(e,t){var n=e.popup,o=e.className,i=e.prefixCls,a=e.style,u=e.target,p=e.onVisibleChanged,f=e.open,h=e.keepDom,g=e.fresh,y=e.onClick,b=e.mask,w=e.arrow,k=e.arrowPos,x=e.align,A=e.motion,S=e.maskMotion,E=e.forceRender,C=e.getPopupContainer,O=e.autoDestroy,M=e.portal,N=e.zIndex,T=e.onMouseEnter,I=e.onMouseLeave,R=e.onPointerEnter,D=e.onPointerDownCapture,P=e.ready,F=e.offsetX,L=e.offsetY,_=e.offsetR,z=e.offsetB,$=e.onAlign,j=e.onPrepare,B=e.stretch,H=e.targetWidth,V=e.targetHeight,W="function"==typeof n?n():n,K=f||h,q=(null==C?void 0:C.length)>0,G=r.useState(!C||!q),Y=(0,d.A)(G,2),ee=Y[0],te=Y[1];if((0,v.A)((function(){!ee&&q&&u&&te(!0)}),[ee,q,u]),!ee)return null;var ne="auto",re={left:"-1000vw",top:"-1000vh",right:ne,bottom:ne};if(P||!f){var oe,ie=x.points,se=x.dynamicInset||(null===(oe=x._experimental)||void 0===oe?void 0:oe.dynamicInset),ae=se&&"r"===ie[0][1],le=se&&"b"===ie[0][0];ae?(re.right=_,re.left=ne):(re.left=F,re.right=ne),le?(re.bottom=z,re.top=ne):(re.top=L,re.bottom=ne)}var ce={};return B&&(B.includes("height")&&V?ce.height=V:B.includes("minHeight")&&V&&(ce.minHeight=V),B.includes("width")&&H?ce.width=H:B.includes("minWidth")&&H&&(ce.minWidth=H)),f||(ce.pointerEvents="none"),r.createElement(M,{open:E||K,getContainer:C&&function(){return C(u)},autoDestroy:O},r.createElement(Z,{prefixCls:i,open:f,zIndex:N,mask:b,motion:S}),r.createElement(U,{onResize:$,disabled:!f},(function(e){return r.createElement(J.Ay,(0,l.A)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:"".concat(i,"-hidden")},A,{onAppearPrepare:j,onEnterPrepare:j,visible:f,onVisibleChanged:function(e){var t;null==A||null===(t=A.onVisibleChanged)||void 0===t||t.call(A,e),p(e)}}),(function(n,l){var u=n.className,d=n.style,p=s()(i,u,o);return r.createElement("div",{ref:(0,m.K4)(e,t,l),className:p,style:(0,c.A)((0,c.A)((0,c.A)((0,c.A)({"--arrow-x":"".concat(k.x||0,"px"),"--arrow-y":"".concat(k.y||0,"px")},re),ce),d),{},{boxSizing:"border-box",zIndex:N},a),onMouseEnter:T,onMouseLeave:I,onPointerEnter:R,onClick:y,onPointerDownCapture:D},w&&r.createElement(X,{prefixCls:i,arrow:w,arrowPos:k,align:x}),r.createElement(Q,{cache:!f&&!g},W))}))})))}));const te=ee,ne=r.forwardRef((function(e,t){var n=e.children,o=e.getTriggerDOMNode,i=(0,m.f3)(n),s=r.useCallback((function(e){(0,m.Xf)(t,o?o(e):e)}),[o]),a=(0,m.xK)(s,(0,m.A9)(n));return i?r.cloneElement(n,{ref:a}):n})),re=r.createContext(null);function oe(e){return e?Array.isArray(e)?e:[e]:[]}function ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function se(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function ae(e){return e.ownerDocument.defaultView}function le(e){for(var t=[],n=null==e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=ae(n).getComputedStyle(n);[o.overflowX,o.overflowY,o.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function ue(e){return ce(parseFloat(e),0)}function de(e,t){var n=(0,c.A)({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=ae(e).getComputedStyle(e),r=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,s=t.borderBottomWidth,a=t.borderLeftWidth,l=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,p=e.offsetWidth,f=e.clientWidth,h=ue(i),m=ue(s),g=ue(a),y=ue(l),v=ce(Math.round(c.width/p*1e3)/1e3),b=ce(Math.round(c.height/u*1e3)/1e3),w=(p-f-g-y)*v,k=(u-d-h-m)*b,x=h*b,A=m*b,S=g*v,E=y*v,C=0,O=0;if("clip"===r){var M=ue(o);C=M*v,O=M*b}var N=c.x+S-C,T=c.y+x-O,I=N+c.width+2*C-S-E-w,R=T+c.height+2*O-x-A-k;n.left=Math.max(n.left,N),n.top=Math.max(n.top,T),n.right=Math.min(n.right,I),n.bottom=Math.min(n.bottom,R)}})),n}function pe(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function fe(e,t){var n=t||[],r=(0,d.A)(n,2),o=r[0],i=r[1];return[pe(e.width,o),pe(e.height,i)]}function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function me(e,t){var n,r=t[0],o=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:n}}function ge(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}var ye=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];const ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=r.forwardRef((function(t,n){var o=t.prefixCls,i=void 0===o?"rc-trigger-popup":o,a=t.children,l=t.action,p=void 0===l?"hover":l,f=t.showAction,h=t.hideAction,m=t.popupVisible,g=t.defaultPopupVisible,b=t.onPopupVisibleChange,w=t.afterPopupVisibleChange,k=t.mouseEnterDelay,x=t.mouseLeaveDelay,A=void 0===x?.1:x,S=t.focusDelay,E=t.blurDelay,C=t.mask,O=t.maskClosable,M=void 0===O||O,N=t.getPopupContainer,I=t.forceRender,R=t.autoDestroy,D=t.destroyPopupOnHide,P=t.popup,F=t.popupClassName,L=t.popupStyle,_=t.popupPlacement,z=t.builtinPlacements,$=void 0===z?{}:z,j=t.popupAlign,B=t.zIndex,H=t.stretch,V=t.getPopupClassNameFromAlign,q=t.fresh,G=t.alignPoint,J=t.onPopupClick,X=t.onPopupAlign,Z=t.arrow,Q=t.popupMotion,ee=t.maskMotion,ue=t.popupTransitionName,pe=t.popupAnimation,ve=t.maskTransitionName,be=t.maskAnimation,we=t.className,ke=t.getTriggerDOMNode,xe=(0,u.A)(t,ye),Ae=R||D||!1,Se=r.useState(!1),Ee=(0,d.A)(Se,2),Ce=Ee[0],Oe=Ee[1];(0,v.A)((function(){Oe(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}())}),[]);var Me=r.useRef({}),Ne=r.useContext(re),Te=r.useMemo((function(){return{registerSubPopup:function(e,t){Me.current[e]=t,null==Ne||Ne.registerSubPopup(e,t)}}}),[Ne]),Ie=Y(),Re=r.useState(null),De=(0,d.A)(Re,2),Pe=De[0],Fe=De[1],Le=r.useRef(null),_e=(0,K.A)((function(e){Le.current=e,(0,T.fk)(e)&&Pe!==e&&Fe(e),null==Ne||Ne.registerSubPopup(Ie,e)})),ze=r.useState(null),$e=(0,d.A)(ze,2),je=$e[0],Be=$e[1],He=r.useRef(null),Ve=(0,K.A)((function(e){(0,T.fk)(e)&&je!==e&&(Be(e),He.current=e)})),Ue=r.Children.only(a),We=(null==Ue?void 0:Ue.props)||{},Ke={},qe=(0,K.A)((function(e){var t,n,r=je;return(null==r?void 0:r.contains(e))||(null===(t=(0,W.j)(r))||void 0===t?void 0:t.host)===e||e===r||(null==Pe?void 0:Pe.contains(e))||(null===(n=(0,W.j)(Pe))||void 0===n?void 0:n.host)===e||e===Pe||Object.values(Me.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),Ge=se(i,Q,pe,ue),Ye=se(i,ee,be,ve),Je=r.useState(g||!1),Xe=(0,d.A)(Je,2),Ze=Xe[0],Qe=Xe[1],et=null!=m?m:Ze,tt=(0,K.A)((function(e){void 0===m&&Qe(e)}));(0,v.A)((function(){Qe(m||!1)}),[m]);var nt=r.useRef(et);nt.current=et;var rt=r.useRef([]);rt.current=[];var ot=(0,K.A)((function(e){var t;tt(e),(null!==(t=rt.current[rt.current.length-1])&&void 0!==t?t:et)!==e&&(rt.current.push(e),null==b||b(e))})),it=r.useRef(),st=function(){clearTimeout(it.current)},at=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;st(),0===t?ot(e):it.current=setTimeout((function(){ot(e)}),1e3*t)};r.useEffect((function(){return st}),[]);var lt=r.useState(!1),ct=(0,d.A)(lt,2),ut=ct[0],dt=ct[1];(0,v.A)((function(e){e&&!et||dt(!0)}),[et]);var pt=r.useState(null),ft=(0,d.A)(pt,2),ht=ft[0],mt=ft[1],gt=r.useState(null),yt=(0,d.A)(gt,2),vt=yt[0],bt=yt[1],wt=function(e){bt([e.clientX,e.clientY])},kt=function(e,t,n,o,i,s,a){var l=r.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[o]||{}}),u=(0,d.A)(l,2),p=u[0],f=u[1],h=r.useRef(0),m=r.useMemo((function(){return t?le(t):[]}),[t]),g=r.useRef({});e||(g.current={});var y=(0,K.A)((function(){if(t&&n&&e){var r,l,u,p,h,y=t,v=y.ownerDocument,b=ae(y).getComputedStyle(y),w=b.width,k=b.height,x=b.position,A=y.style.left,S=y.style.top,E=y.style.right,C=y.style.bottom,O=y.style.overflow,M=(0,c.A)((0,c.A)({},i[o]),s),N=v.createElement("div");if(null===(r=y.parentElement)||void 0===r||r.appendChild(N),N.style.left="".concat(y.offsetLeft,"px"),N.style.top="".concat(y.offsetTop,"px"),N.style.position=x,N.style.height="".concat(y.offsetHeight,"px"),N.style.width="".concat(y.offsetWidth,"px"),y.style.left="0",y.style.top="0",y.style.right="auto",y.style.bottom="auto",y.style.overflow="hidden",Array.isArray(n))h={x:n[0],y:n[1],width:0,height:0};else{var I,R,D=n.getBoundingClientRect();D.x=null!==(I=D.x)&&void 0!==I?I:D.left,D.y=null!==(R=D.y)&&void 0!==R?R:D.top,h={x:D.x,y:D.y,width:D.width,height:D.height}}var P=y.getBoundingClientRect();P.x=null!==(l=P.x)&&void 0!==l?l:P.left,P.y=null!==(u=P.y)&&void 0!==u?u:P.top;var F=v.documentElement,L=F.clientWidth,_=F.clientHeight,z=F.scrollWidth,$=F.scrollHeight,j=F.scrollTop,B=F.scrollLeft,H=P.height,V=P.width,U=h.height,W=h.width,K={left:0,top:0,right:L,bottom:_},q={left:-B,top:-j,right:z-B,bottom:$-j},G=M.htmlRegion,Y="visible",J="visibleFirst";"scroll"!==G&&G!==J&&(G=Y);var X=G===J,Z=de(q,m),Q=de(K,m),ee=G===Y?Q:Z,te=X?Q:ee;y.style.left="auto",y.style.top="auto",y.style.right="0",y.style.bottom="0";var ne=y.getBoundingClientRect();y.style.left=A,y.style.top=S,y.style.right=E,y.style.bottom=C,y.style.overflow=O,null===(p=y.parentElement)||void 0===p||p.removeChild(N);var re=ce(Math.round(V/parseFloat(w)*1e3)/1e3),oe=ce(Math.round(H/parseFloat(k)*1e3)/1e3);if(0===re||0===oe||(0,T.fk)(n)&&!function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,s=o.height;if(i||s)return!0}}return!1}(n))return;var ie=M.offset,se=M.targetOffset,le=fe(P,ie),ue=(0,d.A)(le,2),pe=ue[0],ye=ue[1],ve=fe(h,se),be=(0,d.A)(ve,2),we=be[0],ke=be[1];h.x-=we,h.y-=ke;var xe=M.points||[],Ae=(0,d.A)(xe,2),Se=Ae[0],Ee=he(Ae[1]),Ce=he(Se),Oe=me(h,Ee),Me=me(P,Ce),Ne=(0,c.A)({},M),Te=Oe.x-Me.x+pe,Ie=Oe.y-Me.y+ye;function St(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ee,r=P.x+e,o=P.y+t,i=r+V,s=o+H,a=Math.max(r,n.left),l=Math.max(o,n.top),c=Math.min(i,n.right),u=Math.min(s,n.bottom);return Math.max(0,(c-a)*(u-l))}var Re,De,Pe,Fe,Le=St(Te,Ie),_e=St(Te,Ie,Q),ze=me(h,["t","l"]),$e=me(P,["t","l"]),je=me(h,["b","r"]),Be=me(P,["b","r"]),He=M.overflow||{},Ve=He.adjustX,Ue=He.adjustY,We=He.shiftX,Ke=He.shiftY,qe=function(e){return"boolean"==typeof e?e:e>=0};function Et(){Re=P.y+Ie,De=Re+H,Pe=P.x+Te,Fe=Pe+V}Et();var Ge=qe(Ue),Ye=Ce[0]===Ee[0];if(Ge&&"t"===Ce[0]&&(De>te.bottom||g.current.bt)){var Je=Ie;Ye?Je-=H-U:Je=ze.y-Be.y-ye;var Xe=St(Te,Je),Ze=St(Te,Je,Q);Xe>Le||Xe===Le&&(!X||Ze>=_e)?(g.current.bt=!0,Ie=Je,ye=-ye,Ne.points=[ge(Ce,0),ge(Ee,0)]):g.current.bt=!1}if(Ge&&"b"===Ce[0]&&(Re<te.top||g.current.tb)){var Qe=Ie;Ye?Qe+=H-U:Qe=je.y-$e.y-ye;var et=St(Te,Qe),tt=St(Te,Qe,Q);et>Le||et===Le&&(!X||tt>=_e)?(g.current.tb=!0,Ie=Qe,ye=-ye,Ne.points=[ge(Ce,0),ge(Ee,0)]):g.current.tb=!1}var nt=qe(Ve),rt=Ce[1]===Ee[1];if(nt&&"l"===Ce[1]&&(Fe>te.right||g.current.rl)){var ot=Te;rt?ot-=V-W:ot=ze.x-Be.x-pe;var it=St(ot,Ie),st=St(ot,Ie,Q);it>Le||it===Le&&(!X||st>=_e)?(g.current.rl=!0,Te=ot,pe=-pe,Ne.points=[ge(Ce,1),ge(Ee,1)]):g.current.rl=!1}if(nt&&"r"===Ce[1]&&(Pe<te.left||g.current.lr)){var at=Te;rt?at+=V-W:at=je.x-$e.x-pe;var lt=St(at,Ie),ct=St(at,Ie,Q);lt>Le||lt===Le&&(!X||ct>=_e)?(g.current.lr=!0,Te=at,pe=-pe,Ne.points=[ge(Ce,1),ge(Ee,1)]):g.current.lr=!1}Et();var ut=!0===We?0:We;"number"==typeof ut&&(Pe<Q.left&&(Te-=Pe-Q.left-pe,h.x+W<Q.left+ut&&(Te+=h.x-Q.left+W-ut)),Fe>Q.right&&(Te-=Fe-Q.right-pe,h.x>Q.right-ut&&(Te+=h.x-Q.right+ut)));var dt=!0===Ke?0:Ke;"number"==typeof dt&&(Re<Q.top&&(Ie-=Re-Q.top-ye,h.y+U<Q.top+dt&&(Ie+=h.y-Q.top+U-dt)),De>Q.bottom&&(Ie-=De-Q.bottom-ye,h.y>Q.bottom-dt&&(Ie+=h.y-Q.bottom+dt)));var pt=P.x+Te,ft=pt+V,ht=P.y+Ie,mt=ht+H,gt=h.x,yt=gt+W,vt=h.y,bt=vt+U,wt=(Math.max(pt,gt)+Math.min(ft,yt))/2-pt,kt=(Math.max(ht,vt)+Math.min(mt,bt))/2-ht;null==a||a(t,Ne);var xt=ne.right-P.x-(Te+P.width),At=ne.bottom-P.y-(Ie+P.height);1===re&&(Te=Math.round(Te),xt=Math.round(xt)),1===oe&&(Ie=Math.round(Ie),At=Math.round(At)),f({ready:!0,offsetX:Te/re,offsetY:Ie/oe,offsetR:xt/re,offsetB:At/oe,arrowX:wt/re,arrowY:kt/oe,scaleX:re,scaleY:oe,align:Ne})}})),b=function(){f((function(e){return(0,c.A)((0,c.A)({},e),{},{ready:!1})}))};return(0,v.A)(b,[o]),(0,v.A)((function(){e||b()}),[e]),[p.ready,p.offsetX,p.offsetY,p.offsetR,p.offsetB,p.arrowX,p.arrowY,p.scaleX,p.scaleY,p.align,function(){h.current+=1;var e=h.current;Promise.resolve().then((function(){h.current===e&&y()}))}]}(et,Pe,G&&null!==vt?vt:je,_,$,j,X),xt=(0,d.A)(kt,11),At=xt[0],St=xt[1],Et=xt[2],Ct=xt[3],Ot=xt[4],Mt=xt[5],Nt=xt[6],Tt=xt[7],It=xt[8],Rt=xt[9],Dt=xt[10],Pt=function(e,t,n,o){return r.useMemo((function(){var r=oe(null!=n?n:t),i=oe(null!=o?o:t),s=new Set(r),a=new Set(i);return e&&(s.has("hover")&&(s.delete("hover"),s.add("click")),a.has("hover")&&(a.delete("hover"),a.add("click"))),[s,a]}),[e,t,n,o])}(Ce,p,f,h),Ft=(0,d.A)(Pt,2),Lt=Ft[0],_t=Ft[1],zt=Lt.has("click"),$t=_t.has("click")||_t.has("contextMenu"),jt=(0,K.A)((function(){ut||Dt()}));!function(e,t,n,r){(0,v.A)((function(){if(e&&t&&n){var o=n,i=le(t),s=le(o),a=ae(o),l=new Set([a].concat((0,y.A)(i),(0,y.A)(s)));function c(){r(),nt.current&&G&&$t&&at(!1)}return l.forEach((function(e){e.addEventListener("scroll",c,{passive:!0})})),a.addEventListener("resize",c,{passive:!0}),r(),function(){l.forEach((function(e){e.removeEventListener("scroll",c),a.removeEventListener("resize",c)}))}}}),[e,t,n])}(et,je,Pe,jt),(0,v.A)((function(){jt()}),[vt,_]),(0,v.A)((function(){!et||null!=$&&$[_]||jt()}),[JSON.stringify(j)]);var Bt=r.useMemo((function(){var e=function(e,t,n,r){for(var o=n.points,i=Object.keys(e),s=0;s<i.length;s+=1){var a,l=i[s];if(ie(null===(a=e[l])||void 0===a?void 0:a.points,o,r))return"".concat(t,"-placement-").concat(l)}return""}($,i,Rt,G);return s()(e,null==V?void 0:V(Rt))}),[Rt,V,$,i,G]);r.useImperativeHandle(n,(function(){return{nativeElement:He.current,popupElement:Le.current,forceAlign:jt}}));var Ht=r.useState(0),Vt=(0,d.A)(Ht,2),Ut=Vt[0],Wt=Vt[1],Kt=r.useState(0),qt=(0,d.A)(Kt,2),Gt=qt[0],Yt=qt[1],Jt=function(){if(H&&je){var e=je.getBoundingClientRect();Wt(e.width),Yt(e.height)}};function Xt(e,t,n,r){Ke[e]=function(o){var i;null==r||r(o),at(t,n);for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];null===(i=We[e])||void 0===i||i.call.apply(i,[We,o].concat(a))}}(0,v.A)((function(){ht&&(Dt(),ht(),mt(null))}),[ht]),(zt||$t)&&(Ke.onClick=function(e){var t;nt.current&&$t?at(!1):!nt.current&&zt&&(wt(e),at(!0));for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=We.onClick)||void 0===t||t.call.apply(t,[We,e].concat(r))});var Zt,Qt,en=function(e,t,n,o,i,s,a,l){var c=r.useRef(e);c.current=e;var u=r.useRef(!1);return r.useEffect((function(){if(t&&o&&(!i||s)){var e=function(){u.current=!1},r=function(e){var t;!c.current||a((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)||u.current||l(!1)},d=ae(o);d.addEventListener("pointerdown",e,!0),d.addEventListener("mousedown",r,!0),d.addEventListener("contextmenu",r,!0);var p=(0,W.j)(n);return p&&(p.addEventListener("mousedown",r,!0),p.addEventListener("contextmenu",r,!0)),function(){d.removeEventListener("pointerdown",e,!0),d.removeEventListener("mousedown",r,!0),d.removeEventListener("contextmenu",r,!0),p&&(p.removeEventListener("mousedown",r,!0),p.removeEventListener("contextmenu",r,!0))}}}),[t,n,o,i,s]),function(){u.current=!0}}(et,$t,je,Pe,C,M,qe,at),tn=Lt.has("hover"),nn=_t.has("hover");tn&&(Xt("onMouseEnter",!0,k,(function(e){wt(e)})),Xt("onPointerEnter",!0,k,(function(e){wt(e)})),Zt=function(e){(et||ut)&&null!=Pe&&Pe.contains(e.target)&&at(!0,k)},G&&(Ke.onMouseMove=function(e){var t;null===(t=We.onMouseMove)||void 0===t||t.call(We,e)})),nn&&(Xt("onMouseLeave",!1,A),Xt("onPointerLeave",!1,A),Qt=function(){at(!1,A)}),Lt.has("focus")&&Xt("onFocus",!0,S),_t.has("focus")&&Xt("onBlur",!1,E),Lt.has("contextMenu")&&(Ke.onContextMenu=function(e){var t;nt.current&&_t.has("contextMenu")?at(!1):(wt(e),at(!0)),e.preventDefault();for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=We.onContextMenu)||void 0===t||t.call.apply(t,[We,e].concat(r))}),we&&(Ke.className=s()(We.className,we));var rn=(0,c.A)((0,c.A)({},We),Ke),on={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){xe[e]&&(on[e]=function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null===(t=rn[e])||void 0===t||t.call.apply(t,[rn].concat(r)),xe[e].apply(xe,r)})}));var sn=r.cloneElement(Ue,(0,c.A)((0,c.A)({},rn),on)),an={x:Mt,y:Nt},ln=Z?(0,c.A)({},!0!==Z?Z:{}):null;return r.createElement(r.Fragment,null,r.createElement(U,{disabled:!et,ref:Ve,onResize:function(){Jt(),jt()}},r.createElement(ne,{getTriggerDOMNode:ke},sn)),r.createElement(re.Provider,{value:Te},r.createElement(te,{portal:e,ref:_e,prefixCls:i,popup:P,className:s()(F,Bt),style:L,target:je,onMouseEnter:Zt,onMouseLeave:Qt,onPointerEnter:Zt,zIndex:B,open:et,keepDom:ut,fresh:q,onClick:J,onPointerDownCapture:en,mask:C,motion:Ge,maskMotion:Ye,onVisibleChanged:function(e){dt(!1),Dt(),null==w||w(e)},onPrepare:function(){return new Promise((function(e){Jt(),mt((function(){return e}))}))},forceRender:I,autoDestroy:Ae,getPopupContainer:N,align:Rt,arrow:ln,arrowPos:an,ready:At,offsetX:St,offsetY:Et,offsetR:Ct,offsetB:Ot,onAlign:jt,stretch:H,targetWidth:Ut/Tt,targetHeight:Gt/It})))}));return t}(C);var be={shiftX:64,adjustY:1},we={adjustX:1,shiftY:!0},ke=[0,0],xe={left:{points:["cr","cl"],overflow:we,offset:[-4,0],targetOffset:ke},right:{points:["cl","cr"],overflow:we,offset:[4,0],targetOffset:ke},top:{points:["bc","tc"],overflow:be,offset:[0,-4],targetOffset:ke},bottom:{points:["tc","bc"],overflow:be,offset:[0,4],targetOffset:ke},topLeft:{points:["bl","tl"],overflow:be,offset:[0,-4],targetOffset:ke},leftTop:{points:["tr","tl"],overflow:we,offset:[-4,0],targetOffset:ke},topRight:{points:["br","tr"],overflow:be,offset:[0,-4],targetOffset:ke},rightTop:{points:["tl","tr"],overflow:we,offset:[4,0],targetOffset:ke},bottomRight:{points:["tr","br"],overflow:be,offset:[0,4],targetOffset:ke},rightBottom:{points:["bl","br"],overflow:we,offset:[4,0],targetOffset:ke},bottomLeft:{points:["tl","bl"],overflow:be,offset:[0,4],targetOffset:ke},leftBottom:{points:["br","bl"],overflow:we,offset:[-4,0],targetOffset:ke}},Ae=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],Se=function(e,t){var n=e.overlayClassName,o=e.trigger,i=void 0===o?["hover"]:o,d=e.mouseEnterDelay,p=void 0===d?0:d,f=e.mouseLeaveDelay,h=void 0===f?.1:f,m=e.overlayStyle,g=e.prefixCls,y=void 0===g?"rc-tooltip":g,v=e.children,b=e.onVisibleChange,w=e.afterVisibleChange,k=e.transitionName,x=e.animation,A=e.motion,S=e.placement,E=void 0===S?"right":S,C=e.align,O=void 0===C?{}:C,M=e.destroyTooltipOnHide,N=void 0!==M&&M,T=e.defaultVisible,I=e.getTooltipContainer,R=e.overlayInnerStyle,D=(e.arrowContent,e.overlay),P=e.id,F=e.showArrow,L=void 0===F||F,_=e.classNames,z=e.styles,$=(0,u.A)(e,Ae),j=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(function(){return j.current}));var B=(0,c.A)({},$);return"visible"in e&&(B.popupVisible=e.visible),r.createElement(ve,(0,l.A)({popupClassName:s()(n,null==_?void 0:_.root),prefixCls:y,popup:function(){return r.createElement(a,{key:"content",prefixCls:y,id:P,bodyClassName:null==_?void 0:_.body,overlayInnerStyle:(0,c.A)((0,c.A)({},R),null==z?void 0:z.body)},D)},action:i,builtinPlacements:xe,popupPlacement:E,ref:j,popupAlign:O,getPopupContainer:I,onPopupVisibleChange:b,afterPopupVisibleChange:w,popupTransitionName:k,popupAnimation:x,popupMotion:A,defaultPopupVisible:T,autoDestroy:N,mouseLeaveDelay:h,popupStyle:(0,c.A)((0,c.A)({},m),null==z?void 0:z.root),mouseEnterDelay:p,arrow:L},B),v)};const Ee=(0,r.forwardRef)(Se);var Ce=n(4948),Oe=n(1258),Me=n(6330),Ne=n(2474),Te=n(4586),Ie=n(8257),Re="RC_FORM_INTERNAL_HOOKS",De=function(){(0,h.Ay)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};const Pe=r.createContext({getFieldValue:De,getFieldsValue:De,getFieldError:De,getFieldWarning:De,getFieldsError:De,isFieldsTouched:De,isFieldTouched:De,isFieldValidating:De,isFieldsValidating:De,resetFields:De,setFields:De,setFieldValue:De,setFieldsValue:De,validateFields:De,submit:De,getInternalHooks:function(){return De(),{dispatch:De,initEntityValue:De,registerField:De,useSubscribe:De,setInitialValues:De,destroyForm:De,setCallbacks:De,registerWatch:De,getFields:De,setValidateMessages:De,setPreserve:De,getInitialValue:De}}}),Fe=r.createContext(null);function Le(e){return null==e?[]:Array.isArray(e)?e:[e]}function _e(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var ze=_e(),$e=n(2715),je=n(1087),Be=n(9105);function He(e){var t="function"==typeof Map?new Map:void 0;return He=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if((0,Be.A)())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&(0,je.A)(o,n.prototype),o}(e,arguments,(0,$e.A)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,je.A)(n,e)},He(e)}var Ve=/%[sdj%]/g;function Ue(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function We(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i=n.length;return"function"==typeof e?e.apply(null,n):"string"==typeof e?e.replace(Ve,(function(e){if("%%"===e)return"%";if(o>=i)return e;switch(e){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch(e){return"[Circular]"}break;default:return e}})):e}function Ke(e,t){return null==e||!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e)}function qe(e,t,n){var r=0,o=e.length;!function i(s){if(s&&s.length)n(s);else{var a=r;r+=1,a<o?t(e[a],i):n([])}}([])}"undefined"!=typeof process&&process.env;var Ge=function(e){(0,_.A)(n,e);var t=(0,z.A)(n);function n(e,r){var o;return(0,F.A)(this,n),o=t.call(this,"Async Validation Error"),(0,Te.A)((0,Ne.A)(o),"errors",void 0),(0,Te.A)((0,Ne.A)(o),"fields",void 0),o.errors=e,o.fields=r,o}return(0,L.A)(n)}(He(Error));function Ye(e,t){return function(n){var r,o;return r=e.fullFields?function(e,t){for(var n=e,r=0;r<t.length;r++){if(null==n)return n;n=n[t[r]]}return n}(t,e.fullFields):t[n.field||e.fullField],(o=n)&&void 0!==o.message?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:"function"==typeof n?n():n,fieldValue:r,field:n.field||e.fullField}}}function Je(e,t){if(t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];"object"===(0,N.A)(r)&&"object"===(0,N.A)(e[n])?e[n]=(0,c.A)((0,c.A)({},e[n]),r):e[n]=r}return e}var Xe="enum";const Ze=function(e,t,n,r,o,i){!e.required||n.hasOwnProperty(e.field)&&!Ke(t,i||e.type)||r.push(We(o.messages.required,e.fullField))};var Qe,et=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tt=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,nt={integer:function(e){return nt.number(e)&&parseInt(e,10)===e},float:function(e){return nt.number(e)&&!nt.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"===(0,N.A)(e)&&!nt.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(et)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(function(){if(Qe)return Qe;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:".concat(o.join("|"),")").concat("(?:%[0-9a-zA-Z]{1,})?"),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(i,"$)")),a=new RegExp("^".concat(n,"$")),l=new RegExp("^".concat(i,"$")),c=function(e){return e&&e.exact?s:new RegExp("(?:".concat(t(e)).concat(n).concat(t(e),")|(?:").concat(t(e)).concat(i).concat(t(e),")"),"g")};c.v4=function(e){return e&&e.exact?a:new RegExp("".concat(t(e)).concat(n).concat(t(e)),"g")},c.v6=function(e){return e&&e.exact?l:new RegExp("".concat(t(e)).concat(i).concat(t(e)),"g")};var u=c.v4().source,d=c.v6().source,p="(?:".concat("(?:(?:[a-z]+:)?//)","|www\\.)").concat("(?:\\S+(?::\\S*)?@)?","(?:localhost|").concat(u,"|").concat(d,"|").concat("(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)").concat("(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*").concat("(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",")").concat("(?::\\d{2,5})?").concat('(?:[/?#][^\\s"]*)?');return Qe=new RegExp("(?:^".concat(p,"$)"),"i")}())},hex:function(e){return"string"==typeof e&&!!e.match(tt)}};const rt=Ze,ot=function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(We(o.messages.whitespace,e.fullField))},it=function(e,t,n,r,o){if(e.required&&void 0===t)Ze(e,t,n,r,o);else{var i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?nt[i](t)||r.push(We(o.messages.types[i],e.fullField,e.type)):i&&(0,N.A)(t)!==e.type&&r.push(We(o.messages.types[i],e.fullField,e.type))}},st=function(e,t,n,r,o){var i="number"==typeof e.len,s="number"==typeof e.min,a="number"==typeof e.max,l=t,c=null,u="number"==typeof t,d="string"==typeof t,p=Array.isArray(t);if(u?c="number":d?c="string":p&&(c="array"),!c)return!1;p&&(l=t.length),d&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),i?l!==e.len&&r.push(We(o.messages[c].len,e.fullField,e.len)):s&&!a&&l<e.min?r.push(We(o.messages[c].min,e.fullField,e.min)):a&&!s&&l>e.max?r.push(We(o.messages[c].max,e.fullField,e.max)):s&&a&&(l<e.min||l>e.max)&&r.push(We(o.messages[c].range,e.fullField,e.min,e.max))},at=function(e,t,n,r,o){e[Xe]=Array.isArray(e[Xe])?e[Xe]:[],-1===e[Xe].indexOf(t)&&r.push(We(o.messages[Xe],e.fullField,e[Xe].join(", ")))},lt=function(e,t,n,r,o){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(We(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"==typeof e.pattern&&(new RegExp(e.pattern).test(t)||r.push(We(o.messages.pattern.mismatch,e.fullField,t,e.pattern))))},ct=function(e,t,n,r,o){var i=e.type,s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t,i)&&!e.required)return n();rt(e,t,r,s,o,i),Ke(t,i)||it(e,t,r,s,o)}n(s)},ut={string:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t,"string")&&!e.required)return n();rt(e,t,r,i,o,"string"),Ke(t,"string")||(it(e,t,r,i,o),st(e,t,r,i,o),lt(e,t,r,i,o),!0===e.whitespace&&ot(e,t,r,i,o))}n(i)},method:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&it(e,t,r,i,o)}n(i)},number:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&(it(e,t,r,i,o),st(e,t,r,i,o))}n(i)},boolean:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&it(e,t,r,i,o)}n(i)},regexp:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),Ke(t)||it(e,t,r,i,o)}n(i)},integer:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&(it(e,t,r,i,o),st(e,t,r,i,o))}n(i)},float:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&(it(e,t,r,i,o),st(e,t,r,i,o))}n(i)},array:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();rt(e,t,r,i,o,"array"),null!=t&&(it(e,t,r,i,o),st(e,t,r,i,o))}n(i)},object:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&it(e,t,r,i,o)}n(i)},enum:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&at(e,t,r,i,o)}n(i)},pattern:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t,"string")&&!e.required)return n();rt(e,t,r,i,o),Ke(t,"string")||lt(e,t,r,i,o)}n(i)},date:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t,"date")&&!e.required)return n();var s;rt(e,t,r,i,o),Ke(t,"date")||(s=t instanceof Date?t:new Date(t),it(e,s,r,i,o),s&&st(e,s.getTime(),r,i,o))}n(i)},url:ct,hex:ct,email:ct,required:function(e,t,n,r,o){var i=[],s=Array.isArray(t)?"array":(0,N.A)(t);rt(e,t,r,i,o,s),n(i)},any:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o)}n(i)}};var dt=function(){function e(t){(0,F.A)(this,e),(0,Te.A)(this,"rules",null),(0,Te.A)(this,"_messages",ze),this.define(t)}return(0,L.A)(e,[{key:"define",value:function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==(0,N.A)(e)||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))}},{key:"messages",value:function(e){return e&&(this._messages=Je(_e(),e)),this._messages}},{key:"validate",value:function(t){var n=this,r=t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if("function"==typeof o&&(i=o,o={}),!this.rules||0===Object.keys(this.rules).length)return i&&i(null,r),Promise.resolve(r);if(o.messages){var s=this.messages();s===ze&&(s=_e()),Je(s,o.messages),o.messages=s}else o.messages=this.messages();var a={};(o.keys||Object.keys(this.rules)).forEach((function(e){var o=n.rules[e],i=r[e];o.forEach((function(o){var s=o;"function"==typeof s.transform&&(r===t&&(r=(0,c.A)({},r)),null!=(i=r[e]=s.transform(i))&&(s.type=s.type||(Array.isArray(i)?"array":(0,N.A)(i)))),(s="function"==typeof s?{validator:s}:(0,c.A)({},s)).validator=n.getValidationMethod(s),s.validator&&(s.field=e,s.fullField=s.fullField||e,s.type=n.getType(s),a[e]=a[e]||[],a[e].push({rule:s,value:i,source:r,field:e}))}))}));var l={};return function(e,t,n,r,o){if(t.first){var i=new Promise((function(t,i){var s=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,(0,y.A)(e[n]||[]))})),t}(e);qe(s,n,(function(e){return r(e),e.length?i(new Ge(e,Ue(e))):t(o)}))}));return i.catch((function(e){return e})),i}var s=!0===t.firstFields?Object.keys(e):t.firstFields||[],a=Object.keys(e),l=a.length,c=0,u=[],d=new Promise((function(t,i){var d=function(e){if(u.push.apply(u,e),++c===l)return r(u),u.length?i(new Ge(u,Ue(u))):t(o)};a.length||(r(u),t(o)),a.forEach((function(t){var r=e[t];-1!==s.indexOf(t)?qe(r,n,d):function(e,t,n){var r=[],o=0,i=e.length;function s(e){r.push.apply(r,(0,y.A)(e||[])),++o===i&&n(r)}e.forEach((function(e){t(e,s)}))}(r,n,d)}))}));return d.catch((function(e){return e})),d}(a,o,(function(t,n){var i,s=t.rule,a=!("object"!==s.type&&"array"!==s.type||"object"!==(0,N.A)(s.fields)&&"object"!==(0,N.A)(s.defaultField));function u(e,t){return(0,c.A)((0,c.A)({},t),{},{fullField:"".concat(s.fullField,".").concat(e),fullFields:s.fullFields?[].concat((0,y.A)(s.fullFields),[e]):[e]})}function d(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],d=Array.isArray(i)?i:[i];!o.suppressWarning&&d.length&&e.warning("async-validator:",d),d.length&&void 0!==s.message&&(d=[].concat(s.message));var p=d.map(Ye(s,r));if(o.first&&p.length)return l[s.field]=1,n(p);if(a){if(s.required&&!t.value)return void 0!==s.message?p=[].concat(s.message).map(Ye(s,r)):o.error&&(p=[o.error(s,We(o.messages.required,s.field))]),n(p);var f={};s.defaultField&&Object.keys(t.value).map((function(e){f[e]=s.defaultField})),f=(0,c.A)((0,c.A)({},f),t.rule.fields);var h={};Object.keys(f).forEach((function(e){var t=f[e],n=Array.isArray(t)?t:[t];h[e]=n.map(u.bind(null,e))}));var m=new e(h);m.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),m.validate(t.value,t.rule.options||o,(function(e){var t=[];p&&p.length&&t.push.apply(t,(0,y.A)(p)),e&&e.length&&t.push.apply(t,(0,y.A)(e)),n(t.length?t:null)}))}else n(p)}if(a=a&&(s.required||!s.required&&t.value),s.field=t.field,s.asyncValidator)i=s.asyncValidator(s,t.value,d,t.source,o);else if(s.validator){try{i=s.validator(s,t.value,d,t.source,o)}catch(e){var p,f;null===(p=(f=console).error)||void 0===p||p.call(f,e),o.suppressValidatorError||setTimeout((function(){throw e}),0),d(e.message)}!0===i?d():!1===i?d("function"==typeof s.message?s.message(s.fullField||s.field):s.message||"".concat(s.fullField||s.field," fails")):i instanceof Array?d(i):i instanceof Error&&d(i.message)}i&&i.then&&i.then((function(){return d()}),(function(e){return d(e)}))}),(function(e){!function(e){for(var t,n,o=[],s={},a=0;a<e.length;a++)t=e[a],n=void 0,Array.isArray(t)?o=(n=o).concat.apply(n,(0,y.A)(t)):o.push(t);o.length?(s=Ue(o),i(o,s)):i(null,r)}(e)}),r)}},{key:"getType",value:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!ut.hasOwnProperty(e.type))throw new Error(We("Unknown rule type %s",e.type));return e.type||"string"}},{key:"getValidationMethod",value:function(e){if("function"==typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?ut.required:ut[this.getType(e)]||void 0}}]),e}();(0,Te.A)(dt,"register",(function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");ut[e]=t})),(0,Te.A)(dt,"warning",(function(){})),(0,Te.A)(dt,"messages",ze),(0,Te.A)(dt,"validators",ut);const pt=dt;var ft="'${name}' is not a valid ${type}",ht={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:ft,method:ft,array:ft,object:ft,number:ft,date:ft,boolean:ft,integer:ft,float:ft,regexp:ft,email:ft,url:ft,hex:ft},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},mt=n(3795),gt=pt;function yt(e,t){return e.replace(/\\?\$\{\w+\}/g,(function(e){if(e.startsWith("\\"))return e.slice(1);var n=e.slice(2,-1);return t[n]}))}var vt="CODE_LOGIC_ERROR";function bt(e,t,n,r,o){return wt.apply(this,arguments)}function wt(){return wt=(0,Me.A)((0,Oe.A)().mark((function e(t,n,o,i,s){var a,l,u,d,p,f,h,m,g;return(0,Oe.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(a=(0,c.A)({},o)).ruleIndex,gt.warning=function(){},a.validator&&(l=a.validator,a.validator=function(){try{return l.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(vt)}}),u=null,a&&"array"===a.type&&a.defaultField&&(u=a.defaultField,delete a.defaultField),d=new gt((0,Te.A)({},t,[a])),p=(0,mt.h)(ht,i.validateMessages),d.messages(p),f=[],e.prev=10,e.next=13,Promise.resolve(d.validate((0,Te.A)({},t,n),(0,c.A)({},i)));case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(10),e.t0.errors&&(f=e.t0.errors.map((function(e,t){var n=e.message,o=n===vt?p.default:n;return r.isValidElement(o)?r.cloneElement(o,{key:"error_".concat(t)}):o})));case 18:if(f.length||!u){e.next=23;break}return e.next=21,Promise.all(n.map((function(e,n){return bt("".concat(t,".").concat(n),e,u,i,s)})));case 21:return h=e.sent,e.abrupt("return",h.reduce((function(e,t){return[].concat((0,y.A)(e),(0,y.A)(t))}),[]));case 23:return m=(0,c.A)((0,c.A)({},o),{},{name:t,enum:(o.enum||[]).join(", ")},s),g=f.map((function(e){return"string"==typeof e?yt(e,m):e})),e.abrupt("return",g);case 26:case"end":return e.stop()}}),e,null,[[10,15]])}))),wt.apply(this,arguments)}function kt(e,t,n,r,o,i){var s,a=e.join("."),l=n.map((function(e,t){var n=e.validator,r=(0,c.A)((0,c.A)({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var o=!1,i=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){(0,h.Ay)(!o,"Your validator function has already return a promise. `callback` will be ignored."),o||r.apply(void 0,t)}))}));o=i&&"function"==typeof i.then&&"function"==typeof i.catch,(0,h.Ay)(o,"`callback` is deprecated. Please return a promise instead."),o&&i.then((function(){r()})).catch((function(e){r(e||" ")}))}),r})).sort((function(e,t){var n=e.warningOnly,r=e.ruleIndex,o=t.warningOnly,i=t.ruleIndex;return!!n==!!o?r-i:n?1:-1}));if(!0===o)s=new Promise(function(){var e=(0,Me.A)((0,Oe.A)().mark((function e(n,o){var s,c,u;return(0,Oe.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=0;case 1:if(!(s<l.length)){e.next=12;break}return c=l[s],e.next=5,bt(a,t,c,r,i);case 5:if(!(u=e.sent).length){e.next=9;break}return o([{errors:u,rule:c}]),e.abrupt("return");case 9:s+=1,e.next=1;break;case 12:n([]);case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var u=l.map((function(e){return bt(a,t,e,r,i).then((function(t){return{errors:t,rule:e}}))}));s=(o?function(e){return At.apply(this,arguments)}(u):function(e){return xt.apply(this,arguments)}(u)).then((function(e){return Promise.reject(e)}))}return s.catch((function(e){return e})),s}function xt(){return(xt=(0,Me.A)((0,Oe.A)().mark((function e(t){return(0,Oe.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,(0,y.A)(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function At(){return(At=(0,Me.A)((0,Oe.A)().mark((function e(t){var n;return(0,Oe.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.errors.length&&e([r]),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var St=n(231);function Et(e){return Le(e)}function Ct(e,t){var n={};return t.forEach((function(t){var r=(0,St.A)(e,t);n=(0,mt.A)(n,t,r)})),n}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return Mt(t,e,n)}))}function Mt(e,t){return!(!e||!t)&&!(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&e.length!==t.length)&&t.every((function(t,n){return e[n]===t}))}function Nt(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===(0,N.A)(t.target)&&e in t.target?t.target[e]:t}function Tt(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],i=t-n;return i>0?[].concat((0,y.A)(e.slice(0,n)),[o],(0,y.A)(e.slice(n,t)),(0,y.A)(e.slice(t+1,r))):i<0?[].concat((0,y.A)(e.slice(0,t)),(0,y.A)(e.slice(t+1,n+1)),[o],(0,y.A)(e.slice(n+1,r))):e}var It=["name"],Rt=[];function Dt(e,t,n,r,o,i){return"function"==typeof e?e(t,n,"source"in i?{source:i.source}:{}):r!==o}var Pt=function(e){(0,_.A)(n,e);var t=(0,z.A)(n);function n(e){var o;return(0,F.A)(this,n),o=t.call(this,e),(0,Te.A)((0,Ne.A)(o),"state",{resetCount:0}),(0,Te.A)((0,Ne.A)(o),"cancelRegisterFunc",null),(0,Te.A)((0,Ne.A)(o),"mounted",!1),(0,Te.A)((0,Ne.A)(o),"touched",!1),(0,Te.A)((0,Ne.A)(o),"dirty",!1),(0,Te.A)((0,Ne.A)(o),"validatePromise",void 0),(0,Te.A)((0,Ne.A)(o),"prevValidating",void 0),(0,Te.A)((0,Ne.A)(o),"errors",Rt),(0,Te.A)((0,Ne.A)(o),"warnings",Rt),(0,Te.A)((0,Ne.A)(o),"cancelRegister",(function(){var e=o.props,t=e.preserve,n=e.isListField,r=e.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(n,t,Et(r)),o.cancelRegisterFunc=null})),(0,Te.A)((0,Ne.A)(o),"getNamePath",(function(){var e=o.props,t=e.name,n=e.fieldContext.prefixName,r=void 0===n?[]:n;return void 0!==t?[].concat((0,y.A)(r),(0,y.A)(t)):[]})),(0,Te.A)((0,Ne.A)(o),"getRules",(function(){var e=o.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"==typeof e?e(r):e}))})),(0,Te.A)((0,Ne.A)(o),"refresh",(function(){o.mounted&&o.setState((function(e){return{resetCount:e.resetCount+1}}))})),(0,Te.A)((0,Ne.A)(o),"metaCache",null),(0,Te.A)((0,Ne.A)(o),"triggerMetaEvent",(function(e){var t=o.props.onMetaChange;if(t){var n=(0,c.A)((0,c.A)({},o.getMeta()),{},{destroy:e});(0,Ie.A)(o.metaCache,n)||t(n),o.metaCache=n}else o.metaCache=null})),(0,Te.A)((0,Ne.A)(o),"onStoreChange",(function(e,t,n){var r=o.props,i=r.shouldUpdate,s=r.dependencies,a=void 0===s?[]:s,l=r.onReset,c=n.store,u=o.getNamePath(),d=o.getValue(e),p=o.getValue(c),f=t&&Ot(t,u);switch("valueUpdate"!==n.type||"external"!==n.source||(0,Ie.A)(d,p)||(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Rt,o.warnings=Rt,o.triggerMetaEvent()),n.type){case"reset":if(!t||f)return o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Rt,o.warnings=Rt,o.triggerMetaEvent(),null==l||l(),void o.refresh();break;case"remove":if(i&&Dt(i,e,c,d,p,n))return void o.reRender();break;case"setField":var h=n.data;if(f)return"touched"in h&&(o.touched=h.touched),"validating"in h&&!("originRCField"in h)&&(o.validatePromise=h.validating?Promise.resolve([]):null),"errors"in h&&(o.errors=h.errors||Rt),"warnings"in h&&(o.warnings=h.warnings||Rt),o.dirty=!0,o.triggerMetaEvent(),void o.reRender();if("value"in h&&Ot(t,u,!0))return void o.reRender();if(i&&!u.length&&Dt(i,e,c,d,p,n))return void o.reRender();break;case"dependenciesUpdate":if(a.map(Et).some((function(e){return Ot(n.relatedFields,e)})))return void o.reRender();break;default:if(f||(!a.length||u.length||i)&&Dt(i,e,c,d,p,n))return void o.reRender()}!0===i&&o.reRender()})),(0,Te.A)((0,Ne.A)(o),"validateRules",(function(e){var t=o.getNamePath(),n=o.getValue(),r=e||{},i=r.triggerName,s=r.validateOnly,a=void 0!==s&&s,l=Promise.resolve().then((0,Me.A)((0,Oe.A)().mark((function r(){var s,a,c,u,d,p,f;return(0,Oe.A)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o.mounted){r.next=2;break}return r.abrupt("return",[]);case 2:if(s=o.props,a=s.validateFirst,c=void 0!==a&&a,u=s.messageVariables,d=s.validateDebounce,p=o.getRules(),i&&(p=p.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||Le(t).includes(i)}))),!d||!i){r.next=10;break}return r.next=8,new Promise((function(e){setTimeout(e,d)}));case 8:if(o.validatePromise===l){r.next=10;break}return r.abrupt("return",[]);case 10:return(f=kt(t,n,p,e,c,u)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rt;if(o.validatePromise===l){var t;o.validatePromise=null;var n=[],r=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,o=e.errors,i=void 0===o?Rt:o;t?r.push.apply(r,(0,y.A)(i)):n.push.apply(n,(0,y.A)(i))})),o.errors=n,o.warnings=r,o.triggerMetaEvent(),o.reRender()}})),r.abrupt("return",f);case 13:case"end":return r.stop()}}),r)}))));return a||(o.validatePromise=l,o.dirty=!0,o.errors=Rt,o.warnings=Rt,o.triggerMetaEvent(),o.reRender()),l})),(0,Te.A)((0,Ne.A)(o),"isFieldValidating",(function(){return!!o.validatePromise})),(0,Te.A)((0,Ne.A)(o),"isFieldTouched",(function(){return o.touched})),(0,Te.A)((0,Ne.A)(o),"isFieldDirty",(function(){return!(!o.dirty&&void 0===o.props.initialValue)||void 0!==(0,o.props.fieldContext.getInternalHooks(Re).getInitialValue)(o.getNamePath())})),(0,Te.A)((0,Ne.A)(o),"getErrors",(function(){return o.errors})),(0,Te.A)((0,Ne.A)(o),"getWarnings",(function(){return o.warnings})),(0,Te.A)((0,Ne.A)(o),"isListField",(function(){return o.props.isListField})),(0,Te.A)((0,Ne.A)(o),"isList",(function(){return o.props.isList})),(0,Te.A)((0,Ne.A)(o),"isPreserve",(function(){return o.props.preserve})),(0,Te.A)((0,Ne.A)(o),"getMeta",(function(){return o.prevValidating=o.isFieldValidating(),{touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:null===o.validatePromise}})),(0,Te.A)((0,Ne.A)(o),"getOnlyChild",(function(e){if("function"==typeof e){var t=o.getMeta();return(0,c.A)((0,c.A)({},o.getOnlyChild(e(o.getControlled(),t,o.props.fieldContext))),{},{isFunction:!0})}var n=M(e);return 1===n.length&&r.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}})),(0,Te.A)((0,Ne.A)(o),"getValue",(function(e){var t=o.props.fieldContext.getFieldsValue,n=o.getNamePath();return(0,St.A)(e||t(!0),n)})),(0,Te.A)((0,Ne.A)(o),"getControlled",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.props,n=t.name,r=t.trigger,i=t.validateTrigger,s=t.getValueFromEvent,a=t.normalize,l=t.valuePropName,u=t.getValueProps,d=t.fieldContext,p=void 0!==i?i:d.validateTrigger,f=o.getNamePath(),h=d.getInternalHooks,m=d.getFieldsValue,g=h(Re).dispatch,y=o.getValue(),v=u||function(e){return(0,Te.A)({},l,e)},b=e[r],w=void 0!==n?v(y):{},k=(0,c.A)((0,c.A)({},e),w);return k[r]=function(){var e;o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e=s?s.apply(void 0,n):Nt.apply(void 0,[l].concat(n)),a&&(e=a(e,y,m(!0))),e!==y&&g({type:"updateValue",namePath:f,value:e}),b&&b.apply(void 0,n)},Le(p||[]).forEach((function(e){var t=k[e];k[e]=function(){t&&t.apply(void 0,arguments);var n=o.props.rules;n&&n.length&&g({type:"validateField",namePath:f,triggerName:e})}})),k})),e.fieldContext&&(0,(0,e.fieldContext.getInternalHooks)(Re).initEntityValue)((0,Ne.A)(o)),o}return(0,L.A)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(Re).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,t=this.state.resetCount,n=this.props.children,o=this.getOnlyChild(n),i=o.child;return o.isFunction?e=i:r.isValidElement(i)?e=r.cloneElement(i,this.getControlled(i.props)):((0,h.Ay)(!i,"`children` of Field is not validate ReactElement."),e=i),r.createElement(r.Fragment,{key:t},e)}}]),n}(r.Component);(0,Te.A)(Pt,"contextType",Pe),(0,Te.A)(Pt,"defaultProps",{trigger:"onChange",valuePropName:"value"});const Ft=function(e){var t,n=e.name,o=(0,u.A)(e,It),i=r.useContext(Pe),s=r.useContext(Fe),a=void 0!==n?Et(n):void 0,c=null!==(t=o.isListField)&&void 0!==t?t:!!s,d="keep";return c||(d="_".concat((a||[]).join("_"))),r.createElement(Pt,(0,l.A)({key:d,name:a,isListField:c},o,{fieldContext:i}))};var Lt="__@field_split__";function _t(e){return e.map((function(e){return"".concat((0,N.A)(e),":").concat(e)})).join(Lt)}const zt=function(){function e(){(0,F.A)(this,e),(0,Te.A)(this,"kvs",new Map)}return(0,L.A)(e,[{key:"set",value:function(e,t){this.kvs.set(_t(e),t)}},{key:"get",value:function(e){return this.kvs.get(_t(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(_t(e))}},{key:"map",value:function(e){return(0,y.A)(this.kvs.entries()).map((function(t){var n=(0,d.A)(t,2),r=n[0],o=n[1],i=r.split(Lt);return e({key:i.map((function(e){var t=e.match(/^([^:]*):(.*)$/),n=(0,d.A)(t,3),r=n[1],o=n[2];return"number"===r?Number(o):o})),value:o})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}();var $t=["name"],jt=(0,L.A)((function e(t){var n=this;(0,F.A)(this,e),(0,Te.A)(this,"formHooked",!1),(0,Te.A)(this,"forceRootUpdate",void 0),(0,Te.A)(this,"subscribable",!0),(0,Te.A)(this,"store",{}),(0,Te.A)(this,"fieldEntities",[]),(0,Te.A)(this,"initialValues",{}),(0,Te.A)(this,"callbacks",{}),(0,Te.A)(this,"validateMessages",null),(0,Te.A)(this,"preserve",null),(0,Te.A)(this,"lastValidatePromise",null),(0,Te.A)(this,"getForm",(function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}})),(0,Te.A)(this,"getInternalHooks",(function(e){return e===Re?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):((0,h.Ay)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)})),(0,Te.A)(this,"useSubscribe",(function(e){n.subscribable=e})),(0,Te.A)(this,"prevWithoutPreserves",null),(0,Te.A)(this,"setInitialValues",(function(e,t){if(n.initialValues=e||{},t){var r,o=(0,mt.h)(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;o=(0,mt.A)(o,n,(0,St.A)(e,n))})),n.prevWithoutPreserves=null,n.updateStore(o)}})),(0,Te.A)(this,"destroyForm",(function(e){if(e)n.updateStore({});else{var t=new zt;n.getFieldEntities(!0).forEach((function(e){n.isMergedPreserve(e.isPreserve())||t.set(e.getNamePath(),!0)})),n.prevWithoutPreserves=t}})),(0,Te.A)(this,"getInitialValue",(function(e){var t=(0,St.A)(n.initialValues,e);return e.length?(0,mt.h)(t):t})),(0,Te.A)(this,"setCallbacks",(function(e){n.callbacks=e})),(0,Te.A)(this,"setValidateMessages",(function(e){n.validateMessages=e})),(0,Te.A)(this,"setPreserve",(function(e){n.preserve=e})),(0,Te.A)(this,"watchList",[]),(0,Te.A)(this,"registerWatch",(function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}})),(0,Te.A)(this,"notifyWatch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach((function(n){n(t,r,e)}))}})),(0,Te.A)(this,"timeoutId",null),(0,Te.A)(this,"warningUnhooked",(function(){})),(0,Te.A)(this,"updateStore",(function(e){n.store=e})),(0,Te.A)(this,"getFieldEntities",(function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities})),(0,Te.A)(this,"getFieldsMap",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new zt;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t})),(0,Te.A)(this,"getFieldEntitiesForNamePathList",(function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=Et(e);return t.get(n)||{INVALIDATE_NAME_PATH:Et(e)}}))})),(0,Te.A)(this,"getFieldsValue",(function(e,t){var r,o,i;if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,o=t):e&&"object"===(0,N.A)(e)&&(i=e.strict,o=e.filter),!0===r&&!o)return n.store;var s=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),a=[];return s.forEach((function(e){var t,n,s,l,c="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(i){if(null!==(s=(l=e).isList)&&void 0!==s&&s.call(l))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(o){var u="getMeta"in e?e.getMeta():null;o(u)&&a.push(c)}else a.push(c)})),Ct(n.store,a.map(Et))})),(0,Te.A)(this,"getFieldValue",(function(e){n.warningUnhooked();var t=Et(e);return(0,St.A)(n.store,t)})),(0,Te.A)(this,"getFieldsError",(function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:Et(e[n]),errors:[],warnings:[]}}))})),(0,Te.A)(this,"getFieldError",(function(e){n.warningUnhooked();var t=Et(e);return n.getFieldsError([t])[0].errors})),(0,Te.A)(this,"getFieldWarning",(function(e){n.warningUnhooked();var t=Et(e);return n.getFieldsError([t])[0].warnings})),(0,Te.A)(this,"isFieldsTouched",(function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o,i=t[0],s=t[1],a=!1;0===t.length?o=null:1===t.length?Array.isArray(i)?(o=i.map(Et),a=!1):(o=null,a=i):(o=i.map(Et),a=s);var l=n.getFieldEntities(!0),c=function(e){return e.isFieldTouched()};if(!o)return a?l.every((function(e){return c(e)||e.isList()})):l.some(c);var u=new zt;o.forEach((function(e){u.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();o.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&u.update(n,(function(t){return[].concat((0,y.A)(t),[e])}))}))}));var d=function(e){return e.some(c)},p=u.map((function(e){return e.value}));return a?p.every(d):p.some(d)})),(0,Te.A)(this,"isFieldTouched",(function(e){return n.warningUnhooked(),n.isFieldsTouched([e])})),(0,Te.A)(this,"isFieldsValidating",(function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(Et);return t.some((function(e){var t=e.getNamePath();return Ot(r,t)&&e.isFieldValidating()}))})),(0,Te.A)(this,"isFieldValidating",(function(e){return n.warningUnhooked(),n.isFieldsValidating([e])})),(0,Te.A)(this,"resetWithFieldInitialValue",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new zt,o=n.getFieldEntities(!0);o.forEach((function(e){var t=e.props.initialValue,n=e.getNamePath();if(void 0!==t){var o=r.get(n)||new Set;o.add({entity:e,value:t}),r.set(n,o)}})),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach((function(t){var n,o=r.get(t);o&&(n=e).push.apply(n,(0,y.A)((0,y.A)(o).map((function(e){return e.entity}))))}))):e=o,e.forEach((function(e){if(void 0!==e.props.initialValue){var o=e.getNamePath();if(void 0!==n.getInitialValue(o))(0,h.Ay)(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var i=r.get(o);if(i&&i.size>1)(0,h.Ay)(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(i){var s=n.getFieldValue(o);e.isListField()||t.skipExist&&void 0!==s||n.updateStore((0,mt.A)(n.store,o,(0,y.A)(i)[0].value))}}}}))})),(0,Te.A)(this,"resetFields",(function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore((0,mt.h)(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var r=e.map(Et);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore((0,mt.A)(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)})),(0,Te.A)(this,"setFields",(function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var o=e.name,i=(0,u.A)(e,$t),s=Et(o);r.push(s),"value"in i&&n.updateStore((0,mt.A)(n.store,s,i.value)),n.notifyObservers(t,[s],{type:"setField",data:e})})),n.notifyWatch(r)})),(0,Te.A)(this,"getFields",(function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=e.getMeta(),o=(0,c.A)((0,c.A)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(o,"originRCField",{value:!0}),o}))})),(0,Te.A)(this,"initEntityValue",(function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===(0,St.A)(n.store,r)&&n.updateStore((0,mt.A)(n.store,r,t))}})),(0,Te.A)(this,"isMergedPreserve",(function(e){var t=void 0!==e?e:n.preserve;return null==t||t})),(0,Te.A)(this,"registerField",(function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(o)&&(!r||i.length>1)){var s=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==s&&n.fieldEntities.every((function(e){return!Mt(e.getNamePath(),t)}))){var a=n.store;n.updateStore((0,mt.A)(a,t,s,!0)),n.notifyObservers(a,[t],{type:"remove"}),n.triggerDependenciesUpdate(a,t)}}n.notifyWatch([t])}})),(0,Te.A)(this,"dispatch",(function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,i=e.triggerName;n.validateFields([o],{triggerName:i})}})),(0,Te.A)(this,"notifyObservers",(function(e,t,r){if(n.subscribable){var o=(0,c.A)((0,c.A)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,o)}))}else n.forceRootUpdate()})),(0,Te.A)(this,"triggerDependenciesUpdate",(function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat((0,y.A)(r))}),r})),(0,Te.A)(this,"updateValue",(function(e,t){var r=Et(e),o=n.store;n.updateStore((0,mt.A)(n.store,r,t)),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var i=n.triggerDependenciesUpdate(o,r),s=n.callbacks.onValuesChange;s&&s(Ct(n.store,[r]),n.getFieldsValue()),n.triggerOnFieldsChange([r].concat((0,y.A)(i)))})),(0,Te.A)(this,"setFieldsValue",(function(e){n.warningUnhooked();var t=n.store;if(e){var r=(0,mt.h)(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()})),(0,Te.A)(this,"setFieldValue",(function(e,t){n.setFields([{name:e,value:t,errors:[],warnings:[]}])})),(0,Te.A)(this,"getDependencyChildrenFields",(function(e){var t=new Set,r=[],o=new zt;return n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=Et(t);o.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))})),function e(n){(o.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}}))}(e),r})),(0,Te.A)(this,"triggerOnFieldsChange",(function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var i=new zt;t.forEach((function(e){var t=e.name,n=e.errors;i.set(t,n)})),o.forEach((function(e){e.errors=i.get(e.name)||e.errors}))}var s=o.filter((function(t){var n=t.name;return Ot(e,n)}));s.length&&r(s,o)}})),(0,Te.A)(this,"validateFields",(function(e,t){var r,o;n.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(r=e,o=t):o=e;var i=!!r,s=i?r.map(Et):[],a=[],l=String(Date.now()),u=new Set,d=o||{},p=d.recursive,f=d.dirty;n.getFieldEntities(!0).forEach((function(e){if(i||s.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!f||e.isFieldDirty())){var t=e.getNamePath();if(u.add(t.join(l)),!i||Ot(s,t,p)){var r=e.validateRules((0,c.A)({validateMessages:(0,c.A)((0,c.A)({},ht),n.validateMessages)},o));a.push(r.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var n,r=[],o=[];return null===(n=e.forEach)||void 0===n||n.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors;t?o.push.apply(o,(0,y.A)(n)):r.push.apply(r,(0,y.A)(n))})),r.length?Promise.reject({name:t,errors:r,warnings:o}):{name:t,errors:r,warnings:o}})))}}}));var h=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(o,i){e.forEach((function(e,s){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[s]=e,n>0||(t&&i(r),o(r))}))}))})):Promise.resolve([])}(a);n.lastValidatePromise=h,h.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var m=h.then((function(){return n.lastValidatePromise===h?Promise.resolve(n.getFieldsValue(s)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(s),errorFields:t,outOfDate:n.lastValidatePromise!==h})}));m.catch((function(e){return e}));var g=s.filter((function(e){return u.has(e.join(l))}));return n.triggerOnFieldsChange(g),m})),(0,Te.A)(this,"submit",(function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))})),this.forceRootUpdate=t}));const Bt=function(e){var t=r.useRef(),n=r.useState({}),o=(0,d.A)(n,2)[1];if(!t.current)if(e)t.current=e;else{var i=new jt((function(){o({})}));t.current=i.getForm()}return[t.current]};var Ht=r.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}});const Vt=Ht;var Ut=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"];const Wt=function(e,t){var n=e.name,o=e.initialValues,i=e.fields,s=e.form,a=e.preserve,p=e.children,f=e.component,h=void 0===f?"form":f,m=e.validateMessages,g=e.validateTrigger,v=void 0===g?"onChange":g,b=e.onValuesChange,w=e.onFieldsChange,k=e.onFinish,x=e.onFinishFailed,A=e.clearOnDestroy,S=(0,u.A)(e,Ut),E=r.useRef(null),C=r.useContext(Vt),O=Bt(s),M=(0,d.A)(O,1)[0],T=M.getInternalHooks(Re),I=T.useSubscribe,R=T.setInitialValues,D=T.setCallbacks,P=T.setValidateMessages,F=T.setPreserve,L=T.destroyForm;r.useImperativeHandle(t,(function(){return(0,c.A)((0,c.A)({},M),{},{nativeElement:E.current})})),r.useEffect((function(){return C.registerForm(n,M),function(){C.unregisterForm(n)}}),[C,M,n]),P((0,c.A)((0,c.A)({},C.validateMessages),m)),D({onValuesChange:b,onFieldsChange:function(e){if(C.triggerFormChange(n,e),w){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];w.apply(void 0,[e].concat(r))}},onFinish:function(e){C.triggerFormFinish(n,e),k&&k(e)},onFinishFailed:x}),F(a);var _,z=r.useRef(null);R(o,!z.current),z.current||(z.current=!0),r.useEffect((function(){return function(){return L(A)}}),[]);var $="function"==typeof p;_=$?p(M.getFieldsValue(!0),M):p,I(!$);var j=r.useRef();r.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==(0,N.A)(e)||"object"!==(0,N.A)(t))return!1;var n=Object.keys(e),r=Object.keys(t),o=new Set([].concat(n,r));return(0,y.A)(o).every((function(n){var r=e[n],o=t[n];return"function"==typeof r&&"function"==typeof o||r===o}))})(j.current||[],i||[])||M.setFields(i||[]),j.current=i}),[i,M]);var B=r.useMemo((function(){return(0,c.A)((0,c.A)({},M),{},{validateTrigger:v})}),[M,v]),H=r.createElement(Fe.Provider,{value:null},r.createElement(Pe.Provider,{value:B},_));return!1===h?H:r.createElement(h,(0,l.A)({},S,{ref:E,onSubmit:function(e){e.preventDefault(),e.stopPropagation(),M.submit()},onReset:function(e){var t;e.preventDefault(),M.resetFields(),null===(t=S.onReset)||void 0===t||t.call(S,e)}}),H)};function Kt(e){try{return JSON.stringify(e)}catch(e){return Math.random()}}var qt=r.forwardRef(Wt);qt.FormProvider=function(e){var t=e.validateMessages,n=e.onFormChange,o=e.onFormFinish,i=e.children,s=r.useContext(Ht),a=r.useRef({});return r.createElement(Ht.Provider,{value:(0,c.A)((0,c.A)({},s),{},{validateMessages:(0,c.A)((0,c.A)({},s.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:a.current}),s.triggerFormChange(e,t)},triggerFormFinish:function(e,t){o&&o(e,{values:t,forms:a.current}),s.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(a.current=(0,c.A)((0,c.A)({},a.current),{},(0,Te.A)({},e,t))),s.registerForm(e,t)},unregisterForm:function(e){var t=(0,c.A)({},a.current);delete t[e],a.current=t,s.unregisterForm(e)}})},i)},qt.Field=Ft,qt.List=function(e){var t=e.name,n=e.initialValue,o=e.children,i=e.rules,s=e.validateTrigger,a=e.isListField,l=r.useContext(Pe),u=r.useContext(Fe),d=r.useRef({keys:[],id:0}).current,p=r.useMemo((function(){var e=Et(l.prefixName)||[];return[].concat((0,y.A)(e),(0,y.A)(Et(t)))}),[l.prefixName,t]),f=r.useMemo((function(){return(0,c.A)((0,c.A)({},l),{},{prefixName:p})}),[l,p]),m=r.useMemo((function(){return{getKey:function(e){var t=p.length,n=e[t];return[d.keys[n],e.slice(t+1)]}}}),[p]);return"function"!=typeof o?((0,h.Ay)(!1,"Form.List only accepts function as children."),null):r.createElement(Fe.Provider,{value:m},r.createElement(Pe.Provider,{value:f},r.createElement(Ft,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:i,validateTrigger:s,initialValue:n,isList:!0,isListField:null!=a?a:!!u},(function(e,t){var n=e.value,r=void 0===n?[]:n,i=e.onChange,s=l.getFieldValue,a=function(){return s(p||[])||[]},c={add:function(e,t){var n=a();t>=0&&t<=n.length?(d.keys=[].concat((0,y.A)(d.keys.slice(0,t)),[d.id],(0,y.A)(d.keys.slice(t))),i([].concat((0,y.A)(n.slice(0,t)),[e],(0,y.A)(n.slice(t))))):(d.keys=[].concat((0,y.A)(d.keys),[d.id]),i([].concat((0,y.A)(n),[e]))),d.id+=1},remove:function(e){var t=a(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(d.keys=d.keys.filter((function(e,t){return!n.has(t)})),i(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=a();e<0||e>=n.length||t<0||t>=n.length||(d.keys=Tt(d.keys,e,t),i(Tt(n,e,t)))}}},u=r||[];return Array.isArray(u)||(u=[]),o(u.map((function(e,t){var n=d.keys[t];return void 0===n&&(d.keys[t]=d.id,n=d.keys[t],d.id+=1),{name:t,key:n,isListField:!0}})),c,t)}))))},qt.useForm=Bt,qt.useWatch=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],i=t[1],s=void 0===i?{}:i,a=function(e){return e&&!!e._init}(s)?{form:s}:s,l=a.form,c=(0,r.useState)(),u=(0,d.A)(c,2),p=u[0],f=u[1],h=(0,r.useMemo)((function(){return Kt(p)}),[p]),m=(0,r.useRef)(h);m.current=h;var g=(0,r.useContext)(Pe),y=l||g,v=y&&y._init,b=Et(o),w=(0,r.useRef)(b);return w.current=b,(0,r.useEffect)((function(){if(v){var e=y.getFieldsValue,t=(0,y.getInternalHooks)(Re).registerWatch,n=function(e,t){var n=a.preserve?t:e;return"function"==typeof o?o(n):(0,St.A)(n,w.current)},r=t((function(e,t){var r=n(e,t),o=Kt(r);m.current!==o&&(m.current=o,f(r))})),i=n(e(),e(!0));return p!==i&&f(i),r}}),[v]),p};const Gt=r.createContext({}),Yt=e=>{let{children:t,status:n,override:o}=e;const i=r.useContext(Gt),s=r.useMemo((()=>{const e=Object.assign({},i);return o&&delete e.isFormItemInput,n&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[n,o,i]);return r.createElement(Gt.Provider,{value:s},t)},Jt=r.createContext(null),Xt=e=>{let{children:t}=e;return r.createElement(Jt.Provider,{value:null},t)},Zt=e=>{const{space:t,form:n,children:r}=e;if(null==r)return null;let i=r;return n&&(i=o().createElement(Yt,{override:!0,status:!0},i)),t&&(i=o().createElement(Xt,null,i)),i};var Qt=n(7010);const en=(e,t,n)=>void 0!==n?n:`${e}-${t}`;var tn=n(5694);const nn=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:s,borderRadiusXS:a,calc:l}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,tn.zA)(a)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}};function rn(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function on(e,t){return e?t:{}}function sn(e,t,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:s}=e,{arrowDistance:a=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},nn(e,t,o)),{"&:before":{background:t}})]},on(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:a,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":s,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,tn.zA)(s)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),on(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:a,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":s,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,tn.zA)(s)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),on(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:a},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}})),on(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:a},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}))}}const an={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},ln={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},cn=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);var un=n(1136),dn=n(6561),pn=n(9642),fn=n(7652),hn=n(8408);const mn=e=>({animationDuration:e,animationFillMode:"both"}),gn=e=>({animationDuration:e,animationFillMode:"both"}),yn=function(e,t,n,r){const o=arguments.length>4&&void 0!==arguments[4]&&arguments[4]?"&":"";return{[`\n ${o}${e}-enter,\n ${o}${e}-appear\n `]:Object.assign(Object.assign({},mn(r)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},gn(r)),{animationPlayState:"paused"}),[`\n ${o}${e}-enter${e}-enter-active,\n ${o}${e}-appear${e}-appear-active\n `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},vn=new tn.Mo("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),bn=new tn.Mo("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),wn=new tn.Mo("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),kn=new tn.Mo("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),xn=new tn.Mo("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),An=new tn.Mo("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Sn={zoom:{inKeyframes:vn,outKeyframes:bn},"zoom-big":{inKeyframes:wn,outKeyframes:kn},"zoom-big-fast":{inKeyframes:wn,outKeyframes:kn},"zoom-left":{inKeyframes:new tn.Mo("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),outKeyframes:new tn.Mo("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}})},"zoom-right":{inKeyframes:new tn.Mo("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),outKeyframes:new tn.Mo("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}})},"zoom-up":{inKeyframes:xn,outKeyframes:An},"zoom-down":{inKeyframes:new tn.Mo("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),outKeyframes:new tn.Mo("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}})}},En=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=Sn[t];return[yn(r,o,i,"zoom-big-fast"===t?e.motionDurationFast:e.motionDurationMid),{[`\n ${r}-enter,\n ${r}-appear\n `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Cn=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function On(e,t){return Cn.reduce(((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],s=e[`${r}6`],a=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:i,darkColor:s,textColor:a}))}),{})}var Mn=n(8764),Nn=n(2257);const Tn=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:s,zIndexPopup:a,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:p,sizePopupArrow:f}=e,h=t(s).add(f).add(p).equal(),m=t(s).mul(2).add(f).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,hn.dF)(e)),{position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${n}-inner`]:{minWidth:m,minHeight:l,padding:`${(0,tn.zA)(e.calc(u).div(2).equal())} ${(0,tn.zA)(d)}`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:s,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:h},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(s,8)}},[`${n}-content`]:{position:"relative"}}),On(e,((e,t)=>{let{darkColor:r}=t;return{[`&${n}-${e}`]:{[`${n}-inner`]:{backgroundColor:r},[`${n}-arrow`]:{"--antd-arrow-background-color":r}}}}))),{"&-rtl":{direction:"rtl"}})},sn(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},In=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},rn({contentRadius:e.borderRadius,limitVerticalRadius:!0})),function(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=o,s=1*r/Math.sqrt(2),a=o-r*(1-1/Math.sqrt(2)),l=o-n*(1/Math.sqrt(2)),c=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),u=2*o-l,d=c,p=2*o-s,f=a,h=2*o-0,m=i,g=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),y=r*(Math.sqrt(2)-1);return{arrowShadowWidth:g,arrowPath:`path('M 0 ${i} A ${r} ${r} 0 0 0 ${s} ${a} L ${l} ${c} A ${n} ${n} 0 0 1 ${u} ${d} L ${p} ${f} A ${r} ${r} 0 0 0 ${h} ${m} Z')`,arrowPolygon:`polygon(${y}px 100%, 50% ${y}px, ${2*o-y}px 100%, ${y}px 100%)`}}((0,Mn.oX)(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),Rn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,Nn.OF)("Tooltip",(e=>{const{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e,o=(0,Mn.oX)(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r});return[Tn(o),En(e,"zoom-big-fast")]}),In,{resetStyle:!1,injectStyle:t})(e)},Dn=Cn.map((e=>`${e}-inverse`));function Pn(e,t){const n=function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?Cn.includes(e):[].concat((0,y.A)(Dn),(0,y.A)(Cn)).includes(e)}(t),r=s()({[`${e}-${t}`]:t&&n}),o={},i={};return t&&!n&&(o.background=t,i["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:i}}const Fn=r.forwardRef(((e,t)=>{var n,i,a,l,c,u;const{prefixCls:d,openClassName:p,getTooltipContainer:f,color:h,overlayInnerStyle:m,children:g,afterOpenChange:y,afterVisibleChange:v,destroyTooltipOnHide:b,arrow:w=!0,title:k,overlay:x,builtinPlacements:A,arrowPointAtCenter:S=!1,autoAdjustOverflow:E=!0}=e,C=!!w,[,O]=(0,fn.Ay)(),{getPopupContainer:M,getPrefixCls:N,direction:T,tooltip:I}=r.useContext(pn.QO),R=(0,un.rJ)("Tooltip"),D=r.useRef(null),P=()=>{var e;null===(e=D.current)||void 0===e||e.forceAlign()};r.useImperativeHandle(t,(()=>{var e;return{forceAlign:P,forcePopupAlign:()=>{R.deprecated(!1,"forcePopupAlign","forceAlign"),P()},nativeElement:null===(e=D.current)||void 0===e?void 0:e.nativeElement}}));const[F,L]=(0,Ce.A)(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(i=e.defaultOpen)&&void 0!==i?i:e.defaultVisible}),_=!k&&!x&&0!==k,z=r.useMemo((()=>{var e,t;let n=S;return"object"==typeof w&&(n=null!==(t=null!==(e=w.pointAtCenter)&&void 0!==e?e:w.arrowPointAtCenter)&&void 0!==t?t:S),A||function(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:s}=e,a=t/2,l={};return Object.keys(an).forEach((e=>{const c=r&&ln[e]||an[e],u=Object.assign(Object.assign({},c),{offset:[0,0],dynamicInset:!0});switch(l[e]=u,cn.has(e)&&(u.autoArrow=!1),e){case"top":case"topLeft":case"topRight":u.offset[1]=-a-o;break;case"bottom":case"bottomLeft":case"bottomRight":u.offset[1]=a+o;break;case"left":case"leftTop":case"leftBottom":u.offset[0]=-a-o;break;case"right":case"rightTop":case"rightBottom":u.offset[0]=a+o}const d=rn({contentRadius:i,limitVerticalRadius:!0});if(r)switch(e){case"topLeft":case"bottomLeft":u.offset[0]=-d.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":u.offset[0]=d.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":u.offset[1]=2*-d.arrowOffsetHorizontal+a;break;case"leftBottom":case"rightBottom":u.offset[1]=2*d.arrowOffsetHorizontal-a}u.overflow=function(e,t,n,r){if(!1===r)return{adjustX:!1,adjustY:!1};const o=r&&"object"==typeof r?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=2*t.arrowOffsetHorizontal+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=2*t.arrowOffsetVertical+n,i.shiftX=!0,i.adjustX=!0}const s=Object.assign(Object.assign({},i),o);return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}(e,d,t,n),s&&(u.htmlRegion="visibleFirst")})),l}({arrowPointAtCenter:n,autoAdjustOverflow:E,arrowWidth:C?O.sizePopupArrow:0,borderRadius:O.borderRadius,offset:O.marginXXS,visibleFirst:!0})}),[S,w,A,O]),$=r.useMemo((()=>0===k?k:x||k||""),[x,k]),j=r.createElement(Zt,{space:!0},"function"==typeof $?$():$),{getPopupContainer:B,placement:H="top",mouseEnterDelay:V=.1,mouseLeaveDelay:U=.1,overlayStyle:W,rootClassName:K,overlayClassName:q,styles:G,classNames:Y}=e,J=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),X=N("tooltip",d),Z=N(),Q=e["data-popover-inject"];let ee=F;"open"in e||"visible"in e||!_||(ee=!1);const te=r.isValidElement(g)&&!function(e){return e&&o().isValidElement(e)&&e.type===o().Fragment}(g)?g:r.createElement("span",null,g),ne=te.props,re=ne.className&&"string"!=typeof ne.className?ne.className:s()(ne.className,p||`${X}-open`),[oe,ie,se]=Rn(X,!Q),ae=Pn(X,h),le=ae.arrowStyle,ce=s()(q,{[`${X}-rtl`]:"rtl"===T},ae.className,K,ie,se,null==I?void 0:I.className,null===(a=null==I?void 0:I.classNames)||void 0===a?void 0:a.root,null==Y?void 0:Y.root),ue=s()(null===(l=null==I?void 0:I.classNames)||void 0===l?void 0:l.body,null==Y?void 0:Y.body),[de,pe]=(0,Qt.YK)("Tooltip",J.zIndex),fe=r.createElement(Ee,Object.assign({},J,{zIndex:de,showArrow:C,placement:H,mouseEnterDelay:V,mouseLeaveDelay:U,prefixCls:X,classNames:{root:ce,body:ue},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},le),null===(c=null==I?void 0:I.styles)||void 0===c?void 0:c.root),null==I?void 0:I.style),W),null==G?void 0:G.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},null===(u=null==I?void 0:I.styles)||void 0===u?void 0:u.body),m),null==G?void 0:G.body),ae.overlayStyle)},getTooltipContainer:B||f||M,ref:D,builtinPlacements:z,overlay:j,visible:ee,onVisibleChange:t=>{var n,r;L(!_&&t),_||(null===(n=e.onOpenChange)||void 0===n||n.call(e,t),null===(r=e.onVisibleChange)||void 0===r||r.call(e,t))},afterVisibleChange:null!=y?y:v,arrowContent:r.createElement("span",{className:`${X}-arrow-content`}),motion:{motionName:en(Z,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!b}),ee?function(e,t){return((e,t,n)=>o().isValidElement(e)?o().cloneElement(e,"function"==typeof n?n(e.props||{}):n):t)(e,e,t)}(te,{className:re}):te);return oe(r.createElement(dn.A.Provider,{value:pe},fe))})),Ln=Fn;Ln._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:t,className:n,placement:o="top",title:i,color:l,overlayInnerStyle:c}=e,{getPrefixCls:u}=r.useContext(pn.QO),d=u("tooltip",t),[p,f,h]=Rn(d),m=Pn(d,l),g=m.arrowStyle,y=Object.assign(Object.assign({},c),m.overlayStyle),v=s()(f,h,d,`${d}-pure`,`${d}-placement-${o}`,n,m.className);return p(r.createElement("div",{className:v,style:g},r.createElement("div",{className:`${d}-arrow`}),r.createElement(a,Object.assign({},e,{className:f,prefixCls:d,overlayInnerStyle:y}),i)))};const _n=Ln},4238:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,o:()=>s});var r=n(8769),o=(0,n(7169).A)()?r.useLayoutEffect:r.useEffect,i=function(e,t){var n=r.useRef(!0);o((function(){return e(n.current)}),t),o((function(){return n.current=!1,function(){n.current=!0}}),[])},s=function(e,t){i((function(t){if(!t)return e()}),t)};const a=i},4254:(e,t,n)=>{"use strict";n.d(t,{I9:()=>N,KP:()=>I,T:()=>S,UM:()=>R,Z6:()=>O,uX:()=>M,xe:()=>T});var r=n(1570),o=n(96);const i="undefined"!=typeof navigator?navigator:null,s="undefined"!=typeof document?document:null,a=i&&i.userAgent||"",l=/Edge\/(\d+)/.exec(a),c=/MSIE \d/.exec(a),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(a),d=!!(c||u||l),p=c?document.documentMode:u?+u[1]:l?+l[1]:0,f=!d&&/gecko\/(\d+)/i.test(a),h=f&&+(/Firefox\/(\d+)/.exec(a)||[0,0])[1],m=!d&&/Chrome\/(\d+)/.exec(a),g=!!m,y=m?+m[1]:0,v=!d&&!!i&&/Apple Computer/.test(i.vendor),b=v&&(/Mobile\/\w+/.test(a)||!!i&&i.maxTouchPoints>2),w=b||!!i&&/Mac/.test(i.platform),k=/Android \d/.test(a),x=!!s&&"webkitFontSmoothing"in s.documentElement.style,A=x?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var S=Object.freeze({__proto__:null,ie:d,ie_version:p,gecko:f,gecko_version:h,chrome:g,chrome_version:y,safari:v,ios:b,mac:w,android:k,webkit:x,webkit_version:A});function E(e,t,n,r,o,i){if(e.composing)return!1;const s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;const l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,void 0,"")+r;for(let a=0;a<o.length;a++){const c=o[a].match.exec(l),u=c&&c[0]&&o[a].handler(s,c,t-(c[0].length-r.length),n);if(u)return e.dispatch(u.setMeta(i,{transform:u,from:t,to:n,text:r})),!0}return!1}const C=new r.hs("MILKDOWN_CUSTOM_INPUTRULES"),O=({rules:e})=>{const t=new r.k_({key:C,isInputRules:!0,state:{init:()=>null,apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,o,i)=>E(n,r,o,i,e,t),handleDOMEvents:{compositionend:n=>(setTimeout((()=>{const{$cursor:r}=n.state.selection;r&&E(n,r.pos,r.pos,"",e,t)})),!1)},handleKeyDown(n,r){if("Enter"!==r.key)return!1;const{$cursor:o}=n.state.selection;return!!o&&E(n,o.pos,o.pos,"\n",e,t)}}});return t};function M(e,t){return new o.fV(e,((e,n,r,o)=>{const{tr:i}=e,s=n.length;let a=r,l=o;if(n[s-1]){const c=n[0],u=n[s-1],d=n[s-2],p=r+c.indexOf(d),f=p+d.length-1,h=p+d.lastIndexOf(u),m=h+u.length,g=function(e,t,n){let r=[];return n.doc.nodesBetween(e,t,((e,t)=>{r=[...r,...e.marks.map((n=>({start:t,end:t+e.nodeSize,mark:n})))]})),r}(r,o,e).filter((e=>e.mark.type.excludes(t))).filter((e=>e.end>p));if(g.length)return null;m<f&&i.delete(m,f),h>p&&i.delete(p,h),a=p,l=a+u.length}return i.addMark(a,l,t.create()),i.removeStoredMark(t),i}))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const N=e=>Object.assign(Object.create(e),e).setTime(Date.now()),T=e=>(t,n)=>((e,t=!0)=>{const n=[];return e.descendants(((e,r)=>{if(n.push({node:e,pos:r}),!t)return!1})),n})(t,n).filter((t=>e(t.node))),I=e=>t=>(e=>t=>{for(let n=t.depth;n>0;n--){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}})(e)(t.$from),R=(e,t)=>{if(!(e instanceof r.nh))return;const{node:n,$from:o}=e;return((e,t)=>Array.isArray(e)&&e.includes(t.type)||t.type===e)(t,n)?{node:n,pos:o.pos,start:o.start(o.depth),depth:o.depth}:void 0}},4269:(e,t,n)=>{"use strict";n.d(t,{YR:()=>o});var r=n(6197);function o(e,t,n,o){let i,s,a;"function"==typeof t&&"function"!=typeof n?(s=void 0,a=t,i=n):(s=t,a=n,i=o),(0,r.VG)(e,s,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)}),i)}},4430:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{A:()=>r})},4445:(e,t,n)=>{"use strict";n.d(t,{$e:()=>i,Ay:()=>c});var r={},o=[];function i(e,t){}function s(e,t){}function a(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}function l(e,t){a(i,e,t)}l.preMessage=function(e){o.push(e)},l.resetWarned=function(){r={}},l.noteOnce=function(e,t){a(s,e,t)};const c=l},4511:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8769);function o(e,t,n){var o=r.useRef({});return"value"in o.current&&!n(o.current.condition,t)||(o.current.value=e(),o.current.condition=t),o.current.value}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1369);function o(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},4635:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2016);function o(e,t){(0,r.A)(e,t),t.add(e)}},4895:(e,t,n)=>{"use strict";n.d(t,{E:()=>s});var r=n(5119);function o(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=o(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const i=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r};function s(e){e.update(r.QM,(e=>{const t=e.attributes;return{...e,attributes:e=>{const n="function"==typeof t?t(e):t;return{...n,class:i("prose dark:prose-invert outline-none",(null==n?void 0:n.class)||"","milkdown-theme-nord")}}}}))}},4898:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.ForwardRef=u,t.isMemo=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case s:case i:case d:case p:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case h:case f:case a:return e;default:return t}}case r:return t}}}(e)===f}},4948:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(689),o=n(9449),i=n(4238),s=n(9348);function a(e){return void 0!==e}function l(e,t){var n=t||{},l=n.defaultValue,c=n.value,u=n.onChange,d=n.postState,p=(0,s.A)((function(){return a(c)?c:a(l)?"function"==typeof l?l():l:"function"==typeof e?e():e})),f=(0,r.A)(p,2),h=f[0],m=f[1],g=void 0!==c?c:h,y=d?d(g):g,v=(0,o.A)(u),b=(0,s.A)([g]),w=(0,r.A)(b,2),k=w[0],x=w[1];return(0,i.o)((function(){var e=k[0];h!==e&&v(h,e)}),[k]),(0,i.o)((function(){a(c)||m(c)}),[c]),[y,(0,o.A)((function(e,t){m(e,t),x([g],t)}))]}},5119:(e,t,n)=>{"use strict";n.d(t,{A2:()=>Zr,KE:()=>go,ge:()=>tr,x8:()=>pr,MD:()=>Jr,qf:()=>Yr,CI:()=>Nr,Sr:()=>Ir,kY:()=>zr,QM:()=>jr,f4:()=>or,aD:()=>lr,u7:()=>gr,pe:()=>ar,P_:()=>mr,bQ:()=>kr,TP:()=>ir,eM:()=>sr,P5:()=>ur,k:()=>Br,pZ:()=>hr});var r={};n.r(r),n.d(r,{attentionMarkers:()=>ze,contentInitial:()=>Re,disable:()=>$e,document:()=>Ie,flow:()=>Pe,flowInitial:()=>De,insideSpan:()=>_e,string:()=>Fe,text:()=>Le});var o=n(7488),i=n(6090);const s={};function a(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return l(e.children,t,n)}return Array.isArray(e)?l(e,t,n):""}function l(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=a(e[o],t,n);return r.join("")}function c(e,t,n,r){const o=e.length;let i,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<r.length;)i=r.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function u(e,t){return e.length>0?(c(e,e.length,0,t),e):t}function d(e){const t={};let n,r,o,i,s,a,l,u=-1;for(;++u<e.length;){for(;u in t;)u=t[u];if(n=e[u],u&&"chunkFlow"===n[1].type&&"listItemPrefix"===e[u-1][1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,p(e,u)),u=t[u],l=!0);else if(n[1]._container){for(o=u,r=void 0;o--&&(i=e[o],"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type);)"enter"===i[0]&&(r&&(e[r][1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);r&&(n[1].end=Object.assign({},e[r][1].start),s=e.slice(r,u),s.unshift(n),c(e,r,u-r+1,s))}}return!l}function p(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const i=[],s=n._tokenizer||r.parser[n.contentType](n.start),a=s.events,l=[],u={};let d,p,f=-1,h=n,m=0,g=0;const y=[g];for(;h;){for(;e[++o][1]!==h;);i.push(o),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),p&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=n;++f<a.length;)"exit"===a[f][0]&&"enter"===a[f-1][0]&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(g=f+1,y.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):y.pop(),f=y.length;f--;){const t=a.slice(y[f],y[f+1]),n=i.pop();l.unshift([n,n+t.length-1]),c(e,n,2,t)}for(f=-1;++f<l.length;)u[m+l[f][0]]=m+l[f][1],m+=l[f][1]-l[f][0]-1;return u}const f={}.hasOwnProperty;function h(e,t){let n;for(n in t){const r=(f.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){f.call(r,i)||(r[i]=[]);const e=o[i];m(r[i],Array.isArray(e)?e:e?[e]:[])}}}function m(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);c(e,0,0,r)}const g=M(/[A-Za-z]/),y=M(/[\dA-Za-z]/),v=M(/[#-'*+\--9=?A-Z^-~]/);function b(e){return null!==e&&(e<32||127===e)}const w=M(/\d/),k=M(/[\dA-Fa-f]/),x=M(/[!-/:-@[-`{-~]/);function A(e){return null!==e&&e<-2}function S(e){return null!==e&&(e<0||32===e)}function E(e){return-2===e||-1===e||32===e}const C=M(/\p{P}|\p{S}/u),O=M(/\s/);function M(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function N(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return E(r)?(e.enter(n),s(r)):t(r)};function s(r){return E(r)&&i++<o?(e.consume(r),s):(e.exit(n),t(r))}}const T={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),N(e,t,"linePrefix");e.consume(n)}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):A(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}},I={tokenize:function(e){const t=this,n=[];let r,o,i,s=0;return a;function a(r){if(s<n.length){const o=n[s];return t.containerState=o[1],e.attempt(o[0].continuation,l,u)(r)}return u(r)}function l(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}v(s);let a=n;for(;a<t.events.length;)t.events[a][1].end=Object.assign({},o),a++;return c(t.events,i+1,0,t.events.slice(n)),t.events.length=a,u(e)}return a(e)}function u(o){if(s===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return m(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(R,d,p)(o)}function d(e){return r&&b(),v(s),f(e)}function p(e){return t.parser.lazy[t.now().line]=s!==n.length,i=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(R,h,m)(n)}function h(e){return s++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){return null===n?(r&&b(),v(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:r}),g(n))}function g(n){return null===n?(y(e.exit("chunkFlow"),!0),v(0),void e.consume(n)):A(n)?(e.consume(n),y(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(n),g)}function y(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,a,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){a=t.events[l][1].end;break}o=!0}for(v(s),e=n;e<t.events.length;)t.events[e][1].end=Object.assign({},a),e++;c(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function v(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},R={tokenize:function(e,t,n){return N(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},D={tokenize:function(e,t,n){return function(t){return E(t)?N(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||A(e)?t(e):n(e)}},partial:!0},P={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):A(t)?e.check(F,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return d(e),e}},F={tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N(e,o,"linePrefix")};function o(o){if(null===o||A(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}},partial:!0},L={tokenize:function(e){const t=this,n=e.attempt(D,(function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)}),e.attempt(this.parser.constructs.flowInitial,r,N(e,e.attempt(this.parser.constructs.flow,r,e.attempt(P,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},_={resolveAll:B()},z=j("string"),$=j("text");function j(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,s);return i;function i(e){return l(e)?o(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:B("text"===e?H:void 0)}}function B(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function H(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,s=o.length,a=-1,l=0;for(;s--;){const e=o[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)i=!0,l++;else if(-1!==e){s++;break}}if(l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+s,_bufferIndex:s?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},o.start),r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}function V(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}function U(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let s=[],a=[],l=!0;const d={consume:function(e){A(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,k()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),p.previous=e,l=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=g(),p.events.push(["enter",n,p]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=g(),p.events.push(["exit",t,p]),t},attempt:b((function(e,t){w(e,t.from)})),check:b(v),interrupt:b(v,{interrupt:!0})},p={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:m,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let s;if("string"==typeof i)s=i;else switch(i){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&o)continue;s=" ";break;default:s=String.fromCharCode(i)}o=-2===i,r.push(s)}return r.join("")}(m(e),t)},now:g,defineSkip:function(e){o[e.line]=e.column,k()},write:function(e){return s=u(s,e),function(){let e;for(;r._index<s.length;){const t=s[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)y(t.charCodeAt(r._bufferIndex));else y(t)}}(),null!==s[s.length-1]?[]:(w(t,0),p.events=V(i,p.events,p),p.events)}};let f,h=t.tokenize.call(p,d);return t.resolveAll&&i.push(t),p;function m(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let s;if(n===o)s=[e[n].slice(r,i)];else{if(s=e.slice(n,o),r>-1){const e=s[0];"string"==typeof e?s[0]=e.slice(r):s.shift()}i>0&&s.push(e[o].slice(0,i))}return s}(s,e)}function g(){const{line:e,column:t,offset:n,_index:o,_bufferIndex:i}=r;return{line:e,column:t,offset:n,_index:o,_bufferIndex:i}}function y(e){l=void 0,f=e,h=h(e)}function v(e,t){t.restore()}function b(e,t){return function(n,o,i){let s,c,u,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return s=e,c=0,0===e.length?i:m(e[c])}function m(e){return function(n){return f=function(){const e=g(),t=p.previous,n=p.currentConstruct,o=p.events.length,i=Array.from(a);return{restore:function(){r=e,p.previous=t,p.currentConstruct=n,p.events.length=o,a=i,k()},from:o}}(),u=e,e.partial||(p.currentConstruct=e),e.name&&p.parser.constructs.disable.null.includes(e.name)?v():e.tokenize.call(t?Object.assign(Object.create(p),t):p,d,y,v)(n)}}function y(t){return l=!0,e(u,f),o}function v(e){return l=!0,f.restore(),++c<s.length?m(s[c]):i}}}function w(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&c(p.events,t,p.events.length-t,e.resolve(p.events.slice(t),p)),e.resolveTo&&(p.events=e.resolveTo(p.events,p))}function k(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const W={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),s(i)):o>=3&&(null===i||A(i))?(e.exit("thematicBreak"),t(i)):n(i)}function s(t){return t===r?(e.consume(t),o++,s):(e.exit("thematicBreakSequence"),E(t)?N(e,i,"whitespace")(t):i(t))}}},K={name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,s=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:w(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(W,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return w(t)&&++s<10?(e.consume(t),a):(!r.interrupt||s<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(D,r.interrupt?n:c,e.attempt(q,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return E(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(D,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,N(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){return r.containerState.furtherBlankLines||!E(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(G,t,o)(n))}));function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,N(e,e.attempt(K,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)}},q={tokenize:function(e,t,n){const r=this;return N(e,(function(e){const o=r.events[r.events.length-1];return!E(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},G={tokenize:function(e,t,n){const r=this;return N(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0},Y={name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return E(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){const r=this;return function(t){return E(t)?N(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(Y,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function J(e,t,n,r,o,i,s,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d):null===t||32===t||41===t||b(t)?n(t):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||A(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(o){return u||null!==o&&41!==o&&!S(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||b(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function X(e,t,n,r,o,i){const s=this;let a,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!a||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):A(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||A(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!E(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Z(e,t,n,r,o,i){let s;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),s=40===t?41:t,a):n(t)};function a(n){return n===s?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===s?(e.exit(i),a(s)):null===t?n(t):A(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||A(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===s||92===t?(e.consume(t),c):c(t)}}function Q(e,t){let n;return function r(o){return A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):E(o)?N(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}function ee(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const te={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return X.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return S(t)?Q(e,a)(t):a(t)}function a(t){return J(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(ne,c,c)(t)}function c(t){return E(t)?N(e,u,"whitespace")(t):u(t)}function u(i){return null===i||A(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},ne={tokenize:function(e,t,n){return function(t){return S(t)?Q(e,r)(t):n(t)};function r(t){return Z(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return E(t)?N(e,i,"whitespace")(t):i(t)}function i(e){return null===e||A(e)?t(e):n(e)}},partial:!0},re={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),N(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?a(t):A(t)?e.attempt(oe,i,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||A(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}},oe={tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):A(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):N(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):A(e)?o(e):n(e)}},partial:!0},ie={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||S(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||A(n)?(e.exit("atxHeading"),t(n)):E(n)?N(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||S(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}},resolve:function(e,t){let n,r,o=e.length-2,i=3;return"whitespace"===e[i][1].type&&(i+=2),o-2>i&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},c(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}},se={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let o;return function(t){let s,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){s="paragraph"===r.events[a][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!s?n(t):(e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t))};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),E(t)?N(e,s,"lineSuffix")(t):s(t))}function s(r){return null===r||A(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const s={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",s,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[o][1].end)):e[n][1]=s,e.push(["exit",s,t]),e}},ae=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],le=["pre","script","style","textarea"],ce={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let o,i,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),o=3,r.interrupt?t:$):g(a)?(e.consume(a),s=String.fromCharCode(a),h):n(a)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,a=0,p):g(i)?(e.consume(i),o=4,r.interrupt?t:$):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:$):n(o)}function p(o){return o==="CDATA[".charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:I:p):n(o)}function f(t){return g(t)?(e.consume(t),s=String.fromCharCode(t),h):n(t)}function h(a){if(null===a||47===a||62===a||S(a)){const l=47===a,c=s.toLowerCase();return l||i||!le.includes(c)?ae.includes(s.toLowerCase())?(o=6,l?(e.consume(a),m):r.interrupt?t(a):I(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?v(a):b(a)):(o=1,r.interrupt?t(a):I(a))}return 45===a||y(a)?(e.consume(a),s+=String.fromCharCode(a),h):n(a)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:I):n(o)}function v(t){return E(t)?(e.consume(t),v):N(t)}function b(t){return 47===t?(e.consume(t),N):58===t||95===t||g(t)?(e.consume(t),w):E(t)?(e.consume(t),b):N(t)}function w(t){return 45===t||46===t||58===t||95===t||y(t)?(e.consume(t),w):k(t)}function k(t){return 61===t?(e.consume(t),x):E(t)?(e.consume(t),k):b(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,C):E(t)?(e.consume(t),x):O(t)}function C(t){return t===l?(e.consume(t),l=null,M):null===t||A(t)?n(t):(e.consume(t),C)}function O(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||S(t)?k(t):(e.consume(t),O)}function M(e){return 47===e||62===e||E(e)?b(e):n(e)}function N(t){return 62===t?(e.consume(t),T):n(t)}function T(t){return null===t||A(t)?I(t):E(t)?(e.consume(t),T):n(t)}function I(t){return 45===t&&2===o?(e.consume(t),F):60===t&&1===o?(e.consume(t),L):62===t&&4===o?(e.consume(t),j):63===t&&3===o?(e.consume(t),$):93===t&&5===o?(e.consume(t),z):!A(t)||6!==o&&7!==o?null===t||A(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),I):(e.exit("htmlFlowData"),e.check(ue,B,R)(t))}function R(t){return e.check(de,D,B)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||A(t)?R(t):(e.enter("htmlFlowData"),I(t))}function F(t){return 45===t?(e.consume(t),$):I(t)}function L(t){return 47===t?(e.consume(t),s="",_):I(t)}function _(t){if(62===t){const n=s.toLowerCase();return le.includes(n)?(e.consume(t),j):I(t)}return g(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),_):I(t)}function z(t){return 93===t?(e.consume(t),$):I(t)}function $(t){return 62===t?(e.consume(t),j):45===t&&2===o?(e.consume(t),$):I(t)}function j(t){return null===t||A(t)?(e.exit("htmlFlowData"),B(t)):(e.consume(t),j)}function B(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},ue={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(D,t,n)}},partial:!0},de={tokenize:function(e,t,n){const r=this;return function(t){return A(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},pe={tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},fe={name:"codeFenced",tokenize:function(e,t,n){const r=this,o={tokenize:function(e,t,n){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s};function s(t){return e.enter("codeFencedFence"),E(t)?N(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),E(t)?N(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||A(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let i,s=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(a++,e.consume(t),l):a<3?n(t):(e.exit("codeFencedFenceSequence"),E(t)?N(e,c,"whitespace")(t):c(t))}function c(n){return null===n||A(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(pe,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||A(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):E(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),N(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||A(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||A(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return s>0&&E(t)?N(e,g,"linePrefix",s+1)(t):g(t)}function g(t){return null===t||A(t)?e.check(pe,f,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||A(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}},concrete:!0};var he=n(1157);const me={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=y,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=k,c):(e.enter("characterReferenceValue"),o=7,i=w,c(t))}function c(a){if(59===a&&s){const o=e.exit("characterReferenceValue");return i!==y||(0,he.s)(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&s++<o?(e.consume(a),c):n(a)}}},ge={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return x(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},ye={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),N(e,t,"linePrefix")}}},ve={name:"labelEnd",tokenize:function(e,t,n){const r=this;let o,i,s=r.events.length;for(;s--;)if(("labelImage"===r.events[s][1].type||"labelLink"===r.events[s][1].type)&&!r.events[s][1]._balanced){o=r.events[s][1];break}return function(t){return o?o._inactive?u(t):(i=r.parser.defined.includes(ee(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(be,c,i?c:u)(t):91===t?e.attempt(we,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(ke,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,o,i,s=e.length,a=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=s);const l={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},d={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[o][1].end)},p={type:"labelText",start:Object.assign({},e[r+a+2][1].end),end:Object.assign({},e[o-2][1].start)};return i=[["enter",l,t],["enter",d,t]],i=u(i,e.slice(r+1,r+a+3)),i=u(i,[["enter",p,t]]),i=u(i,V(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=u(i,[["exit",p,t],e[o-2],e[o-1],["exit",d,t]]),i=u(i,e.slice(o+1)),i=u(i,[["exit",l,t]]),c(e,r,e.length,i),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const n=e[t][1];"labelImage"!==n.type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},be={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return S(t)?Q(e,o)(t):o(t)}function o(t){return 41===t?c(t):J(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return S(t)?Q(e,a)(t):c(t)}function s(e){return n(e)}function a(t){return 34===t||39===t||40===t?Z(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return S(t)?Q(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},we={tokenize:function(e,t,n){const r=this;return function(t){return X.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},ke={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},xe={name:"labelStartImage",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:ve.resolveAll};function Ae(e){return null===e||S(e)||O(e)?1:C(e)?2:void 0}const Se={name:"attention",tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ae(r);let i;return function(t){return i=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===i)return e.consume(a),s;const l=e.exit("attentionSequence"),c=Ae(a),u=!c||2===c&&o||n.includes(a),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(a)}},resolveAll:function(e,t){let n,r,o,i,s,a,l,d,p=-1;for(;++p<e.length;)if("enter"===e[p][0]&&"attentionSequence"===e[p][1].type&&e[p][1]._close)for(n=p;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[p][1]).charCodeAt(0)){if((e[n][1]._close||e[p][1]._open)&&(e[p][1].end.offset-e[p][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[p][1].end.offset-e[p][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[p][1].end.offset-e[p][1].start.offset>1?2:1;const f=Object.assign({},e[n][1].end),h=Object.assign({},e[p][1].start);Ee(f,-a),Ee(h,a),i={type:a>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[n][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[p][1].start),end:h},o={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[p][1].start)},r={type:a>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},i.start),e[p][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=u(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=u(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=u(l,V(t.parser.constructs.insideSpan.null,e.slice(n+1,p),t)),l=u(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[p][1].end.offset-e[p][1].start.offset?(d=2,l=u(l,[["enter",e[p][1],t],["exit",e[p][1],t]])):d=0,c(e,n-1,p-n+3,l),p=n+l.length-d-2;break}for(p=-1;++p<e.length;)"attentionSequence"===e[p][1].type&&(e[p][1].type="data");return e}};function Ee(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ce={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return g(t)?(e.consume(t),i):l(t)}function i(e){return 43===e||45===e||46===e||y(e)?(r=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||y(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||b(r)?n(r):(e.consume(r),a)}function l(t){return 64===t?(e.consume(t),c):v(t)?(e.consume(t),l):n(t)}function c(e){return y(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||y(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},Oe={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),w):g(t)?(e.consume(t),M):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):g(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):A(t)?(s=u,z(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?_(e):45===e?d(e):u(e)}function f(t){return t==="CDATA[".charCodeAt(i++)?(e.consume(t),6===i?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):A(t)?(s=h,z(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),v):h(t)}function v(t){return 62===t?_(t):93===t?(e.consume(t),v):h(t)}function b(t){return null===t||62===t?_(t):A(t)?(s=b,z(t)):(e.consume(t),b)}function w(t){return null===t?n(t):63===t?(e.consume(t),k):A(t)?(s=w,z(t)):(e.consume(t),w)}function k(e){return 62===e?_(e):w(e)}function x(t){return g(t)?(e.consume(t),C):n(t)}function C(t){return 45===t||y(t)?(e.consume(t),C):O(t)}function O(t){return A(t)?(s=O,z(t)):E(t)?(e.consume(t),O):_(t)}function M(t){return 45===t||y(t)?(e.consume(t),M):47===t||62===t||S(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),_):58===t||95===t||g(t)?(e.consume(t),I):A(t)?(s=T,z(t)):E(t)?(e.consume(t),T):_(t)}function I(t){return 45===t||46===t||58===t||95===t||y(t)?(e.consume(t),I):R(t)}function R(t){return 61===t?(e.consume(t),D):A(t)?(s=R,z(t)):E(t)?(e.consume(t),R):T(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,P):A(t)?(s=D,z(t)):E(t)?(e.consume(t),D):(e.consume(t),F)}function P(t){return t===o?(e.consume(t),o=void 0,L):null===t?n(t):A(t)?(s=P,z(t)):(e.consume(t),P)}function F(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||S(t)?T(t):(e.consume(t),F)}function L(e){return 47===e||62===e||S(e)?T(e):n(e)}function _(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function z(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$}function $(t){return E(t)?N(e,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):j(t)}function j(t){return e.enter("htmlTextData"),s(t)}}},Me={name:"labelStartLink",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:ve.resolveAll},Ne={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return A(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},Te={name:"codeText",tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),i++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):A(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||A(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}},Ie={42:K,43:K,45:K,48:K,49:K,50:K,51:K,52:K,53:K,54:K,55:K,56:K,57:K,62:Y},Re={91:te},De={[-2]:re,[-1]:re,32:re},Pe={35:ie,42:W,45:[se,W],60:ce,61:se,95:W,96:fe,126:fe},Fe={38:me,92:ge},Le={[-5]:ye,[-4]:ye,[-3]:ye,33:xe,38:me,42:Se,60:[Ce,Oe],91:Me,92:[Ne,ge],93:ve,95:Se,96:Te},_e={null:[Se,_]},ze={null:[42,95]},$e={null:[]};const je=/[\0\t\n\r]/g;function Be(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}const He=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ve(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Be(n.slice(t?2:1),t?16:10)}return(0,he.s)(n)||e}function Ue(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function We(e){return e&&"object"==typeof e?"position"in e||"type"in e?qe(e.position):"start"in e||"end"in e?qe(e):"line"in e||"column"in e?Ke(e):"":""}function Ke(e){return Ge(e&&e.line)+":"+Ge(e&&e.column)}function qe(e){return Ke(e&&e.start)+"-"+Ke(e&&e.end)}function Ge(e){return e&&"number"==typeof e?e:1}const Ye={}.hasOwnProperty;function Je(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(w),autolinkProtocol:p,autolinkEmail:p,atxHeading:o(y),blockQuote:o((function(){return{type:"blockquote",children:[]}})),characterEscape:p,characterReference:p,codeFenced:o(g),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(g,i),codeText:o((function(){return{type:"inlineCode",value:""}}),i),codeTextData:p,data:p,codeFlowValue:p,definition:o((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:o(v),hardBreakTrailing:o(v),htmlFlow:o(b,i),htmlFlowData:p,htmlText:o(b,i),htmlTextData:p,image:o((function(){return{type:"image",title:null,url:"",alt:null}})),label:i,link:o(w),listItem:o((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:o(k,(function(){this.data.expectingFirstListItemValue=!0})),listUnordered:o(k),paragraph:o((function(){return{type:"paragraph",children:[]}})),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(y),strong:o((function(){return{type:"strong",children:[]}})),thematicBreak:o((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:c(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:c(),autolinkEmail:function(e){f.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){f.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:c(),characterEscapeValue:f,characterReferenceMarkerHexadecimal:m,characterReferenceMarkerNumeric:m,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=Be(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=(0,he.s)(t);const o=this.stack.pop();o.value+=r,o.position.end=Xe(e.end)},codeFenced:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0})),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:f,codeIndented:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")})),codeText:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:f,data:f,definition:c(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:c(),hardBreakEscape:c(h),hardBreakTrailing:c(h),htmlFlow:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:f,htmlText:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:f,image:c((function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0})),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(He,Ve)}(t),n.identifier=Ue(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=Xe(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(p.call(this,e),f.call(this,e))},link:c((function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0})),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:c((function(){this.data.setextHeadingSlurpLineEnding=void 0})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:c(),thematicBreak:c()}};Ze(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let o={type:"root",children:[]};const s={stack:[o],tokenStack:[],config:t,enter:l,exit:u,buffer:i,resume:d,data:n},a=[];let c=-1;for(;++c<e.length;)"listOrdered"!==e[c][1].type&&"listUnordered"!==e[c][1].type||("enter"===e[c][0]?a.push(c):c=r(e,a.pop(),c));for(c=-1;++c<e.length;){const n=t[e[c][0]];Ye.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},s),e[c][1])}if(s.tokenStack.length>0){const e=s.tokenStack[s.tokenStack.length-1];(e[1]||et).call(s,void 0,e[0])}for(o.position={start:Xe(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Xe(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)o=t.transforms[c](o)||o;return o};function r(e,t,n){let r,o,i,s,a=t-1,l=-1,c=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||s||l||i||(i=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let s=a;for(o=void 0;s--;){const t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,i=void 0,s=!0}}}return e[t][1]._spread=c,n}function o(e,t){return function(n){l.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:Xe(t.start),end:void 0}}function c(e){return function(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+We({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||et).call(this,e,r[0])),n.position.end=Xe(e.end)}function d(){return function(e){return a(e,"boolean"!=typeof s.includeImageAlt||s.includeImageAlt,"boolean"!=typeof s.includeHtml||s.includeHtml)}(this.stack.pop())}function p(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:""},n.position={start:Xe(e.start),end:void 0},t.push(n)),this.stack.push(n)}function f(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Xe(e.end)}function h(){this.data.atHardBreak=!0}function m(e){this.data.characterReferenceType=e.type}function g(){return{type:"code",lang:null,meta:null,value:""}}function y(){return{type:"heading",depth:0,children:[]}}function v(){return{type:"break"}}function b(){return{type:"html",value:""}}function w(){return{type:"link",title:null,url:"",children:[]}}function k(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!d(e););return e}(function(e){const t=function(e){const t={};let n=-1;for(;++n<e.length;)h(t,e[n]);return t}([r,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:t,content:o(T),document:o(I),flow:o(L),string:o(z),text:o($)};return n;function o(e){return function(t){return U(n,e,t)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,s){const a=[];let l,c,u,d,p;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(je.lastIndex=u,l=je.exec(o),d=l&&void 0!==l.index?l.index:o.length,p=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===p&&u===d&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),u<d&&(a.push(o.slice(u,d)),t+=d-u),p){case 0:a.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),a.push(-2);t++<c;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return s&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function Xe(e){return{line:e.line,column:e.column,offset:e.offset}}function Ze(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ze(e,r):Qe(e,r)}}function Qe(e,t){let n;for(n in t)if(Ye.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function et(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+We({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+We({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+We({start:t.start,end:t.end})+") is still open")}function tt(e){const t=this;t.parser=function(n){return Je(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const nt={}.hasOwnProperty,rt={}.hasOwnProperty;function ot(e,t){let n,r=-1;if(t.extensions)for(;++r<t.extensions.length;)ot(e,t.extensions[r]);for(n in t)if(rt.call(t,n))switch(n){case"extensions":break;case"unsafe":case"join":o=e[n],(i=t[n])&&o.push(...i);break;case"handlers":it(e[n],t[n]);break;default:e.options[n]=t[n]}var o,i;return e}function it(e,t){t&&Object.assign(e,t)}var st=n(6313),at=n(8468),lt=n(1697);const ct=[function(e,t,n,r){if("code"===t.type&&(0,at.m)(t,r)&&("list"===e.type||e.type===t.type&&(0,at.m)(e,r)))return!1;if("spread"in n&&"boolean"==typeof n.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&(0,lt.f)(t,r)))return;return n.spread?1:0}}],ut=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],dt=[{character:"\t",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:ut},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:ut},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ \t\r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:ut},{atBreak:!0,character:"+",after:"(?:[ \t\r\n])"},{atBreak:!0,character:"-",after:"(?:[ \t\r\n-])"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:ut},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:ut},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:ut},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:ut},{atBreak:!0,character:"~"}],pt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ft(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return function(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}(n.slice(t?2:1),t?16:10)}return(0,he.s)(n)||e}function ht(e){return e.label||!e.identifier?e.label||"":e.identifier.replace(pt,ft)}function mt(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function gt(e,t,n,r){let o=r.join.length;for(;o--;){const i=r.join[o](e,t,n,r);if(!0===i||1===i)break;if("number"==typeof i)return"\n".repeat(1+i);if(!1===i)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const yt=/\r?\n|\r/g;function vt(e,t){const n=[];let r,o=0,i=0;for(;r=yt.exec(e);)s(e.slice(o,r.index)),n.push(r[0]),o=r.index+r[0].length,i++;return s(e.slice(o)),n.join("");function s(e){n.push(t(e,i,!e))}}var bt=n(3219);function wt(e,t){return e-t}function kt(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],o=[],i=e+t;let s,a=-1,l=0;for(;s=n.exec(i);)r.push(s.index);for(;++a<r.length;)l!==r[a]&&o.push(e.slice(l,r[a])),o.push("\\"),l=r[a];return o.push(e.slice(l)),o.join("")}function xt(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,o=n.line||1,i=n.column||1;return{move:function(e){const t=e||"",n=t.split(/\r?\n|\r/g),s=n[n.length-1];return o+=n.length-1,i=1===n.length?i+s.length:1+s.length+r,t},current:function(){return{now:{line:o,column:i},lineShift:r}},shift:function(e){r+=e}}}function At(e,t={}){const n={enter:function(e){return n.stack.push(e),function(){n.stack.pop()}},indentLines:vt,associationId:ht,containerPhrasing:Ot,containerFlow:Mt,createTracker:xt,compilePattern:mt,safe:Nt,stack:[],unsafe:[...dt],join:[...ct],handlers:{...st.p},options:{},indexStack:[],handle:void 0};ot(n,t),n.options.tightDefinitions&&n.join.push(Ct),n.handle=function(e,t){const n=t||{};function r(t,...n){let o=r.invalid;const i=r.handlers;if(t&&nt.call(t,e)){const n=String(t[e]);o=nt.call(i,n)?i[n]:r.unknown}if(o)return o.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}("type",{invalid:St,unknown:Et,handlers:n.handlers});let r=n.handle(e,void 0,n,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0});return r&&10!==r.charCodeAt(r.length-1)&&13!==r.charCodeAt(r.length-1)&&(r+="\n"),r}function St(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Et(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function Ct(e,t){if("definition"===e.type&&e.type===t.type)return 0}function Ot(e,t){return function(e,t,n){const r=t.indexStack,o=e.children||[],i=[];let s=-1,a=n.before;r.push(-1);let l=t.createTracker(n);for(;++s<o.length;){const c=o[s];let u;if(r[r.length-1]=s,s+1<o.length){let n=t.handle.handlers[o[s+1].type];n&&n.peek&&(n=n.peek),u=n?n(o[s+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else u=n.after;i.length>0&&("\r"===a||"\n"===a)&&"html"===c.type&&(i[i.length-1]=i[i.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(i.join(""))),i.push(l.move(t.handle(c,e,t,{...l.current(),before:a,after:u}))),a=i[i.length-1].slice(-1)}return r.pop(),i.join("")}(e,this,t)}function Mt(e,t){return function(e,t,n){const r=t.indexStack,o=e.children||[],i=t.createTracker(n),s=[];let a=-1;for(r.push(-1);++a<o.length;){const n=o[a];r[r.length-1]=a,s.push(i.move(t.handle(n,e,t,{before:"\n",after:"\n",...i.current()}))),"list"!==n.type&&(t.bulletLastUsed=void 0),a<o.length-1&&s.push(i.move(gt(n,o[a+1],e,t)))}return r.pop(),s.join("")}(e,this,t)}function Nt(e,t){return function(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),o=[],i=[],s={};let a=-1;for(;++a<e.unsafe.length;){const t=e.unsafe[a];if(!(0,bt.q)(e.stack,t))continue;const n=e.compilePattern(t);let i;for(;i=n.exec(r);){const e="before"in t||Boolean(t.atBreak),n="after"in t,r=i.index+(e?i[1].length:0);o.includes(r)?(s[r].before&&!e&&(s[r].before=!1),s[r].after&&!n&&(s[r].after=!1)):(o.push(r),s[r]={before:e,after:n})}}o.sort(wt);let l=n.before?n.before.length:0;const c=r.length-(n.after?n.after.length:0);for(a=-1;++a<o.length;){const e=o[a];e<l||e>=c||e+1<c&&o[a+1]===e+1&&s[e].after&&!s[e+1].before&&!s[e+1].after||o[a-1]===e-1&&s[e].before&&!s[e-1].before&&!s[e-1].after||(l!==e&&i.push(kt(r.slice(l,e),"\\")),l=e,!/[!-/:-@[-`{-~]/.test(r.charAt(e))||n.encode&&n.encode.includes(r.charAt(e))?(i.push("&#x"+r.charCodeAt(e).toString(16).toUpperCase()+";"),l++):i.push("\\"))}return i.push(kt(r.slice(l,c),n.after)),i.join("")}(this,e,t)}function Tt(e){const t=this;t.compiler=function(n){return At(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function It(e){if(e)throw e}var Rt=n(9710),Dt=n(9820);function Pt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}class Ft extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=s?s.line:void 0,this.name=We(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ft.prototype.file="",Ft.prototype.name="",Ft.prototype.reason="",Ft.prototype.message="",Ft.prototype.stack="",Ft.prototype.column=void 0,Ft.prototype.line=void 0,Ft.prototype.ancestors=void 0,Ft.prototype.cause=void 0,Ft.prototype.fatal=void 0,Ft.prototype.place=void 0,Ft.prototype.ruleId=void 0,Ft.prototype.source=void 0;const Lt=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Bt(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else s<0&&(n=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=s));return r===o?o=s:o<0&&(o=e.length),e.slice(r,o)},_t=function(e){if(Bt(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},zt=function(e){Bt(e);let t,n=e.length,r=-1,o=0,i=-1,s=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==s&&(s=1):i>-1&&(s=-1);else if(t){o=n+1;break}}return i<0||r<0||0===s||1===s&&i===r-1&&i===o+1?"":e.slice(i,r)},$t=function(...e){let t,n=-1;for(;++n<e.length;)Bt(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Bt(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),s=l,a=0;continue}}else if(o.length>0){o="",i=0,s=l,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(s+1,l):o=e.slice(s+1,l),i=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},jt="/";function Bt(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ht=function(){return"/"};function Vt(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}const Ut=["history","path","basename","stem","extname","dirname"];class Wt{constructor(e){let t;t=e?Vt(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd=Ht(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Ut.length;){const e=Ut[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Ut.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Lt(this.path):void 0}set basename(e){qt(e,"basename"),Kt(e,"basename"),this.path=$t(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?_t(this.path):void 0}set dirname(e){Gt(this.basename,"dirname"),this.path=$t(e||"",this.basename)}get extname(){return"string"==typeof this.path?zt(this.path):void 0}set extname(e){if(Kt(e,"extname"),Gt(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=$t(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Vt(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!Vt(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),qt(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Lt(this.path,this.extname):void 0}set stem(e){qt(e,"stem"),Kt(e,"stem"),this.path=$t(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Ft(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Kt(e,t){if(e&&e.includes(jt))throw new Error("`"+t+"` cannot be a path: did not expect `"+jt+"`")}function qt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Gt(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Yt=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};Object.setPrototypeOf(r,t);const o=Object.getOwnPropertyNames(n);for(const e of o){const t=Object.getOwnPropertyDescriptor(n,e);t&&Object.defineProperty(r,e,t)}return r},Jt={}.hasOwnProperty;class Xt extends Yt{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...s){const a=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==s[l]&&void 0!==s[l]||(s[l]=t[l]);t=s,a?function(e,t){let n;return function(...t){const i=e.length>t.length;let s;i&&t.push(r);try{s=e.apply(this,t)}catch(e){if(i&&n)throw e;return r(e)}i||(s instanceof Promise?s.then(o,r):s instanceof Error?r(s):o(s))};function r(e,...r){n||(n=!0,t(e,...r))}function o(e){r(null,e)}}(a,o)(...s):r(null,...s)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const e=new Xt;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Rt(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(tn("data",this.frozen),this.namespace[e]=t,this):Jt.call(this.namespace,e)&&this.namespace[e]||void 0:e?(tn("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=on(e),n=this.parser||this.Parser;return Qt("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Qt("process",this.parser||this.Parser),en("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=on(e),s=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):((0,Dt.ok)(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(s,i,(function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var s;"string"==typeof(s=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(s)?r.value=i:r.result=i,a(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),Qt("processSync",this.parser||this.Parser),en("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,It(e),t=r})),rn("processSync","process",n),(0,Dt.ok)(t,"we either bailed on an error or have a tree"),t}run(e,t,n){nn(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){(0,Dt.ok)("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");const s=on(t);r.run(e,s,(function(t,r,s){const a=r||e;t?i(t):o?o(a):((0,Dt.ok)(n,"`done` is defined if `resolve` is not"),n(void 0,a,s))}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){It(e),n=t,r=!0})),rn("runSync","run",r),(0,Dt.ok)(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();const n=on(t),r=this.compiler||this.Compiler;return en("stringify",r),nn(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(tn("use",this.frozen),null==e);else if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?s(e):i(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(r.settings=Rt(!0,r.settings,e.settings))}function s(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)o(e[t])}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const s=n[o][1];Pt(s)&&Pt(r)&&(r=Rt(!0,s,r)),n[o]=[e,r,...i]}}}}const Zt=(new Xt).freeze();function Qt(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function en(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function tn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nn(e){if(!Pt(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function rn(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function on(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Wt(e)}var sn,an,ln,cn,un,dn,pn,fn=n(7043),hn=n(1440),mn=Object.defineProperty,gn=(e,t,n)=>(((e,t,n)=>{t in e?mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),yn=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},vn=(e,t,n)=>(yn(e,t,"read from private field"),n?n.call(e):t.get(e)),bn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},wn=(e,t,n,r)=>(yn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class kn{}class xn{constructor(){gn(this,"elements",[]),gn(this,"size",(()=>this.elements.length)),gn(this,"top",(()=>this.elements.at(-1))),gn(this,"push",(e=>{var t;null==(t=this.top())||t.push(e)})),gn(this,"open",(e=>{this.elements.push(e)})),gn(this,"close",(()=>{const e=this.elements.pop();if(!e)throw(0,hn.TR)();return e}))}}class An extends kn{constructor(e,t,n){super(),this.type=e,this.content=t,this.attrs=n}push(e,...t){this.content.push(e,...t)}pop(){return this.content.pop()}static create(e,t,n){return new An(e,t,n)}}const Sn=class extends xn{constructor(e){super(),gn(this,"schema"),bn(this,sn,i.CU.none),bn(this,an,(e=>e.isText)),bn(this,ln,((e,t)=>{if(vn(this,an).call(this,e)&&vn(this,an).call(this,t)&&i.CU.sameSet(e.marks,t.marks))return this.schema.text(e.text+t.text,e.marks)})),bn(this,cn,(e=>{const t=Object.values({...this.schema.nodes,...this.schema.marks}).find((t=>t.spec.parseMarkdown.match(e)));if(!t)throw(0,hn.Xm)(e);return t})),bn(this,un,(e=>{const t=vn(this,cn).call(this,e);t.spec.parseMarkdown.runner(this,e,t)})),gn(this,"injectRoot",((e,t,n)=>(this.openNode(t,n),this.next(e.children),this))),gn(this,"openNode",((e,t)=>(this.open(An.create(e,[],t)),this))),bn(this,dn,(()=>{wn(this,sn,i.CU.none);const e=this.close();return vn(this,pn).call(this,e.type,e.attrs,e.content)})),gn(this,"closeNode",(()=>(vn(this,dn).call(this),this))),bn(this,pn,((e,t,n)=>{const r=e.createAndFill(t,n,vn(this,sn));if(!r)throw(0,hn.$D)(e,t,n);return this.push(r),r})),gn(this,"addNode",((e,t,n)=>(vn(this,pn).call(this,e,t,n),this))),gn(this,"openMark",((e,t)=>{const n=e.create(t);return wn(this,sn,n.addToSet(vn(this,sn))),this})),gn(this,"closeMark",(e=>(wn(this,sn,e.removeFromSet(vn(this,sn))),this))),gn(this,"addText",(e=>{const t=this.top();if(!t)throw(0,hn.TR)();const n=t.pop(),r=this.schema.text(e,vn(this,sn));if(!n)return t.push(r),this;const o=vn(this,ln).call(this,n,r);return o?(t.push(o),this):(t.push(n,r),this)})),gn(this,"build",(()=>{let e;do{e=vn(this,dn).call(this)}while(this.size());return e})),gn(this,"next",((e=[])=>([e].flat().forEach((e=>vn(this,un).call(this,e))),this))),gn(this,"toDoc",(()=>this.build())),gn(this,"run",((e,t)=>{const n=e.runSync(e.parse(t),t);return this.next(n),this})),this.schema=e}};let En=Sn;sn=new WeakMap,an=new WeakMap,ln=new WeakMap,cn=new WeakMap,un=new WeakMap,dn=new WeakMap,pn=new WeakMap,gn(En,"create",((e,t)=>{const n=new Sn(e);return e=>(n.run(t,e),n.toDoc())}));const Cn=class extends kn{constructor(e,t,n,r={}){super(),gn(this,"push",((e,...t)=>{this.children||(this.children=[]),this.children.push(e,...t)})),gn(this,"pop",(()=>{var e;return null==(e=this.children)?void 0:e.pop()})),this.type=e,this.children=t,this.value=n,this.props=r}};let On=Cn;var Mn,Nn,Tn,In,Rn,Dn,Pn,Fn,Ln,_n,zn,$n;gn(On,"create",((e,t,n,r={})=>new Cn(e,t,n,r)));const jn=class extends xn{constructor(e){super(),bn(this,Mn,i.CU.none),gn(this,"schema"),bn(this,Nn,(e=>{const t=Object.values({...this.schema.nodes,...this.schema.marks}).find((t=>t.spec.toMarkdown.match(e)));if(!t)throw(0,hn._K)(e.type);return t})),bn(this,Tn,(e=>vn(this,Nn).call(this,e).spec.toMarkdown.runner(this,e))),bn(this,In,((e,t)=>vn(this,Nn).call(this,e).spec.toMarkdown.runner(this,e,t))),bn(this,Rn,(e=>{const{marks:t}=e,n=e=>e.type.spec.priority??50;[...t].sort(((e,t)=>n(e)-n(t))).every((t=>!vn(this,In).call(this,t,e)))&&vn(this,Tn).call(this,e),t.forEach((e=>vn(this,$n).call(this,e)))})),bn(this,Dn,((e,t)=>{var n;if(e.type===t||1!==(null==(n=e.children)?void 0:n.length))return e;const r=e=>{var n;if(e.type===t)return e;if(1!==(null==(n=e.children)?void 0:n.length))return null;const[o]=e.children;return o?r(o):null},o=r(e);if(!o)return e;const i=o.children?[...o.children]:void 0,s={...e,children:i};return s.children=i,o.children=[s],o})),bn(this,Pn,(e=>{const{children:t}=e;return t&&(e.children=t.reduce(((e,t,n)=>{if(0===n)return[t];const r=e.at(-1);if(r&&r.isMark&&t.isMark){t=vn(this,Dn).call(this,t,r.type);const{children:n,...o}=t,{children:i,...s}=r;if(t.type===r.type&&n&&i&&JSON.stringify(o)===JSON.stringify(s)){const t={...s,children:[...i,...n]};return e.slice(0,-1).concat(vn(this,Pn).call(this,t))}}return e.concat(t)}),[])),e})),bn(this,Fn,(e=>{const t={...e.props,type:e.type};return e.children&&(t.children=e.children),e.value&&(t.value=e.value),t})),gn(this,"openNode",((e,t,n)=>(this.open(On.create(e,void 0,t,n)),this))),bn(this,Ln,(()=>{const e=this.close();return vn(this,_n).call(this,e.type,e.children,e.value,e.props)})),gn(this,"closeNode",(()=>(vn(this,Ln).call(this),this))),bn(this,_n,((e,t,n,r)=>{const o=On.create(e,t,n,r),i=vn(this,Pn).call(this,vn(this,Fn).call(this,o));return this.push(i),i})),gn(this,"addNode",((e,t,n,r)=>(vn(this,_n).call(this,e,t,n,r),this))),bn(this,zn,((e,t,n,r)=>e.isInSet(vn(this,Mn))?this:(wn(this,Mn,e.addToSet(vn(this,Mn))),this.openNode(t,n,{...r,isMark:!0})))),bn(this,$n,(e=>{!e.isInSet(vn(this,Mn))||(wn(this,Mn,e.type.removeFromSet(vn(this,Mn))),vn(this,Ln).call(this))})),gn(this,"withMark",((e,t,n,r)=>(vn(this,zn).call(this,e,t,n,r),this))),gn(this,"closeMark",(e=>(vn(this,$n).call(this,e),this))),gn(this,"build",(()=>{let e=null;do{e=vn(this,Ln).call(this)}while(this.size());return e})),gn(this,"next",(e=>{return t=e,Object.prototype.hasOwnProperty.call(t,"size")?(e.forEach((e=>{vn(this,Rn).call(this,e)})),this):(vn(this,Rn).call(this,e),this);var t})),gn(this,"toString",(e=>e.stringify(this.build()))),gn(this,"run",(e=>(this.next(e),this))),this.schema=e}};let Bn=jn;Mn=new WeakMap,Nn=new WeakMap,Tn=new WeakMap,In=new WeakMap,Rn=new WeakMap,Dn=new WeakMap,Pn=new WeakMap,Fn=new WeakMap,Ln=new WeakMap,_n=new WeakMap,zn=new WeakMap,$n=new WeakMap,gn(Bn,"create",((e,t)=>{const n=new jn(e);return e=>(n.run(e),n.toString(t))}));var Hn=n(1570),Vn=n(3686),Un=n(4254),Wn=n(5715),Kn=n(96),qn=n(5939),Gn=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Yn=(e,t,n)=>(Gn(e,t,"read from private field"),n?n.call(e):t.get(e)),Jn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Xn=(e,t,n,r)=>(Gn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function Zn(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}const Qn={strong:(e,t,n,r)=>{const o=e.marker||n.options.strong||"*",i=n.enter("strong"),s=n.createTracker(r);let a=s.move(o+o);return a+=s.move(n.containerPhrasing(e,{before:a,after:o,...s.current()})),a+=s.move(o+o),i(),a},emphasis:(e,t,n,r)=>{const o=e.marker||n.options.emphasis||"*",i=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(o);return a+=s.move(n.containerPhrasing(e,{before:a,after:o,...s.current()})),a+=s.move(o),i(),a}},er=(0,o.CR)("ConfigReady"),tr=(0,o.CR)("InitReady"),nr=(0,o.Z0)([],"initTimer"),rr=(0,o.Z0)({},"editor"),or=(0,o.Z0)([],"inputRules"),ir=(0,o.Z0)([],"prosePlugins"),sr=(0,o.Z0)([],"remarkPlugins"),ar=(0,o.Z0)([],"nodeView"),lr=(0,o.Z0)([],"markView"),cr=(0,o.Z0)(Zt().use(tt).use(Tt),"remark"),ur=(0,o.Z0)({handlers:Qn},"remarkStringifyOptions");function dr(e){const t=t=>(t.inject(rr,e).inject(ir,[]).inject(sr,[]).inject(or,[]).inject(ar,[]).inject(lr,[]).inject(ur,{handlers:Qn}).inject(cr,Zt().use(tt).use(Tt)).inject(nr,[er]).record(tr),async()=>{await t.waitTimers(nr);const e=t.get(ur);return t.set(cr,Zt().use(tt).use(Tt,e)),t.done(tr),()=>{t.remove(rr).remove(ir).remove(sr).remove(or).remove(ar).remove(lr).remove(ur).remove(cr).remove(nr).clearTimer(tr)}});return Zn(t,{displayName:"Init"}),t}const pr=(0,o.CR)("SchemaReady"),fr=(0,o.Z0)([],"schemaTimer"),hr=(0,o.Z0)({},"schema"),mr=(0,o.Z0)([],"nodes"),gr=(0,o.Z0)([],"marks");function yr(e){var t;return{...e,parseDOM:null==(t=e.parseDOM)?void 0:t.map((t=>({priority:e.priority,...t})))}}const vr=e=>(e.inject(hr,{}).inject(mr,[]).inject(gr,[]).inject(fr,[tr]).record(pr),async()=>{await e.waitTimers(fr);const t=e.get(cr),n=e.get(sr).reduce(((e,t)=>e.use(t.plugin,t.options)),t);e.set(cr,n);const r=Object.fromEntries(e.get(mr).map((([e,t])=>[e,yr(t)]))),o=Object.fromEntries(e.get(gr).map((([e,t])=>[e,yr(t)]))),s=new i.Sj({nodes:r,marks:o});return e.set(hr,s),e.done(pr),()=>{e.remove(hr).remove(mr).remove(gr).remove(fr).clearTimer(pr)}});Zn(vr,{displayName:"Schema"});const br=(0,o.CR)("ParserReady"),wr=()=>{throw(0,fn.dI)()},kr=(0,o.Z0)(wr,"parser"),xr=(0,o.Z0)([],"parserTimer"),Ar=e=>(e.inject(kr,wr).inject(xr,[pr]).record(br),async()=>{await e.waitTimers(xr);const t=e.get(cr),n=e.get(hr);return e.set(kr,En.create(n,t)),e.done(br),()=>{e.remove(kr).remove(xr).clearTimer(br)}});Zn(Ar,{displayName:"Parser"});const Sr=(0,o.CR)("SerializerReady"),Er=(0,o.Z0)([],"serializerTimer"),Cr=()=>{throw(0,fn.dI)()},Or=(0,o.Z0)(Cr,"serializer"),Mr=e=>(e.inject(Or,Cr).inject(Er,[pr]).record(Sr),async()=>{await e.waitTimers(Er);const t=e.get(cr),n=e.get(hr);return e.set(Or,Bn.create(n,t)),e.done(Sr),()=>{e.remove(Or).remove(Er).clearTimer(Sr)}});Zn(Mr,{displayName:"Serializer"});const Nr=(0,o.Z0)("","defaultValue"),Tr=(0,o.Z0)({},"editorState"),Ir=(0,o.Z0)((e=>e),"stateOptions"),Rr=(0,o.Z0)([],"editorStateTimer"),Dr=(0,o.CR)("EditorStateReady"),Pr=new Hn.hs("MILKDOWN_STATE_TRACKER");function Fr(e){const t=(0,Wn.st)(Kn.dv,Wn.ic,Wn.Qv,Wn._e);return e.Backspace=t,e}const Lr=e=>(e.inject(Nr,"").inject(Tr,{}).inject(Ir,(e=>e)).inject(Rr,[br,Sr,Zr]).record(Dr),async()=>{await e.waitTimers(Rr);const t=e.get(hr),n=e.get(kr),r=e.get(or),o=e.get(Ir),s=e.get(ir),a=function(e,t,n){if("string"==typeof e)return t(e);if("html"===e.type)return i.S4.fromSchema(n).parse(e.dom);if("json"===e.type)return i.bP.fromJSON(n,e.value);throw(0,fn.j7)(e)}(e.get(Nr),n,t),l=[...s,new Hn.k_({key:Pr,state:{init:()=>{},apply:(t,n,r,o)=>{e.set(Tr,o)}}}),(0,Un.Z6)({rules:r}),(0,qn.w)(Fr(Wn.RV))];e.set(ir,l);const c=o({schema:t,doc:a,plugins:l}),u=Hn.$t.create(c);return e.set(Tr,u),e.done(Dr),()=>{e.remove(Nr).remove(Tr).remove(Ir).remove(Rr).clearTimer(Dr)}});Zn(Lr,{displayName:"EditorState"});const _r=(0,o.CR)("EditorViewReady"),zr=(0,o.Z0)({},"editorView"),$r=(0,o.Z0)([],"editorViewTimer"),jr=(0,o.Z0)({},"editorViewOptions"),Br=(0,o.Z0)(null,"root"),Hr=(0,o.Z0)(null,"rootDOM"),Vr=(0,o.Z0)({},"rootAttrs"),Ur=new Hn.hs("MILKDOWN_VIEW_CLEAR"),Wr=e=>(e.inject(Br,document.body).inject(zr,{}).inject(jr,{}).inject(Hr,null).inject(Vr,{}).inject($r,[Dr]).record(_r),async()=>{await e.wait(tr);const t=e.get(Br)||document.body,n="string"==typeof t?document.querySelector(t):t;e.update(ir,(t=>[new Hn.k_({key:Ur,view:t=>{const r=n?function(e,t){const n=document.createElement("div");n.className="milkdown",e.appendChild(n),t.set(Hr,n);const r=t.get(Vr);return Object.entries(r).forEach((([e,t])=>n.setAttribute(e,t))),n}(n,e):void 0;return(()=>{if(r&&n){const e=t.dom;n.replaceChild(r,e),r.appendChild(e)}})(),{destroy:()=>{null!=r&&r.parentNode&&(null==r||r.parentNode.replaceChild(t.dom,r)),null==r||r.remove()}}}}),...t])),await e.waitTimers($r);const r=e.get(Tr),o=e.get(jr),i=Object.fromEntries(e.get(ar)),s=Object.fromEntries(e.get(lr)),a=new Vn.Lz(n,{state:r,nodeViews:i,markViews:s,...o});return function(e){e.classList.add("editor"),e.setAttribute("role","textbox")}(a.dom),e.set(zr,a),e.done(_r),()=>{null==a||a.destroy(),e.remove(Br).remove(zr).remove(jr).remove(Hr).remove(Vr).remove($r).clearTimer(_r)}});var Kr,qr;Zn(Wr,{displayName:"EditorView"});class Gr{constructor(){Jn(this,Kr,void 0),Jn(this,qr,void 0),Xn(this,Kr,new o.mc),Xn(this,qr,null),this.setCtx=e=>{Xn(this,qr,e)}}get ctx(){return Yn(this,qr)}create(e,t){const n=e.create(Yn(this,Kr).sliceMap);return n.set(t),n}get(e){return Yn(this,Kr).get(e).get()}remove(e){return Yn(this,Kr).remove(e)}call(e,t){if(null==Yn(this,qr))throw(0,fn.zD)();const n=this.get(e)(t),r=Yn(this,qr).get(zr);return n(r.state,r.dispatch,r)}}function Yr(e="cmdKey"){return(0,o.Z0)((()=>()=>!1),e)}Kr=new WeakMap,qr=new WeakMap;const Jr=(0,o.Z0)(new Gr,"commands"),Xr=(0,o.Z0)([pr],"commandsTimer"),Zr=(0,o.CR)("CommandsReady"),Qr=e=>{const t=new Gr;return t.setCtx(e),e.inject(Jr,t).inject(Xr,[pr]).record(Zr),async()=>(await e.waitTimers(Xr),e.done(Zr),()=>{e.remove(Jr).remove(Xr).clearTimer(Zr)})};var eo,to,no,ro,oo,io,so,ao,lo,co,uo,po,fo,ho,mo;Zn(Qr,{displayName:"Commands"}),eo=new WeakMap,to=new WeakMap,no=new WeakMap,ro=new WeakMap,oo=new WeakMap,io=new WeakMap,so=new WeakMap,ao=new WeakMap,lo=new WeakMap,co=new WeakMap,uo=new WeakMap,po=new WeakMap,fo=new WeakMap,ho=new WeakMap,mo=new WeakMap;let go=class e{constructor(){Jn(this,eo,void 0),Jn(this,to,void 0),Jn(this,no,void 0),Jn(this,ro,void 0),Jn(this,oo,void 0),Jn(this,io,void 0),Jn(this,so,void 0),Jn(this,ao,void 0),Jn(this,lo,void 0),Jn(this,co,void 0),Jn(this,uo,void 0),Jn(this,po,void 0),Jn(this,fo,void 0),Jn(this,ho,void 0),Jn(this,mo,void 0),Xn(this,eo,!1),Xn(this,to,"Idle"),Xn(this,no,[]),Xn(this,ro,(()=>{})),Xn(this,oo,new o.mc),Xn(this,io,new o.zD),Xn(this,so,new Map),Xn(this,ao,new Map),Xn(this,lo,new o.Kj(Yn(this,oo),Yn(this,io))),Xn(this,co,(()=>{const e=function(e){const t=t=>(t.record(er),async()=>(await e(t),t.done(er),()=>{t.clearTimer(er)}));return Zn(t,{displayName:"Config"}),t}((async e=>{await Promise.all(Yn(this,no).map((t=>t(e))))})),t=[vr,Ar,Mr,Qr,Lr,Wr,dr(this),e];Yn(this,uo).call(this,t,Yn(this,ao))})),Xn(this,uo,((e,t)=>{e.forEach((e=>{const n=Yn(this,lo).produce(Yn(this,eo)?e.meta:void 0),r=e(n);t.set(e,{ctx:n,handler:r,cleanup:void 0})}))})),Xn(this,po,((e,t=!1)=>Promise.all([e].flat().map((e=>{const n=Yn(this,so).get(e),r=null==n?void 0:n.cleanup;return t?Yn(this,so).delete(e):Yn(this,so).set(e,{ctx:void 0,handler:void 0,cleanup:void 0}),"function"==typeof r?r():r}))))),Xn(this,fo,(async()=>{await Promise.all([...Yn(this,ao).entries()].map((([e,{cleanup:t}])=>"function"==typeof t?t():t))),Yn(this,ao).clear()})),Xn(this,ho,(e=>{Xn(this,to,e),Yn(this,ro).call(this,e)})),Xn(this,mo,(e=>[...e.entries()].map((async([t,n])=>{const{ctx:r,handler:o}=n;if(!o)return;const i=await o();e.set(t,{ctx:r,handler:o,cleanup:i})})))),this.enableInspector=(e=!0)=>(Xn(this,eo,e),this),this.onStatusChange=e=>(Xn(this,ro,e),this),this.config=e=>(Yn(this,no).push(e),this),this.removeConfig=e=>(Xn(this,no,Yn(this,no).filter((t=>t!==e))),this),this.use=e=>{const t=[e].flat();return t.flat().forEach((e=>{Yn(this,so).set(e,{ctx:void 0,handler:void 0,cleanup:void 0})})),"Created"===Yn(this,to)&&Yn(this,uo).call(this,t,Yn(this,so)),this},this.remove=async e=>"OnCreate"===Yn(this,to)?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise((t=>{setTimeout((()=>{t(this.remove(e))}),50)}))):(await Yn(this,po).call(this,[e].flat(),!0),this),this.create=async()=>("OnCreate"===Yn(this,to)||("Created"===Yn(this,to)&&await this.destroy(),Yn(this,ho).call(this,"OnCreate"),Yn(this,co).call(this),Yn(this,uo).call(this,[...Yn(this,so).keys()],Yn(this,so)),await Promise.all([Yn(this,mo).call(this,Yn(this,ao)),Yn(this,mo).call(this,Yn(this,so))].flat()),Yn(this,ho).call(this,"Created")),this),this.destroy=async(e=!1)=>"Destroyed"===Yn(this,to)||"OnDestroy"===Yn(this,to)?this:"OnCreate"===Yn(this,to)?new Promise((t=>{setTimeout((()=>{t(this.destroy(e))}),50)})):(e&&Xn(this,no,[]),Yn(this,ho).call(this,"OnDestroy"),await Yn(this,po).call(this,[...Yn(this,so).keys()],e),await Yn(this,fo).call(this),Yn(this,ho).call(this,"Destroyed"),this),this.action=e=>e(Yn(this,lo)),this.inspect=()=>Yn(this,eo)?[...Yn(this,ao).values(),...Yn(this,so).values()].map((({ctx:e})=>{var t;return null==(t=null==e?void 0:e.inspector)?void 0:t.read()})).filter((e=>!!e)):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new e}get ctx(){return Yn(this,lo)}get status(){return Yn(this,to)}}},5152:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},5309:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(7545),o=n(2474);function i(e,t){if(t&&("object"===(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.A)(e)}},5405:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},5536:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2559);function o(e,t,n){return n((0,r.A)(e,t))}},5694:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>et,an:()=>C,Ki:()=>F,zA:()=>D,RC:()=>Ze,hV:()=>J,IV:()=>Je});var r=n(4586),o=n(689),i=n(3705),s=n(9740);const a=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};var l=n(9055),c=n(8769),u=(n(4511),n(8257),n(5152)),d=n(414),p="%";function f(e){return e.join(p)}const h=function(){function e(t){(0,u.A)(this,e),(0,r.A)(this,"instanceId",void 0),(0,r.A)(this,"cache",new Map),this.instanceId=t}return(0,d.A)(e,[{key:"get",value:function(e){return this.opGet(f(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(f(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}();var m="data-token-hash",g="data-css-hash",y="__cssinjs_instance__";const v=c.createContext({hashPriority:"low",cache:function(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(g,"]"))||[],n=document.head.firstChild;Array.from(t).forEach((function(t){t[y]=t[y]||e,t[y]===e&&document.head.insertBefore(t,n)}));var r={};Array.from(document.querySelectorAll("style[".concat(g,"]"))).forEach((function(t){var n,o=t.getAttribute(g);r[o]?t[y]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[o]=!0}))}return new h(e)}(),defaultCache:!0});var b=n(7545),w=n(7169);new RegExp("CALC_UNIT","g");var k=function(){function e(){(0,u.A)(this,e),(0,r.A)(this,"cache",void 0),(0,r.A)(this,"keys",void 0),(0,r.A)(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return(0,d.A)(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o={map:this.cache};return e.forEach((function(e){var t;o=o?null===(t=o)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):void 0})),null!==(t=o)&&void 0!==t&&t.value&&r&&(o.value[1]=this.cacheCallTimes++),null===(n=o)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce((function(e,t){var n=(0,o.A)(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e}),[this.keys[0],this.cacheCallTimes]),s=(0,o.A)(i,1)[0];this.delete(s)}this.keys.push(t)}var a=this.cache;t.forEach((function(e,o){if(o===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var i=a.get(e);i?i.map||(i.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}}))}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var o=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),o}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter((function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)})),this.deleteByPath(this.cache,e)}}]),e}();(0,r.A)(k,"MAX_CACHE_SIZE",20),(0,r.A)(k,"MAX_CACHE_OFFSET",5);var x=n(4445),A=0,S=function(){function e(t){(0,u.A)(this,e),(0,r.A)(this,"derivatives",void 0),(0,r.A)(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=A,0===t.length&&(0,x.$e)(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),A+=1}return(0,d.A)(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce((function(t,n){return n(e,t)}),void 0)}}]),e}(),E=new k;function C(e){var t=Array.isArray(e)?e:[e];return E.has(t)||E.set(t,new S(t)),E.get(t)}var O=new WeakMap,M={},N=new WeakMap;function T(e){var t=N.get(e)||"";return t||(Object.keys(e).forEach((function(n){var r=e[n];t+=n,r instanceof S?t+=r.id:r&&"object"===(0,b.A)(r)?t+=T(r):t+=r})),t=a(t),N.set(e,t)),t}function I(e,t){return a("".concat(t,"_").concat(T(e)))}"random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,"");var R=(0,w.A)();function D(e){return"number"==typeof e?"".concat(e,"px"):e}function P(e,t,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var a=(0,s.A)((0,s.A)({},i),{},(o={},(0,r.A)(o,m,t),(0,r.A)(o,g,n),o)),l=Object.keys(a).map((function(e){var t=a[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"<style ".concat(l,">").concat(e,"</style>")}var F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},L=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!=n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")})).join(""),"}"):""},_=function(e,t,n){var r={},i={};return Object.entries(e).forEach((function(e){var t,s,a=(0,o.A)(e,2),l=a[0],c=a[1];if(null!=n&&null!==(t=n.preserve)&&void 0!==t&&t[l])i[l]=c;else if(!("string"!=typeof c&&"number"!=typeof c||null!=n&&null!==(s=n.ignore)&&void 0!==s&&s[l])){var u,d=F(l,null==n?void 0:n.prefix);r[d]="number"!=typeof c||null!=n&&null!==(u=n.unitless)&&void 0!==u&&u[l]?String(c):"".concat(c,"px"),i[l]="var(".concat(d,")")}})),[i,L(r,t,{scope:null==n?void 0:n.scope})]},z=n(4238),$=(0,s.A)({},c).useInsertionEffect;const j=$?function(e,t,n){return $((function(){return e(),t()}),n)}:function(e,t,n){c.useMemo(e,n),(0,z.A)((function(){return t(!0)}),n)},B=void 0!==(0,s.A)({},c).useInsertionEffect?function(e){var t=[],n=!1;return c.useEffect((function(){return n=!1,function(){n=!0,t.length&&t.forEach((function(e){return e()}))}}),e),function(e){n||t.push(e)}}:function(){return function(e){e()}},H=function(){return!1};function V(e,t,n,r,s){var a=c.useContext(v).cache,l=f([e].concat((0,i.A)(t))),u=B([l]),d=(H(),function(e){a.opUpdate(l,(function(t){var r=t||[void 0,void 0],i=(0,o.A)(r,2),s=i[0],a=[void 0===s?0:s,i[1]||n()];return e?e(a):a}))});c.useMemo((function(){d()}),[l]);var p=a.opGet(l)[1];return j((function(){null==s||s(p)}),(function(e){return d((function(t){var n=(0,o.A)(t,2),r=n[0],i=n[1];return e&&0===r&&(null==s||s(p)),[r+1,i]})),function(){a.opUpdate(l,(function(t){var n=t||[],i=(0,o.A)(n,2),s=i[0],c=void 0===s?0:s,d=i[1];return 0==c-1?(u((function(){!e&&a.opGet(l)||null==r||r(d,!1)})),null):[c-1,d]}))}}),[l]),p}var U={},W="css",K=new Map,q=0;var G=function(e,t,n,r){var o=n.getDerivativeToken(e),i=(0,s.A)((0,s.A)({},o),t);return r&&(i=r(i)),i},Y="token";function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(0,c.useContext)(v),u=r.cache.instanceId,d=r.container,p=n.salt,f=void 0===p?"":p,h=n.override,b=void 0===h?U:h,w=n.formatToken,k=n.getComputedToken,x=n.cssVar,A=function(e,n){for(var r=O,o=0;o<n.length;o+=1){var s=n[o];r.has(s)||r.set(s,new WeakMap),r=r.get(s)}return r.has(M)||r.set(M,Object.assign.apply(Object,[{}].concat((0,i.A)(t)))),r.get(M)}(0,t),S=T(A),E=T(b),C=x?T(x):"",N=V(Y,[f,e.id,S,E,C],(function(){var t,n=k?k(A,b,e):G(A,b,e,w),r=(0,s.A)({},n),i="";if(x){var l=_(n,x.key,{prefix:x.prefix,ignore:x.ignore,unitless:x.unitless,preserve:x.preserve}),c=(0,o.A)(l,2);n=c[0],i=c[1]}var u=I(n,f);n._tokenKey=u,r._tokenKey=I(r,f);var d=null!==(t=null==x?void 0:x.key)&&void 0!==t?t:u;n._themeKey=d,function(e){K.set(e,(K.get(e)||0)+1)}(d);var p="".concat(W,"-").concat(a(u));return n._hashId=p,[n,p,r,i,(null==x?void 0:x.key)||""]}),(function(e){!function(e,t){K.set(e,(K.get(e)||0)-1);var n=Array.from(K.keys()),r=n.filter((function(e){return(K.get(e)||0)<=0}));n.length-r.length>q&&r.forEach((function(e){!function(e,t){"undefined"!=typeof document&&document.querySelectorAll("style[".concat(m,'="').concat(e,'"]')).forEach((function(e){var n;e[y]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),K.delete(e)}))}(e[0]._themeKey,u)}),(function(e){var t=(0,o.A)(e,4),n=t[0],r=t[3];if(x&&r){var i=(0,l.BD)(r,a("css-variables-".concat(n._themeKey)),{mark:g,prepend:"queue",attachTo:d,priority:-999});i[y]=u,i.setAttribute(m,n._themeKey)}}));return N}var X=n(9575);const Z={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Q="comm",ee="rule",te="decl",ne="@import",re="@keyframes",oe="@layer",ie=Math.abs,se=String.fromCharCode;function ae(e){return e.trim()}function le(e,t,n){return e.replace(t,n)}function ce(e,t,n){return e.indexOf(t,n)}function ue(e,t){return 0|e.charCodeAt(t)}function de(e,t,n){return e.slice(t,n)}function pe(e){return e.length}function fe(e,t){return t.push(e),e}function he(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function me(e,t,n,r){switch(e.type){case oe:if(e.children.length)break;case ne:case te:return e.return=e.return||e.value;case Q:return"";case re:return e.return=e.value+"{"+he(e.children,r)+"}";case ee:if(!pe(e.value=e.props.join(",")))return""}return pe(n=he(e.children,r))?e.return=e.value+"{"+n+"}":""}Object.assign;var ge=1,ye=1,ve=0,be=0,we=0,ke="";function xe(e,t,n,r,o,i,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:ge,column:ye,length:s,return:"",siblings:a}}function Ae(){return we=be>0?ue(ke,--be):0,ye--,10===we&&(ye=1,ge--),we}function Se(){return we=be<ve?ue(ke,be++):0,ye++,10===we&&(ye=1,ge++),we}function Ee(){return ue(ke,be)}function Ce(){return be}function Oe(e,t){return de(ke,e,t)}function Me(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ne(e){return ae(Oe(be-1,Re(91===e?e+2:40===e?e+1:e)))}function Te(e){for(;(we=Ee())&&we<33;)Se();return Me(e)>2||Me(we)>3?"":" "}function Ie(e,t){for(;--t&&Se()&&!(we<48||we>102||we>57&&we<65||we>70&&we<97););return Oe(e,Ce()+(t<6&&32==Ee()&&32==Se()))}function Re(e){for(;Se();)switch(we){case e:return be;case 34:case 39:34!==e&&39!==e&&Re(we);break;case 40:41===e&&Re(e);break;case 92:Se()}return be}function De(e,t){for(;Se()&&e+we!==57&&(e+we!==84||47!==Ee()););return"/*"+Oe(t,be-1)+"*"+se(47===e?e:Se())}function Pe(e){for(;!Me(Ee());)Se();return Oe(e,be)}function Fe(e){return function(e){return ke="",e}(Le("",null,null,null,[""],e=function(e){return ge=ye=1,ve=pe(ke=e),be=0,[]}(e),0,[0],e))}function Le(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,p=0,f=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,k=i,x=r,A=b;g;)switch(h=v,v=Se()){case 40:if(108!=h&&58==ue(A,d-1)){-1!=ce(A+=le(Ne(v),"&","&\f"),"&\f",ie(c?a[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:A+=Ne(v);break;case 9:case 10:case 13:case 32:A+=Te(h);break;case 92:A+=Ie(Ce()-1,7);continue;case 47:switch(Ee()){case 42:case 47:fe(ze(De(Se(),Ce()),t,n,l),l),5!=Me(h||1)&&5!=Me(Ee()||1)||!pe(A)||" "===de(A,-1,void 0)||(A+=" ");break;default:A+="/"}break;case 123*m:a[c++]=pe(A)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(A=le(A,/\f/g,"")),f>0&&(pe(A)-d||0===m&&47===h)&&fe(f>32?$e(A+";",r,n,d-1,l):$e(le(A," ","")+";",r,n,d-2,l),l);break;case 59:A+=";";default:if(fe(x=_e(A,t,n,c,u,o,a,b,w=[],k=[],d,i),i),123===v)if(0===u)Le(A,t,x,x,w,i,d,a,k);else switch(99===p&&110===ue(A,3)?100:p){case 100:case 108:case 109:case 115:Le(e,x,x,r&&fe(_e(e,x,x,0,0,o,a,b,o,w=[],d,k),k),o,k,d,a,r?w:k);break;default:Le(A,x,x,x,[""],k,0,a,k)}}c=u=f=0,m=y=1,b=A="",d=s;break;case 58:d=1+pe(A),f=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==Ae())continue;switch(A+=se(v),v*m){case 38:y=u>0?1:(A+="\f",-1);break;case 44:a[c++]=(pe(A)-1)*y,y=1;break;case 64:45===Ee()&&(A+=Ne(Se())),p=Ee(),u=d=pe(b=A+=Pe(Ce())),v++;break;case 45:45===h&&2==pe(A)&&(m=0)}}return i}function _e(e,t,n,r,o,i,s,a,l,c,u,d){for(var p=o-1,f=0===o?i:[""],h=function(e){return e.length}(f),m=0,g=0,y=0;m<r;++m)for(var v=0,b=de(e,p+1,p=ie(g=s[m])),w=e;v<h;++v)(w=ae(g>0?f[v]+" "+b:le(b,/&\f/g,f[v])))&&(l[y++]=w);return xe(e,t,n,0===o?ee:a,l,c,u,d)}function ze(e,t,n,r){return xe(e,t,n,Q,se(we),de(e,2,-2),0,r)}function $e(e,t,n,r,o){return xe(e,t,n,te,de(e,0,r),de(e,r+1,-1),r,o)}var je,Be="data-ant-cssinjs-cache-path",He="_FILE_STYLE__",Ve=!0;var Ue="_multi_value_";function We(e){return he(Fe(e),me).replace(/\{%%%\:[^;];}/g,";")}var Ke=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},a=r.root,l=r.injectHash,c=r.parentSelectors,u=n.hashId,d=n.layer,p=(n.path,n.hashPriority),f=n.transformers,h=void 0===f?[]:f,m=(n.linters,""),g={};function y(t){var r=t.getName(u);if(!g[r]){var i=e(t.style,n,{root:!1,parentSelectors:c}),s=(0,o.A)(i,1)[0];g[r]="@keyframes ".concat(t.getName(u)).concat(s)}}var v=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);return v.forEach((function(t){var r="string"!=typeof t||a?t:{};if("string"==typeof r)m+="".concat(r,"\n");else if(r._keyframe)y(r);else{var d=h.reduce((function(e,t){var n;return(null==t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),r);Object.keys(d).forEach((function(t){var r=d[t];if("object"!==(0,b.A)(r)||!r||"animationName"===t&&r._keyframe||function(e){return"object"===(0,b.A)(e)&&e&&("_skip_check_"in e||Ue in e)}(r)){var f;function C(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),r=t;Z[e]||"number"!=typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!=t&&t._keyframe&&(y(t),r=t.getName(u)),m+="".concat(n,":").concat(r,";")}var h=null!==(f=null==r?void 0:r.value)&&void 0!==f?f:r;"object"===(0,b.A)(r)&&null!=r&&r[Ue]&&Array.isArray(h)?h.forEach((function(e){C(t,e)})):C(t,h)}else{var v=!1,w=t.trim(),k=!1;(a||l)&&u?w.startsWith("@")?v=!0:w=function(e,t,n){if(!t)return e;var r=".".concat(t),o="low"===n?":where(".concat(r,")"):r;return e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",s=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(s).concat(o).concat(r.slice(s.length))].concat((0,i.A)(n.slice(1))).join(" ")})).join(",")}("&"===w?"":t,u,p):!a||u||"&"!==w&&""!==w||(w="",k=!0);var x=e(r,n,{root:k,injectHash:v,parentSelectors:[].concat((0,i.A)(c),[w])}),A=(0,o.A)(x,2),S=A[0],E=A[1];g=(0,s.A)((0,s.A)({},g),E),m+="".concat(w).concat(S)}}))}})),a?d&&(m&&(m="@layer ".concat(d.name," {").concat(m,"}")),d.dependencies&&(g["@layer ".concat(d.name)]=d.dependencies.map((function(e){return"@layer ".concat(e,", ").concat(d.name,";")})).join("\n"))):m="{".concat(m,"}"),[m,g]};function qe(e,t){return a("".concat(e.join("%")).concat(t))}function Ge(){return null}var Ye="style";function Je(e,t){var n=e.token,a=e.path,u=e.hashId,d=e.layer,p=e.nonce,f=e.clientOnly,h=e.order,b=void 0===h?0:h,k=c.useContext(v),x=k.autoClear,A=(k.mock,k.defaultCache),S=k.hashPriority,E=k.container,C=k.ssrInline,O=k.transformers,M=k.linters,N=k.cache,T=k.layer,I=n._tokenKey,D=[I];T&&D.push("layer"),D.push.apply(D,(0,i.A)(a));var P=R,F=V(Ye,D,(function(){var e=D.join("|");if(function(e){return function(){if(!je&&(je={},(0,w.A)())){var e=document.createElement("div");e.className=Be,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=e.split(":"),n=(0,o.A)(t,2),r=n[0],i=n[1];je[r]=i}));var n,r=document.querySelector("style[".concat(Be,"]"));r&&(Ve=!1,null===(n=r.parentNode)||void 0===n||n.removeChild(r)),document.body.removeChild(e)}}(),!!je[e]}(e)){var n=function(e){var t=je[e],n=null;if(t&&(0,w.A)())if(Ve)n=He;else{var r=document.querySelector("style[".concat(g,'="').concat(je[e],'"]'));r?n=r.innerHTML:delete je[e]}return[n,t]}(e),r=(0,o.A)(n,2),i=r[0],s=r[1];if(i)return[i,I,s,{},f,b]}var l=t(),c=Ke(l,{hashId:u,hashPriority:S,layer:T?d:void 0,path:a.join("-"),transformers:O,linters:M}),p=(0,o.A)(c,2),h=p[0],m=p[1],y=We(h),v=qe(D,y);return[y,I,v,m,f,b]}),(function(e,t){var n=(0,o.A)(e,3)[2];(t||x)&&R&&(0,l.m6)(n,{mark:g})}),(function(e){var t=(0,o.A)(e,4),n=t[0],r=(t[1],t[2]),i=t[3];if(P&&n!==He){var a={mark:g,prepend:!T&&"queue",attachTo:E,priority:b},c="function"==typeof p?p():p;c&&(a.csp={nonce:c});var u=[],d=[];Object.keys(i).forEach((function(e){e.startsWith("@layer")?u.push(e):d.push(e)})),u.forEach((function(e){(0,l.BD)(We(i[e]),"_layer-".concat(e),(0,s.A)((0,s.A)({},a),{},{prepend:!0}))}));var f=(0,l.BD)(n,r,a);f[y]=N.instanceId,f.setAttribute(m,I),d.forEach((function(e){(0,l.BD)(We(i[e]),"_effect-".concat(e),a)}))}})),L=(0,o.A)(F,3),_=L[0],z=L[1],$=L[2];return function(e){var t,n;return t=C&&!P&&A?c.createElement("style",(0,X.A)({},(n={},(0,r.A)(n,m,z),(0,r.A)(n,g,$),n),{dangerouslySetInnerHTML:{__html:_}})):c.createElement(Ge,null),c.createElement(c.Fragment,null,t,e)}}var Xe="cssVar";const Ze=function(e,t){var n=e.key,r=e.prefix,s=e.unitless,a=e.ignore,u=e.token,d=e.scope,p=void 0===d?"":d,f=(0,c.useContext)(v),h=f.cache.instanceId,b=f.container,w=u._tokenKey,k=[].concat((0,i.A)(e.path),[n,p,w]);return V(Xe,k,(function(){var e=t(),i=_(e,n,{prefix:r,unitless:s,ignore:a,scope:p}),l=(0,o.A)(i,2),c=l[0],u=l[1];return[c,u,qe(k,u),n]}),(function(e){var t=(0,o.A)(e,3)[2];R&&(0,l.m6)(t,{mark:g})}),(function(e){var t=(0,o.A)(e,3),r=t[1],i=t[2];if(r){var s=(0,l.BD)(r,i,{mark:g,prepend:"queue",attachTo:b,priority:-999});s[y]=h,s.setAttribute(m,n)}}))};var Qe;Qe={},(0,r.A)(Qe,Ye,(function(e,t,n){var r=(0,o.A)(e,6),i=r[0],s=r[1],a=r[2],l=r[3],c=r[4],u=r[5],d=(n||{}).plain;if(c)return null;var p=i,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return p=P(i,s,a,f,d),l&&Object.keys(l).forEach((function(e){if(!t[e]){t[e]=!0;var n=P(We(l[e]),s,"_effect-".concat(e),f,d);e.startsWith("@layer")?p=n+p:p+=n}})),[u,a,p]})),(0,r.A)(Qe,Y,(function(e,t,n){var r=(0,o.A)(e,5),i=r[2],s=r[3],a=r[4],l=(n||{}).plain;if(!s)return null;var c=i._tokenKey;return[-999,c,P(s,a,c,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]})),(0,r.A)(Qe,Xe,(function(e,t,n){var r=(0,o.A)(e,4),i=r[1],s=r[2],a=r[3],l=(n||{}).plain;return i?[-999,s,P(i,a,s,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]:null}));const et=function(){function e(t,n){(0,u.A)(this,e),(0,r.A)(this,"name",void 0),(0,r.A)(this,"style",void 0),(0,r.A)(this,"_keyframe",!0),this.name=t,this.style=n}return(0,d.A)(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();function tt(e){return e.notSplit=!0,e}tt(["borderTop","borderBottom"]),tt(["borderTop"]),tt(["borderBottom"]),tt(["borderLeft","borderRight"]),tt(["borderLeft"]),tt(["borderRight"])},5715:(e,t,n)=>{"use strict";n.d(t,{Im:()=>v,Qv:()=>a,RV:()=>C,_e:()=>c,ic:()=>s,st:()=>k,wh:()=>w,y_:()=>b});var r=n(3710),o=n(6090),i=n(1570);const s=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);const a=(e,t,n)=>{let s=function(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}(e,n);if(!s)return!1;let a=u(s);if(!a){let n=s.blockRange(),o=n&&(0,r.jP)(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let c=a.nodeBefore;if(!c.type.spec.isolating&&h(e,a,t))return!0;if(0==s.parent.content.size&&(l(c,"end")||i.nh.isSelectable(c))){let n=(0,r.$L)(e.doc,s.before(),s.after(),o.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(l(c,"end")?i.LN.findFrom(r.doc.resolve(r.mapping.map(a.pos,-1)),-1):i.nh.create(r.doc,a.pos-c.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!c.isAtom||a.depth!=s.depth-1||(t&&t(e.tr.delete(a.pos-c.nodeSize,a.pos).scrollIntoView()),0))};function l(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}const c=(e,t,n)=>{let{$head:r,empty:o}=e.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;s=u(r)}let a=s&&s.nodeBefore;return!(!a||!i.nh.isSelectable(a)||(t&&t(e.tr.setSelection(i.nh.create(e.doc,s.pos-a.nodeSize)).scrollIntoView()),0))};function u(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 d(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}function p(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var f;function h(e,t,n){let s,a,c=t.nodeBefore,u=t.nodeAfter;if(c.type.spec.isolating||u.type.spec.isolating)return!1;if(function(e,t,n){let o=t.nodeBefore,i=t.nodeAfter,s=t.index();return!(!(o&&i&&o.type.compatibleContent(i.type))||(!o.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(s,s+1)||!i.isTextblock&&!(0,r.n9)(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let d=t.parent.canReplace(t.index(),t.index()+1);if(d&&(s=(a=c.contentMatchAt(c.childCount)).findWrapping(u.type))&&a.matchType(s[0]||u.type).validEnd){if(n){let i=t.pos+u.nodeSize,a=o.FK.empty;for(let e=s.length-1;e>=0;e--)a=o.FK.from(s[e].create(null,a));a=o.FK.from(c.copy(a));let l=e.tr.step(new r.Wg(t.pos-1,i,t.pos,i,new o.Ji(a,1,0),s.length,!0)),d=i+2*s.length;(0,r.n9)(l.doc,d)&&l.join(d),n(l.scrollIntoView())}return!0}let p=i.LN.findFrom(t,1),f=p&&p.$from.blockRange(p.$to),h=f&&(0,r.jP)(f);if(null!=h&&h>=t.depth)return n&&n(e.tr.lift(f,h).scrollIntoView()),!0;if(d&&l(u,"start",!0)&&l(c,"end")){let i=c,s=[];for(;s.push(i),!i.isTextblock;)i=i.lastChild;let a=u,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(i.canReplace(i.childCount,i.childCount,a.content)){if(n){let i=o.FK.empty;for(let e=s.length-1;e>=0;e--)i=o.FK.from(s[e].copy(i));n(e.tr.step(new r.Wg(t.pos-s.length,t.pos+u.nodeSize,t.pos+l,t.pos+u.nodeSize-l,new o.Ji(i,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function m(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return!!o.node(s).isTextblock&&(n&&n(t.tr.setSelection(i.U3.create(t.doc,e<0?o.start(s):o.end(s)))),!0)}}const g=m(-1),y=m(1);function v(e,t=null){return function(n,o){let{$from:i,$to:s}=n.selection,a=i.blockRange(s),l=a&&(0,r.oM)(a,e,t);return!!l&&(o&&o(n.tr.wrap(a,l).scrollIntoView()),!0)}}function b(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:s}}=n.selection.ranges[r];n.doc.nodesBetween(i,s,((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:s}}=n.selection.ranges[r];o.setBlockType(i,s,e,t)}r(o.scrollIntoView())}return!0}}function w(e,t=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!function(e,t,n){for(let r=0;r<t.length;r++){let{$from:o,$to:i}=t[r],s=0==o.depth&&e.inlineContent&&e.type.allowsMarkType(n);if(e.nodesBetween(o.pos,i.pos,(e=>{if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return!0}return!1}(n.doc,s,e))return!1;if(r)if(i)e.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let o=!1,i=n.tr;for(let t=0;!o&&t<s.length;t++){let{$from:r,$to:i}=s[t];o=n.doc.rangeHasMark(r.pos,i.pos,e)}for(let n=0;n<s.length;n++){let{$from:r,$to:a}=s[n];if(o)i.removeMark(r.pos,a.pos,e);else{let n=r.pos,o=a.pos,s=r.nodeAfter,l=a.nodeBefore,c=s&&s.isText?/^\s*/.exec(s.text)[0].length:0,u=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<o&&(n+=c,o-=u),i.addMark(n,o,e.create(t))}}r(i.scrollIntoView())}return!0}}function k(...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 x=k(s,a,c),A=k(s,((e,t,n)=>{let s=function(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}(e,n);if(!s)return!1;let a=d(s);if(!a)return!1;let c=a.nodeAfter;if(h(e,a,t))return!0;if(0==s.parent.content.size&&(l(c,"start")||i.nh.isSelectable(c))){let n=(0,r.$L)(e.doc,s.before(),s.after(),o.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(l(c,"start")?i.LN.findFrom(r.doc.resolve(r.mapping.map(a.pos)),1):i.nh.create(r.doc,r.mapping.map(a.pos))),t(r.scrollIntoView())}return!0}}return!(!c.isAtom||a.depth!=s.depth-1||(t&&t(e.tr.delete(a.pos,a.pos+c.nodeSize).scrollIntoView()),0))}),((e,t,n)=>{let{$head:r,empty:o}=e.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;s=d(r)}let a=s&&s.nodeAfter;return!(!a||!i.nh.isSelectable(a)||(t&&t(e.tr.setSelection(i.nh.create(e.doc,s.pos)).scrollIntoView()),0))}));const S={Enter: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))}),((e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof i.i5||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=p(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=e.tr.insert(n,s.createAndFill());a.setSelection(i.U3.create(a.doc,n+1)),t(a.scrollIntoView())}return!0}),((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.zy)(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let o=n.blockRange(),i=o&&(0,r.jP)(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)}),((e,t)=>{let{$from:n,$to:o}=e.selection;if(e.selection instanceof i.nh&&e.selection.node.isBlock)return!(!n.parentOffset||!(0,r.zy)(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let s=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof i.U3||e.selection instanceof i.i5)&&a.deleteSelection();let l=0==n.depth?null:p(n.node(-1).contentMatchAt(n.indexAfter(-1))),c=f?[f]:s&&l?[{type:l}]:void 0,u=(0,r.zy)(a.doc,a.mapping.map(n.pos),1,c);if(c||u||!(0,r.zy)(a.doc,a.mapping.map(n.pos),1,l?[{type:l}]:void 0)||(l&&(c=[{type:l}]),u=!0),u&&(a.split(a.mapping.map(n.pos),1,c),!s&&!n.parentOffset&&n.parent.type!=l)){let e=a.mapping.map(n.before()),t=a.doc.resolve(e);l&&n.node(-1).canReplaceWith(t.index(),t.index()+1,l)&&a.setNodeMarkup(a.mapping.map(n.before()),l)}t(a.scrollIntoView())}return!0})),"Mod-Enter":(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),s=n.indexAfter(-1),a=p(o.contentMatchAt(s));if(!a||!o.canReplaceWith(s,s,a))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,a.createAndFill());o.setSelection(i.LN.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0},Backspace:x,"Mod-Backspace":x,"Shift-Backspace":x,Delete:A,"Mod-Delete":A,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new i.i5(e.doc))),!0)},E={"Ctrl-h":S.Backspace,"Alt-Backspace":S["Mod-Backspace"],"Ctrl-d":S.Delete,"Ctrl-Alt-Backspace":S["Mod-Delete"],"Alt-Delete":S["Mod-Delete"],"Alt-d":S["Mod-Delete"],"Ctrl-a":g,"Ctrl-e":y};for(let e in S)E[e]=S[e];const C=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&"darwin"==os.platform())?E:S},5939:(e,t,n)=>{"use strict";n.d(t,{K:()=>g,w:()=>m});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&&/Chrome\/(\d+)/.exec(navigator.userAgent),s=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),a="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=s||i&&+i[1]<57,c=0;c<10;c++)r[48+c]=r[96+c]=String(c);for(c=1;c<=24;c++)r[c+111]="F"+c;for(c=65;c<=90;c++)r[c]=String.fromCharCode(c+32),o[c]=String.fromCharCode(c);for(var u in r)o.hasOwnProperty(u)||(o[u]=r[u]);var d=n(1570);const p="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function f(e){let t,n,r,o,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let e=0;e<i.length-1;e++){let s=i[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);p?o=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function h(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function m(e){return new d.k_({props:{handleKeyDown:g(e)}})}function g(e){let t=function(e){let t=Object.create(null);for(let n in e)t[f(n)]=e[n];return t}(e);return function(e,n){let i,s=function(e){var t=!(l&&(e.ctrlKey||e.altKey||e.metaKey)||a&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?o:r)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),c=t[h(s,n)];if(c&&c(e.state,e.dispatch,e))return!0;if(1==s.length&&" "!=s){if(n.shiftKey){let r=t[h(s,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.shiftKey||n.altKey||n.metaKey||s.charCodeAt(0)>127)&&(i=r[n.keyCode])&&i!=s){let r=t[h(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},6090:(e,t,n)=>{"use strict";function r(e){this.content=e}n.d(t,{S4:()=>X,ZF:()=>ae,FK:()=>a,CU:()=>d,sX:()=>G,bP:()=>I,u$:()=>N,Z6:()=>K,vI:()=>p,Sj:()=>Y,Ji:()=>f}),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),s=o.content.slice();return-1==i?s.push(n||e,t):(s[i+1]=t,n&&(s[i]=n)),new r(s)},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(),s=o.find(e);return i.splice(-1==s?i.length:s,0,t,n),new r(i)},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)};const o=r;function i(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),s=t.child(r);if(o!=s){if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)n++;return n}if(o.content.size||s.content.size){let e=i(o.content,s.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function s(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let a=e.child(--o),l=t.child(--i),c=a.nodeSize;if(a!=l){if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let e=0,t=Math.min(a.text.length,l.text.length);for(;e<t&&a.text[a.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let e=s(a.content,l.content,n-1,r-1);if(e)return e}n-=c,r-=c}else n-=c,r-=c}}class a{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,s=0;s<t;i++){let a=this.content[i],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,e-o),Math.min(a.content.size,t-o),n,r+o)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf?(r?o+="function"==typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),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(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new a(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 s=this.content[o],a=i+s.nodeSize;a>e&&((i<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=a}return new a(n,r)}cutByIndex(e,t){return e==t?a.empty:0==e&&t==this.content.length?this:new a(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new a(r,o)}addToStart(e){return new a([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new a(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 new 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 i(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return s(this,e,t,n)}findIndex(e,t=-1){if(0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(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 a.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return a.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 a(t||e,n)}static from(e){if(!e)return a.empty;if(e instanceof a)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new a([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}a.empty=new a([],0);const l={index:0,offset:0};function c(e,t){return l.index=e,l.offset=t,l}function u(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!u(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class d{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&&u(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return d.none;if(e instanceof d)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}d.none=[];class p extends Error{}class f{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=m(this.content,e+this.openStart,t);return n&&new f(n,this.openStart,this.openEnd)}removeBetween(e,t){return new f(h(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 f.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(a.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 f(e,n,r)}}function h(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(h(i.content,t-o-1,n-o-1)))}function m(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=m(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function g(e,t,n){if(n.openStart>e.depth)throw new p("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new p("Inconsistent open depths");return y(e,t,n,0)}function y(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let s=y(e,t,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:s}=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(a.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return x(i,A(e,o,s,t,r))}{let r=e.parent,o=r.content;return x(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return x(i,S(e,t,r))}function v(e,t){if(!t.type.compatibleContent(e.type))throw new p("Cannot join "+t.type.name+" onto "+e.type.name)}function b(e,t,n){let r=e.node(n);return v(r,t.node(n)),r}function w(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 k(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(w(e.nodeAfter,r),i++));for(let e=i;e<s;e++)w(o.child(e),r);t&&t.depth==n&&t.textOffset&&w(t.nodeBefore,r)}function x(e,t){return e.type.checkContent(t),e.copy(t)}function A(e,t,n,r,o){let i=e.depth>o&&b(e,t,o+1),s=r.depth>o&&b(n,r,o+1),l=[];return k(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(v(i,s),w(x(i,A(e,t,n,r,o+1)),l)):(i&&w(x(i,S(e,t,o+1)),l),k(t,n,o,l),s&&w(x(s,S(n,r,o+1)),l)),k(r,null,o,l),new a(l)}function S(e,t,n){let r=[];return k(null,e,n,r),e.depth>n&&w(x(b(e,t,n+1),S(e,t,n+1)),r),k(t,null,n,r),new a(r)}f.empty=new f(a.empty,0,0);class E{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 new 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 new 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 d.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 N(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 new 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),s=o-i;if(n.push(t,e,r+i),!s)break;if(t=t.child(e),t.isText)break;o=s-1,r+=i+1}return new E(t,n,o)}static resolveCached(e,t){for(let n=0;n<C.length;n++){let r=C[n];if(r.pos==t&&r.doc==e)return r}let n=C[O]=E.resolve(e,t);return O=(O+1)%M,n}}let C=[],O=0,M=12;class N{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)}}const T=Object.create(null);class I{constructor(e,t,n,r=d.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||a.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&&u(this.attrs,t||e.defaultAttrs||T)&&d.sameSet(this.marks,n||d.none)}copy(e=null){return e==this.content?this:new I(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new I(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 f.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new f(a,r.depth-i,o.depth-i)}replace(e,t,n){return g(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),!t)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 E.resolveCached(this,e)}resolveNoCache(e){return E.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),D(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=a.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<o;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);let e=d.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!d.sameSet(e,this.marks))throw new 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){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=a.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}I.prototype.text=void 0;class R extends I{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):D(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 R(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new R(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 D(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class P{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new F(e,t);if(null==n.next)return P.empty;let r=L(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);H(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new P(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(B);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}(H(e,0))}(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){if("star"==t.type){let s=n();return r(i,s),o(e(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return o(e(t.expr,i),s),o(e(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){let s=i;for(let r=0;r<t.min;r++){let r=n();o(e(t.expr,s),r),s=r}if(-1==t.max)o(e(t.expr,s),s);else for(let i=t.min;i<t.max;i++){let i=n();r(s,i),o(e(t.expr,s),i),s=i}return[r(s)]}if("name"==t.type)return[r(i,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=e(t.exprs[r],i);if(r==t.exprs.length-1)return s;o(s,i=n())}}(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}function o(e,t){e.forEach((e=>e.to=t))}}(r));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:s}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}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 o(i,s){let l=i.matchFragment(e,n);if(l&&(!t||l.validEnd))return a.from(s.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(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:s}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!s.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 new 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")}}P.empty=new P(!0);class F{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 new SyntaxError(e+" (in content expression '"+this.string+"')")}}function L(e){let t=[];do{t.push(_(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function _(e){let t=[];do{t.push(z(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function z(e){let t=function(e){if(e.eat("(")){let t=L(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=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.groups.indexOf(t)>-1&&o.push(r)}return 0==o.length&&e.err("No node type or group '"+t+"' found"),o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=j(e,t)}return t}function $(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function j(e,t){let n=$(e),r=n;return e.eat(",")&&(r="}"!=e.next?$(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function B(e,t){return t-e}function H(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(B)}function V(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 U(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)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function W(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new q(e[n]);return t}class K{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=W(n.attrs),this.defaultAttrs=V(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==P.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}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:U(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new I(this,this.computeAttrs(e),a.from(t),d.setFrom(n))}createChecked(e=null,t,n){return t=a.from(t),this.checkContent(t),new I(this,this.computeAttrs(e),t,d.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=a.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(a.empty,!0);return o?new I(this,e,t.append(o),d.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!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 new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}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){if(null==this.markSet)return e;let t;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:d.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new K(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class q{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class G{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=W(r.attrs),this.excluded=null;let o=V(this.attrs);this.instance=o?new d(this,o):null}create(e=null){return!e&&this.instance?this.instance:new d(this,U(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new G(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]}excludes(e){return this.excluded.indexOf(e)>-1}}class Y{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=o.from(e.nodes),t.marks=o.from(e.marks||{}),this.nodes=K.compile(this.spec.nodes,this),this.marks=G.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",o=t.spec.marks;t.contentMatch=n[r]||(n[r]=P.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.markSet="_"==o?null:o?J(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?[]:J(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 K))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new R(n,n.defaultAttrs,e,d.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return I.fromJSON(this,e)}markFromJSON(e){return d.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function J(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],s=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(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class X{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&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 re(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new re(this,t,!0);return n.addAll(e,t.from,t.to),f.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(oe(e,n.tag)&&(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=ie(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=ie(e)),e.node||e.ignore||e.mark||(e.node=t)}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new X(e,X.schemaRules(e)))}}const Z={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},Q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ee={ol:!0,ul:!0};function te(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class ne{constructor(e,t,n,r,o,i,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=d.none,this.stashMarks=[],this.match=i||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(a.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=a.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):se(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Z.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class re{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,i=te(null,t.preserveWhitespace,0)|(n?4:0);r=o?new ne(o.type,o.attrs,d.none,d.none,!0,t.topMatch||o.type.contentMatch,i):new ne(n?null:e.schema.topNodeType,null,d.none,d.none,!0,null,i),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style");if(t){let n=this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t));if(!n)return;let[r,o]=n,i=this.top;for(let e=0;e<o.length;e++)this.removePendingMark(o[e],i);for(let e=0;e<r.length;e++)this.addPendingMark(r[e]);this.addElement(e);for(let e=0;e<r.length;e++)this.removePendingMark(r[e],i);for(let e=0;e<o.length;e++)this.addPendingMark(o[e])}else this.addElement(e)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();ee.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&&ee.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:Q.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,i=this.needsBlock;if(Z.hasOwnProperty(r))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),t&&this.sync(n),this.needsBlock=i}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=d.none,n=d.none;for(let r=0;r<e.length;r+=2)for(let o;;){let i=this.parser.matchStyle(e[r],e[r+1],this,o);if(!i)break;if(i.ignore)return null;if(i.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach((e=>{i.clearMark(e)&&(n=e.addToSet(n))})):t=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(t),!1!==i.consuming)break;o=i}return[t,n]}addElementByRule(e,t,n){let r,o,i;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace)):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let i=te(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ne(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}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,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=o;s--)if(i(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}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}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function oe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ie(e){let t={};for(let n in e)t[n]=e[n];return t}function se(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class ae{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=ce(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]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],s=this.serializeMark(n,e.isInline,t);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=ae.renderSpec(ce(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new 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&&ae.renderSpec(ce(n),r(e,t))}static renderSpec(e,t,n=null){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 r,o=t[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?e.createElementNS(n,o):e.createElement(o),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let o=l;o<t.length;o++){let i=t[o];if(0===i){if(o<t.length-1||o>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:o}=ae.renderSpec(e,i,n);if(s.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ae(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=le(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return le(e.marks)}}function le(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ce(e){return e.document||window.document}},6121:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2559);function o(e,t,n){return e.set((0,r.A)(e,t),n),n}},6127:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var r=n(4586);const o=Math.round;function i(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map((e=>parseFloat(e)));for(let e=0;e<3;e+=1)r[e]=t(r[e]||0,n[e]||"",e);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const s=(e,t,n)=>0===n?e:e/100;function a(e,t){const n=t||255;return e>n?n:e<0?0:e}class l{constructor(e){function t(t){return t[0]in e&&t[1]in e&&t[2]in e}if((0,r.A)(this,"isValid",!0),(0,r.A)(this,"r",0),(0,r.A)(this,"g",0),(0,r.A)(this,"b",0),(0,r.A)(this,"a",1),(0,r.A)(this,"_h",void 0),(0,r.A)(this,"_s",void 0),(0,r.A)(this,"_l",void 0),(0,r.A)(this,"_v",void 0),(0,r.A)(this,"_max",void 0),(0,r.A)(this,"_min",void 0),(0,r.A)(this,"_brightness",void 0),e)if("string"==typeof e){const n=e.trim();function o(e){return n.startsWith(e)}/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):o("rgb")?this.fromRgbString(n):o("hsl")?this.fromHslString(n):(o("hsv")||o("hsb"))&&this.fromHsvString(n)}else if(e instanceof l)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=a(e.r),this.g=a(e.g),this.b=a(e.b),this.a="number"==typeof e.a?a(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else{if(!t("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e));this.fromHsv(e)}}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*e(this.r)+.7152*e(this.g)+.0722*e(this.b)}getHue(){if(void 0===this._h){const e=this.getMax()-this.getMin();this._h=0===e?0:o(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(void 0===this._s){const e=this.getMax()-this.getMin();this._s=0===e?0:e/this.getMax()}return this._s}getLightness(){return void 0===this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return void 0===this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return void 0===this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){const n=this._c(e),r=t/100,i=e=>(n[e]-this[e])*r+this[e],s={r:o(i("r")),g:o(i("g")),b:o(i("b")),a:o(100*i("a"))/100};return this._c(s)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>o((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=2===t.length?t:"0"+t;const n=(this.g||0).toString(16);e+=2===n.length?n:"0"+n;const r=(this.b||0).toString(16);if(e+=2===r.length?r:"0"+r,"number"==typeof this.a&&this.a>=0&&this.a<1){const t=o(255*this.a).toString(16);e+=2===t.length?t:"0"+t}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=o(100*this.getSaturation()),n=o(100*this.getLightness());return 1!==this.a?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=a(t,n),r}_c(e){return new this.constructor(e)}getMax(){return void 0===this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return void 0===this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){if(this._h=e%360,this._s=t,this._l=n,this.a="number"==typeof r?r:1,t<=0){const e=o(255*n);this.r=e,this.g=e,this.b=e}let i=0,s=0,a=0;const l=e/60,c=(1-Math.abs(2*n-1))*t,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,s=u):l>=1&&l<2?(i=u,s=c):l>=2&&l<3?(s=c,a=u):l>=3&&l<4?(s=u,a=c):l>=4&&l<5?(i=u,a=c):l>=5&&l<6&&(i=c,a=u);const d=n-c/2;this.r=o(255*(i+d)),this.g=o(255*(s+d)),this.b=o(255*(a+d))}fromHsv({h:e,s:t,v:n,a:r}){this._h=e%360,this._s=t,this._v=n,this.a="number"==typeof r?r:1;const i=o(255*n);if(this.r=i,this.g=i,this.b=i,t<=0)return;const s=e/60,a=Math.floor(s),l=s-a,c=o(n*(1-t)*255),u=o(n*(1-t*l)*255),d=o(n*(1-t*(1-l))*255);switch(a){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;default:this.g=c,this.b=u}}fromHsvString(e){const t=i(e,s);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=i(e,s);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=i(e,((e,t)=>t.includes("%")?o(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}},6197:(e,t,n)=>{"use strict";n.d(t,{dc:()=>l,_Z:()=>c,VG:()=>u});const r=function(e){if(null==e)return i;if("function"==typeof e)return o(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=r(e[n]);return o((function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}))}(e):function(e){const t=e;return o((function(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}))}(e);if("string"==typeof e)return t=e,o((function(e){return e&&e.type===t}));var t;throw new Error("Expected function, string, or object as test")};function o(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function i(){return!0}const s=[],a=!0,l=!1,c="skip";function u(e,t,n,o){let i;"function"==typeof t&&"function"!=typeof n?(o=n,n=t):i=t;const u=r(i),d=o?-1:1;!function e(r,i,p){const f=r&&"object"==typeof r?r:{};if("string"==typeof f.type){const e="string"==typeof f.tagName?f.tagName:"string"==typeof f.name?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+r.type+(e?"<"+e+">":"")+")"})}return h;function h(){let f,h,m,g=s;if((!t||u(r,i,p[p.length-1]||void 0))&&(g=function(e){return Array.isArray(e)?e:"number"==typeof e?[a,e]:null==e?s:[e]}(n(r,p)),g[0]===l))return g;if("children"in r&&r.children){const t=r;if(t.children&&g[0]!==c)for(h=(o?t.children.length:-1)+d,m=p.concat(t);h>-1&&h<t.children.length;){const n=t.children[h];if(f=e(n,h,m)(),f[0]===l)return f;h="number"==typeof f[1]?f[1]:h+d}}return g}}(e,void 0,[])()}},6284:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>r})},6313:(e,t,n)=>{"use strict";function r(e,t,n){return">"+(n?"":" ")+e}n.d(t,{p:()=>C});var o=n(3219);function i(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&(0,o.q)(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}var s=n(8468);function a(e,t,n){return(n?"":" ")+e}function l(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function c(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(o);return a+=s.move(n.containerPhrasing(e,{before:a,after:o,...s.current()})),a+=s.move(o),i(),a}c.peek=function(e,t,n){return n.options.emphasis||"*"};var u=n(1697);function d(e){return e.value||""}function p(e,t,n,r){const o=l(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=n.enter(`title${i}`),u+=c.move(" "+o),u+=c.move(n.safe(e.title,{before:u,after:o,...c.current()})),u+=c.move(o),a()),u+=c.move(")"),s(),u}function f(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function h(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}d.peek=function(){return"<"},p.peek=function(){return"!"},f.peek=function(){return"!"},h.peek=function(){return"`"};var m=n(1807);function g(e,t){const n=(0,m.d)(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function y(e,t,n,r){const o=l(n),i='"'===o?"Quote":"Apostrophe",s=n.createTracker(r);let a,c;if(g(e,n)){const t=n.stack;n.stack=[],a=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,{before:r,after:">",...s.current()})),r+=s.move(">"),a(),n.stack=t,r}a=n.enter("link"),c=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(c=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=s.move(" "+o),u+=s.move(n.safe(e.title,{before:u,after:o,...s.current()})),u+=s.move(o),c()),u+=s.move(")"),a(),u}function v(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function b(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function w(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}y.peek=function(e,t,n){return g(e,n)?"<":"["},v.peek=function(){return"["};const k=function(e){if(null==e)return A;if("function"==typeof e)return x(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=k(e[n]);return x((function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}))}(e):function(e){const t=e;return x((function(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}))}(e);if("string"==typeof e)return t=e,x((function(e){return e&&e.type===t}));var t;throw new Error("Expected function, string, or object as test")};function x(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function A(){return!0}const S=k(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function E(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),s=n.createTracker(r);let a=s.move(o+o);return a+=s.move(n.containerPhrasing(e,{before:a,after:o,...s.current()})),a+=s.move(o+o),i(),a}E.peek=function(e,t,n){return n.options.strong||"*"};const C={blockquote:function(e,t,n,o){const i=n.enter("blockquote"),s=n.createTracker(o);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),r);return i(),a},break:i,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",l="`"===o?"GraveAccent":"Tilde";if((0,s.m)(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,a);return e(),t}const c=n.createTracker(r),u=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>s&&(s=i):i=1,o=r+t.length,r=n.indexOf(t,o);return s}(i,o)+1,3)),d=n.enter("codeFenced");let p=c.move(u);if(e.lang){const t=n.enter(`codeFencedLang${l}`);p+=c.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...c.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${l}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,{before:p,after:"\n",encode:["`"],...c.current()})),t()}return p+=c.move("\n"),i&&(p+=c.move(i+"\n")),p+=c.move(u),d(),p},definition:function(e,t,n,r){const o=l(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":"\n",...c.current()}))),a(),e.title&&(a=n.enter(`title${i}`),u+=c.move(" "+o),u+=c.move(n.safe(e.title,{before:u,after:o,...c.current()})),u+=c.move(o),a()),s(),u},emphasis:c,hardBreak:i,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if((0,u.f)(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===o?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(o),a=n.enter("headingAtx"),l=n.enter("phrasing");i.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),a(),c},html:d,image:p,imageReference:f,inlineCode:h,link:y,linkReference:v,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):b(n);const a=e.ordered?"."===s?")":".":function(e){const t=b(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),w(n)===s&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||b(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let s=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(r);a.move(i+" ".repeat(s-i.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),(function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?i:i+" ".repeat(s-i.length))+e}));return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,r);return i(),o(),s},root:function(e,t,n,r){return(e.children.some((function(e){return S(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:E,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(w(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}}},6330:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var s=e.apply(t,n);function a(e){r(s,o,i,a,l,"next",e)}function l(e){r(s,o,i,a,l,"throw",e)}a(void 0)}))}}n.d(t,{A:()=>o})},6488:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},6561:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8769);const o=n.n(r)().createContext(void 0)},6758:e=>{"use strict";e.exports=function(e){return e[1]}},6902:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7545);function o(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==e?(0,r.A)(e):"null"));return e}},7010:(e,t,n)=>{"use strict";n.d(t,{YK:()=>d,jH:()=>l});var r=n(8769),o=n.n(r),i=n(7652),s=n(6561);const a=100,l=1e3,c={Modal:a,Drawer:a,Popover:a,Popconfirm:a,Tooltip:a,Tour:a,FloatButton:a},u={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},d=(e,t)=>{const[,n]=(0,i.Ay)(),r=o().useContext(s.A);let a;if(void 0!==t)a=[t,t];else{let o=null!=r?r:0;o+=e in c?(r?0:n.zIndexPopupBase)+c[e]:u[e],a=[void 0===r?t:o,o]}return a}},7043:(e,t,n)=>{"use strict";n.d(t,{Ik:()=>c,dI:()=>l,j7:()=>a,pj:()=>d,sm:()=>p,zD:()=>u});var r=(e=>(e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e))(r||{});class o extends Error{constructor(e,t){super(t),this.name="MilkdownError",this.code=e}}const i=(e,t)=>"function"==typeof t?"[Function]":t,s=e=>JSON.stringify(e,i);function a(e){return new o(r.docTypeError,`Doc type error, unsupported type: ${s(e)}`)}function l(){return new o(r.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function c(e){return new o(r.expectDomTypeError,`Expect to be a dom, but get: ${s(e)}.`)}function u(){return new o(r.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function d(e){return new o(r.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function p(e){return new o(r.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}},7096:(e,t,n)=>{"use strict";function r(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}n.d(t,{A:()=>r})},7169:(e,t,n)=>{"use strict";function r(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}n.d(t,{A:()=>r})},7268:(e,t,n)=>{"use strict";n.d(t,{yu:()=>c,Qx:()=>h,b_:()=>u,JY:()=>b,hk:()=>g,dz:()=>d,YR:()=>v,Yh:()=>m,Gf:()=>p,lz:()=>w,pq:()=>y,m5:()=>f,yh:()=>k});var r=n(5119),o=n(7488);var i=n(7043),s=n(5939),a=n(6090),l=n(1570);function c(e,t){const n=(0,r.qf)(e),o=i=>async()=>{o.key=n,await i.wait(r.A2);const s=t(i);return i.get(r.MD).create(n,s),o.run=t=>i.get(r.MD).call(e,t),()=>{i.get(r.MD).remove(n)}};return o}function u(e){const t=n=>async()=>{await n.wait(r.x8);const o=e(n);return n.update(r.f4,(e=>[...e,o])),t.inputRule=o,()=>{n.update(r.f4,(e=>e.filter((e=>e!==o))))}};return t}function d(e,t){const n=o=>async()=>{const i=t(o);return o.update(r.P_,(t=>[...t.filter((t=>t[0]!==e)),[e,i]])),n.id=e,n.schema=i,()=>{o.update(r.P_,(t=>t.filter((([t])=>t!==e))))}};return n.type=t=>{const n=t.get(r.pZ).nodes[e];if(!n)throw(0,i.pj)(e);return n},n}function p(e){let t;const n=n=>async()=>(await n.wait(r.x8),t=e(n),n.update(r.TP,(e=>[...e,t])),()=>{n.update(r.TP,(e=>e.filter((e=>e!==t))))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function f(e,t){const n=o=>async()=>{await o.wait(r.x8);const i=t(o);return e.type(o)instanceof a.Z6?o.update(r.pe,(t=>[...t,[e.id,i]])):o.update(r.aD,(t=>[...t,[e.id,i]])),n.view=i,n.type=e,()=>{e.type(o)instanceof a.Z6?o.update(r.pe,(t=>t.filter((t=>t[0]!==e.id)))):o.update(r.aD,(t=>t.filter((t=>t[0]!==e.id))))}};return n}function h(e,t){const n=(0,o.Z0)(e,t),r=e=>(e.inject(n),()=>()=>{e.remove(n)});return r.key=n,r}function m(e,t){const n=h(t,e),o=d(e,(e=>e.get(n.key)(e))),i=[n,o];return i.id=o.id,i.node=o,i.type=e=>o.type(e),i.schema=o.schema,i.ctx=n,i.key=n.key,i.extendSchema=t=>o=>()=>{const s=o.get(n.key),a=t(s)(o);o.update(r.P_,(t=>[...t.filter((t=>t[0]!==e)),[e,a]])),i.schema=a},i}function g(e,t){const n=h(t,e),o=function(e,t){const n=o=>async()=>{const i=t(o);return o.update(r.u7,(t=>[...t.filter((t=>t[0]!==e)),[e,i]])),n.id=e,n.schema=i,()=>{o.update(r.u7,(t=>t.filter((([t])=>t!==e))))}};return n.type=t=>{const n=t.get(r.pZ).marks[e];if(!n)throw(0,i.sm)(e);return n},n}(e,(e=>e.get(n.key)(e))),s=[n,o];return s.id=o.id,s.mark=o,s.type=o.type,s.schema=o.schema,s.ctx=n,s.key=n.key,s.extendSchema=t=>o=>()=>{const i=o.get(n.key),a=t(i)(o);o.update(r.u7,(t=>[...t.filter((t=>t[0]!==e)),[e,a]])),s.schema=a},s}function y(e,t){const n=h(Object.fromEntries(Object.entries(t).map((([e,{shortcuts:t}])=>[e,t]))),`${e}Keymap`),o=function(e){const t=n=>async()=>{await n.wait(r.x8);const o=e(n),i=(0,s.w)(o);return n.update(r.TP,(e=>[...e,i])),t.keymap=o,()=>{n.update(r.TP,(e=>e.filter((e=>e!==i))))}};return t}((e=>{const r=e.get(n.key),o=Object.entries(t).flatMap((([t,{command:n}])=>[r[t]].flat().map((t=>[t,n(e)]))));return Object.fromEntries(o)})),i=[n,o];return i.ctx=n,i.shortcuts=o,i.key=n.key,i.keymap=o.keymap,i}((e,t=21)=>{(e=>{Math.log(e.length-1),Math.LN2,e.length})("abcedfghicklmn",t)})(0,10);const v=(e,t=()=>({}))=>h(t,`${e}Attr`),b=(e,t=()=>({}))=>h(t,`${e}Attr`);function w(e,t,n){const o=h(n??{},e),i=e=>async()=>{await e.wait(r.ge);const n={plugin:t(e),options:e.get(o.key)};return e.update(r.eM,(e=>[...e,n])),()=>{e.update(r.eM,(e=>e.filter((e=>e!==n))))}},s=[o,i];return s.id=e,s.plugin=i,s.options=o,s}function k(e,t=!1){return n=>{const o=n.get(r.kY),i=n.get(r.bQ)(e);if(!i)return;if(!t){const{state:e}=o;return o.dispatch(e.tr.replace(0,e.doc.content.size,new a.Ji(i.content,0,0)))}const s=n.get(r.pZ),c=n.get(r.Sr),u=n.get(r.TP),d=l.$t.create({schema:s,doc:i,plugins:u,...c});o.updateState(d)}}},7488:(e,t,n)=>{"use strict";n.d(t,{CR:()=>H,Kj:()=>R,Z0:()=>g,mc:()=>f,zD:()=>D});var r,o,i,s=n(1440),a=Object.defineProperty,l=(e,t,n)=>(((e,t,n)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),c=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},u=(e,t,n)=>(c(e,t,"read from private field"),n?n.call(e):t.get(e)),d=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},p=(e,t,n,r)=>(c(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class f{constructor(){l(this,"sliceMap",new Map),l(this,"get",(e=>{const t="string"==typeof e?[...this.sliceMap.values()].find((t=>t.type.name===e)):this.sliceMap.get(e.id);if(!t){const t="string"==typeof e?e:e.name;throw(0,s.XM)(t)}return t})),l(this,"remove",(e=>{const t="string"==typeof e?[...this.sliceMap.values()].find((t=>t.type.name===e)):this.sliceMap.get(e.id);!t||this.sliceMap.delete(t.type.id)})),l(this,"has",(e=>"string"==typeof e?[...this.sliceMap.values()].some((t=>t.type.name===e)):this.sliceMap.has(e.id)))}}class h{constructor(e,t,n){l(this,"type"),d(this,r,[]),d(this,o,void 0),d(this,i,(()=>{u(this,r).forEach((e=>e(u(this,o))))})),l(this,"set",(e=>{p(this,o,e),u(this,i).call(this)})),l(this,"get",(()=>u(this,o))),l(this,"update",(e=>{p(this,o,e(u(this,o))),u(this,i).call(this)})),this.type=n,p(this,o,t),e.set(n.id,this)}on(e){return u(this,r).push(e),()=>{p(this,r,u(this,r).filter((t=>t!==e)))}}once(e){const t=this.on((n=>{e(n),t()}));return t}off(e){p(this,r,u(this,r).filter((t=>t!==e)))}offAll(){p(this,r,[])}}r=new WeakMap,o=new WeakMap,i=new WeakMap;class m{constructor(e,t){l(this,"id"),l(this,"name"),l(this,"_typeInfo"),l(this,"_defaultValue"),this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw(0,s.dI)()}}create(e,t=this._defaultValue){return new h(e,t,this)}}const g=(e,t)=>new m(e,t);var y,v,b,w,k,x,A,S,E,C,O,M,N;class T{constructor(e,t,n){d(this,y,void 0),d(this,v,void 0),d(this,b,void 0),d(this,w,new Set),d(this,k,new Set),d(this,x,new Map),d(this,A,new Map),l(this,"read",(()=>({metadata:u(this,y),injectedSlices:[...u(this,w)].map((e=>({name:"string"==typeof e?e:e.name,value:u(this,S).call(this,e)}))),consumedSlices:[...u(this,k)].map((e=>({name:"string"==typeof e?e:e.name,value:u(this,S).call(this,e)}))),recordedTimers:[...u(this,x)].map((([e,{duration:t}])=>({name:e.name,duration:t,status:u(this,E).call(this,e)}))),waitTimers:[...u(this,A)].map((([e,{duration:t}])=>({name:e.name,duration:t,status:u(this,E).call(this,e)})))}))),l(this,"onRecord",(e=>{u(this,x).set(e,{start:Date.now(),duration:0})})),l(this,"onClear",(e=>{u(this,x).delete(e)})),l(this,"onDone",(e=>{const t=u(this,x).get(e);!t||(t.duration=Date.now()-t.start)})),l(this,"onWait",((e,t)=>{const n=Date.now();t.finally((()=>{u(this,A).set(e,{duration:Date.now()-n})}))})),l(this,"onInject",(e=>{u(this,w).add(e)})),l(this,"onRemove",(e=>{u(this,w).delete(e)})),l(this,"onUse",(e=>{u(this,k).add(e)})),d(this,S,(e=>u(this,v).get(e).get())),d(this,E,(e=>u(this,b).get(e).status)),p(this,v,e),p(this,b,t),p(this,y,n)}}y=new WeakMap,v=new WeakMap,b=new WeakMap,w=new WeakMap,k=new WeakMap,x=new WeakMap,A=new WeakMap,S=new WeakMap,E=new WeakMap;const I=class{constructor(e,t,n){d(this,C,void 0),d(this,O,void 0),d(this,M,void 0),d(this,N,void 0),l(this,"produce",(e=>e&&Object.keys(e).length?new I(u(this,C),u(this,O),{...e}):this)),l(this,"inject",((e,t)=>{var n;const r=e.create(u(this,C).sliceMap);return null!=t&&r.set(t),null==(n=u(this,N))||n.onInject(e),this})),l(this,"remove",(e=>{var t;return u(this,C).remove(e),null==(t=u(this,N))||t.onRemove(e),this})),l(this,"record",(e=>{var t;return e.create(u(this,O).store),null==(t=u(this,N))||t.onRecord(e),this})),l(this,"clearTimer",(e=>{var t;return u(this,O).remove(e),null==(t=u(this,N))||t.onClear(e),this})),l(this,"isInjected",(e=>u(this,C).has(e))),l(this,"isRecorded",(e=>u(this,O).has(e))),l(this,"use",(e=>{var t;return null==(t=u(this,N))||t.onUse(e),u(this,C).get(e)})),l(this,"get",(e=>this.use(e).get())),l(this,"set",((e,t)=>this.use(e).set(t))),l(this,"update",((e,t)=>this.use(e).update(t))),l(this,"timer",(e=>u(this,O).get(e))),l(this,"done",(e=>{var t;this.timer(e).done(),null==(t=u(this,N))||t.onDone(e)})),l(this,"wait",(e=>{var t;const n=this.timer(e).start();return null==(t=u(this,N))||t.onWait(e,n),n})),l(this,"waitTimers",(async e=>{await Promise.all(this.get(e).map((e=>this.wait(e))))})),p(this,C,e),p(this,O,t),p(this,M,n),n&&p(this,N,new T(e,t,n))}get meta(){return u(this,M)}get inspector(){return u(this,N)}};let R=I;C=new WeakMap,O=new WeakMap,M=new WeakMap,N=new WeakMap;class D{constructor(){l(this,"store",new Map),l(this,"get",(e=>{const t=this.store.get(e.id);if(!t)throw(0,s.nr)(e.name);return t})),l(this,"remove",(e=>{this.store.delete(e.id)})),l(this,"has",(e=>this.store.has(e.id)))}}var P,F,L,_,z,$;class j{constructor(e,t){l(this,"type"),d(this,P,null),d(this,F,null),d(this,L,void 0),d(this,_,"pending"),l(this,"start",(()=>(u(this,P)??p(this,P,new Promise(((e,t)=>{p(this,F,(t=>{t instanceof CustomEvent&&t.detail.id===u(this,L)&&(p(this,_,"resolved"),u(this,z).call(this),t.stopImmediatePropagation(),e())})),u(this,$).call(this,(()=>{"pending"===u(this,_)&&p(this,_,"rejected"),u(this,z).call(this),t(new Error(`Timing ${this.type.name} timeout.`))})),p(this,_,"pending"),addEventListener(this.type.name,u(this,F))}))),u(this,P)))),l(this,"done",(()=>{const e=new CustomEvent(this.type.name,{detail:{id:u(this,L)}});dispatchEvent(e)})),d(this,z,(()=>{u(this,F)&&removeEventListener(this.type.name,u(this,F))})),d(this,$,(e=>{setTimeout((()=>{e()}),this.type.timeout)})),p(this,L,Symbol(t.name)),this.type=t,e.set(t.id,this)}get status(){return u(this,_)}}P=new WeakMap,F=new WeakMap,L=new WeakMap,_=new WeakMap,z=new WeakMap,$=new WeakMap;class B{constructor(e,t=3e3){l(this,"id"),l(this,"name"),l(this,"timeout"),l(this,"create",(e=>new j(e,this))),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}}const H=(e,t=3e3)=>new B(e,t)},7534:(e,t,n)=>{"use strict";n.d(t,{Te:()=>pr});var r,o,i=n(7043),s=n(536),a=n(96),l=n(7268),c=n(5119),u=n(1570),d=n(6090),p=n(3686),f=n(5939),h=n(3710);if("undefined"!=typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),o=(t,n)=>(e.set(t,n),n)}else{const e=[],t=10;let n=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},o=(r,o)=>(n==t&&(n=0),e[n++]=r,e[n++]=o)}var m=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++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,o=t/this.width|0;let i=r+1,s=o+1;for(let e=1;i<this.width&&this.map[t+e]==n;e++)i++;for(let e=1;s<this.height&&this.map[t+this.width*e]==n;e++)s++;return{left:r,top:o,right:i,bottom:s}}throw new 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 new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:o,top:i,bottom:s}=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:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(e,t){const{left:n,right:r,top:o,bottom:i}=this.findCell(e),{left:s,right:a,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(o,l),right:Math.max(r,a),bottom:Math.max(i,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,o==e.left&&o&&this.map[i-1]==s||r==e.top&&r&&this.map[i-this.width]==s||t.push(s))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width;const 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 new RangeError("Not a table node: "+e.type.name);const t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const o=e.child(r);let i=0;if(n)for(let t=0;t<r;t++){const n=e.child(t);for(let e=0;e<n.childCount;e++){const o=n.child(e);t+o.attrs.rowspan>r&&(i+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){const 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=[];let o=0,i=null;const s=[];for(let e=0,o=t*n;e<o;e++)r[e]=0;for(let a=0,l=0;a<n;a++){const c=e.child(a);l++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==c.childCount)break;const u=c.child(e),{colspan:d,rowspan:p,colwidth:f}=u.attrs;for(let e=0;e<p;e++){if(e+a>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:l,n:p-e});break}const c=o+e*t;for(let e=0;e<d;e++){0==r[c+e]?r[c+e]=l:(i||(i=[])).push({type:"collision",row:a,pos:l,n:d-e});const n=f&&f[e];if(n){const r=(c+e)%t*2,o=s[r];null==o||o!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):o==n&&s[r+1]++}}}o+=d,l+=u.nodeSize}const u=(a+1)*t;let d=0;for(;o<u;)0==r[o++]&&d++;d&&(i||(i=[])).push({type:"missing",row:a,n:d}),l++}const a=new m(t,n,r,i);let l=!1;for(let e=0;!l&&e<s.length;e+=2)null!=s[e]&&s[e+1]<n&&(l=!0);return l&&function(e,t,n){e.problems||(e.problems=[]);const r={};for(let o=0;o<e.map.length;o++){const i=e.map[o];if(r[i])continue;r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let a=null;const l=s.attrs;for(let n=0;n<l.colspan;n++){const r=t[(o+n)%e.width*2];null==r||l.colwidth&&l.colwidth[n]==r||((a||(a=g(l)))[n]=r)}a&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}(a,s,e),a}(e))}};function g(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function y(e,t){if("string"==typeof e)return{};const n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((e=>Number(e))):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(const n in t){const r=t[n].getFromDOM,o=r&&r(e);null!=o&&(i[n]=o)}return i}function v(e,t){const n={};1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const r in t){const o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function b(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}var w=new u.hs("selectingCells");function k(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 x(e){const 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 A(e){const 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;const n=k(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const 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--){const 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 new RangeError(`No cell found around position ${t.head}`)}function S(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function E(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function C(e,t,n){const r=e.node(-1),o=m.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return null==s?null:e.node(0).resolve(i+s)}function O(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((e=>e>0))||(r.colwidth=null)),r}function M(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}var N=class extends u.LN{constructor(e,t=e){const n=e.node(-1),r=m.get(n),o=e.start(-1),i=r.rectBetween(e.pos-o,t.pos-o),s=e.node(0),a=r.cellsInRect(i).filter((e=>e!=t.pos-o));a.unshift(t.pos-o);const l=a.map((e=>{const t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);const r=o+e+1;return new u.yn(s.resolve(r),s.resolve(r+t.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(e,t){const n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(S(n)&&S(r)&&E(n,r)){const e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?N.rowSelection(n,r):e&&this.isColSelection()?N.colSelection(n,r):new N(n,r)}return u.U3.between(n,r)}content(){const e=this.$anchorCell.node(-1),t=m.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++){const s=[];for(let i=n*t.width+r.left,a=r.left;a<r.right;a++,i++){const n=t.map[i];if(o[n])continue;o[n]=!0;const a=t.findCell(n);let l=e.nodeAt(n);if(!l)throw RangeError(`No cell with offset ${n} found`);const c=r.left-a.left,u=a.right-r.right;if(c>0||u>0){let e=l.attrs;if(c>0&&(e=O(e,0,c)),u>0&&(e=O(e,e.colspan-u,u)),a.left<r.left){if(l=l.type.createAndFill(e),!l)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else l=l.type.create(e,l.content)}if(a.top<r.top||a.bottom>r.bottom){const e={...l.attrs,rowspan:Math.min(a.bottom,r.bottom)-Math.max(a.top,r.top)};l=a.top<r.top?l.type.createAndFill(e):l.type.create(e,l.content)}s.push(l)}i.push(e.child(n).copy(d.FK.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?e:i;return new d.Ji(d.FK.from(s),1,1)}replace(e,t=d.Ji.empty){const n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){const{$from:i,$to:s}=r[o],a=e.mapping.slice(n);e.replace(a.map(i.pos),a.map(s.pos),o?d.Ji.empty:t)}const o=u.LN.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new d.Ji(d.FK.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),n=m.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(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),r=m.get(n),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(t.pos-o),a=e.node(0);return i.top<=s.top?(i.top>0&&(e=a.resolve(o+r.map[i.left])),s.bottom<r.height&&(t=a.resolve(o+r.map[r.width*(r.height-1)+s.right-1]))):(s.top>0&&(t=a.resolve(o+r.map[s.left])),i.bottom<r.height&&(e=a.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new N(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=m.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),o=t.colCount(this.$headCell.pos-n);if(Math.min(r,o)>0)return!1;const i=r+this.$anchorCell.nodeAfter.attrs.colspan,s=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==t.width}eq(e){return e instanceof N&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),r=m.get(n),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(t.pos-o),a=e.node(0);return i.left<=s.left?(i.left>0&&(e=a.resolve(o+r.map[i.top*r.width])),s.right<r.width&&(t=a.resolve(o+r.map[r.width*(s.top+1)-1]))):(s.left>0&&(t=a.resolve(o+r.map[s.top*r.width])),i.right<r.width&&(e=a.resolve(o+r.map[r.width*(i.top+1)-1]))),new N(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new N(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new N(e.resolve(t),e.resolve(n))}getBookmark(){return new T(this.$anchorCell.pos,this.$headCell.pos)}};N.prototype.visible=!1,u.LN.jsonID("cell",N);var T=class{constructor(e,t){this.anchor=e,this.head=t}map(e){return new T(e.map(this.anchor),e.map(this.head))}resolve(e){const 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&&E(t,n)?new N(t,n):u.LN.near(n,1)}};function I(e){if(!(e.selection instanceof N))return null;const t=[];return e.selection.forEachCell(((e,n)=>{t.push(p.NZ.node(n,n+e.nodeSize,{class:"selectedCell"}))})),p.zF.create(e.doc,t)}var R=new u.hs("fix-tables");function D(e,t,n,r){const o=e.childCount,i=t.childCount;e:for(let s=0,a=0;s<i;s++){const i=t.child(s);for(let t=a,r=Math.min(o,s+3);t<r;t++)if(e.child(t)==i){a=t+1,n+=i.nodeSize;continue e}r(i,n),a<o&&e.child(a).sameMarkup(i)?D(e.child(a),i,n+1,r):i.nodesBetween(0,i.content.size,r,n+1),n+=i.nodeSize}}function P(e,t){let n;const r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){const o=m.get(t);if(!o.problems)return r;r||(r=e.tr);const i=[];for(let e=0;e<o.height;e++)i.push(0);for(let e=0;e<o.problems.length;e++){const s=o.problems[e];if("collision"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;const o=e.attrs;for(let e=0;e<o.rowspan;e++)i[s.row+e]+=s.n;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,O(o,o.colspan-s.n,s.n))}else if("missing"==s.type)i[s.row]+=s.n;else if("overlong_rowspan"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-s.n})}else if("colwidth mismatch"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,{...e.attrs,colwidth:s.colwidth})}}let s,a;for(let e=0;e<i.length;e++)i[e]&&(null==s&&(s=e),a=e);for(let l=0,c=n+1;l<o.height;l++){const n=t.child(l),o=c+n.nodeSize,u=i[l];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);const i=[];for(let n=0;n<u;n++){const n=b(e.schema)[t].createAndFill();n&&i.push(n)}const d=0!=l&&s!=l-1||a!=l?o-1:c+1;r.insert(r.mapping.map(d),i)}c=o}return r.setMeta(R,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&D(t.doc,e.doc,0,r):e.doc.descendants(r),n}function F(e,t){const n=e.createAndFill();return new h.dL(n).replace(0,n.content.size,t).doc}function L(e,t,n,r,o,i,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let c=o;c<i;c++){const o=s*t.width+c,i=t.map[o];if(t.map[o-t.width]==i){l=!0;const o=n.nodeAt(i),{top:u,left:d}=t.findCell(i);e.setNodeMarkup(e.mapping.slice(a).map(i+r),null,{...o.attrs,rowspan:s-u}),e.insert(e.mapping.slice(a).map(t.positionAt(s,d,n)),o.type.createAndFill({...o.attrs,rowspan:u+o.attrs.rowspan-s})),c+=o.attrs.colspan-1}}return l}function _(e,t,n,r,o,i,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let c=o;c<i;c++){const o=c*t.width+s,i=t.map[o];if(t.map[o-1]==i){l=!0;const o=n.nodeAt(i),u=t.colCount(i),d=e.mapping.slice(a).map(i+r);e.setNodeMarkup(d,null,O(o.attrs,s-u,o.attrs.colspan-(s-u))),e.insert(d+o.nodeSize,o.type.createAndFill(O(o.attrs,0,s-u))),c+=o.attrs.rowspan-1}}return l}function z(e,t,n,r,o){let i=n?e.doc.nodeAt(n-1):e.doc;if(!i)throw new Error("No table found");let s=m.get(i);const{top:a,left:l}=r,c=l+o.width,u=a+o.height,p=e.tr;let f=0;function h(){if(i=n?p.doc.nodeAt(n-1):p.doc,!i)throw new Error("No table found");s=m.get(i),f=p.mapping.maps.length}(function(e,t,n,r,o,i,s){const a=b(e.doc.type.schema);let l,c;if(o>t.width)for(let i=0,u=0;i<t.height;i++){const d=n.child(i);u+=d.nodeSize;const p=[];let f;f=null==d.lastChild||d.lastChild.type==a.cell?l||(l=a.cell.createAndFill()):c||(c=a.header_cell.createAndFill());for(let e=t.width;e<o;e++)p.push(f);e.insert(e.mapping.slice(s).map(u-1+r),p)}if(i>t.height){const u=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){const o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==a.header_cell;u.push(o?c||(c=a.header_cell.createAndFill()):l||(l=a.cell.createAndFill()))}const p=a.row.create(null,d.FK.from(u)),f=[];for(let e=t.height;e<i;e++)f.push(p);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),f)}return!(!l&&!c)})(p,s,i,n,c,u,f)&&h(),L(p,s,i,n,l,c,a,f)&&h(),L(p,s,i,n,l,c,u,f)&&h(),_(p,s,i,n,a,u,l,f)&&h(),_(p,s,i,n,a,u,c,f)&&h();for(let e=a;e<u;e++){const t=s.positionAt(e,l,i),r=s.positionAt(e,c,i);p.replace(p.mapping.slice(f).map(t+n),p.mapping.slice(f).map(r+n),new d.Ji(o.rows[e-a],0,0))}h(),p.setSelection(new N(p.doc.resolve(n+s.positionAt(a,l,i)),p.doc.resolve(n+s.positionAt(u-1,c-1,i)))),t(p)}var $=(0,f.K)({ArrowLeft:B("horiz",-1),ArrowRight:B("horiz",1),ArrowUp:B("vert",-1),ArrowDown:B("vert",1),"Shift-ArrowLeft":H("horiz",-1),"Shift-ArrowRight":H("horiz",1),"Shift-ArrowUp":H("vert",-1),"Shift-ArrowDown":H("vert",1),Backspace:V,"Mod-Backspace":V,Delete:V,"Mod-Delete":V});function j(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function B(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof N)return j(n,r,u.LN.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;const s=q(o,e,t);if(null==s)return!1;if("horiz"==e)return j(n,r,u.LN.near(n.doc.resolve(i.head+t),t));{const o=n.doc.resolve(s),i=C(o,e,t);let a;return a=i?u.LN.near(i,1):t<0?u.LN.near(n.doc.resolve(o.before(-1)),-1):u.LN.near(n.doc.resolve(o.after(-1)),1),j(n,r,a)}}}function H(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof N)s=i;else{const r=q(o,e,t);if(null==r)return!1;s=new N(n.doc.resolve(r))}const a=C(s.$headCell,e,t);return!!a&&j(n,r,new N(s.$anchorCell,a))}}function V(e,t){const n=e.selection;if(!(n instanceof N))return!1;if(t){const r=e.tr,o=b(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 d.Ji(o,0,0))})),r.docChanged&&t(r)}return!0}function U(e,t){const n=k(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new N(n))),!0)}function W(e,t,n){if(!x(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;const 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;const i=e?0:Math.max(0,n-1),l=e<t.childCount-1?0:Math.max(0,r-1);(i||l)&&(o=F(b(s).row,new d.Ji(o,i,l)).content),a.push(o)}else{if("cell"!=i&&"header_cell"!=i)return null;a.push(n||r?F(b(s).row,new d.Ji(t,n,r)).content:t)}return function(e,t){const n=[];for(let e=0;e<t.length;e++){const r=t[e];for(let t=r.childCount-1;t>=0;t--){const{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(d.FK.empty),n[o]<r){const i=b(e).cell.createAndFill(),s=[];for(let e=n[o];e<r;e++)s.push(i);t[o]=t[o].append(d.FK.from(s))}return{height:t.length,width:r,rows:t}}(s,a)}(n);const o=e.state.selection;if(o instanceof N){r||(r={width:1,height:1,rows:[d.FK.from(F(b(e.state.schema).cell,n))]});const t=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),s=m.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){const t=[],o=[];for(let e=0;e<n.length;e++){const i=n[e],s=[];for(let n=t[e]||0,o=0;n<r;o++){let a=i.child(o%i.childCount);n+a.attrs.colspan>r&&(a=a.type.createChecked(O(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+a.attrs.colspan}o.push(d.FK.from(s))}n=o,e=r}if(t!=o){const e=[];for(let r=0,i=0;r<o;r++,i++){const 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(d.FK.from(s))}n=e,t=o}return{width:e,height:t,rows:n}}(r,s.right-s.left,s.bottom-s.top),z(e.state,e.dispatch,i,s,r),!0}if(r){const t=A(e.state),n=t.start(-1);return z(e.state,e.dispatch,n,m.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function K(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=G(e,t.target);let o;if(t.shiftKey&&e.state.selection instanceof N)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(o=k(e.state.selection.$anchor))&&(null==(n=Y(e,t))?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(t,n){let r=Y(e,n);const o=null==w.getState(e.state);if(!r||!E(t,r)){if(!o)return;r=t}const i=new N(t,r);if(o||!e.state.selection.eq(i)){const n=e.state.tr.setSelection(i);o&&n.setMeta(w,t.pos),e.dispatch(n)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),null!=w.getState(e.state)&&e.dispatch(e.state.tr.setMeta(w,-1))}function a(n){const o=n,a=w.getState(e.state);let l;if(null!=a)l=e.state.doc.resolve(a);else if(G(e,o.target)!=r&&(l=Y(e,t),!l))return s();l&&i(l,o)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function q(e,t,n){if(!(e.state.selection instanceof u.U3))return null;const{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){const i=r.before(o),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?i:null}}return null}function G(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function Y(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?k(e.state.doc.resolve(n.pos)):null}var J=class{constructor(e,t){this.node=e,this.cellMinWidth=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")),X(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,X(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function X(e,t,n,r,o,i){var s;let a=0,l=!0,c=t.firstChild;const u=e.firstChild;if(u){for(let e=0,n=0;e<u.childCount;e++){const{colspan:s,colwidth:d}=u.child(e).attrs;for(let e=0;e<s;e++,n++){const s=o==n?i:d&&d[e],u=s?s+"px":"";a+=s||r,s||(l=!1),c?(c.style.width!=u&&(c.style.width=u),c=c.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;c;){const e=c.nextSibling;null==(s=c.parentNode)||s.removeChild(c),c=e}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var Z=new u.hs("tableColumnResizing");var Q=class{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(Z);if(n&&null!=n.setHandle)return new Q(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new Q(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let n=e.mapping.map(t.activeHandle,-1);return S(e.doc.resolve(n))||(n=-1),new Q(n,t.dragging)}return t}};function ee(e,t,n){const r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;const{pos:o}=r,i=k(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;const s=m.get(i.node(-1)),a=i.start(-1),l=s.map.indexOf(i.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function te(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function ne(e,t){e.dispatch(e.state.tr.setMeta(Z,{setHandle:t}))}function re(e){const t=e.selection,n=A(e),r=n.node(-1),o=n.start(-1),i=m.get(r);return{...t instanceof N?i.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function oe(e,{map:t,tableStart:n,table:r},o){let i=o>0?-1:0;(function(e,t,n){const r=b(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(t,r,o+i)&&(i=0==o||o==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+o;if(o>0&&o<t.width&&t.map[a-1]==t.map[a]){const i=t.map[a],l=r.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,M(l.attrs,o-t.colCount(i))),s+=l.attrs.rowspan-1}else{const l=null==i?b(r.type.schema).cell:r.nodeAt(t.map[a+i]).type,c=t.positionAt(s,o,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function ie(e,t){if(!x(e))return!1;if(t){const n=re(e);t(oe(e.tr,n,n.left))}return!0}function se(e,t){if(!x(e))return!1;if(t){const n=re(e);t(oe(e.tr,n,n.right))}return!0}function ae(e,{map:t,table:n,tableStart:r},o){const i=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+o,l=t.map[a],c=n.nodeAt(l),u=c.attrs;if(o>0&&t.map[a-1]==l||o<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(i).map(r+l),null,O(u,o-t.colCount(l)));else{const t=e.mapping.slice(i).map(r+l);e.delete(t,t+c.nodeSize)}s+=u.rowspan}}function le(e,{map:t,table:n,tableStart:r},o){let i=0;for(let e=0;e<o;e++)i+=n.child(e).nodeSize;const s=i+n.child(o).nodeSize,a=e.mapping.maps.length;e.delete(i+r,s+r);for(let i=0,s=o*t.width;i<t.width;i++,s++){const l=t.map[s];if(o>0&&l==t.map[s-t.width]){const t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(a).map(l+r),null,{...t,rowspan:t.rowspan-1}),i+=t.colspan-1}else if(o<t.width&&l==t.map[s+t.width]){const s=n.nodeAt(l),c=s.attrs,u=s.type.create({...c,rowspan:s.attrs.rowspan-1},s.content),d=t.positionAt(o+1,i,n);e.insert(e.mapping.slice(a).map(r+d),u),i+=c.colspan-1}}}function ce(e,t,n){const 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++){const o=t.table.nodeAt(r[e]);if(o&&o.type!==n.header_cell)return!1}return!0}function ue(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!x(t))return!1;if(n){const r=b(t.schema),o=re(t),i=t.tr,s=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),a=s.map((e=>o.table.nodeAt(e)));for(let e=0;e<s.length;e++)a[e].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[e],r.cell,a[e].attrs);if(0==i.steps.length)for(let e=0;e<s.length;e++)i.setNodeMarkup(o.tableStart+s[e],r.header_cell,a[e].attrs);n(i)}return!0}}(e):function(t,n){if(!x(t))return!1;if(n){const r=b(t.schema),o=re(t),i=t.tr,s=ce("row",o,r),a=ce("column",o,r),l=("column"===e?s:"row"===e&&a)?1:0,c="column"==e?{left:0,top:l,right:1,bottom:o.map.height}:"row"==e?{left:l,top:0,right:o.map.width,bottom:1}:o,u="column"==e?a?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((e=>{const t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)})),n(i)}return!0}}function de(e){return function(t,n){if(!x(t))return!1;const r=function(e,t){if(t<0){const t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){const r=e.node(-1).child(t),o=r.lastChild;if(o)return n-1-o.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){const e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(A(t),e);if(null==r)return!1;if(n){const e=t.doc.resolve(r);n(t.tr.setSelection(u.U3.between(e,(o=e,o.node(0).resolve(o.pos+o.nodeAfter.nodeSize)))).scrollIntoView())}var o;return!0}}ue("row",{useDeprecatedLogic:!0}),ue("column",{useDeprecatedLogic:!0}),ue("cell",{useDeprecatedLogic:!0});var pe=n(4254),fe=n(5715);function he(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}var me=n(9820);const ge=Ae(/[A-Za-z]/),ye=Ae(/[\dA-Za-z]/);function ve(e){return null!==e&&e<-2}function be(e){return null!==e&&(e<0||32===e)}function we(e){return-2===e||-1===e||32===e}Ae(/[#-'*+\--9=?A-Z^-~]/),Ae(/\d/),Ae(/[\dA-Fa-f]/),Ae(/[!-/:-@[-`{-~]/);const ke=Ae(/\p{P}|\p{S}/u),xe=Ae(/\s/);function Ae(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}var Se=n(7096);const Ee=function(e){if(null==e)return Oe;if("function"==typeof e)return Ce(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ee(e[n]);return Ce((function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}))}(e):function(e){const t=e;return Ce((function(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}))}(e);if("string"==typeof e)return t=e,Ce((function(e){return e&&e.type===t}));var t;throw new Error("Expected function, string, or object as test")};function Ce(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Oe(){return!0}const Me=[],Ne=!1;function Te(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=Ee(o),s=r?-1:1;!function e(o,a,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Me;if((!t||i(o,a,l[l.length-1]||void 0))&&(p=function(e){return Array.isArray(e)?e:"number"==typeof e?[true,e]:null==e?Me:[e]}(n(o,l)),p[0]===Ne))return p;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+s,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Ne)return c;u="number"==typeof c[1]?c[1]:u+s}}return p}}(e,void 0,[])()}function Ie(e){return"function"==typeof e?e:function(){return e}}const Re="phrasing",De=["autolink","link","image","label"];function Pe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Fe(e){this.config.enter.autolinkProtocol.call(this,e)}function Le(e){this.config.exit.autolinkProtocol.call(this,e)}function _e(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];(0,me.ok)("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function ze(e){this.config.exit.autolinkEmail.call(this,e)}function $e(e){this.exit(e)}function je(e){!function(e,t,n){const r=Ee((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([(o=e[0],"string"==typeof o?new RegExp((0,Se.A)(o),"g"):o),Ie(e[1])])}var o;return t}(t);let i=-1;for(;++i<o.length;)Te(e,"text",s);function s(e,t){let n,s=-1;for(;++s<t.length;){const e=t[s],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],s=o[i][1];let a=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=s(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(a!==n&&u.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),a=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Be],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,He]],{ignore:["link","linkReference"]})}function Be(e,t,n,r,o){let i="";if(!Ve(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const s=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=he(e,"(");let i=he(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function He(e,t,n,r){return!(!Ve(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Ve(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||xe(n)||ke(n))&&(!t||47!==n)}function Ue(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function We(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ke(){this.buffer()}function qe(e){const t=this.resume(),n=this.stack[this.stack.length-1];(0,me.ok)("footnoteDefinition"===n.type),n.label=t,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase()}function Ge(e){this.exit(e)}function Ye(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Je(){this.buffer()}function Xe(e){const t=this.resume(),n=this.stack[this.stack.length-1];(0,me.ok)("footnoteReference"===n.type),n.label=t,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase()}function Ze(e){this.exit(e)}function Qe(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),a(),s(),i+=o.move("]"),i}function et(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const s=n.enter("footnoteDefinition"),a=n.enter("label");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),a(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(n.indentLines(n.containerFlow(e,o.current()),tt)),s(),i}function tt(e,t,n){return 0===t?e:(n?"":" ")+e}Qe.peek=function(){return"["};const nt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function rt(e){this.enter({type:"delete",children:[]},e)}function ot(e){this.exit(e)}function it(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let s=o.move("~~");return s+=n.containerPhrasing(e,{...o.current(),before:s,after:"~"}),s+=o.move("~~"),i(),s}function st(e){return e.length}function at(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}it.peek=function(){return"~"};var lt=n(6313);function ct(e){const t=e._align;(0,me.ok)(t,"expected `_align` on table"),this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function ut(e){this.exit(e),this.data.inTable=void 0}function dt(e){this.enter({type:"tableRow",children:[]},e)}function pt(e){this.exit(e)}function ft(e){this.enter({type:"tableCell",children:[]},e)}function ht(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mt));const n=this.stack[this.stack.length-1];(0,me.ok)("inlineCode"===n.type),n.value=t,this.exit(e)}function mt(e,t){return"|"===t?t:e}function gt(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=lt.p.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return a(function(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return s(),i}(e,n,r),e.align)},tableCell:s,tableRow:function(e,t,n,r){const o=a([l(e,n,r)]);return o.slice(0,o.indexOf("\n"))}}};function s(e,t,n,r){const o=n.enter("tableCell"),s=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:i,after:i});return s(),o(),a}function a(e,t){return function(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||st,o=[],i=[],s=[],a=[];let l=0,c=-1;for(;++c<e.length;){const n=[],o=[];let d=-1;for(e[c].length>l&&(l=e[c].length);++d<e[c].length;){const i=null==(u=e[c][d])?"":String(u);if(!1!==t.alignDelimiters){const e=r(i);o[d]=e,(void 0===a[d]||e>a[d])&&(a[d]=e)}n.push(i)}i[c]=n,s[c]=o}var u;let d=-1;if("object"==typeof n&&"length"in n)for(;++d<l;)o[d]=at(n[d]);else{const e=at(n);for(;++d<l;)o[d]=e}d=-1;const p=[],f=[];for(;++d<l;){const e=o[d];let n="",r="";99===e?(n=":",r=":"):108===e?n=":":114===e&&(r=":");let i=!1===t.alignDelimiters?1:Math.max(1,a[d]-n.length-r.length);const s=n+"-".repeat(i)+r;!1!==t.alignDelimiters&&(i=n.length+i+r.length,i>a[d]&&(a[d]=i),f[d]=i),p[d]=s}i.splice(1,0,p),s.splice(1,0,f),c=-1;const h=[];for(;++c<i.length;){const e=i[c],n=s[c];d=-1;const r=[];for(;++d<l;){const i=e[d]||"";let s="",c="";if(!1!==t.alignDelimiters){const e=a[d]-(n[d]||0),t=o[d];114===t?s=" ".repeat(e):99===t?e%2?(s=" ".repeat(e/2+.5),c=" ".repeat(e/2-.5)):(s=" ".repeat(e/2),c=s):c=" ".repeat(e)}!1===t.delimiterStart||d||r.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===i||!1===t.delimiterStart&&!d||r.push(" "),!1!==t.alignDelimiters&&r.push(s),r.push(i),!1!==t.alignDelimiters&&r.push(c),!1!==t.padding&&r.push(" "),!1===t.delimiterEnd&&d===l-1||r.push("|")}h.push(!1===t.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("tableRow");for(;++o<r.length;)i[o]=s(r[o],0,t,n);return a(),i}}function yt(e){const t=this.stack[this.stack.length-2];(0,me.ok)("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function vt(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];(0,me.ok)("paragraph"===e.type);const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function bt(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);i&&a.move(s);let l=lt.p.listItem(e,t,n,{...r,...a.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+s}))),l}function wt(e,t,n,r){const o=e.length;let i,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<r.length;)i=r.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}const kt={}.hasOwnProperty;function xt(e,t){let n;for(n in t){const r=(kt.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){kt.call(r,i)||(r[i]=[]);const e=o[i];At(r[i],Array.isArray(e)?e:e?[e]:[])}}}function At(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);wt(e,0,0,r)}const St={tokenize:function(e,t,n){let r=0;return function t(i){return(87===i||119===i)&&r<3?(r++,e.consume(i),t):46===i&&3===r?(e.consume(i),o):n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Et={tokenize:function(e,t,n){let r,o,i;return s;function s(t){return 46===t||95===t?e.check(Ot,l,a)(t):null===t||be(t)||xe(t)||45!==t&&ke(t)?l(t):(i=!0,e.consume(t),s)}function a(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),s}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},Ct={tokenize:function(e,t){let n=0,r=0;return o;function o(s){return 40===s?(n++,e.consume(s),o):41===s&&r<n?i(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?e.check(Ot,t,i)(s):null===s||be(s)||xe(s)?t(s):(e.consume(s),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Ot={tokenize:function(e,t,n){return r;function r(s){return 33===s||34===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||63===s||95===s||126===s?(e.consume(s),r):38===s?(e.consume(s),i):93===s?(e.consume(s),o):60===s||null===s||be(s)||xe(s)?t(s):n(s)}function o(e){return null===e||40===e||91===e||be(e)||xe(e)?t(e):r(e)}function i(e){return ge(e)?s(e):n(e)}function s(t){return 59===t?(e.consume(t),r):ge(t)?(e.consume(t),s):n(t)}},partial:!0},Mt={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ye(e)?n(e):t(e)}},partial:!0},Nt={tokenize:function(e,t,n){const r=this;return function(t){return 87!==t&&119!==t||!Pt.call(r,r.previous)||zt(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(St,e.attempt(Et,e.attempt(Ct,o),n),n)(t))};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Pt},Tt={tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){return 72!==t&&104!==t||!Ft.call(r,r.previous)||zt(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),s)};function s(t){if(ge(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),s;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),i?l:(i=!0,a)):n(t)}function l(t){return null===t||function(e){return null!==e&&(e<32||127===e)}(t)||be(t)||xe(t)||ke(t)?n(t):e.attempt(Et,e.attempt(Ct,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:Ft},It={tokenize:function(e,t,n){const r=this;let o,i;return function(t){return _t(t)&&Lt.call(r,r.previous)&&!zt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(t)):n(t)};function s(t){return _t(t)?(e.consume(t),s):64===t?(e.consume(t),a):n(t)}function a(t){return 46===t?e.check(Mt,c,l)(t):45===t||95===t||ye(t)?(i=!0,e.consume(t),a):c(t)}function l(t){return e.consume(t),o=!0,a}function c(s){return i&&o&&ge(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(s)):n(s)}},previous:Lt},Rt={};let Dt=48;for(;Dt<123;)Rt[Dt]=It,Dt++,58===Dt?Dt=65:91===Dt&&(Dt=97);function Pt(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||be(e)}function Ft(e){return!ge(e)}function Lt(e){return!(47===e||_t(e))}function _t(e){return 43===e||45===e||46===e||95===e||ye(e)}function zt(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function $t(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return we(r)?(e.enter(n),s(r)):t(r)};function s(r){return we(r)&&i++<o?(e.consume(r),s):(e.exit(n),t(r))}}Rt[43]=It,Rt[45]=It,Rt[46]=It,Rt[95]=It,Rt[72]=[It,Tt],Rt[104]=[It,Tt],Rt[87]=[It,Nt],Rt[119]=[It,Nt];const jt={tokenize:function(e,t,n){return function(t){return we(t)?$t(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ve(e)?t(e):n(e)}},partial:!0},Bt={tokenize:function(e,t,n){const r=this;return $t(e,(function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function Ht(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!s||!s._balanced)return n(o);const a=Ue(r.sliceSerialize({start:s.end,end:r.now()}));return 94===a.codePointAt(0)&&i.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)):n(o)}}function Vt(e,t){let n,r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[r+1],e[r+2],["enter",o,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(r,e.length-r+1,...l),e}function Ut(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(a){if(s>999||93===a&&!i||null===a||91===a||be(a))return n(a);if(93===a){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(Ue(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return be(a)||(i=!0),s++,e.consume(a),92===a?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function Wt(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(a>999||93===t&&!s||null===t||91===t||be(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=Ue(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return be(t)||(s=!0),a++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),$t(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function Kt(e,t,n){return e.check(jt,t,e.attempt(Bt,t,n))}function qt(e){e.exit("gfmFootnoteDefinition")}function Gt(e){return null===e||be(e)||xe(e)?1:ke(e)?2:void 0}function Yt(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}function Jt(e){let t=(e||{}).singleTilde;const n={tokenize:function(e,n,r){const o=this.previous,i=this.events;let s=0;return function(t){return 126===o&&"characterEscape"!==i[i.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(i){const l=Gt(o);if(126===i)return s>1?r(i):(e.consume(i),s++,a);if(s<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=Gt(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},s=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],a=t.parser.constructs.insideSpan.null;a&&wt(s,s.length,0,Yt(a,e.slice(r+1,n),t)),wt(s,s.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),wt(e,r-1,n-r+3,s),n=r+s.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Xt{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0!==n||0!==r.length){for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}}function Zt(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function Qt(e,t,n){const r=this;let o,i=0,s=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:a;return i===w&&r.parser.lazy[r.now().line]?n(e):i(e)};function a(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(o=!0,s+=1),l(e)}(t)}function l(t){return null===t?n(t):ve(t)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):we(t)?$t(e,l,"whitespace")(t):(s+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||be(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,we(t)?$t(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):b(t)}function f(t){return we(t)?$t(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(s+=1,m(t)):null===t||ve(t)?v(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return we(t)?$t(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?p(n):(null===n||ve(n))&&o&&i===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function w(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||ve(n)?(e.exit("tableRow"),t(n)):we(n)?$t(e,k,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||be(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?A:x)}function A(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function en(e,t){let n,r,o,i=-1,s=!0,a=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Xt;for(;++i<e.length;){const f=e[i],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(nn(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(s=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",r,t]])),a="tableDelimiterRow"===h.type?2:r?3:1):!a||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(s?s=!1:(0!==l[1]&&(c[0]=c[1],o=tn(p,t,l,a,void 0,o)),l=c,c=[l[1],i,0,0])):(s=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=tn(p,t,l,a,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=tn(p,t,l,a,i,o)):0!==c[1]&&(o=tn(p,t,c,a,i,o)),a=0):!a||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&nn(p,t,d,n,r),p.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Zt(t.events,i))}return e}function tn(e,t,n,r,o,i){const s=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},rn(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const a=rn(t.events,n[1]);if(i={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=rn(t.events,n[2]),i=rn(t.events,n[3]),s={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",s,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==o&&(i.end=Object.assign({},rn(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function nn(e,t,n,r,o){const i=[],s=rn(t.events,n);o&&(o.end=Object.assign({},s),i.push(["exit",o,t])),r.end=Object.assign({},s),i.push(["exit",r,t]),e.add(n+1,0,i)}function rn(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const on={tokenize:function(e,t,n){const r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o):n(t)};function o(t){return be(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(r){return ve(r)?t(r):we(r)?e.check({tokenize:sn},t,n)(r):n(r)}}};function sn(e,t,n){return $t(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const an={};function ln(e){const t=e||an,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return function(e){const t={};let n=-1;for(;++n<e.length;)xt(t,e[n]);return t}([{text:Rt},{document:{91:{tokenize:Wt,continuation:{tokenize:Kt},exit:qt}},text:{91:{tokenize:Ut},93:{add:"after",tokenize:Ht,resolveTo:Vt}}},Jt(e),{flow:{null:{tokenize:Qt,resolveAll:en}}},{text:{91:on}}])}(t)),o.push([{transforms:[je],enter:{literalAutolink:Pe,literalAutolinkEmail:Fe,literalAutolinkHttp:Fe,literalAutolinkWww:Fe},exit:{literalAutolink:$e,literalAutolinkEmail:ze,literalAutolinkHttp:Le,literalAutolinkWww:_e}},{enter:{gfmFootnoteDefinition:We,gfmFootnoteDefinitionLabelString:Ke,gfmFootnoteCall:Ye,gfmFootnoteCallString:Je},exit:{gfmFootnoteDefinition:Ge,gfmFootnoteDefinitionLabelString:qe,gfmFootnoteCall:Ze,gfmFootnoteCallString:Xe}},{canContainEols:["delete"],enter:{strikethrough:rt},exit:{strikethrough:ot}},{enter:{table:ct,tableData:ft,tableHeader:ft,tableRow:dt},exit:{codeText:ht,table:ut,tableData:pt,tableHeader:pt,tableRow:pt}},{exit:{taskListCheckValueChecked:yt,taskListCheckValueUnchecked:yt,paragraph:vt}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Re,notInConstruct:De},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Re,notInConstruct:De},{character:":",before:"[ps]",after:"\\/",inConstruct:Re,notInConstruct:De}]},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:et,footnoteReference:Qe}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:nt}],handlers:{delete:it}},gt(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:bt}}]}}(t))}function cn(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e}const un=(0,l.JY)("strike_through");cn(un,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const dn=(0,l.hk)("strike_through",(e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>"line-through"===e}],toDOM:t=>["del",e.get(un.key)(t)],parseMarkdown:{match:e=>"delete"===e.type,runner:(e,t,n)=>{e.openMark(n),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"strike_through"===e.type.name,runner:(e,t)=>{e.withMark(t,"delete")}}})));cn(dn.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"}),cn(dn.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const pn=(0,l.yu)("ToggleStrikeThrough",(e=>()=>(0,fe.wh)(dn.type(e))));cn(pn,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const fn=(0,l.b_)((e=>(0,pe.uX)(/~([^~]+)~$/,dn.type(e))));cn(fn,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const hn=(0,l.pq)("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(c.MD);return()=>t.call(pn.key)}}});function mn(e,t=3,n=3){const r=Array(n).fill(0).map((()=>Rn.type(e).createAndFill())),o=Array(n).fill(0).map((()=>Dn.type(e).createAndFill())),i=Array(t).fill(0).map(((t,n)=>In.type(e).create(null,0===n?o:r)));return Tn.type(e).create(null,i)}function gn(e){return(0,pe.KP)((e=>"table"===e.type.spec.tableRole))(e)}function yn(e,t){const n=gn(t);if(!n)return;const r=m.get(n.node);return e<0||e>=r.width?void 0:r.cellsInRect({left:e,right:e+1,top:0,bottom:r.height}).map((e=>{const t=n.node.nodeAt(e);if(!t)return;const r=e+n.start;return{pos:r,start:r+1,node:t}})).filter((e=>null!=e))}function vn(e,t){const n=gn(t);if(!n)return;const r=m.get(n.node);return e<0||e>=r.height?void 0:r.cellsInRect({left:0,right:r.width,top:e,bottom:e+1}).map((e=>{const t=n.node.nodeAt(e);if(!t)return;const r=e+n.start;return{pos:r,start:r+1,node:t}})).filter((e=>null!=e))}function bn(e,t,{map:n,tableStart:r,table:o},i){const s=Array(i).fill(0).reduce(((e,t,n)=>e+o.child(n).nodeSize),r),a=Array(n.width).fill(0).map(((t,r)=>{const i=o.nodeAt(n.map[r]);return Rn.type(e).createAndFill({alignment:null==i?void 0:i.attrs.alignment})}));return t.insert(s,In.type(e).create(null,a)),t}function wn(e){return t=>n=>{const r=gn(n.selection),o="row"===e;if(r){const e=m.get(r.node);if(t>=0&&t<(o?e.height:e.width)){const i=e.positionAt(o?t:e.height-1,o?e.width-1:t,r.node),s=n.doc.resolve(r.start+i),a=o?N.rowSelection:N.colSelection,l=e.positionAt(o?t:0,o?0:t,r.node),c=n.doc.resolve(r.start+l);return(0,pe.I9)(n.setSelection(a(s,c)))}}return n}}cn(hn.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"}),cn(hn.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const kn=wn("row"),xn=wn("col");function An(e){return e[0].map(((t,n)=>e.map((e=>e[n]))))}function Sn(e,t){const n=[],r=m.get(e);for(let o=0;o<r.height;o++){const i=e.child(o),s=[];for(let n=0;n<r.width;n++){if(!t[o][n])continue;const i=r.map[o*r.width+n],a=t[o][n],l=e.nodeAt(i).type.createChecked(Object.assign({},a.attrs),a.content,a.marks);s.push(l)}n.push(i.type.createChecked(i.attrs,s,i.marks))}return e.type.createChecked(e.attrs,n,e.marks)}function En(e){const t=m.get(e),n=[];for(let r=0;r<t.height;r++){const o=[],i={};for(let n=0;n<t.width;n++){const s=t.map[r*t.width+n],a=e.nodeAt(s),l=t.findCell(s);i[s]||l.top!==r?o.push(null):(i[s]=!0,o.push(a))}n.push(o)}return n}function Cn(e,t,n,r){const o=t[0]>n[0]?-1:1,i=e.splice(t[0],t.length),s=i.length%2==0?1:0;let a;return a=-1===r&&1===o?n[0]-1:1===r&&-1===o?n[n.length-1]-s+1:-1===o?n[0]:n[n.length-1]-s,e.splice(a,0,...i),e}function On(e,t){let n=e,r=e;for(let o=e;o>=0;o--){const e=yn(o,t.selection);e&&e.forEach((e=>{const t=e.node.attrs.colspan+o-1;t>=n&&(n=o),t>r&&(r=t)}))}for(let n=e;n<=r;n++){const e=yn(n,t.selection);e&&e.forEach((e=>{const t=e.node.attrs.colspan+n-1;e.node.attrs.colspan>1&&t>r&&(r=t)}))}const o=[];for(let e=n;e<=r;e++){const n=yn(e,t.selection);n&&n.length&&o.push(e)}n=o[0],r=o[o.length-1];const i=yn(n,t.selection),s=vn(0,t.selection),a=t.doc.resolve(i[i.length-1].pos);let l;for(let e=r;e>=n;e--){const n=yn(e,t.selection);if(n&&n.length){for(let e=s.length-1;e>=0;e--)if(s[e].pos===n[0].pos){l=n[0];break}if(l)break}}return{$anchor:a,$head:t.doc.resolve(l.pos),indexes:o}}function Mn(e,t){let n=e,r=e;for(let o=e;o>=0;o--)vn(o,t.selection).forEach((e=>{const t=e.node.attrs.rowspan+o-1;t>=n&&(n=o),t>r&&(r=t)}));for(let n=e;n<=r;n++)vn(n,t.selection).forEach((e=>{const t=e.node.attrs.rowspan+n-1;e.node.attrs.rowspan>1&&t>r&&(r=t)}));const o=[];for(let e=n;e<=r;e++){const n=vn(e,t.selection);n&&n.length&&o.push(e)}n=o[0],r=o[o.length-1];const i=vn(n,t.selection),s=yn(0,t.selection),a=t.doc.resolve(i[i.length-1].pos);let l;for(let e=r;e>=n;e--){const n=vn(e,t.selection);if(n&&n.length){for(let e=s.length-1;e>=0;e--)if(s[e].pos===n[0].pos){l=n[0];break}if(l)break}}return{$anchor:a,$head:t.doc.resolve(l.pos),indexes:o}}const Nn=function(e){const t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const e in t)n[e]={default:t[e].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:()=>["table",["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:e=>y(e,t)}],toDOM:e=>["td",v(e,t),0]},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:e=>y(e,t)}],toDOM:e=>["th",v(e,t),0]}}}({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Tn=(0,l.Yh)("table",(()=>({...Nn.table,parseMarkdown:{match:e=>"table"===e.type,runner:(e,t,n)=>{const r=t.align,o=t.children.map(((e,t)=>({...e,align:r,isHeader:0===t})));e.openNode(n),e.next(o),e.closeNode()}},toMarkdown:{match:e=>"table"===e.type.name,runner:(e,t)=>{var n;const r=null==(n=t.content.firstChild)?void 0:n.content;if(!r)return;const o=[];r.forEach((e=>{o.push(e.attrs.alignment)})),e.openNode("table",void 0,{align:o}),e.next(t.content),e.closeNode()}}})));cn(Tn.node,{displayName:"NodeSchema<table>",group:"Table"}),cn(Tn.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const In=(0,l.Yh)("table_row",(()=>({...Nn.table_row,parseMarkdown:{match:e=>"tableRow"===e.type,runner:(e,t,n)=>{const r=t.align,o=t.children.map(((e,n)=>({...e,align:r[n],isHeader:t.isHeader})));e.openNode(n),e.next(o),e.closeNode()}},toMarkdown:{match:e=>"table_row"===e.type.name,runner:(e,t)=>{e.openNode("tableRow"),e.next(t.content),e.closeNode()}}})));cn(In.node,{displayName:"NodeSchema<tableRow>",group:"Table"}),cn(In.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const Rn=(0,l.Yh)("table_cell",(()=>({...Nn.table_cell,parseMarkdown:{match:e=>"tableCell"===e.type&&!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>"table_cell"===e.type.name,runner:(e,t)=>{e.openNode("tableCell").next(t.content).closeNode()}}})));cn(Rn.node,{displayName:"NodeSchema<tableCell>",group:"Table"}),cn(Rn.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const Dn=(0,l.Yh)("table_header",(()=>({...Nn.table_header,parseMarkdown:{match:e=>"tableCell"===e.type&&!!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>"table_header"===e.type.name,runner:(e,t)=>{e.openNode("tableCell"),e.next(t.content),e.closeNode()}}})));cn(Dn.node,{displayName:"NodeSchema<tableHeader>",group:"Table"}),cn(Dn.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});const Pn=(0,l.b_)((e=>new a.fV(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,((t,n,r,o)=>{var i,s;const a=t.doc.resolve(r);if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),Tn.type(e)))return null;const l=mn(e,Number(null==(i=n.groups)?void 0:i.row),Number(null==(s=n.groups)?void 0:s.col)),c=t.tr.replaceRangeWith(r,o,l);return c.setSelection(u.U3.create(c.doc,r+3)).scrollIntoView()}))));cn(Pn,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const Fn=(0,l.yu)("GoToPrevTableCell",(()=>()=>de(-1)));cn(Fn,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const Ln=(0,l.yu)("GoToNextTableCell",(()=>()=>de(1)));cn(Ln,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const _n=(0,l.yu)("BreakTable",(e=>()=>(t,n)=>{if(!x(t))return!1;const{$head:r}=t.selection,o=r.after(),i=t.tr.replaceWith(o,o,s.Wf.type(e).createAndFill());return i.setSelection(u.LN.near(i.doc.resolve(o),1)).scrollIntoView(),null==n||n(i),!0}));cn(_n,{displayName:"Command<breakTableCommand>",group:"Table"});const zn=(0,l.yu)("InsertTable",(e=>({row:t,col:n}={})=>(r,o)=>{const{selection:i,tr:s}=r,{from:a}=i,l=mn(e,t,n),c=s.replaceSelectionWith(l),d=u.LN.findFrom(c.doc.resolve(a),1,!0);return d&&c.setSelection(d),null==o||o(c),!0}));cn(zn,{displayName:"Command<insertTableCommand>",group:"Table"});const $n=(0,l.yu)("MoveRow",(()=>({from:e,to:t}={})=>(n,r)=>{const{tr:o}=n;return!!(null==r?void 0:r(function(e,t,n,r=!0){const o=gn(e.selection);if(!o)return e;const{indexes:i}=Mn(t,e),{indexes:s}=Mn(n,e);if(i.includes(n))return e;const a=function(e,t,n){let r=En(e.node);return r=Cn(r,t,n,0),Sn(e.node,r)}(o,i,s),l=(0,pe.I9)(e).replaceWith(o.pos,o.pos+o.node.nodeSize,a);if(!r)return l;const c=m.get(a),u=o.start,d=n,p=c.positionAt(d,c.width-1,a),f=l.doc.resolve(u+p),h=N.rowSelection,g=c.positionAt(d,0,a),y=l.doc.resolve(u+g);return l.setSelection(h(f,y))}(o,e??0,t??0,!0)))}));cn($n,{displayName:"Command<moveRowCommand>",group:"Table"});const jn=(0,l.yu)("MoveCol",(()=>({from:e,to:t}={})=>(n,r)=>{const{tr:o}=n;return!!(null==r?void 0:r(function(e,t,n,r=!0){const o=gn(e.selection);if(!o)return e;const{indexes:i}=On(t,e),{indexes:s}=On(n,e);if(i.includes(n))return e;const a=function(e,t,n){let r=An(En(e.node));return r=Cn(r,t,n,0),r=An(r),Sn(e.node,r)}(o,i,s),l=(0,pe.I9)(e).replaceWith(o.pos,o.pos+o.node.nodeSize,a);if(!r)return l;const c=m.get(a),u=o.start,d=n,p=c.positionAt(c.height-1,d,a),f=l.doc.resolve(u+p),h=N.colSelection,g=c.positionAt(0,d,a),y=l.doc.resolve(u+g);return l.setSelection(h(f,y))}(o,e??0,t??0,!0)))}));cn(jn,{displayName:"Command<moveColCommand>",group:"Table"});const Bn=(0,l.yu)("SelectRow",(()=>(e=0)=>(t,n)=>{const{tr:r}=t;return!!(null==n?void 0:n(kn(e)(r)))}));cn(Bn,{displayName:"Command<selectRowCommand>",group:"Table"});const Hn=(0,l.yu)("SelectCol",(()=>(e=0)=>(t,n)=>{const{tr:r}=t;return!!(null==n?void 0:n(xn(e)(r)))}));cn(Hn,{displayName:"Command<selectColCommand>",group:"Table"});const Vn=(0,l.yu)("SelectTable",(()=>()=>(e,t)=>{const{tr:n}=e;return!!(null==t?void 0:t(function(e){const t=function(e){const t=gn(e);if(!t)return;const n=m.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map((e=>{const n=t.node.nodeAt(e),r=e+t.start;return{pos:r,start:r+1,node:n}}))}(e.selection);if(t&&t[0]){const n=e.doc.resolve(t[0].pos),r=t[t.length-1];if(r){const t=e.doc.resolve(r.pos);return(0,pe.I9)(e.setSelection(new N(t,n)))}}return e}(n)))}));cn(Vn,{displayName:"Command<selectTableCommand>",group:"Table"});const Un=(0,l.yu)("DeleteSelectedCells",(()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof N))return!1;const r=n.isRowSelection(),o=n.isColSelection();return r&&o?function(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(e,t):o?function(e,t){if(!x(e))return!1;if(t){const n=re(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;ae(r,n,e),e!=n.left;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=m.get(e)}t(r)}return!0}(e,t):function(e,t){if(!x(e))return!1;if(t){const n=re(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;le(r,n,e),e!=n.top;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=m.get(n.table)}t(r)}return!0}(e,t)}));cn(Un,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const Wn=(0,l.yu)("AddColBefore",(()=>()=>ie));cn(Wn,{displayName:"Command<addColBeforeCommand>",group:"Table"});const Kn=(0,l.yu)("AddColAfter",(()=>()=>se));cn(Kn,{displayName:"Command<addColAfterCommand>",group:"Table"});const qn=(0,l.yu)("AddRowBefore",(e=>()=>(t,n)=>{if(!x(t))return!1;if(n){const r=re(t);n(bn(e,t.tr,r,r.top))}return!0}));cn(qn,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const Gn=(0,l.yu)("AddRowAfter",(e=>()=>(t,n)=>{if(!x(t))return!1;if(n){const r=re(t);n(bn(e,t.tr,r,r.bottom))}return!0}));cn(Gn,{displayName:"Command<addRowAfterCommand>",group:"Table"});const Yn=(0,l.yu)("SetAlign",(()=>(e="left")=>{return t="alignment",n=e,function(e,r){if(!x(e))return!1;const o=A(e);if(o.nodeAfter.attrs[t]===n)return!1;if(r){const i=e.tr;e.selection instanceof N?e.selection.forEachCell(((e,r)=>{e.attrs[t]!==n&&i.setNodeMarkup(r,null,{...e.attrs,[t]:n})})):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:n}),r(i)}return!0};var t,n}));cn(Yn,{displayName:"Command<setAlignCommand>",group:"Table"});const Jn=(0,l.pq)("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(c.MD);return()=>t.call(Ln.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(c.MD);return()=>t.call(Fn.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:e=>{const t=e.get(c.MD);return()=>t.call(_n.key)}}});cn(Jn.ctx,{displayName:"KeymapCtx<table>",group:"Table"}),cn(Jn.shortcuts,{displayName:"Keymap<table>",group:"Table"});const Xn="footnote_definition",Zn="footnoteDefinition",Qn=(0,l.Yh)("footnote_definition",(()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${Xn}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,i.Ik)(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":Xn},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===Zn,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===Xn,runner:(e,t)=>{e.openNode(Zn,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}})));cn(Qn.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"}),cn(Qn.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const er="footnote_reference",tr=(0,l.Yh)("footnote_reference",(()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${er}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,i.Ik)(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":er},t]},parseMarkdown:{match:({type:e})=>"footnoteReference"===e,runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===er,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}})));cn(tr.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"}),cn(tr.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const nr=s.hm.extendSchema((e=>t=>{const n=e(t);return{...n,attrs:{...n.attrs,checked:{default:null}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,i.Ik)(e);return{label:e.dataset.label,listType:e.dataset["list-type"],spread:e.dataset.spread,checked:e.dataset.checked?"true"===e.dataset.checked:null}}},...(null==n?void 0:n.parseDOM)||[]],toDOM:e=>n.toDOM&&null==e.attrs.checked?n.toDOM(e):["li",{"data-item-type":"task","data-label":e.attrs.label,"data-list-type":e.attrs.listType,"data-spread":e.attrs.spread,"data-checked":e.attrs.checked},0],parseMarkdown:{match:({type:e})=>"listItem"===e,runner:(e,t,r)=>{if(null==t.checked)return void n.parseMarkdown.runner(e,t,r);const o=null!=t.label?`${t.label}.`:"•",i=null!=t.checked?!!t.checked:null,s=null!=t.label?"ordered":"bullet",a=null!=t.spread?`${t.spread}`:"true";e.openNode(r,{label:o,listType:s,spread:a,checked:i}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>"list_item"===e.type.name,runner:(e,t)=>{if(null==t.attrs.checked)return void n.toMarkdown.runner(e,t);const r=t.attrs.label,o=t.attrs.listType,i="true"===t.attrs.spread,s=t.attrs.checked;e.openNode("listItem",void 0,{label:r,listType:o,spread:i,checked:s}),e.next(t.content),e.closeNode()}}}}));cn(nr,{displayName:"NodeSchema<listItem>",group:"ListItem"});const rr=(0,l.b_)((()=>new a.fV(/^\[(?<checked>\s|x)\]\s$/,((e,t,n,r)=>{var o;const i=e.doc.resolve(n);let s=0,a=i.node(s);for(;a&&"list_item"!==a.type.name;)s--,a=i.node(s);if(!a||null!=a.attrs.checked)return null;const l="x"===(null==(o=t.groups)?void 0:o.checked),c=i.before(s),u=e.tr;return u.deleteRange(n,r).setNodeMarkup(c,void 0,{...a.attrs,checked:l}),u}))));cn(rr,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const or=[hn,Jn].flat(),ir=[Pn,rr],sr=[fn],ar=(0,l.Gf)((e=>{const t=new u.hs("MILKDOWN_AUTO_INSERT_ZERO_SPACE"),n=t=>t.type===s.Wf.type(e);return new u.k_({key:t,props:{handleDOMEvents:{compositionstart(e){const{state:t,dispatch:r}=e,{tr:o,selection:i}=t,{$from:s}=i;return pe.T.safari&&x(t)&&i.empty&&(e=>n(e)&&2===e.nodeSize)(s.parent)&&r(o.insertText("",s.start())),!1},compositionend(e){const{state:t,dispatch:r}=e,{tr:o,selection:i}=t,{$from:s}=i;return pe.T.safari&&x(t)&&i.empty&&n(s.parent)&&s.parent.textContent.startsWith("")&&r(o.delete(s.start(),s.start()+1)),!1}}}})}));cn(ar,{displayName:"Prose<autoInsertZeroSpaceInTablePlugin>",group:"Prose"});const lr=(0,l.Gf)((()=>function({handleWidth:e=5,cellMinWidth:t=25,View:n=J,lastColumnResizable:r=!0}={}){const o=new u.k_({key:Z,state:{init:(e,r)=>(o.spec.props.nodeViews[b(r.schema).table.name]=(e,r)=>new n(e,t,r),new Q(-1,!1)),apply:(e,t)=>t.apply(e)},props:{attributes:e=>{const t=Z.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r,o){const i=Z.getState(e.state);if(i&&!i.dragging){const r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target);let s=-1;if(r){const{left:o,right:i}=r.getBoundingClientRect();t.clientX-o<=n?s=ee(e,t,"left"):i-t.clientX<=n&&(s=ee(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){const t=e.state.doc.resolve(s),n=t.node(-1),r=m.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}ne(e,s)}}}(t,n,e,0,r)},mouseleave:e=>{!function(e){const t=Z.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&ne(e,-1)}(e)},mousedown:(e,n)=>{!function(e,t,n){const r=Z.getState(e.state);if(!r||-1==r.activeHandle||r.dragging)return!1;const o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=e.domAtPos(t);let s=i.node.childNodes[i.offset].offsetWidth,a=n;if(r)for(let e=0;e<n;e++)r[e]&&(s-=r[e],a--);return s/a}(e,r.activeHandle,o.attrs);function s(t){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);const r=Z.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){const r=e.state.doc.resolve(t),o=r.node(-1),i=m.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<i.height;e++){const t=e*i.width+a;if(e&&i.map[t]==i.map[t-i.width])continue;const r=i.map[t],u=o.nodeAt(r).attrs,d=1==u.colspan?0:a-i.colCount(r);if(u.colwidth&&u.colwidth[d]==n)continue;const p=u.colwidth?u.colwidth.slice():(c=u.colspan,Array(c).fill(0));p[d]=n,l.setNodeMarkup(s+r,null,{...u,colwidth:p})}var c;l.docChanged&&e.dispatch(l)}(e,r.activeHandle,te(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Z,{setDragging:null})))}function a(t){if(!t.which)return s(t);const r=Z.getState(e.state);if(r&&r.dragging){const o=te(r.dragging,t,n);!function(e,t,n,r){const o=e.state.doc.resolve(t),i=o.node(-1),s=o.start(-1),a=m.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let l=e.domAtPos(o.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&X(i,l.firstChild,l,r,a,n)}(e,r.activeHandle,o,n)}}e.dispatch(e.state.tr.setMeta(Z,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault()}(e,n,t)}},decorations:e=>{const t=Z.getState(e);if(t&&t.activeHandle>-1)return function(e,t){const n=[],r=e.doc.resolve(t),o=r.node(-1);if(!o)return p.zF.empty;const i=m.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let e=0;e<i.height;e++){const t=a+e*i.width-1;if(!(a!=i.width&&i.map[t]==i.map[t+1]||0!=e&&i.map[t-1]==i.map[t-1-i.width])){const e=i.map[t],r=s+e+o.nodeAt(e).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(p.NZ.widget(r,a))}}return p.zF.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}({})));cn(lr,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const cr=(0,l.Gf)((()=>function({allowTableNodeSelection:e=!1}={}){return new u.k_({key:w,state:{init:()=>null,apply(e,t){const n=e.getMeta(w);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;const{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:I,handleDOMEvents:{mousedown:K},createSelectionBetween:e=>null!=w.getState(e.state)?e.state.selection:null,handleTripleClick:U,handleKeyDown:$,handlePaste:W},appendTransaction:(t,n,r)=>function(e,t,n){const r=(t||e).selection,o=(t||e).doc;let i,s;if(r instanceof u.nh&&(s=r.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)i=N.create(o,r.from);else if("row"==s){const e=o.resolve(r.from+1);i=N.rowSelection(e,e)}else if(!n){const e=m.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];i=N.create(o,t+1,n)}}else r instanceof u.U3&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.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)}(r)?i=u.U3.create(o,r.from):r instanceof u.U3&&function({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){const 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--){const 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}(r)&&(i=u.U3.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}(r,P(r,n),e)})}()));cn(cr,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const ur=(0,l.lz)("remarkGFM",(()=>ln));cn(ur.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"}),cn(ur.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const dr=[ar,lr,cr,ur].flat(),pr=[[nr,Tn,In,Dn,Rn,Qn,tr,un,dn].flat(),ir,sr,or,dr,[Ln,Fn,_n,zn,$n,jn,Bn,Hn,Vn,Un,qn,Gn,Wn,Kn,Yn,pn]].flat()},7545:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},7652:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>b,Is:()=>m});var r=n(8769),o=n.n(r),i=n(5694);const s="5.23.2";var a=n(258),l=n(9154),c=n(6127);function u(e){return e>=0&&e<=255}const d=function(e,t){const{r:n,g:r,b:o,a:i}=new c.Y(e).toRgb();if(i<1)return e;const{r:s,g:a,b:l}=new c.Y(t).toRgb();for(let e=.01;e<=1;e+=.01){const t=Math.round((n-s*(1-e))/e),i=Math.round((r-a*(1-e))/e),d=Math.round((o-l*(1-e))/e);if(u(t)&&u(i)&&u(d))return new c.Y({r:t,g:i,b:d,a:Math.round(100*e)/100}).toRgbString()}return new c.Y({r:n,g:r,b:o,a:1}).toRgbString()};var p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function f(e){const{override:t}=e,n=p(e,["override"]),r=Object.assign({},t);Object.keys(l.A).forEach((e=>{delete r[e]}));const o=Object.assign(Object.assign({},n),r);if(!1===o.motion){const e="0s";o.motionDurationFast=e,o.motionDurationMid=e,o.motionDurationSlow=e}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:d(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:d(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:d(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:3*o.lineWidth,lineWidth:o.lineWidth,controlOutlineWidth:2*o.lineWidth,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:d(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:1200,screenXLMin:1200,screenXLMax:1599,screenXXL:1600,screenXXLMin:1600,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`\n 0 1px 2px -2px ${new c.Y("rgba(0, 0, 0, 0.16)").toRgbString()},\n 0 3px 6px 0 ${new c.Y("rgba(0, 0, 0, 0.12)").toRgbString()},\n 0 5px 12px 4px ${new c.Y("rgba(0, 0, 0, 0.09)").toRgbString()}\n `,boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const m={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},g={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},y={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},v=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o}=t,i=h(t,["override"]);let s=Object.assign(Object.assign({},r),{override:o});return s=f(s),i&&Object.entries(i).forEach((e=>{let[t,n]=e;const{theme:r}=n,o=h(n,["theme"]);let i=o;r&&(i=v(Object.assign(Object.assign({},s),o),{override:o},r)),s[t]=i})),s};function b(){const{token:e,hashed:t,theme:n,override:r,cssVar:c}=o().useContext(a.vG),u=`${s}-${t||""}`,d=n||a.zQ,[p,h,b]=(0,i.hV)(d,[l.A,e],{salt:u,override:r,getComputedToken:v,formatToken:f,cssVar:c&&{prefix:c.prefix,key:c.key,unitless:m,ignore:g,preserve:y}});return[d,b,t?h:"",p,c]}},7756:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6488),o=n(4430),i=n(7985),s=n(5405);function a(e){return(0,r.A)(e)||(0,o.A)(e)||(0,i.A)(e)||(0,s.A)()}},7985:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6284);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},8128:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},8257:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(7545),o=n(4445);const i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new Set;return function e(t,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=i.has(t);if((0,o.Ay)(!l,"Warning: There may be circular references"),l)return!1;if(t===s)return!0;if(n&&a>1)return!1;i.add(t);var c=a+1;if(Array.isArray(t)){if(!Array.isArray(s)||t.length!==s.length)return!1;for(var u=0;u<t.length;u++)if(!e(t[u],s[u],c))return!1;return!0}if(t&&s&&"object"===(0,r.A)(t)&&"object"===(0,r.A)(s)){var d=Object.keys(t);return d.length===Object.keys(s).length&&d.every((function(n){return e(t[n],s[n],c)}))}return!1}(e,t)}},8299:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,fk:()=>l});var r=n(7545),o=n(8769),i=n.n(o),s=n(9435),a=n.n(s);function l(e){return e instanceof HTMLElement||e instanceof SVGElement}function c(e){var t,n=function(e){return e&&"object"===(0,r.A)(e)&&l(e.nativeElement)?e.nativeElement:l(e)?e:null}(e);return n||(e instanceof i().Component?null===(t=a().findDOMNode)||void 0===t?void 0:t.call(a(),e):null)}},8406:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(6330),o=n(1361),i=function(){var e=(0,r.A)((function*(e,t,n){return(yield o.http.post("api/gateway/cmdb.instance.PostSearchV3/v3/object/".concat(e,"/instance/_search"),t,n)).data}));return function(t,n,r){return e.apply(this,arguments)}}()},8408:(e,t,n)=>{"use strict";n.d(t,{av:()=>o,dF:()=>r,jz:()=>s,vj:()=>i}),n(5694);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},o=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),i=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let a={};return!1!==r&&(a={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},a),s),{[o]:s})}},s=e=>({[`.${e}`]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{[`.${e} .${e}-icon`]:{display:"block"}})})},8468:(e,t,n)=>{"use strict";function r(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}n.d(t,{m:()=>r})},8695:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>Ut});var r=n(3705),o=n(8769),i=n.n(o);const s=i().createContext({});var a=n(9642),l=n(5694);const c=(0,o.createContext)({});var u=n(4511),d=n(3795),p=n(1136);const f=(0,o.createContext)(void 0);var h=n(9740);const m=(0,h.A)((0,h.A)({},{yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),g={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},y={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},m),timePickerLocale:Object.assign({},g)},v="${label} is not a valid ${type}",b={locale:"en",Pagination:{items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},DatePicker:y,TimePicker:g,Calendar:y,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:v,method:v,array:v,object:v,number:v,date:v,boolean:v,integer:v,float:v,regexp:v,email:v,url:v,hex:v},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let w=Object.assign({},b.Modal),k=[];const x=()=>k.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),b.Modal),A=(0,o.createContext)(void 0),S=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;o.useEffect((()=>{const e=function(e){if(e){const t=Object.assign({},e);return k.push(t),w=x(),()=>{k=k.filter((e=>e!==t)),w=x()}}w=Object.assign({},b.Modal)}(null==t?void 0:t.Modal);return e}),[t]);const i=o.useMemo((()=>Object.assign(Object.assign({},t),{exist:!0})),[t]);return o.createElement(A.Provider,{value:i},n)};var E=n(258),C=n(9154),O=n(9424),M=n(6127),N=n(7169),T=n(9055);const I=`-ant-${Date.now()}-${Math.random()}`;const R=o.createContext(!1),D=e=>{let{children:t,disabled:n}=e;const r=o.useContext(R);return o.createElement(R.Provider,{value:null!=n?n:r},t)},P=R,F=o.createContext(void 0),L=e=>{let{children:t,size:n}=e;const r=o.useContext(F);return o.createElement(F.Provider,{value:n||r},t)},_=F;var z=n(8257);const $=Object.assign({},o),{useId:j}=$,B=void 0===j?()=>"":j;var H=n(1382),V=n(7652);function U(e){const{children:t}=e,[,n]=(0,V.Ay)(),{motion:r}=n,i=o.useRef(!1);return i.current=i.current||!1===r,i.current?o.createElement(H.Kq,{motion:r},t):t}const W=()=>null;var K=n(8408);const q=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let G,Y,J,X;function Z(){return G||a.yH}function Q(){return Y||a.pM}const ee=()=>({getPrefixCls:(e,t)=>t||(e?`${Z()}-${e}`:Z()),getIconPrefixCls:Q,getRootPrefixCls:()=>G||Z(),getTheme:()=>J,holderRender:X}),te=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:s,form:h,locale:m,componentSize:g,direction:y,space:v,splitter:w,virtual:k,dropdownMatchSelectWidth:x,popupMatchSelectWidth:A,popupOverflow:O,legacyLocale:M,parentContext:N,iconPrefixCls:T,theme:I,componentDisabled:R,segmented:P,statistic:F,spin:_,calendar:$,carousel:j,cascader:H,collapse:G,typography:Y,checkbox:J,descriptions:X,divider:Z,drawer:Q,skeleton:ee,steps:te,image:ne,layout:re,list:oe,mentions:ie,modal:se,progress:ae,result:le,slider:ce,breadcrumb:ue,menu:de,pagination:pe,input:fe,textArea:he,empty:me,badge:ge,radio:ye,rate:ve,switch:be,transfer:we,avatar:ke,message:xe,tag:Ae,table:Se,card:Ee,tabs:Ce,timeline:Oe,timePicker:Me,upload:Ne,notification:Te,tree:Ie,colorPicker:Re,datePicker:De,rangePicker:Pe,flex:Fe,wave:Le,dropdown:_e,warning:ze,tour:$e,tooltip:je,popover:Be,popconfirm:He,floatButtonGroup:Ve,variant:Ue,inputNumber:We,treeSelect:Ke}=e,qe=o.useCallback(((t,n)=>{const{prefixCls:r}=e;if(n)return n;const o=r||N.getPrefixCls("");return t?`${o}-${t}`:o}),[N.getPrefixCls,e.prefixCls]),Ge=T||N.iconPrefixCls||a.pM,Ye=n||N.csp;((e,t)=>{const[n,r]=(0,V.Ay)();(0,l.IV)({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>null==t?void 0:t.nonce,layer:{name:"antd"}},(()=>[(0,K.jz)(e)]))})(Ge,Ye);const Je=function(e,t,n){var r;(0,p.rJ)("ConfigProvider");const o=e||{},i=!1!==o.inherit&&t?t:Object.assign(Object.assign({},E.sb),{hashed:null!==(r=null==t?void 0:t.hashed)&&void 0!==r?r:E.sb.hashed,cssVar:null==t?void 0:t.cssVar}),s=B();return(0,u.A)((()=>{var r,a;if(!e)return t;const l=Object.assign({},i.components);Object.keys(e.components||{}).forEach((t=>{l[t]=Object.assign(Object.assign({},l[t]),e.components[t])}));const c=`css-var-${s.replace(/:/g,"")}`,u=(null!==(r=o.cssVar)&&void 0!==r?r:i.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:null==n?void 0:n.prefixCls},"object"==typeof i.cssVar?i.cssVar:{}),"object"==typeof o.cssVar?o.cssVar:{}),{key:"object"==typeof o.cssVar&&(null===(a=o.cssVar)||void 0===a?void 0:a.key)||c});return Object.assign(Object.assign(Object.assign({},i),o),{token:Object.assign(Object.assign({},i.token),o.token),components:l,cssVar:u})}),[o,i],((e,t)=>e.some(((e,n)=>{const r=t[n];return!(0,z.A)(e,r,!0)}))))}(I,N.theme,{prefixCls:qe("")}),Xe={csp:Ye,autoInsertSpaceInButton:r,alert:i,anchor:s,locale:m||M,direction:y,space:v,splitter:w,virtual:k,popupMatchSelectWidth:null!=A?A:x,popupOverflow:O,getPrefixCls:qe,iconPrefixCls:Ge,theme:Je,segmented:P,statistic:F,spin:_,calendar:$,carousel:j,cascader:H,collapse:G,typography:Y,checkbox:J,descriptions:X,divider:Z,drawer:Q,skeleton:ee,steps:te,image:ne,input:fe,textArea:he,layout:re,list:oe,mentions:ie,modal:se,progress:ae,result:le,slider:ce,breadcrumb:ue,menu:de,pagination:pe,empty:me,badge:ge,radio:ye,rate:ve,switch:be,transfer:we,avatar:ke,message:xe,tag:Ae,table:Se,card:Ee,tabs:Ce,timeline:Oe,timePicker:Me,upload:Ne,notification:Te,tree:Ie,colorPicker:Re,datePicker:De,rangePicker:Pe,flex:Fe,wave:Le,dropdown:_e,warning:ze,tour:$e,tooltip:je,popover:Be,popconfirm:He,floatButtonGroup:Ve,variant:Ue,inputNumber:We,treeSelect:Ke},Ze=Object.assign({},N);Object.keys(Xe).forEach((e=>{void 0!==Xe[e]&&(Ze[e]=Xe[e])})),q.forEach((t=>{const n=e[t];n&&(Ze[t]=n)})),void 0!==r&&(Ze.button=Object.assign({autoInsertSpace:r},Ze.button));const Qe=(0,u.A)((()=>Ze),Ze,((e,t)=>{const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((n=>e[n]!==t[n]))})),et=o.useMemo((()=>({prefixCls:Ge,csp:Ye})),[Ge,Ye]);let tt=o.createElement(o.Fragment,null,o.createElement(W,{dropdownMatchSelectWidth:x}),t);const nt=o.useMemo((()=>{var e,t,n,r;return(0,d.h)((null===(e=b.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(n=null===(t=Qe.locale)||void 0===t?void 0:t.Form)||void 0===n?void 0:n.defaultValidateMessages)||{},(null===(r=Qe.form)||void 0===r?void 0:r.validateMessages)||{},(null==h?void 0:h.validateMessages)||{})}),[Qe,null==h?void 0:h.validateMessages]);Object.keys(nt).length>0&&(tt=o.createElement(f.Provider,{value:nt},tt)),m&&(tt=o.createElement(S,{locale:m,_ANT_MARK__:"internalMark"},tt)),(Ge||Ye)&&(tt=o.createElement(c.Provider,{value:et},tt)),g&&(tt=o.createElement(L,{size:g},tt)),tt=o.createElement(U,null,tt);const rt=o.useMemo((()=>{const e=Je||{},{algorithm:t,token:n,components:r,cssVar:o}=e,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["algorithm","token","components","cssVar"]),s=t&&(!Array.isArray(t)||t.length>0)?(0,l.an)(t):E.zQ,a={};Object.entries(r||{}).forEach((e=>{let[t,n]=e;const r=Object.assign({},n);"algorithm"in r&&(!0===r.algorithm?r.theme=s:(Array.isArray(r.algorithm)||"function"==typeof r.algorithm)&&(r.theme=(0,l.an)(r.algorithm)),delete r.algorithm),a[t]=r}));const c=Object.assign(Object.assign({},C.A),n);return Object.assign(Object.assign({},i),{theme:s,token:c,components:a,override:Object.assign({override:c},a),cssVar:o})}),[Je]);return I&&(tt=o.createElement(E.vG.Provider,{value:rt},tt)),Qe.warning&&(tt=o.createElement(p._n.Provider,{value:Qe.warning},tt)),void 0!==R&&(tt=o.createElement(D,{disabled:R},tt)),o.createElement(a.QO.Provider,{value:Qe},tt)},ne=e=>{const t=o.useContext(a.QO),n=o.useContext(A);return o.createElement(te,Object.assign({parentContext:t,legacyLocale:n},e))};ne.ConfigContext=a.QO,ne.SizeContext=_,ne.config=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;void 0!==t&&(G=t),void 0!==n&&(Y=n),"holderRender"in e&&(X=o),r&&(function(e){return Object.keys(e).some((e=>e.endsWith("Color")))}(r)?function(e,t){const n=function(e,t){const n={},r=(e,t)=>{let n=e.clone();return n=(null==t?void 0:t(n))||n,n.toRgbString()},o=(e,t)=>{const o=new M.Y(e),i=(0,O.cM)(o.toRgbString());n[`${t}-color`]=r(o),n[`${t}-color-disabled`]=i[1],n[`${t}-color-hover`]=i[4],n[`${t}-color-active`]=i[6],n[`${t}-color-outline`]=o.clone().setA(.2).toRgbString(),n[`${t}-color-deprecated-bg`]=i[0],n[`${t}-color-deprecated-border`]=i[2]};if(t.primaryColor){o(t.primaryColor,"primary");const e=new M.Y(t.primaryColor),i=(0,O.cM)(e.toRgbString());i.forEach(((e,t)=>{n[`primary-${t+1}`]=e})),n["primary-color-deprecated-l-35"]=r(e,(e=>e.lighten(35))),n["primary-color-deprecated-l-20"]=r(e,(e=>e.lighten(20))),n["primary-color-deprecated-t-20"]=r(e,(e=>e.tint(20))),n["primary-color-deprecated-t-50"]=r(e,(e=>e.tint(50))),n["primary-color-deprecated-f-12"]=r(e,(e=>e.setA(.12*e.a)));const s=new M.Y(i[0]);n["primary-color-active-deprecated-f-30"]=r(s,(e=>e.setA(.3*e.a))),n["primary-color-active-deprecated-d-02"]=r(s,(e=>e.darken(2)))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`\n :root {\n ${Object.keys(n).map((t=>`--${e}-${t}: ${n[t]};`)).join("\n")}\n }\n `.trim()}(e,t);(0,N.A)()&&(0,T.BD)(n,`${I}-dynamic-theme`)}(Z(),r):J=r)},ne.useConfig=function(){return{componentDisabled:(0,o.useContext)(P),componentSize:(0,o.useContext)(_)}},Object.defineProperty(ne,"SizeContext",{get:()=>_});const re=ne;var oe,ie=n(9435),se=n(1258),ae=n(6330),le=n(7545),ce=(0,h.A)({},ie),ue=ce.version,de=ce.render,pe=ce.unmountComponentAtNode;try{Number((ue||"").split(".")[0])>=18&&(oe=ce.createRoot)}catch(e){}function fe(e){var t=ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===(0,le.A)(t)&&(t.usingClientEntryPoint=e)}var he="__rc_react_root__";function me(e){return ge.apply(this,arguments)}function ge(){return(ge=(0,ae.A)((0,se.A)().mark((function e(t){return(0,se.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[he])||void 0===e||e.unmount(),delete t[he]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ye(e){pe(e)}function ve(){return(ve=(0,ae.A)((0,se.A)().mark((function e(t){return(0,se.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===oe){e.next=2;break}return e.abrupt("return",me(t));case 2:ye(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}let be=(e,t)=>(function(e,t){oe?function(e,t){fe(!0);var n=t[he]||oe(t);fe(!1),n.render(e),t[he]=n}(e,t):function(e,t){null==de||de(e,t)}(e,t)}(e,t),()=>function(e){return ve.apply(this,arguments)}(t));var we=n(9575);const ke={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};var xe=n(689),Ae=n(4586),Se=n(4223),Ee=n(3373),Ce=n.n(Ee),Oe=n(9116),Me=n(4445);function Ne(e){return"object"===(0,le.A)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,le.A)(e.icon)||"function"==typeof e.icon)}function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r,o=e[n];return"class"===n?(t.className=o,delete t.class):(delete t[n],t[(r=n,r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=o),t}),{})}function Ie(e,t,n){return n?i().createElement(e.tag,(0,h.A)((0,h.A)({key:t},Te(e.attrs)),n),(e.children||[]).map((function(n,r){return Ie(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):i().createElement(e.tag,(0,h.A)({key:t},Te(e.attrs)),(e.children||[]).map((function(n,r){return Ie(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function Re(e){return(0,O.cM)(e)[0]}function De(e){return e?Array.isArray(e)?e:[e]:[]}var Pe=["icon","className","onClick","style","primaryColor","secondaryColor"],Fe={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1},Le=function(e){var t,n,r,i,s,a=e.icon,l=e.className,u=e.onClick,d=e.style,p=e.primaryColor,f=e.secondaryColor,m=(0,Se.A)(e,Pe),g=o.useRef(),y=Fe;if(p&&(y={primaryColor:p,secondaryColor:f||Re(p)}),t=g,n=(0,o.useContext)(c),r=n.csp,i=n.prefixCls,s="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",i&&(s=s.replace(/anticon/g,i)),(0,o.useEffect)((function(){var e=t.current,n=(0,Oe.j)(e);(0,T.BD)(s,"@ant-design-icons",{prepend:!0,csp:r,attachTo:n})}),[]),function(e,t){(0,Me.Ay)(e,"[@ant-design/icons] ".concat(t))}(Ne(a),"icon should be icon definiton, but got ".concat(a)),!Ne(a))return null;var v=a;return v&&"function"==typeof v.icon&&(v=(0,h.A)((0,h.A)({},v),{},{icon:v.icon(y.primaryColor,y.secondaryColor)})),Ie(v.icon,"svg-".concat(v.name),(0,h.A)((0,h.A)({className:l,onClick:u,style:d,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},m),{},{ref:g}))};Le.displayName="IconReact",Le.getTwoToneColors=function(){return(0,h.A)({},Fe)},Le.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;Fe.primaryColor=t,Fe.secondaryColor=n||Re(t),Fe.calculated=!!n};const _e=Le;function ze(e){var t=De(e),n=(0,xe.A)(t,2),r=n[0],o=n[1];return _e.setTwoToneColors({primaryColor:r,secondaryColor:o})}var $e=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];ze(O.z1.primary);var je=o.forwardRef((function(e,t){var n=e.className,r=e.icon,i=e.spin,s=e.rotate,a=e.tabIndex,l=e.onClick,u=e.twoToneColor,d=(0,Se.A)(e,$e),p=o.useContext(c),f=p.prefixCls,h=void 0===f?"anticon":f,m=p.rootClassName,g=Ce()(m,h,(0,Ae.A)((0,Ae.A)({},"".concat(h,"-").concat(r.name),!!r.name),"".concat(h,"-spin"),!!i||"loading"===r.name),n),y=a;void 0===y&&l&&(y=-1);var v=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,b=De(u),w=(0,xe.A)(b,2),k=w[0],x=w[1];return o.createElement("span",(0,we.A)({role:"img","aria-label":r.name},d,{ref:t,tabIndex:y,onClick:l,className:g}),o.createElement(_e,{icon:r,primaryColor:k,secondaryColor:x,style:v}))}));je.displayName="AntdIcon",je.getTwoToneColor=function(){var e=_e.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},je.setTwoToneColor=ze;const Be=je;var He=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:ke}))};const Ve=o.forwardRef(He),Ue={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var We=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:Ue}))};const Ke=o.forwardRef(We),qe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var Ge=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:qe}))};const Ye=o.forwardRef(Ge),Je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var Xe=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:Je}))};const Ze=o.forwardRef(Xe),Qe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var et=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:Qe}))};const tt=o.forwardRef(et);var nt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=nt.F1&&t<=nt.F12)return!1;switch(t){case nt.ALT:case nt.CAPS_LOCK:case nt.CONTEXT_MENU:case nt.CTRL:case nt.DOWN:case nt.END:case nt.ESC:case nt.HOME:case nt.INSERT:case nt.LEFT:case nt.MAC_FF_META:case nt.META:case nt.NUMLOCK:case nt.NUM_CENTER:case nt.PAGE_DOWN:case nt.PAGE_UP:case nt.PAUSE:case nt.PRINT_SCREEN:case nt.RIGHT:case nt.SHIFT:case nt.UP:case nt.WIN_KEY:case nt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=nt.ZERO&&e<=nt.NINE)return!0;if(e>=nt.NUM_ZERO&&e<=nt.NUM_MULTIPLY)return!0;if(e>=nt.A&&e<=nt.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case nt.SPACE:case nt.QUESTION_MARK:case nt.NUM_PLUS:case nt.NUM_MINUS:case nt.NUM_PERIOD:case nt.NUM_DIVISION:case nt.SEMICOLON:case nt.DASH:case nt.EQUALS:case nt.COMMA:case nt.PERIOD:case nt.SLASH:case nt.APOSTROPHE:case nt.SINGLE_QUOTE:case nt.OPEN_SQUARE_BRACKET:case nt.BACKSLASH:case nt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const rt=nt;var ot="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function it(e,t){return 0===e.indexOf(t)}var st=o.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,i=e.className,s=e.duration,a=void 0===s?4.5:s,l=e.showProgress,c=e.pauseOnHover,u=void 0===c||c,d=e.eventKey,p=e.content,f=e.closable,m=e.closeIcon,g=void 0===m?"x":m,y=e.props,v=e.onClick,b=e.onNoticeClose,w=e.times,k=e.hovering,x=o.useState(!1),A=(0,xe.A)(x,2),S=A[0],E=A[1],C=o.useState(0),O=(0,xe.A)(C,2),M=O[0],N=O[1],T=o.useState(0),I=(0,xe.A)(T,2),R=I[0],D=I[1],P=k||S,F=a>0&&l,L=function(){b(d)};o.useEffect((function(){if(!P&&a>0){var e=Date.now()-R,t=setTimeout((function(){L()}),1e3*a-R);return function(){u&&clearTimeout(t),D(Date.now()-e)}}}),[a,P,w]),o.useEffect((function(){if(!P&&F&&(u||0===R)){var e,t=performance.now();return function n(){cancelAnimationFrame(e),e=requestAnimationFrame((function(e){var r=e+R-t,o=Math.min(r/(1e3*a),1);N(100*o),o<1&&n()}))}(),function(){u&&cancelAnimationFrame(e)}}}),[a,R,P,F,w]);var _=o.useMemo((function(){return"object"===(0,le.A)(f)&&null!==f?f:f?{closeIcon:g}:{}}),[f,g]),z=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:(0,h.A)({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||it(n,"aria-"))||t.data&&it(n,"data-")||t.attr&&ot.includes(n))&&(r[n]=e[n])})),r}(_,!0),$=100-(!M||M<0?0:M>100?100:M),j="".concat(n,"-notice");return o.createElement("div",(0,we.A)({},y,{ref:t,className:Ce()(j,i,(0,Ae.A)({},"".concat(j,"-closable"),f)),style:r,onMouseEnter:function(e){var t;E(!0),null==y||null===(t=y.onMouseEnter)||void 0===t||t.call(y,e)},onMouseLeave:function(e){var t;E(!1),null==y||null===(t=y.onMouseLeave)||void 0===t||t.call(y,e)},onClick:v}),o.createElement("div",{className:"".concat(j,"-content")},p),f&&o.createElement("a",(0,we.A)({tabIndex:0,className:"".concat(j,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==rt.ENTER||L()},"aria-label":"Close"},z,{onClick:function(e){e.preventDefault(),e.stopPropagation(),L()}}),_.closeIcon),F&&o.createElement("progress",{className:"".concat(j,"-progress"),max:"100",value:$},$+"%"))}));const at=st;var lt=i().createContext({});const ct=function(e){var t=e.children,n=e.classNames;return i().createElement(lt.Provider,{value:{classNames:n}},t)};var ut=["className","style","classNames","styles"];const dt=function(e){var t,n,s,a,l,c=e.configList,u=e.placement,d=e.prefixCls,p=e.className,f=e.style,m=e.motion,g=e.onAllNoticeRemoved,y=e.onNoticeClose,v=e.stack,b=(0,o.useContext)(lt).classNames,w=(0,o.useRef)({}),k=(0,o.useState)(null),x=(0,xe.A)(k,2),A=x[0],S=x[1],E=(0,o.useState)([]),C=(0,xe.A)(E,2),O=C[0],M=C[1],N=c.map((function(e){return{config:e,key:String(e.key)}})),T=(l={offset:8,threshold:3,gap:16},(t=v)&&"object"===(0,le.A)(t)&&(l.offset=null!==(n=t.offset)&&void 0!==n?n:8,l.threshold=null!==(s=t.threshold)&&void 0!==s?s:3,l.gap=null!==(a=t.gap)&&void 0!==a?a:16),[!!t,l]),I=(0,xe.A)(T,2),R=I[0],D=I[1],P=D.offset,F=D.threshold,L=D.gap,_=R&&(O.length>0||N.length<=F),z="function"==typeof m?m(u):m;return(0,o.useEffect)((function(){R&&O.length>1&&M((function(e){return e.filter((function(e){return N.some((function(t){var n=t.key;return e===n}))}))}))}),[O,N,R]),(0,o.useEffect)((function(){var e,t;R&&w.current[null===(e=N[N.length-1])||void 0===e?void 0:e.key]&&S(w.current[null===(t=N[N.length-1])||void 0===t?void 0:t.key])}),[N,R]),i().createElement(H.aF,(0,we.A)({key:u,className:Ce()(d,"".concat(d,"-").concat(u),null==b?void 0:b.list,p,(0,Ae.A)((0,Ae.A)({},"".concat(d,"-stack"),!!R),"".concat(d,"-stack-expanded"),_)),style:f,keys:N,motionAppear:!0},z,{onAllRemoved:function(){g(u)}}),(function(e,t){var n=e.config,o=e.className,s=e.style,a=e.index,l=n,c=l.key,p=l.times,f=String(c),m=n,g=m.className,v=m.style,k=m.classNames,x=m.styles,S=(0,Se.A)(m,ut),E=N.findIndex((function(e){return e.key===f})),C={};if(R){var T=N.length-1-(E>-1?E:a-1),I="top"===u||"bottom"===u?"-50%":"0";if(T>0){var D,F,z;C.height=_?null===(D=w.current[f])||void 0===D?void 0:D.offsetHeight:null==A?void 0:A.offsetHeight;for(var $=0,j=0;j<T;j++){var B;$+=(null===(B=w.current[N[N.length-1-j].key])||void 0===B?void 0:B.offsetHeight)+L}var H=(_?$:T*P)*(u.startsWith("top")?1:-1),V=!_&&null!=A&&A.offsetWidth&&null!==(F=w.current[f])&&void 0!==F&&F.offsetWidth?((null==A?void 0:A.offsetWidth)-2*P*(T<3?T:3))/(null===(z=w.current[f])||void 0===z?void 0:z.offsetWidth):1;C.transform="translate3d(".concat(I,", ").concat(H,"px, 0) scaleX(").concat(V,")")}else C.transform="translate3d(".concat(I,", 0, 0)")}return i().createElement("div",{ref:t,className:Ce()("".concat(d,"-notice-wrapper"),o,null==k?void 0:k.wrapper),style:(0,h.A)((0,h.A)((0,h.A)({},s),C),null==x?void 0:x.wrapper),onMouseEnter:function(){return M((function(e){return e.includes(f)?e:[].concat((0,r.A)(e),[f])}))},onMouseLeave:function(){return M((function(e){return e.filter((function(e){return e!==f}))}))}},i().createElement(at,(0,we.A)({},S,{ref:function(e){E>-1?w.current[f]=e:delete w.current[f]},prefixCls:d,classNames:k,styles:x,className:Ce()(g,null==b?void 0:b.notice),style:v,times:p,key:c,eventKey:c,onNoticeClose:y,hovering:R&&O.length>0})))}))};var pt=o.forwardRef((function(e,t){var n=e.prefixCls,i=void 0===n?"rc-notification":n,s=e.container,a=e.motion,l=e.maxCount,c=e.className,u=e.style,d=e.onAllRemoved,p=e.stack,f=e.renderNotifications,m=o.useState([]),g=(0,xe.A)(m,2),y=g[0],v=g[1],b=function(e){var t,n=y.find((function(t){return t.key===e}));null==n||null===(t=n.onClose)||void 0===t||t.call(n),v((function(t){return t.filter((function(t){return t.key!==e}))}))};o.useImperativeHandle(t,(function(){return{open:function(e){v((function(t){var n,o=(0,r.A)(t),i=o.findIndex((function(t){return t.key===e.key})),s=(0,h.A)({},e);return i>=0?(s.times=((null===(n=t[i])||void 0===n?void 0:n.times)||0)+1,o[i]=s):(s.times=0,o.push(s)),l>0&&o.length>l&&(o=o.slice(-l)),o}))},close:function(e){b(e)},destroy:function(){v([])}}}));var w=o.useState({}),k=(0,xe.A)(w,2),x=k[0],A=k[1];o.useEffect((function(){var e={};y.forEach((function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))})),Object.keys(x).forEach((function(t){e[t]=e[t]||[]})),A(e)}),[y]);var S=function(e){A((function(t){var n=(0,h.A)({},t);return(n[e]||[]).length||delete n[e],n}))},E=o.useRef(!1);if(o.useEffect((function(){Object.keys(x).length>0?E.current=!0:E.current&&(null==d||d(),E.current=!1)}),[x]),!s)return null;var C=Object.keys(x);return(0,ie.createPortal)(o.createElement(o.Fragment,null,C.map((function(e){var t=x[e],n=o.createElement(dt,{key:e,configList:t,placement:e,prefixCls:i,className:null==c?void 0:c(e),style:null==u?void 0:u(e),motion:a,onNoticeClose:b,onAllNoticeRemoved:S,stack:p});return f?f(n,{prefixCls:i,key:e}):n}))),s)}));const ft=pt;var ht=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],mt=function(){return document.body},gt=0;const yt=e=>{const[,,,,t]=(0,V.Ay)();return t?`${e}-css-var`:""};var vt=n(7010),bt=n(2257),wt=n(8764);const kt=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:o,colorSuccess:i,colorError:s,colorWarning:a,colorInfo:c,fontSizeLG:u,motionEaseInOutCirc:d,motionDurationSlow:p,marginXS:f,paddingXS:h,borderRadiusLG:m,zIndexPopup:g,contentPadding:y,contentBg:v}=e,b=`${t}-notice`,w=new l.Mo("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:h,transform:"translateY(0)",opacity:1}}),k=new l.Mo("MessageMoveOut",{"0%":{maxHeight:e.height,padding:h,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),x={padding:h,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:f,fontSize:u},[`${b}-content`]:{display:"inline-block",padding:y,background:v,borderRadius:m,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:i},[`${t}-error > ${n}`]:{color:s},[`${t}-warning > ${n}`]:{color:a},[`${t}-info > ${n},\n ${t}-loading > ${n}`]:{color:c}};return[{[t]:Object.assign(Object.assign({},(0,K.dF)(e)),{color:o,position:"fixed",top:f,width:"100%",pointerEvents:"none",zIndex:g,[`${t}-move-up`]:{animationFillMode:"forwards"},[`\n ${t}-move-up-appear,\n ${t}-move-up-enter\n `]:{animationName:w,animationDuration:p,animationPlayState:"paused",animationTimingFunction:d},[`\n ${t}-move-up-appear${t}-move-up-appear-active,\n ${t}-move-up-enter${t}-move-up-enter-active\n `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:k,animationDuration:p,animationPlayState:"paused",animationTimingFunction:d},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${b}-wrapper`]:Object.assign({},x)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},x),{padding:0,textAlign:"start"})}]},xt=(0,bt.OF)("Message",(e=>{const t=(0,wt.oX)(e,{height:150});return[kt(t)]}),(e=>({zIndexPopup:e.zIndexPopupBase+vt.jH+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})));const At={info:o.createElement(Ze,null),success:o.createElement(Ve,null),error:o.createElement(Ke,null),warning:o.createElement(Ye,null),loading:o.createElement(tt,null)},St=e=>{let{prefixCls:t,type:n,icon:r,children:i}=e;return o.createElement("div",{className:Ce()(`${t}-custom-content`,`${t}-${n}`)},r||At[n],o.createElement("span",null,i))},Et={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var Ct=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:Et}))};const Ot=o.forwardRef(Ct);function Mt(e){let t;const n=new Promise((n=>{t=e((()=>{n(!0)}))})),r=()=>{null==t||t()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}const Nt=3,Tt=e=>{let{children:t,prefixCls:n}=e;const r=yt(n),[i,s,a]=xt(n,r);return i(o.createElement(ct,{classNames:{list:Ce()(s,a,r)}},t))},It=(e,t)=>{let{prefixCls:n,key:r}=t;return o.createElement(Tt,{prefixCls:n,key:r},e)},Rt=o.forwardRef(((e,t)=>{const{top:n,prefixCls:i,getContainer:s,maxCount:l,duration:c=Nt,rtl:u,transitionName:d,onAllRemoved:p}=e,{getPrefixCls:f,getPopupContainer:h,message:m,direction:g}=o.useContext(a.QO),y=i||f("message"),v=o.createElement("span",{className:`${y}-close-x`},o.createElement(Ot,{className:`${y}-close-icon`})),[b,w]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?mt:t,i=e.motion,s=e.prefixCls,a=e.maxCount,l=e.className,c=e.style,u=e.onAllRemoved,d=e.stack,p=e.renderNotifications,f=(0,Se.A)(e,ht),h=o.useState(),m=(0,xe.A)(h,2),g=m[0],y=m[1],v=o.useRef(),b=o.createElement(ft,{container:g,ref:v,prefixCls:s,motion:i,maxCount:a,className:l,style:c,onAllRemoved:u,stack:d,renderNotifications:p}),w=o.useState([]),k=(0,xe.A)(w,2),x=k[0],A=k[1],S=o.useMemo((function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&Object.keys(t).forEach((function(n){var r=t[n];void 0!==r&&(e[n]=r)}))})),e}(f,e);null!==t.key&&void 0!==t.key||(t.key="rc-notification-".concat(gt),gt+=1),A((function(e){return[].concat((0,r.A)(e),[{type:"open",config:t}])}))},close:function(e){A((function(t){return[].concat((0,r.A)(t),[{type:"close",key:e}])}))},destroy:function(){A((function(e){return[].concat((0,r.A)(e),[{type:"destroy"}])}))}}}),[]);return o.useEffect((function(){y(n())})),o.useEffect((function(){v.current&&x.length&&(x.forEach((function(e){switch(e.type){case"open":v.current.open(e.config);break;case"close":v.current.close(e.key);break;case"destroy":v.current.destroy()}})),A((function(e){return e.filter((function(e){return!x.includes(e)}))})))}),[x]),[S,b]}({prefixCls:y,style:()=>({left:"50%",transform:"translateX(-50%)",top:null!=n?n:8}),className:()=>Ce()({[`${y}-rtl`]:null!=u?u:"rtl"===g}),motion:()=>function(e,t){return{motionName:null!=t?t:`${e}-move-up`}}(y,d),closable:!1,closeIcon:v,duration:c,getContainer:()=>(null==s?void 0:s())||(null==h?void 0:h())||document.body,maxCount:l,onAllRemoved:p,renderNotifications:It});return o.useImperativeHandle(t,(()=>Object.assign(Object.assign({},b),{prefixCls:y,message:m}))),w}));let Dt=0;function Pt(e){const t=o.useRef(null),n=((0,p.rJ)("Message"),o.useMemo((()=>{const e=e=>{var n;null===(n=t.current)||void 0===n||n.close(e)},n=n=>{if(!t.current){const e=()=>{};return e.then=()=>{},e}const{open:r,prefixCls:i,message:s}=t.current,a=`${i}-notice`,{content:l,icon:c,type:u,key:d,className:p,style:f,onClose:h}=n,m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(n,["content","icon","type","key","className","style","onClose"]);let g=d;return null==g&&(Dt+=1,g=`antd-message-${Dt}`),Mt((t=>(r(Object.assign(Object.assign({},m),{key:g,content:o.createElement(St,{prefixCls:i,type:u,icon:c},l),placement:"top",className:Ce()(u&&`${a}-${u}`,p,null==s?void 0:s.className),style:Object.assign(Object.assign({},null==s?void 0:s.style),f),onClose:()=>{null==h||h(),t()}})),()=>{e(g)})))},r={open:n,destroy:n=>{var r;void 0!==n?e(n):null===(r=t.current)||void 0===r||r.destroy()}};return["info","success","warning","error","loading"].forEach((e=>{r[e]=(t,r,o)=>{let i,s,a;i=t&&"object"==typeof t&&"content"in t?t:{content:t},"function"==typeof r?a=r:(s=r,a=o);const l=Object.assign(Object.assign({onClose:a,duration:s},i),{type:e});return n(l)}})),r}),[]));return[n,o.createElement(Rt,Object.assign({key:"message-holder"},e,{ref:t}))]}let Ft=null,Lt=e=>e(),_t=[],zt={};function $t(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:o}=zt,i=(null==e?void 0:e())||document.body;return{getContainer:()=>i,duration:t,rtl:n,maxCount:r,top:o}}const jt=i().forwardRef(((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:l}=(0,o.useContext)(a.QO),c=zt.prefixCls||l("message"),u=(0,o.useContext)(s),[d,p]=Pt(Object.assign(Object.assign(Object.assign({},n),{prefixCls:c}),u.message));return i().useImperativeHandle(t,(()=>{const e=Object.assign({},d);return Object.keys(e).forEach((t=>{e[t]=function(){return r(),d[t].apply(d,arguments)}})),{instance:e,sync:r}})),p})),Bt=i().forwardRef(((e,t)=>{const[n,r]=i().useState($t),o=()=>{r($t)};i().useEffect(o,[]);const s=ee(),a=s.getRootPrefixCls(),l=s.getIconPrefixCls(),c=s.getTheme(),u=i().createElement(jt,{ref:t,sync:o,messageConfig:n});return i().createElement(re,{prefixCls:a,iconPrefixCls:l,theme:c},s.holderRender?s.holderRender(u):u)}));function Ht(){if(!Ft){const e=document.createDocumentFragment(),t={fragment:e};return Ft=t,void Lt((()=>{be(i().createElement(Bt,{ref:e=>{const{instance:n,sync:r}=e||{};Promise.resolve().then((()=>{!t.instance&&n&&(t.instance=n,t.sync=r,Ht())}))}}),e)}))}Ft.instance&&(_t.forEach((e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":Lt((()=>{const t=Ft.instance.open(Object.assign(Object.assign({},zt),e.config));null==t||t.then(e.resolve),e.setCloseFn(t)}));break;case"destroy":Lt((()=>{null==Ft||Ft.instance.destroy(e.key)}));break;default:Lt((()=>{var n;const o=(n=Ft.instance)[t].apply(n,(0,r.A)(e.args));null==o||o.then(e.resolve),e.setCloseFn(o)}))}})),_t=[])}const Vt={open:function(e){const t=Mt((t=>{let n;const r={type:"open",config:e,resolve:t,setCloseFn:e=>{n=e}};return _t.push(r),()=>{n?Lt((()=>{n()})):r.skipped=!0}}));return Ht(),t},destroy:e=>{_t.push({type:"destroy",key:e}),Ht()},config:function(e){zt=Object.assign(Object.assign({},zt),e),Lt((()=>{var e;null===(e=null==Ft?void 0:Ft.sync)||void 0===e||e.call(Ft)}))},useMessage:function(e){return Pt(e)},_InternalPanelDoNotUseOrYouWillBeFired:e=>{const{prefixCls:t,className:n,type:r,icon:i,content:s}=e,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:c}=o.useContext(a.QO),u=t||c("message"),d=yt(u),[p,f,h]=xt(u,d);return p(o.createElement(at,Object.assign({},l,{prefixCls:u,className:Ce()(n,f,`${u}-notice-pure-panel`,h,d),eventKey:"pure",duration:null,content:o.createElement(St,{prefixCls:u,type:r,icon:i},s)})))}};["success","info","warning","error","loading"].forEach((e=>{Vt[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){ee();const n=Mt((n=>{let r;const o={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return _t.push(o),()=>{r?Lt((()=>{r()})):o.skipped=!0}}));return Ht(),n}(e,n)}}));const Ut=Vt},8764:(e,t,n)=>{"use strict";n.d(t,{L_:()=>I,oX:()=>E});var r=n(7545),o=n(689),i=n(4586),s=n(9740),a=n(8769),l=n.n(a),c=n(5694),u=n(5152),d=n(414),p=n(2474),f=n(9296),h=n(857);const m=(0,d.A)((function e(){(0,u.A)(this,e)}));var g="CALC_UNIT",y=new RegExp(g,"g");function v(e){return"number"==typeof e?"".concat(e).concat(g):e}var b=function(e){(0,f.A)(n,e);var t=(0,h.A)(n);function n(e,o){var s;(0,u.A)(this,n),s=t.call(this),(0,i.A)((0,p.A)(s),"result",""),(0,i.A)((0,p.A)(s),"unitlessCssVar",void 0),(0,i.A)((0,p.A)(s),"lowPriority",void 0);var a=(0,r.A)(e);return s.unitlessCssVar=o,e instanceof n?s.result="(".concat(e.result,")"):"number"===a?s.result=v(e):"string"===a&&(s.result=e),s}return(0,d.A)(n,[{key:"add",value:function(e){return e instanceof n?this.result="".concat(this.result," + ").concat(e.getResult()):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," + ").concat(v(e))),this.lowPriority=!0,this}},{key:"sub",value:function(e){return e instanceof n?this.result="".concat(this.result," - ").concat(e.getResult()):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," - ").concat(v(e))),this.lowPriority=!0,this}},{key:"mul",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," * ").concat(e.getResult(!0)):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," * ").concat(e)),this.lowPriority=!1,this}},{key:"div",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," / ").concat(e.getResult(!0)):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," / ").concat(e)),this.lowPriority=!1,this}},{key:"getResult",value:function(e){return this.lowPriority||e?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(e){var t=this,n=(e||{}).unit,r=!0;return"boolean"==typeof n?r=n:Array.from(this.unitlessCssVar).some((function(e){return t.result.includes(e)}))&&(r=!1),this.result=this.result.replace(y,r?"px":""),void 0!==this.lowPriority?"calc(".concat(this.result,")"):this.result}}]),n}(m);const w=function(e){(0,f.A)(n,e);var t=(0,h.A)(n);function n(e){var r;return(0,u.A)(this,n),r=t.call(this),(0,i.A)((0,p.A)(r),"result",0),e instanceof n?r.result=e.result:"number"==typeof e&&(r.result=e),r}return(0,d.A)(n,[{key:"add",value:function(e){return e instanceof n?this.result+=e.result:"number"==typeof e&&(this.result+=e),this}},{key:"sub",value:function(e){return e instanceof n?this.result-=e.result:"number"==typeof e&&(this.result-=e),this}},{key:"mul",value:function(e){return e instanceof n?this.result*=e.result:"number"==typeof e&&(this.result*=e),this}},{key:"div",value:function(e){return e instanceof n?this.result/=e.result:"number"==typeof e&&(this.result/=e),this}},{key:"equal",value:function(){return this.result}}]),n}(m),k=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};n(9973);const x=function(e,t,n,r){var i=(0,s.A)({},t[e]);null!=r&&r.deprecatedTokens&&r.deprecatedTokens.forEach((function(e){var t,n=(0,o.A)(e,2),r=n[0],s=n[1];(null!=i&&i[r]||null!=i&&i[s])&&(null!==(t=i[s])&&void 0!==t||(i[s]=null==i?void 0:i[r]))}));var a=(0,s.A)((0,s.A)({},n),i);return Object.keys(a).forEach((function(e){a[e]===t[e]&&delete a[e]})),a};var A="undefined"!=typeof CSSINJS_STATISTIC,S=!0;function E(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!A)return Object.assign.apply(Object,[{}].concat(t));S=!1;var o={};return t.forEach((function(e){"object"===(0,r.A)(e)&&Object.keys(e).forEach((function(t){Object.defineProperty(o,t,{configurable:!0,enumerable:!0,get:function(){return e[t]}})}))})),S=!0,o}var C={};function O(){}const M=function(e,t,n){var r;return"function"==typeof n?n(E(t,null!==(r=t[e])&&void 0!==r?r:{})):null!=n?n:{}};var N=new(function(){function e(){(0,u.A)(this,e),(0,i.A)(this,"map",new Map),(0,i.A)(this,"objectIDMap",new WeakMap),(0,i.A)(this,"nextID",0),(0,i.A)(this,"lastAccessBeat",new Map),(0,i.A)(this,"accessBeat",0)}return(0,d.A)(e,[{key:"set",value:function(e,t){this.clear();var n=this.getCompositeKey(e);this.map.set(n,t),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(e){var t=this.getCompositeKey(e),n=this.map.get(t);return this.lastAccessBeat.set(t,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(e){var t=this;return e.map((function(e){return e&&"object"===(0,r.A)(e)?"obj_".concat(t.getObjectID(e)):"".concat((0,r.A)(e),"_").concat(e)})).join("|")}},{key:"getObjectID",value:function(e){if(this.objectIDMap.has(e))return this.objectIDMap.get(e);var t=this.nextID;return this.objectIDMap.set(e,t),this.nextID+=1,t}},{key:"clear",value:function(){var e=this;if(this.accessBeat>1e4){var t=Date.now();this.lastAccessBeat.forEach((function(n,r){t-n>6e5&&(e.map.delete(r),e.lastAccessBeat.delete(r))})),this.accessBeat=0}}}]),e}());const T=function(){return{}},I=function(e){var t=e.useCSP,n=void 0===t?T:t,a=e.useToken,u=e.usePrefix,d=e.getResetStyles,p=e.getCommonStyle,f=e.getCompUnitless;function h(t,i,f){var h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},m=Array.isArray(t)?t:[t,t],g=(0,o.A)(m,1)[0],y=m.join("-"),v=e.layer||{name:"antd"};return function(e){var t,o,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,T=a(),I=T.theme,R=T.realToken,D=T.hashId,P=T.token,F=T.cssVar,L=u(),_=L.rootPrefixCls,z=L.iconPrefixCls,$=n(),j=F?"css":"js",B=(t=function(){var e=new Set;return F&&Object.keys(h.unitless||{}).forEach((function(t){e.add((0,c.Ki)(t,F.prefix)),e.add((0,c.Ki)(t,k(g,F.prefix)))})),function(e,t){var n="css"===e?b:w;return function(e){return new n(e,t)}}(j,e)},o=[j,g,null==F?void 0:F.prefix],l().useMemo((function(){var e=N.get(o);if(e)return e;var n=t();return N.set(o,n),n}),o)),H=function(e){return"js"===e?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"max(".concat(t.map((function(e){return(0,c.zA)(e)})).join(","),")")},min:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"min(".concat(t.map((function(e){return(0,c.zA)(e)})).join(","),")")}}}(j),V=H.max,U=H.min,W={theme:I,token:P,hashId:D,nonce:function(){return $.nonce},clientOnly:h.clientOnly,layer:v,order:h.order||-999};return"function"==typeof d&&(0,c.IV)((0,s.A)((0,s.A)({},W),{},{clientOnly:!1,path:["Shared",_]}),(function(){return d(P,{prefix:{rootPrefixCls:_,iconPrefixCls:z},csp:$})})),[(0,c.IV)((0,s.A)((0,s.A)({},W),{},{path:[y,e,z]}),(function(){if(!1===h.injectStyle)return[];var t=function(e){var t,n=e,r=O;return A&&"undefined"!=typeof Proxy&&(t=new Set,n=new Proxy(e,{get:function(e,n){var r;return S&&(null===(r=t)||void 0===r||r.add(n)),e[n]}}),r=function(e,n){var r;C[e]={global:Array.from(t),component:(0,s.A)((0,s.A)({},null===(r=C[e])||void 0===r?void 0:r.component),n)}}),{token:n,keys:t,flush:r}}(P),n=t.token,o=t.flush,a=M(g,R,f),l=".".concat(e),u=x(g,R,a,{deprecatedTokens:h.deprecatedTokens});F&&a&&"object"===(0,r.A)(a)&&Object.keys(a).forEach((function(e){a[e]="var(".concat((0,c.Ki)(e,k(g,F.prefix)),")")}));var d=E(n,{componentCls:l,prefixCls:e,iconCls:".".concat(z),antCls:".".concat(_),calc:B,max:V,min:U},F?a:u),y=i(d,{hashId:D,prefixCls:e,rootPrefixCls:_,iconPrefixCls:z});o(g,u);var v="function"==typeof p?p(d,e,m,h.resetFont):null;return[!1===h.resetStyle?null:v,y]})),D]}}return{genStyleHooks:function(e,t,n,r){var u=Array.isArray(e)?e[0]:e;function d(e){return"".concat(String(u)).concat(e.slice(0,1).toUpperCase()).concat(e.slice(1))}var p=(null==r?void 0:r.unitless)||{},m="function"==typeof f?f(e):{},g=(0,s.A)((0,s.A)({},m),{},(0,i.A)({},d("zIndexPopup"),!0));Object.keys(p).forEach((function(e){g[d(e)]=p[e]}));var y=(0,s.A)((0,s.A)({},r),{},{unitless:g,prefixToken:d}),v=h(e,t,n,y),b=function(e,t,n){var r=n.unitless,o=n.injectStyle,i=void 0===o||o,s=n.prefixToken,u=n.ignore,d=function(o){var i=o.rootCls,l=o.cssVar,d=void 0===l?{}:l,p=a().realToken;return(0,c.RC)({path:[e],prefix:d.prefix,key:d.key,unitless:r,ignore:u,token:p,scope:i},(function(){var r=M(e,p,t),o=x(e,p,r,{deprecatedTokens:null==n?void 0:n.deprecatedTokens});return Object.keys(r).forEach((function(e){o[s(e)]=o[e],delete o[e]})),o})),null};return function(t){var n=a().cssVar;return[function(r){return i&&n?l().createElement(l().Fragment,null,l().createElement(d,{rootCls:t,cssVar:n,component:e}),r):r},null==n?void 0:n.key]}}(u,n,y);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=v(e,t),r=(0,o.A)(n,2)[1],i=b(t),s=(0,o.A)(i,2);return[s[0],r,s[1]]}},genSubStyleComponent:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=h(e,t,n,(0,s.A)({resetStyle:!1,order:-998},r));return function(e){var t=e.prefixCls,n=e.rootCls;return o(t,void 0===n?t:n),null}},genComponentStyleHook:h}}},9055:(e,t,n)=>{"use strict";n.d(t,{m6:()=>h,BD:()=>m});var r=n(9740),o=n(7169),i="data-rc-order",s="data-rc-priority",a="rc-util-key",l=new Map;function c(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):a}function u(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function d(e){return Array.from((l.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,o.A)())return null;var n=t.csp,r=t.prepend,a=t.priority,l=void 0===a?0:a,c=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),p="prependQueue"===c,f=document.createElement("style");f.setAttribute(i,c),p&&l&&f.setAttribute(s,"".concat(l)),null!=n&&n.nonce&&(f.nonce=null==n?void 0:n.nonce),f.innerHTML=e;var h=u(t),m=h.firstChild;if(r){if(p){var g=(t.styles||d(h)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(i)))return!1;var t=Number(e.getAttribute(s)||0);return l>=t}));if(g.length)return h.insertBefore(f,g[g.length-1].nextSibling),f}h.insertBefore(f,m)}else h.appendChild(f);return f}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u(t);return(t.styles||d(n)).find((function(n){return n.getAttribute(c(t))===e}))}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=f(e,t);n&&u(t).removeChild(n)}function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=u(n),i=d(o),s=(0,r.A)((0,r.A)({},n),{},{styles:i});!function(e,t){var n=l.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var r=p("",t),o=r.parentNode;l.set(e,o),e.removeChild(r)}}(o,s);var a,h,m,g=f(t,s);if(g)return null!==(a=s.csp)&&void 0!==a&&a.nonce&&g.nonce!==(null===(h=s.csp)||void 0===h?void 0:h.nonce)&&(g.nonce=null===(m=s.csp)||void 0===m?void 0:m.nonce),g.innerHTML!==e&&(g.innerHTML=e),g;var y=p(e,s);return y.setAttribute(c(s),t),y}},9105:(e,t,n)=>{"use strict";function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}n.d(t,{A:()=>r})},9116:(e,t,n)=>{"use strict";function r(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function o(e){return function(e){return r(e)instanceof ShadowRoot}(e)?r(e):null}n.d(t,{j:()=>o})},9126:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var r=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),o="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),s="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},a=["top","right","bottom","left","width","height","size","weight"],l="undefined"!=typeof MutationObserver,c=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,r=0;function o(){t&&(t=!1,e()),n&&a()}function i(){s(o)}function a(){var e=Date.now();if(t){if(e-r<2)return;n=!0}else t=!0,n=!1,setTimeout(i,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){o&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){o&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},p=y(0,0,0,0);function f(e){return parseFloat(e)||0}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+f(e["border-"+n+"-width"])}),0)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return o?m(e)?function(e){var t=e.getBBox();return y(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=d(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=f(i)}return t}(r),i=o.left+o.right,s=o.top+o.bottom,a=f(r.width),l=f(r.height);if("border-box"===r.boxSizing&&(Math.round(a+i)!==t&&(a-=h(r,"left","right")+i),Math.round(l+s)!==n&&(l-=h(r,"top","bottom")+s)),!function(e){return e===d(e).document.documentElement}(e)){var c=Math.round(a+i)-t,u=Math.round(l+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(u)&&(l-=u)}return y(o.left,o.top,a,l)}(e):p}function y(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,o,i,s,a,l,c=(r=(n=t).x,o=n.y,i=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),u(l,{x:r,y:o,width:i,height:s,top:o,right:r+i,bottom:s+o,left:r}),l);u(this,{target:e,contentRect:c})},w=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),k="undefined"!=typeof WeakMap?new WeakMap:new r,x=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new w(t,n,this);k.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){x.prototype[e]=function(){var t;return(t=k.get(this))[e].apply(t,arguments)}}));const A=void 0!==i.ResizeObserver?i.ResizeObserver:x},9154:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,r:()=>r});const r={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},o=Object.assign(Object.assign({},r),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'",fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0})},9284:(e,t,n)=>{"use strict";n.d(t,{A9:()=>f,K4:()=>c,Xf:()=>l,f3:()=>d,xK:()=>u});var r=n(7545),o=n(8769),i=n(3790),s=n(4511),a=n(785),l=function(e,t){"function"==typeof e?e(t):"object"===(0,r.A)(e)&&e&&"current"in e&&(e.current=t)},c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);return r.length<=1?r[0]:function(e){t.forEach((function(t){l(t,e)}))}},u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.A)((function(){return c.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))},d=function(e){var t,n;if(!e)return!1;if(p(e)&&e.props.propertyIsEnumerable("ref"))return!0;var r=(0,i.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render||r.$$typeof===i.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===i.ForwardRef)};function p(e){return(0,o.isValidElement)(e)&&!(0,a.A)(e)}var f=function(e){if(e&&p(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null}},9296:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1087);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},9348:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(689),o=n(8769);function i(e){var t=o.useRef(!1),n=o.useState(e),i=(0,r.A)(n,2),s=i[0],a=i[1];return o.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[s,function(e,n){n&&t.current||a(e)}]}},9424:(e,t,n)=>{"use strict";n.d(t,{z1:()=>E,cM:()=>m,UA:()=>T,uy:()=>g});var r=n(6127),o=2,i=.16,s=.05,a=.05,l=.15,c=5,u=4,d=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function p(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-o*t:Math.round(e.h)+o*t:n?Math.round(e.h)+o*t:Math.round(e.h)-o*t)<0?r+=360:r>=360&&(r-=360),r}function f(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-i*t:t===u?e.s+i:e.s+s*t)>1&&(r=1),n&&t===c&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(100*r)/100);var r}function h(e,t,n){var r;return r=n?e.v+a*t:e.v-l*t,r=Math.max(0,Math.min(1,r)),Math.round(100*r)/100}function m(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],o=new r.Y(e),i=o.toHsv(),s=c;s>0;s-=1){var a=new r.Y({h:p(i,s,!0),s:f(i,s,!0),v:h(i,s,!0)});n.push(a)}n.push(o);for(var l=1;l<=u;l+=1){var m=new r.Y({h:p(i,l),s:f(i,l),v:h(i,l)});n.push(m)}return"dark"===t.theme?d.map((function(e){var o=e.index,i=e.amount;return new r.Y(t.backgroundColor||"#141414").mix(n[o],i).toHexString()})):n.map((function(e){return e.toHexString()}))}var g={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},y=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];y.primary=y[5];var v=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];v.primary=v[5];var b=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];b.primary=b[5];var w=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];w.primary=w[5];var k=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];k.primary=k[5];var x=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];x.primary=x[5];var A=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];A.primary=A[5];var S=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];S.primary=S[5];var E=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];E.primary=E[5];var C=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];C.primary=C[5];var O=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];O.primary=O[5];var M=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];M.primary=M[5];var N=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];N.primary=N[5];var T={red:y,volcano:v,orange:b,gold:w,yellow:k,lime:x,green:A,cyan:S,blue:E,geekblue:C,purple:O,magenta:M,grey:N},I=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];I.primary=I[5];var R=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];R.primary=R[5];var D=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];D.primary=D[5];var P=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];P.primary=P[5];var F=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];F.primary=F[5];var L=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];L.primary=L[5];var _=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];_.primary=_[5];var z=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];z.primary=z[5];var $=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];$.primary=$[5];var j=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];j.primary=j[5];var B=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];B.primary=B[5];var H=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];H.primary=H[5];var V=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];V.primary=V[5]},9449:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8769);function o(e){var t=r.useRef();t.current=e;var n=r.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[]);return n}},9575:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},9642:(e,t,n)=>{"use strict";n.d(t,{QO:()=>s,pM:()=>i,yH:()=>o});var r=n(8769);const o="ant",i="anticon",s=r.createContext({getPrefixCls:(e,t)=>t||(e?`${o}-${e}`:o),iconPrefixCls:i}),{Consumer:a}=s},9710:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(s(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&s(r)?r:{},a(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&a(d,{name:n,newValue:o}));return d}},9740:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(4586);function o(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},9820:(e,t,n)=>{"use strict";function r(){}n.d(t,{ok:()=>r})},9973:(e,t,n)=>{"use strict";n.d(t,{_q:()=>r.A});var r=n(9449);n(4948),n(9284),n(3795),n(4445)}}]);
|
|
3
|
-
//# sourceMappingURL=1599.
|
|
1
|
+
/*! For license information please see 1599.59abead2.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_next_bricks_ai=globalThis.webpackChunk_next_bricks_ai||[]).push([[1055,1599],{62:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},96:(e,t,n)=>{"use strict";n.d(t,{JJ:()=>a,dv:()=>i,fV:()=>o,tG:()=>s});var r=n(1329);class o{constructor(e,t){var n;this.match=e,this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){let i=n;if(t[1]){let e=t[0].lastIndexOf(t[1]);i+=t[0].slice(e+t[1].length);let n=(r+=e)-o;n>0&&(i=t[0].slice(e-n,e)+i,r=o)}return e.tr.insertText(i,r,o)}):t}}const i=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let o,i=n[r];if(i.spec.isInputRules&&(o=i.getState(e))){if(t){let n=e.tr,r=o.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(o.text){let t=n.doc.resolve(o.from).marks();n.replaceWith(o.from,o.to,e.schema.text(o.text,t))}else n.delete(o.from,o.to);t(n)}return!0}}return!1};function s(e,t,n=null,i){return new o(e,((e,o,s,a)=>{let l=n instanceof Function?n(o):n,c=e.tr.delete(s,a),u=c.doc.resolve(s).blockRange(),d=u&&(0,r.oM)(u,t,l);if(!d)return null;c.wrap(u,d);let p=c.doc.resolve(s-1).nodeBefore;return p&&p.type==t&&(0,r.n9)(c.doc,s-1)&&(!i||i(o,p))&&c.join(s-1),c}))}function a(e,t,n=null){return new o(e,((e,r,o,i)=>{let s=e.doc.resolve(o),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,a):null}))}new o(/--$/,"—"),new o(/\.\.\.$/,"…"),new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new o(/"$/,"”"),new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new o(/'$/,"’")},231:(e,t,n)=>{"use strict";function r(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}n.d(t,{A:()=>r})},258:(e,t,n)=>{"use strict";n.d(t,{vG:()=>m,sb:()=>h,zQ:()=>f});var r=n(8769),o=n.n(r),i=n(5694),s=n(9424),a=n(9154),l=n(6127);const c=(e,t)=>new l.Y(e).setA(t).toRgbString(),u=(e,t)=>new l.Y(e).darken(t).toHexString(),d=e=>{const t=(0,s.cM)(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},p=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:c(r,.88),colorTextSecondary:c(r,.65),colorTextTertiary:c(r,.45),colorTextQuaternary:c(r,.25),colorFill:c(r,.15),colorFillSecondary:c(r,.06),colorFillTertiary:c(r,.04),colorFillQuaternary:c(r,.02),colorBgSolid:c(r,1),colorBgSolidHover:c(r,.75),colorBgSolidActive:c(r,.95),colorBgLayout:u(n,4),colorBgContainer:u(n,0),colorBgElevated:u(n,0),colorBgSpotlight:c(r,.85),colorBgBlur:"transparent",colorBorder:u(n,15),colorBorderSecondary:u(n,6)}},f=(0,i.an)((function(e){s.uy.pink=s.uy.magenta,s.UA.pink=s.UA.magenta;const t=Object.keys(a.r).map((t=>{const n=e[t]===s.uy[t]?s.UA[t]:(0,s.cM)(e[t]);return new Array(10).fill(1).reduce(((e,r,o)=>(e[`${t}-${o+1}`]=n[o],e[`${t}${o+1}`]=n[o],e)),{})})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),function(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:i,colorError:s,colorInfo:a,colorPrimary:c,colorBgBase:u,colorTextBase:d}=e,p=n(c),f=n(o),h=n(i),m=n(s),g=n(a),y=r(u,d),v=n(e.colorLink||e.colorInfo),b=new l.Y(m[1]).mix(new l.Y(m[3]),50).toHexString();return Object.assign(Object.assign({},y),{colorPrimaryBg:p[1],colorPrimaryBgHover:p[2],colorPrimaryBorder:p[3],colorPrimaryBorderHover:p[4],colorPrimaryHover:p[5],colorPrimary:p[6],colorPrimaryActive:p[7],colorPrimaryTextHover:p[8],colorPrimaryText:p[9],colorPrimaryTextActive:p[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:b,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],colorBgMask:new l.Y("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}(e,{generateColorPalettes:d,generateNeutralColorPalettes:p})),(e=>{const t=function(e){const t=new Array(10).fill(null).map(((t,n)=>{const r=n-1,o=e*Math.pow(Math.E,r/5),i=n>1?Math.floor(o):Math.ceil(o);return 2*Math.floor(i/2)}));return t[1]=e,t.map((e=>{return{size:e,lineHeight:(t=e,(t+8)/t)};var t}))}(e),n=t.map((e=>e.size)),r=t.map((e=>e.lineHeight)),o=n[1],i=n[0],s=n[2],a=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:s,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:a,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(a*o),fontHeightLG:Math.round(c*s),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}})(e.fontSize)),function(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}(e)),(e=>{const{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}})(e)),function(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+2*t).toFixed(1)}s`,motionDurationSlow:`${(n+3*t).toFixed(1)}s`,lineWidthBold:o+1},(e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}})(r))}(e))})),h={token:a.A,override:{override:a.A},hashed:!0},m=o().createContext(h)},414:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(1369);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,r.A)(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},536:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>ce,PD:()=>at,hm:()=>Le,Wf:()=>K});var r=n(7268),o=n(5119),i=n(5715),s=n(6090),a=n(7043),l=n(96),c=n(7096);const u=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ","a"],["ُ","u"],["ِ","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]];const d=[["&"," and "],["🦄"," unicorn "],["♥"," love "]];function p(e,t){if("string"!=typeof e)throw new TypeError(`Expected a string, got \`${typeof e}\``);const n=(t={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...t}).preserveLeadingUnderscore&&e.startsWith("_"),r=t.preserveTrailingDash&&e.endsWith("-");e=function(e,t){if("string"!=typeof e)throw new TypeError(`Expected a string, got \`${typeof e}\``);t={customReplacements:[],...t};const n=new Map([...u,...t.customReplacements]);return(e=((e,t)=>{for(const[n,r]of t)e=e.replace(new RegExp((0,c.A)(n),"g"),r);return e})(e=e.normalize(),n)).normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize()}(e,{customReplacements:new Map([...d,...t.customReplacements])}),t.decamelize&&(e=(e=>e.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"))(e));const o=(e=>{let t="a-z\\d";if(t+=e.lowercase?"":"A-Z",e.preserveCharacters.length>0)for(const n of e.preserveCharacters){if(n===e.separator)throw new Error(`The separator character \`${e.separator}\` cannot be included in preserved characters: ${e.preserveCharacters}`);t+=(0,c.A)(n)}return new RegExp(`[^${t}]+`,"g")})(t);return t.lowercase&&(e=e.toLowerCase()),e=(e=(e=e.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3")).replace(o,t.separator)).replace(/\\/g,""),t.separator&&(e=((e,t)=>{const n=(0,c.A)(t);return e.replace(new RegExp(`${n}{2,}`,"g"),t).replace(new RegExp(`^${n}|${n}$`,"g"),"")})(e,t.separator)),n&&(e=`_${e}`),r&&(e=`${e}-`),e}var f=n(1570),h=n(4254),m=n(1329);function g(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!i&&(!n||(r.node(i.depth-1).type==e?function(e,t,n,r){let o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new m.Wg(i-1,a,i,a,new s.Ji(s.FK.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new s.u$(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const l=(0,m.jP)(r);if(null==l)return!1;o.lift(r,l);let c=o.mapping.map(i,-1)-1;return(0,m.n9)(o.doc,c)&&o.join(c),t(o.scrollIntoView()),!0}(t,n,e,i):function(e,t,n){let r=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,i=n.startIndex;t>i;t--)e-=o.child(t).nodeSize,r.delete(e-1,e+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,c=n.endIndex==o.childCount,u=i.node(-1),d=i.index(-1);if(!u.canReplace(d+(l?0:1),d+1,a.content.append(c?s.FK.empty:s.FK.from(o))))return!1;let p=i.pos,f=p+a.nodeSize;return r.step(new m.Wg(p-(l?1:0),f+(c?1:0),p+1,f-1,new s.Ji((l?s.FK.empty:s.FK.from(o.copy(s.FK.empty))).append(c?s.FK.empty:s.FK.from(o.copy(s.FK.empty))),l?0:1,c?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,i)))}}var y=n(3686),v=n(4269);function b(e){return String(e||"").toUpperCase()}var w=n(6197);function k(){return function(e){const t=function(e){const t=new Map;if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return(0,v.YR)(e,"definition",(function(e){const n=b(e.identifier);n&&!t.get(n)&&t.set(n,e)})),function(e){const n=b(e);return t.get(n)}}(e);(0,v.YR)(e,(function(e,n,r){if("definition"===e.type&&void 0!==r&&"number"==typeof n)return r.children.splice(n,1),[w._Z,n];if("imageReference"===e.type||"linkReference"===e.type){const o=t(e.identifier);if(o&&r&&"number"==typeof n)return r.children[n]="imageReference"===e.type?{type:"image",url:o.url,title:o.title,alt:e.alt}:{type:"link",url:o.url,title:o.title,children:e.children},[w._Z,n]}}))}}function x(e,t){var n;if(!(t.childCount>=1&&"hardbreak"===(null==(n=t.lastChild)?void 0:n.type.name)))return void e.next(t.content);const r=[];t.content.forEach(((e,n,o)=>{o!==t.childCount-1&&r.push(e)})),e.next(s.FK.fromArray(r))}function A(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}const S=(0,r.JY)("emphasis");A(S,{displayName:"Attr<emphasis>",group:"Emphasis"});const E=(0,r.hk)("emphasis",(e=>({attrs:{marker:{default:e.get(o.P5).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>"italic"===e}],toDOM:t=>["em",e.get(S.key)(t)],parseMarkdown:{match:e=>"emphasis"===e.type,runner:(e,t,n)=>{e.openMark(n,{marker:t.marker}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"emphasis"===e.type.name,runner:(e,t)=>{e.withMark(t,"emphasis",void 0,{marker:t.attrs.marker})}}})));A(E.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"}),A(E.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const C=(0,r.yu)("ToggleEmphasis",(e=>()=>(0,i.wh)(E.type(e))));A(C,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const O=(0,r.b_)((e=>(0,h.uX)(/(?:^|[^*])\*([^*]+)\*$/,E.type(e),{updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}})));A(O,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const M=(0,r.b_)((e=>(0,h.uX)(/(?:^|[^_])_([^_]+)_$/,E.type(e),{updateCaptured:({fullMatch:e,start:t})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:t+1}})));A(M,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const N=(0,r.pq)("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{const t=e.get(o.MD);return()=>t.call(C.key)}}});A(N.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"}),A(N.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const T=(0,r.JY)("strong");A(T,{displayName:"Attr<strong>",group:"Strong"});const I=(0,r.hk)("strong",(e=>({attrs:{marker:{default:e.get(o.P5).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>"bold"===e}],toDOM:t=>["strong",e.get(T.key)(t)],parseMarkdown:{match:e=>"strong"===e.type,runner:(e,t,n)=>{e.openMark(n,{marker:t.marker}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"strong"===e.type.name,runner:(e,t)=>{e.withMark(t,"strong",void 0,{marker:t.attrs.marker})}}})));A(I.mark,{displayName:"MarkSchema<strong>",group:"Strong"}),A(I.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const R=(0,r.yu)("ToggleStrong",(e=>()=>(0,i.wh)(I.type(e))));A(R,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const D=(0,r.b_)((e=>(0,h.uX)(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,I.type(e))));A(D,{displayName:"InputRule<strong>",group:"Strong"});const P=(0,r.pq)("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{const t=e.get(o.MD);return()=>t.call(R.key)}}});A(P.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"}),A(P.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const F=(0,r.JY)("inlineCode");A(F,{displayName:"Attr<inlineCode>",group:"InlineCode"});const L=(0,r.hk)("inlineCode",(e=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(F.key)(t)],parseMarkdown:{match:e=>"inlineCode"===e.type,runner:(e,t,n)=>{e.openMark(n),e.addText(t.value),e.closeMark(n)}},toMarkdown:{match:e=>"inlineCode"===e.type.name,runner:(e,t,n)=>{e.withMark(t,"inlineCode",n.text||"")}}})));A(L.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"}),A(L.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const _=(0,r.yu)("ToggleInlineCode",(e=>()=>(t,n)=>{const{selection:r,tr:o}=t;if(r.empty)return!1;const{from:i,to:s}=r;return t.doc.rangeHasMark(i,s,L.type(e))?(null==n||n(o.removeMark(i,s,L.type(e))),!0):(Object.keys(t.schema.marks).filter((e=>e!==L.type.name)).map((e=>t.schema.marks[e])).forEach((e=>{o.removeMark(i,s,e)})),null==n||n(o.addMark(i,s,L.type(e).create())),!0)}));A(_,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const z=(0,r.b_)((e=>(0,h.uX)(/(?:\`)([^\`]+)(?:\`)$/,L.type(e))));A(z,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const $=(0,r.pq)("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{const t=e.get(o.MD);return()=>t.call(_.key)}}});A($.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"}),A($.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const j=(0,r.JY)("link");A(j,{displayName:"Attr<link>",group:"Link"});const B=(0,r.hk)("link",(e=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(j.key)(t),...t.attrs}],parseMarkdown:{match:e=>"link"===e.type,runner:(e,t,n)=>{const r=t.url,o=t.title;e.openMark(n,{href:r,title:o}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"link"===e.type.name,runner:(e,t)=>{e.withMark(t,"link",void 0,{title:t.attrs.title,url:t.attrs.href})}}})));A(B.mark,{displayName:"MarkSchema<link>",group:"Link"});const H=(0,r.yu)("ToggleLink",(e=>(t={})=>(0,i.wh)(B.type(e),t)));A(H,{displayName:"Command<toggleLinkCommand>",group:"Link"});const V=(0,r.yu)("UpdateLink",(e=>(t={})=>(n,r)=>{if(!r)return!1;let o,i=-1;const{selection:s}=n,{from:a,to:l}=s;if(n.doc.nodesBetween(a,a===l?l+1:l,((t,n)=>{if(B.type(e).isInSet(t.marks))return o=t,i=n,!1})),!o)return!1;const c=o.marks.find((({type:t})=>t===B.type(e)));if(!c)return!1;const u=i,d=i+o.nodeSize,{tr:p}=n,h=B.type(e).create({...c.attrs,...t});return!!h&&(r(p.removeMark(u,d,c).addMark(u,d,h).setSelection(new f.U3(p.selection.$anchor)).scrollIntoView()),!0)}));A(V,{displayName:"Command<updateLinkCommand>",group:"Link"});const U=(0,r.dz)("doc",(()=>({content:"block+",parseMarkdown:{match:({type:e})=>"root"===e,runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>"doc"===e.type.name,runner:(e,t)=>{e.openNode("root"),e.next(t.content)}}})));A(U,{displayName:"NodeSchema<doc>",group:"Doc"});const W=(0,r.YR)("paragraph");A(W,{displayName:"Attr<paragraph>",group:"Paragraph"});const K=(0,r.Yh)("paragraph",(e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(W.key)(t),0],parseMarkdown:{match:e=>"paragraph"===e.type,runner:(e,t,n)=>{e.openNode(n),t.children?e.next(t.children):e.addText(t.value||""),e.closeNode()}},toMarkdown:{match:e=>"paragraph"===e.type.name,runner:(e,t)=>{e.openNode("paragraph"),x(e,t),e.closeNode()}}})));A(K.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"}),A(K.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const q=(0,r.yu)("TurnIntoText",(e=>()=>(0,i.y_)(K.type(e))));A(q,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const G=(0,r.pq)("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{const t=e.get(o.MD);return()=>t.call(q.key)}}});A(G.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"}),A(G.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const Y=Array(6).fill(0).map(((e,t)=>t+1)),J=(0,r.Qx)((function(e){return p(e.textContent)}),"headingIdGenerator");A(J,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const X=(0,r.YR)("heading");A(X,{displayName:"Attr<heading>",group:"Heading"});const Z=(0,r.Yh)("heading",(e=>{const t=e.get(J.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:Y.map((e=>({tag:`h${e}`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw(0,a.Ik)(t);return{level:e,id:t.id}}}))),toDOM:n=>[`h${n.attrs.level}`,{...e.get(X.key)(n),id:n.attrs.id||t(n)},0],parseMarkdown:{match:({type:e})=>"heading"===e,runner:(e,t,n)=>{const r=t.depth;e.openNode(n,{level:r}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>"heading"===e.type.name,runner:(e,t)=>{e.openNode("heading",void 0,{depth:t.attrs.level}),x(e,t),e.closeNode()}}}}));A(Z.node,{displayName:"NodeSchema<heading>",group:"Heading"}),A(Z.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const Q=(0,r.b_)((e=>(0,l.JJ)(/^(?<hashes>#+)\s$/,Z.type(e),(t=>{var n,r;const i=(null==(r=null==(n=t.groups)?void 0:n.hashes)?void 0:r.length)||0,s=e.get(o.kY),{$from:a}=s.state.selection,l=a.node();if("heading"===l.type.name){let e=Number(l.attrs.level)+Number(i);return e>6&&(e=6),{level:e}}return{level:i}}))));A(Q,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const ee=(0,r.yu)("WrapInHeading",(e=>t=>(t??(t=1),t<1?(0,i.y_)(K.type(e)):(0,i.y_)(Z.type(e),{level:t}))));A(ee,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const te=(0,r.yu)("DowngradeHeading",(e=>()=>(t,n,r)=>{const{$from:o}=t.selection,s=o.node();if(s.type!==Z.type(e)||!t.selection.empty||0!==o.parentOffset)return!1;const a=s.attrs.level-1;return a?(null==n||n(t.tr.setNodeMarkup(t.selection.$from.before(),void 0,{...s.attrs,level:a})),!0):(0,i.y_)(K.type(e))(t,n,r)}));A(te,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const ne=(0,r.pq)("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{const t=e.get(o.MD);return()=>t.call(ee.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{const t=e.get(o.MD);return()=>t.call(te.key)}}});A(ne.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"}),A(ne.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const re=(0,r.YR)("blockquote");A(re,{displayName:"Attr<blockquote>",group:"Blockquote"});const oe=(0,r.Yh)("blockquote",(e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(re.key)(t),0],parseMarkdown:{match:({type:e})=>"blockquote"===e,runner:(e,t,n)=>{e.openNode(n).next(t.children).closeNode()}},toMarkdown:{match:e=>"blockquote"===e.type.name,runner:(e,t)=>{e.openNode("blockquote").next(t.content).closeNode()}}})));A(oe.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"}),A(oe.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const ie=(0,r.b_)((e=>(0,l.tG)(/^\s*>\s$/,oe.type(e))));A(ie,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const se=(0,r.yu)("WrapInBlockquote",(e=>()=>(0,i.Im)(oe.type(e))));A(se,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const ae=(0,r.pq)("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{const t=e.get(o.MD);return()=>t.call(se.key)}}});A(ae.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"}),A(ae.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const le=(0,r.YR)("codeBlock",(()=>({pre:{},code:{}})));A(le,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const ce=(0,r.Yh)("code_block",(e=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{language:e.dataset.language}}}],toDOM:t=>{const n=e.get(le.key)(t);return["pre",{...n.pre,"data-language":t.attrs.language},["code",n.code,0]]},parseMarkdown:{match:({type:e})=>"code"===e,runner:(e,t,n)=>{const r=t.lang,o=t.value;e.openNode(n,{language:r}),o&&e.addText(o),e.closeNode()}},toMarkdown:{match:e=>"code_block"===e.type.name,runner:(e,t)=>{var n;e.addNode("code",void 0,(null==(n=t.content.firstChild)?void 0:n.text)||"",{lang:t.attrs.language})}}})));A(ce.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"}),A(ce.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const ue=(0,r.b_)((e=>(0,l.JJ)(/^```(?<language>[a-z]*)?[\s\n]$/,ce.type(e),(e=>{var t;return{language:(null==(t=e.groups)?void 0:t.language)??""}}))));A(ue,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const de=(0,r.yu)("CreateCodeBlock",(e=>(t="")=>(0,i.y_)(ce.type(e),{language:t})));A(de,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"}),A((0,r.yu)("UpdateCodeBlockLanguage",(()=>({pos:e,language:t}={pos:-1,language:""})=>(n,r)=>e>=0&&(null==r||r(n.tr.setNodeAttribute(e,"language",t)),!0))),{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const pe=(0,r.pq)("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{const t=e.get(o.MD);return()=>t.call(de.key)}}});A(pe.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"}),A(pe.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const fe=(0,r.YR)("image");A(fe,{displayName:"Attr<image>",group:"Image"});const he=(0,r.Yh)("image",(e=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:""},alt:{default:""},title:{default:""}},parseDOM:[{tag:"img[src]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(fe.key)(t),...t.attrs}],parseMarkdown:{match:({type:e})=>"image"===e,runner:(e,t,n)=>{const r=t.url,o=t.alt,i=t.title;e.addNode(n,{src:r,alt:o,title:i})}},toMarkdown:{match:e=>"image"===e.type.name,runner:(e,t)=>{e.addNode("image",void 0,void 0,{title:t.attrs.title,url:t.attrs.src,alt:t.attrs.alt})}}})));A(he.node,{displayName:"NodeSchema<image>",group:"Image"}),A(he.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const me=(0,r.yu)("InsertImage",(e=>(t={})=>(n,r)=>{if(!r)return!0;const{src:o="",alt:i="",title:s=""}=t,a=he.type(e).create({src:o,alt:i,title:s});return a&&r(n.tr.replaceSelectionWith(a).scrollIntoView()),!0}));A(me,{displayName:"Command<insertImageCommand>",group:"Image"});const ge=(0,r.yu)("UpdateImage",(e=>(t={})=>(n,r)=>{const o=(0,h.UM)(n.selection,he.type(e));if(!o)return!1;const{node:i,pos:s}=o,a={...i.attrs},{src:l,alt:c,title:u}=t;return void 0!==l&&(a.src=l),void 0!==c&&(a.alt=c),void 0!==u&&(a.title=u),null==r||r(n.tr.setNodeMarkup(s,void 0,a).scrollIntoView()),!0}));A(ge,{displayName:"Command<updateImageCommand>",group:"Image"}),A((0,r.b_)((e=>new l.fV(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,((t,n,r,o)=>{const[i,s,a="",l]=n;return i?t.tr.replaceWith(r,o,he.type(e).create({src:a,alt:s,title:l})):null})))),{displayName:"InputRule<insertImageInputRule>",group:"Image"});const ye=(0,r.YR)("hardbreak",(e=>({"data-is-inline":e.attrs.isInline})));A(ye,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const ve=(0,r.Yh)("hardbreak",(e=>({inline:!0,group:"inline",attrs:{isInline:{default:!1}},selectable:!1,parseDOM:[{tag:"br"}],toDOM:t=>["br",e.get(ye.key)(t)],parseMarkdown:{match:({type:e})=>"break"===e,runner:(e,t,n)=>{var r;e.addNode(n,{isInline:!(null==(r=t.data)||!r.isInline)})}},leafText:()=>"\n",toMarkdown:{match:e=>"hardbreak"===e.type.name,runner:(e,t)=>{t.attrs.isInline?e.addNode("text",void 0,"\n"):e.addNode("break")}}})));A(ve.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"}),A(ve.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const be=(0,r.yu)("InsertHardbreak",(e=>()=>(t,n)=>{var r;const{selection:o,tr:i}=t;if(!(o instanceof f.U3))return!1;if(o.empty){const e=o.$from.node();if(e.childCount>0&&"hardbreak"===(null==(r=e.lastChild)?void 0:r.type.name))return null==n||n(i.replaceRangeWith(o.to-1,o.to,t.schema.node("paragraph")).setSelection(f.LN.near(i.doc.resolve(o.to))).scrollIntoView()),!0}return null==n||n(i.setMeta("hardbreak",!0).replaceSelectionWith(ve.type(e).create()).scrollIntoView()),!0}));A(be,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const we=(0,r.pq)("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{const t=e.get(o.MD);return()=>t.call(be.key)}}});A(we.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"}),A(we.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const ke=(0,r.YR)("hr");A(ke,{displayName:"Attr<hr>",group:"Hr"});const xe=(0,r.Yh)("hr",(e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(ke.key)(t)],parseMarkdown:{match:({type:e})=>"thematicBreak"===e,runner:(e,t,n)=>{e.addNode(n)}},toMarkdown:{match:e=>"hr"===e.type.name,runner:e=>{e.addNode("thematicBreak")}}})));A(xe.node,{displayName:"NodeSchema<hr>",group:"Hr"}),A(xe.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const Ae=(0,r.b_)((e=>new l.fV(/^(?:---|___\s|\*\*\*\s)$/,((t,n,r,o)=>{const{tr:i}=t;return n[0]&&i.replaceWith(r-1,o,xe.type(e).create()),i}))));A(Ae,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const Se=(0,r.yu)("InsertHr",(e=>()=>(t,n)=>{if(!n)return!0;const r=K.node.type(e).create(),{tr:o,selection:i}=t,{from:s}=i,a=xe.type(e).create();if(!a)return!0;const l=o.replaceSelectionWith(a).insert(s,r),c=f.LN.findFrom(l.doc.resolve(s),1,!0);return c&&n(l.setSelection(c).scrollIntoView()),!0}));A(Se,{displayName:"Command<insertHrCommand>",group:"Hr"});const Ee=(0,r.YR)("bulletList");A(Ee,{displayName:"Attr<bulletList>",group:"BulletList"});const Ce=(0,r.Yh)("bullet_list",(e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{spread:e.dataset.spread}}}],toDOM:t=>["ul",{...e.get(Ee.key)(t),"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:t})=>"list"===e&&!t,runner:(e,t,n)=>{const r=null!=t.spread?`${t.spread}`:"false";e.openNode(n,{spread:r}).next(t.children).closeNode()}},toMarkdown:{match:e=>"bullet_list"===e.type.name,runner:(e,t)=>{e.openNode("list",void 0,{ordered:!1,spread:"true"===t.attrs.spread}).next(t.content).closeNode()}}})));A(Ce.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"}),A(Ce.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const Oe=(0,r.b_)((e=>(0,l.tG)(/^\s*([-+*])\s$/,Ce.type(e))));A(Oe,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const Me=(0,r.yu)("WrapInBulletList",(e=>()=>(0,i.Im)(Ce.type(e))));A(Me,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const Ne=(0,r.pq)("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{const t=e.get(o.MD);return()=>t.call(Me.key)}}});A(Ne.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"}),A(Ne.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const Te=(0,r.YR)("orderedList");A(Te,{displayName:"Attr<orderedList>",group:"OrderedList"});const Ie=(0,r.Yh)("ordered_list",(e=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{spread:e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(Te.key)(t),...1===t.attrs.order?{}:t.attrs.order,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:t})=>"list"===e&&!!t,runner:(e,t,n)=>{const r=null!=t.spread?`${t.spread}`:"true";e.openNode(n,{spread:r}).next(t.children).closeNode()}},toMarkdown:{match:e=>"ordered_list"===e.type.name,runner:(e,t)=>{e.openNode("list",void 0,{ordered:!0,start:1,spread:"true"===t.attrs.spread}),e.next(t.content),e.closeNode()}}})));A(Ie.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"}),A(Ie.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const Re=(0,r.b_)((e=>(0,l.tG)(/^\s*(\d+)\.\s$/,Ie.type(e),(e=>({order:Number(e[1])})),((e,t)=>t.childCount+t.attrs.order===Number(e[1])))));A(Re,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const De=(0,r.yu)("WrapInOrderedList",(e=>()=>(0,i.Im)(Ie.type(e))));A(De,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const Pe=(0,r.pq)("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{const t=e.get(o.MD);return()=>t.call(De.key)}}});A(Pe.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"}),A(Pe.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const Fe=(0,r.YR)("listItem");A(Fe,{displayName:"Attr<listItem>",group:"ListItem"});const Le=(0,r.Yh)("list_item",(e=>({group:"listItem",content:"paragraph block*",attrs:{label:{default:"•"},listType:{default:"bullet"},spread:{default:"true"}},defining:!0,parseDOM:[{tag:"li",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,a.Ik)(e);return{label:e.dataset.label,listType:e.dataset["list-type"],spread:e.dataset.spread}}}],toDOM:t=>["li",{...e.get(Fe.key)(t),"data-label":t.attrs.label,"data-list-type":t.attrs.listType,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:e})=>"listItem"===e,runner:(e,t,n)=>{const r=null!=t.label?`${t.label}.`:"•",o=null!=t.label?"ordered":"bullet",i=null!=t.spread?`${t.spread}`:"true";e.openNode(n,{label:r,listType:o,spread:i}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>"list_item"===e.type.name,runner:(e,t)=>{e.openNode("listItem",void 0,{spread:"true"===t.attrs.spread}),e.next(t.content),e.closeNode()}}})));A(Le.node,{displayName:"NodeSchema<listItem>",group:"ListItem"}),A(Le.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const _e=(0,r.yu)("SinkListItem",(e=>()=>{return t=Le.type(e),function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,(e=>e.childCount>0&&e.firstChild.type==t));if(!i)return!1;let a=i.startIndex;if(0==a)return!1;let l=i.parent,c=l.child(a-1);if(c.type!=t)return!1;if(n){let r=c.lastChild&&c.lastChild.type==l.type,o=s.FK.from(r?t.create():null),a=new s.Ji(s.FK.from(t.create(null,s.FK.from(l.type.create(null,o)))),r?3:1,0),u=i.start,d=i.end;n(e.tr.step(new m.Wg(u-(r?3:1),d,u,d,a,1,!0)).scrollIntoView())}return!0};var t}));A(_e,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const ze=(0,r.yu)("SplitListItem",(e=>()=>g(Le.type(e))));A(ze,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const $e=(0,r.yu)("SplitListItem",(e=>()=>{return t=Le.type(e),function(e,n){let{$from:r,$to:o,node:i}=e.selection;if(i&&i.isBlock||r.depth<2||!r.sameParent(o))return!1;let a=r.node(-1);if(a.type!=t)return!1;if(0==r.parent.content.size&&r.node(-1).childCount==r.indexAfter(-1)){if(3==r.depth||r.node(-3).type!=t||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let o=s.FK.empty,i=r.index(-1)?1:r.index(-2)?2:3;for(let e=r.depth-i;e>=r.depth-3;e--)o=s.FK.from(r.node(e).copy(o));let a=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;o=o.append(s.FK.from(t.createAndFill()));let l=r.before(r.depth-(i-1)),c=e.tr.replace(l,r.after(-a),new s.Ji(o,4-i,0)),u=-1;c.doc.nodesBetween(l,c.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0==e.content.size&&(u=t+1)})),u>-1&&c.setSelection(f.LN.near(c.doc.resolve(u))),n(c.scrollIntoView())}return!0}let l=o.pos==r.end()?a.contentMatchAt(0).defaultType:null,c=e.tr.delete(r.pos,o.pos),u=l?[null,{type:l}]:void 0;return!!(0,m.zy)(c.doc,r.pos,2,u)&&(n&&n(c.split(r.pos,2,u).scrollIntoView()),!0)};var t}));A($e,{displayName:"Command<splitListItemCommand>",group:"ListItem"});const je=(0,r.yu)("LiftFirstListItem",(e=>()=>function(e){return(t,n,r)=>{const{selection:o}=t;if(!(o instanceof f.U3))return!1;const{empty:i,$from:s}=o;if(!i||0!==s.parentOffset)return!1;const a=s.node(-1);return!(a.type!==Le.type(e)||a.firstChild!==s.node()||s.node(-2).childCount>1)&&g(Le.type(e))(t,n,r)}}(e)));A(je,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const Be=(0,r.pq)("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{const t=e.get(o.MD);return()=>t.call($e.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{const t=e.get(o.MD);return()=>t.call(_e.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{const t=e.get(o.MD);return()=>t.call(ze.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{const t=e.get(o.MD);return()=>t.call(je.key)}}});A(Be.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"}),A(Be.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const He=(0,r.dz)("text",(()=>({group:"inline",parseMarkdown:{match:({type:e})=>"text"===e,runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>"text"===e.type.name,runner:(e,t)=>{e.addNode("text",void 0,t.text)}}})));A(He,{displayName:"NodeSchema<text>",group:"Text"});const Ve=(0,r.YR)("html");A(Ve,{displayName:"Attr<html>",group:"Html"});const Ue=(0,r.Yh)("html",(e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:t=>{const n=document.createElement("span"),r={...e.get(Ve.key)(t),"data-value":t.attrs.value,"data-type":"html"};return n.textContent=t.attrs.value,["span",r,t.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:e=>({value:e.dataset.value??""})}],parseMarkdown:{match:({type:e})=>"html"===e,runner:(e,t,n)=>{e.addNode(n,{value:t.value})}},toMarkdown:{match:e=>"html"===e.type.name,runner:(e,t)=>{e.addNode("html",void 0,t.attrs.value)}}})));A(Ue.node,{displayName:"NodeSchema<html>",group:"Html"}),A(Ue.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const We=[U,W,K,J,X,Z,ye,ve,re,oe,le,ce,ke,xe,fe,he,Ee,Ce,Te,Ie,Fe,Le,S,E,T,I,F,L,j,B,Ve,Ue,He].flat(),Ke=[ie,Oe,Re,ue,Ae,Q].flat(),qe=[O,M,z,D],Ge=[q,se,ee,te,de,be,Se,me,ge,De,Me,_e,$e,ze,je,C,_,R,H,V],Ye=[ae,pe,we,ne,Be,Pe,Ne,G,N,$,P].flat(),Je=(0,r.lz)("remarkAddOrderInList",(()=>()=>e=>{(0,v.YR)(e,"list",(e=>{if(e.ordered){const t=e.start??1;e.children.forEach(((e,n)=>{e.label=n+t}))}}))}));A(Je.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"}),A(Je.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const Xe=(0,r.lz)("remarkLineBreak",(()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;(0,v.YR)(e,"text",((e,n,r)=>{if(!e.value||"string"!=typeof e.value)return;const o=[];let i=0;t.lastIndex=0;let s=t.exec(e.value);for(;s;){const n=s.index;i!==n&&o.push({type:"text",value:e.value.slice(i,n)}),o.push({type:"break",data:{isInline:!0}}),i=n+s[0].length,s=t.exec(e.value)}return o.length>0&&r&&"number"==typeof n?(i<e.value.length&&o.push({type:"text",value:e.value.slice(i)}),r.children.splice(n,1,...o),n+o.length):void 0}))}));A(Xe.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"}),A(Xe.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const Ze=(0,r.lz)("remarkInlineLink",(()=>k));A(Ze.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"}),A(Ze.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const Qe=(0,r.lz)("remarkHTMLTransformer",(()=>()=>e=>{!function(e){(function e(t,n,r){if((e=>!!e.children)(t)){const n=[];for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r];if(o){const i=e(o,r,t);if(i)for(let e=0,t=i.length;e<t;e++){const t=i[e];t&&n.push(t)}}}t.children=n}return((e,t,n)=>(e=>"html"===e.type)(e)?("root"===(null==n?void 0:n.type)&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]):[e])(t,0,r)})(e,0,null)[0]}(e)}));A(Qe.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"}),A(Qe.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const et=(0,r.lz)("remarkMarker",(()=>()=>(e,t)=>{(0,v.YR)(e,(e=>["strong","emphasis"].includes(e.type)),(e=>{e.marker=(e=>t.value.charAt(e.position.start.offset))(e)}))}));A(et.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"}),A(et.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const tt=(0,r.Gf)((()=>{let e=!1;const t=new f.hs("MILKDOWN_INLINE_NODES_CURSOR"),n=new f.k_({key:t,state:{init:()=>!1,apply(e){if(!e.selection.empty)return!1;const t=e.selection.$from,n=t.nodeBefore,r=t.nodeAfter;return!(!(n&&r&&n.isInline&&!n.isText&&r.isInline)||r.isText)}},props:{handleDOMEvents:{compositionend:(t,r)=>!!e&&(e=!1,requestAnimationFrame((()=>{if(n.getState(t.state)){const e=t.state.selection.from;r.preventDefault(),t.dispatch(t.state.tr.insertText(r.data||"",e))}})),!0),compositionstart:t=>(n.getState(t.state)&&(e=!0),!1),beforeinput:(t,r)=>{if(n.getState(t.state)&&r instanceof InputEvent&&r.data&&!e){const e=t.state.selection.from;return r.preventDefault(),t.dispatch(t.state.tr.insertText(r.data||"",e)),!0}return!1}},decorations(e){if(n.getState(e)){const t=e.selection.$from.pos,n=document.createElement("span"),r=y.NZ.widget(t,n,{side:-1}),o=document.createElement("span"),i=y.NZ.widget(t,o);return setTimeout((()=>{n.contentEditable="true",o.contentEditable="true"})),y.zF.create(e.doc,[r,i])}return y.zF.empty}}});return n}));A(tt,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const nt=(0,r.Gf)((e=>new f.k_({key:new f.hs("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,r)=>{if(!t.length)return;const[o]=t;if(!o)return;const[i]=o.steps;if(o.getMeta("hardbreak")){if(!(i instanceof m.Ln))return;const{from:t}=i;return r.tr.setNodeMarkup(t,ve.type(e),void 0,[])}if(i instanceof m.XE){let t=r.tr;const{from:n,to:o}=i;return r.doc.nodesBetween(n,o,((n,r)=>{n.type===ve.type(e)&&(t=t.setNodeMarkup(r,ve.type(e),void 0,[]))})),t}}})));A(nt,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const rt=(0,r.Qx)(["table","code_block"],"hardbreakFilterNodes");A(rt,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const ot=(0,r.Gf)((e=>{const t=e.get(rt.key);return new f.k_({key:new f.hs("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(e,n)=>{const r=e.getMeta("hardbreak"),[o]=e.steps;if(r&&o){const{from:e}=o,r=n.doc.resolve(e);let i=r.depth,s=!0;for(;i>0;)t.includes(r.node(i).type.name)&&(s=!1),i--;return s}return!0}})}));A(ot,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const it=(0,r.Gf)((e=>{const t=new f.hs("MILKDOWN_HEADING_ID"),n=n=>{if(n.composing||!n.editable)return;const r=e.get(J.key),o=n.state.tr.setMeta("addToHistory",!1);let i=!1;n.state.doc.descendants(((n,s)=>{if(n.type===Z.type(e)){if(0===n.textContent.trim().length)return;const e=n.attrs,a=r(n);e.id!==a&&(i=!0,o.setMeta(t,!0).setNodeMarkup(s,void 0,{...e,id:a}))}})),i&&n.dispatch(o)};return new f.k_({key:t,view:e=>(n(e),{update:e=>{n(e)}})})}));A(it,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const st=(0,r.Gf)((e=>{const t=t=>{if(t.composing||!t.editable)return;const n=Ie.type(e),r=Ce.type(e),o=Le.type(e),i=t.state,s=(e,t)=>{let n=!1;const r=`${t+1}.`;return e.label!==r&&(e.label=r,n=!0),n};let a=i.tr,l=!1;i.doc.descendants(((e,t,i,c)=>{if(e.type===r){const r=e.maybeChild(0);(null==r?void 0:r.type)===o&&"ordered"===r.attrs.listType&&(l=!0,a.setNodeMarkup(t,n,{spread:"true"}),e.descendants(((e,t,n,r)=>{if(e.type===o){const n={...e.attrs};s(n,r)&&(a=a.setNodeMarkup(t,void 0,n))}return!1})))}else if(e.type===o&&(null==i?void 0:i.type)===n){const n={...e.attrs};let r=!1;"ordered"!==n.listType&&(n.listType="ordered",r=!0),(null==i?void 0:i.maybeChild(0))&&(r=s(n,c)),r&&(a=a.setNodeMarkup(t,void 0,n),l=!0)}})),l&&t.dispatch(a.setMeta("addToHistory",!1))};return new f.k_({key:new f.hs("MILKDOWN_KEEP_LIST_ORDER"),view:e=>(t(e),{update:e=>{t(e)}})})}));A(st,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const at=[We,Ke,qe,Ge,Ye,[nt,rt,ot,tt,Je,Ze,Xe,Qe,et,it,st].flat()].flat()},689:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6488),o=n(7985),i=n(5405);function s(e,t){return(0,r.A)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||(0,o.A)(e,t)||(0,i.A)()}},785:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(7545),o=Symbol.for("react.element"),i=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function a(e){return e&&"object"===(0,r.A)(e)&&(e.$$typeof===o||e.$$typeof===i)&&e.type===s}},829:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2559);function o(e,t){return e.get((0,r.A)(e,t))}},855:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},857:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(2715),o=n(9105),i=n(5309);function s(e){var t=(0,o.A)();return function(){var n,o=(0,r.A)(e);if(t){var s=(0,r.A)(this).constructor;n=Reflect.construct(o,arguments,s)}else n=o.apply(this,arguments);return(0,i.A)(this,n)}}},918:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2016);function o(e,t,n){(0,r.A)(e,t),t.set(e,n)}},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},1087:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},1136:(e,t,n)=>{"use strict";n.d(t,{_n:()=>i,rJ:()=>s});var r=n(8769);function o(){}n(4445);const i=r.createContext({}),s=()=>{const e=()=>{};return e.deprecated=o,e}},1157:(e,t,n)=>{"use strict";n.d(t,{s:()=>o});const r=document.createElement("i");function o(e){const t="&"+e+";";r.innerHTML=t;const n=r.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}},1258:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7545);function o(){o=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),a=new R(r||[]);return s(i,"_invoke",{value:M(e,n,a)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",m="suspendedYield",g="executing",y="completed",v={};function b(){}function w(){}function k(){}var x={};d(x,l,(function(){return this}));var A=Object.getPrototypeOf,S=A&&A(A(D([])));S&&S!==n&&i.call(S,l)&&(x=S);var E=k.prototype=b.prototype=Object.create(x);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,s,a,l){var c=f(e[o],e,s);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==(0,r.A)(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(c.arg)}var o;s(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function M(t,n,r){var o=h;return function(i,s){if(o===g)throw Error("Generator is already running");if(o===y){if("throw"===i)throw s;return{value:e,done:!0}}for(r.method=i,r.arg=s;;){var a=r.delegate;if(a){var l=N(a,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var c=f(t,n,r);if("normal"===c.type){if(o=r.done?y:m,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=y,r.method="throw",r.arg=c.arg)}}}function N(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,N(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var s=i.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function n(){for(;++o<t.length;)if(i.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return s.next=s}}throw new TypeError((0,r.A)(t)+" is not iterable")}return w.prototype=k,s(E,"constructor",{value:k,configurable:!0}),s(k,"constructor",{value:w,configurable:!0}),w.displayName=d(k,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,d(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},C(O.prototype),d(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new O(p(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},C(E),d(E,u,"Generator"),d(E,l,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=D,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}},1329:(e,t,n)=>{"use strict";n.d(t,{$L:()=>O,Ln:()=>y,Um:()=>C,Wg:()=>v,XE:()=>f,dL:()=>j,jP:()=>k,n9:()=>E,oM:()=>x,zy:()=>S});var r=n(6090);const o=Math.pow(2,16);function i(e){return 65535&e}class s{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 a{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&a.empty)return a.empty}recover(e){let t=0,n=i(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+function(e){return(e-(65535&e))/o}(e)}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,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;let u=this.ranges[l+i],d=this.ranges[l+a],p=c+u;if(e<=p){let i=c+r+((u?e==c?-1:e==p?1:t:t)<0?0:d);if(n)return i;let a=e==c?2:e==p?1:4;return(t<0?e!=c:e!=p)&&(a|=8),new s(i,a,e==(t<0?c:p)?null:l/3+(e-c)*o)}r+=d-u}return n?e+r:new s(e+r,0,null)}touches(e,t){let n=0,r=i(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let i=this.ranges[t]-(this.inverted?n:0);if(i>e)break;let a=this.ranges[t+o];if(e<=i+a&&t==3*r)return!0;n+=this.ranges[t+s]-a}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],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),o+=c-l}}invert(){return new a(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?a.empty:new a(e<0?[0,-e,0]:[0,0,e])}}a.empty=new a([]);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 s(e,r,null)}}const c=Object.create(null);class u{getMap(){return a.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=c[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in c)throw new RangeError("Duplicate use of step JSON ID "+e);return c[e]=t,t.prototype.jsonID=e,t}}class d{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new d(e,null)}static fail(e){return new d(null,e)}static fromReplace(e,t,n,o){try{return d.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.vI)return d.fail(e.message);throw e}}}function p(e,t,n){let o=[];for(let r=0;r<e.childCount;r++){let i=e.child(r);i.content.size&&(i=i.copy(p(i.content,t,i))),i.isInline&&(i=t(i,n,r)),o.push(i)}return r.FK.fromArray(o)}class f extends u{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),o=n.node(n.sharedDepth(this.to)),i=new r.Ji(p(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 d.fromReplace(e,this.from,this.to,i)}invert(){return new h(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new f(t.pos,n.pos,this.mark)}merge(e){return e instanceof f&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new f(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 new RangeError("Invalid input for AddMarkStep.fromJSON");return new f(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("addMark",f);class h extends u{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.Ji(p(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return d.fromReplace(e,this.from,this.to,n)}invert(){return new f(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new h(t.pos,n.pos,this.mark)}merge(e){return e instanceof h&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new h(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new h(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("removeMark",h);class m extends u{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return d.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return d.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.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 m(this.pos,t.marks[n]);return new m(this.pos,this.mark)}}return new g(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new m(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 new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new m(t.pos,e.markFromJSON(t.mark))}}u.jsonID("addNodeMark",m);class g extends u{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return d.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return d.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new m(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new g(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 new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new g(t.pos,e.markFromJSON(t.mark))}}u.jsonID("removeNodeMark",g);class y extends u{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&b(e,this.from,this.to)?d.fail("Structure replace would overwrite content"):d.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new a([this.from,this.to-this.from,this.slice.size])}invert(e){return new y(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 y(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof y)||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.Ji.empty:new r.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new y(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new y(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 new RangeError("Invalid input for ReplaceStep.fromJSON");return new y(t.from,t.to,r.Ji.fromJSON(e,t.slice),!!t.structure)}}u.jsonID("replace",y);class v extends u{constructor(e,t,n,r,o,i,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(e){if(this.structure&&(b(e,this.from,this.gapFrom)||b(e,this.gapTo,this.to)))return d.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return d.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?d.fromReplace(e,this.from,this.to,n):d.fail("Content does not fit in gap")}getMap(){return new a([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 v(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=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new v(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 new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new v(t.from,t.to,t.gapFrom,t.gapTo,r.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function b(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 w(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function k(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||!w(r,o,i))break}return null}function x(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 s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<o;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return i?o.map(A).concat({type:t,attrs:n}).concat(i.map(A)):null}function A(e){return{type:e,attrs:null}}function S(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.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 s=n.content.cutByIndex(i,n.childCount),a=r&&r[t]||n;if(a!=n&&(s=s.replaceChild(0,a.type.create(a.attrs))),!n.canReplace(i+1,n.childCount)||!a.type.validContent(s))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function E(e,t){let n=e.resolve(t),r=n.index();return o=n.nodeBefore,i=n.nodeAfter,!(!o||!i||o.isLeaf||!o.canAppend(i))&&n.parent.canReplace(r,r+1);var o,i}function C(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),s=r.node(t),a=!1;if(1==e)a=s.canReplace(i,i,o);else{let e=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=e&&s.canReplaceWith(i,i,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function O(e,t,n=t,o=r.Ji.empty){if(t==n&&!o.size)return null;let i=e.resolve(t),s=e.resolve(n);return M(i,s,o)?new y(t,n,o):new N(i,s,o).fit()}function M(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}u.jsonID("replaceAround",v);class N{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.FK.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.FK.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,s=n.depth,a=o.depth;for(;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;let l=new r.Ji(i,s,a);return e>-1?new v(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new y(n.pos,o.pos,l):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,o=null;n?(o=R(this.unplaced.content,n-1).firstChild,e=o.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let s,{type:a,match:l}=this.frontier[e],c=null;if(1==t&&(i?l.matchType(i.type)||(c=l.fillBefore(r.FK.from(i),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:e,parent:o,inject:c};if(2==t&&i&&(s=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:o,wrap:s};if(o&&l.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=R(e,t);return!(!o.childCount||o.firstChild.isLeaf||(this.unplaced=new r.Ji(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=R(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new r.Ji(T(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new r.Ji(T(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 s=this.unplaced,a=n?n.content:s.content,l=s.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 f=a.size+e-(s.content.size-s.openEnd);for(;c<a.childCount;){let e=a.child(c),t=d.matchType(e.type);if(!t)break;c++,(c>1||0==l||e.content.size)&&(d=t,u.push(D(e.mark(p.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?f:-1)))}let h=c==a.childCount;h||(f=-1),this.placed=I(this.placed,t,r.FK.from(u)),this.frontier[t].match=d,h&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=h?0==e?r.Ji.empty:new r.Ji(T(s.content,e-1,1),e-1,f<0?s.openEnd:e-1):new r.Ji(T(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!P(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e: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=P(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=P(e,n,r,t,!0);if(!o||o.childCount)continue e}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=I(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=I(this.placed,this.depth,r.FK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.FK.empty,!0);e.childCount&&(this.placed=I(this.placed,this.frontier.length,e))}}function T(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(T(e.firstChild.content,t-1,n)))}function I(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(I(e.lastChild.content,t-1,n)))}function R(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function D(e,t,n){if(t<=0)return e;let o=e.content;return t>1&&(o=o.replaceChild(0,D(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.FK.empty,!0)))),e.copy(o)}function P(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!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,s)?a:null}function F(e){return e.spec.defining||e.spec.definingForContent}function L(e,t,n,o,i){if(t<n){let r=e.firstChild;e=e.replaceChild(0,r.copy(L(r.content,t+1,n,o,r)))}if(t>o){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.FK.empty,!0))}return e}function _(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}class z extends u{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 d.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 d.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(o),0,t.isLeaf?0:1))}getMap(){return a.empty}invert(e){return new z(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new z(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new z(t.pos,t.attr,t.value)}}u.jsonID("attr",z);let $=class extends Error{};$=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},($.prototype=Object.create(Error.prototype)).constructor=$,$.prototype.name="TransformError";class j{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 $(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.Ji.empty){let o=O(this.doc,e,t,n);return o&&this.step(o),this}replaceWith(e,t,n){return this.replace(e,t,new r.Ji(r.FK.from(n),0,0))}delete(e,t){return this.replace(e,t,r.Ji.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),s=e.doc.resolve(n);if(M(i,s,o))return e.step(new y(t,n,o));let a=_(i,e.doc.resolve(n));0==a[a.length-1]&&a.pop();let l=-(i.depth+1);a.unshift(l);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;a.indexOf(e)>-1?l=e:i.before(e)==t&&a.splice(1,0,-e)}let c=a.indexOf(l),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--){let t=u[e].type,n=F(t);if(n&&i.node(c).type!=t)d=e;else if(n||!t.isTextblock)break}for(let t=o.openStart;t>=0;t--){let l=(t+d+1)%(o.openStart+1),p=u[l];if(p)for(let t=0;t<a.length;t++){let u=a[(t+c)%a.length],d=!0;u<0&&(d=!1,u=-u);let f=i.node(u-1),h=i.index(u-1);if(f.canReplaceWith(h,h,p.type,p.marks))return e.replace(i.before(u),d?s.after(u):n,new r.Ji(L(o.content,0,o.openStart,l),l,o.openEnd))}}let p=e.steps.length;for(let r=a.length-1;r>=0&&(e.replace(t,n,o),!(e.steps.length>p));r--){let e=a[r];e<0||(t=i.before(e),n=s.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)return null}return null}(e.doc,t,o.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.Ji(r.FK.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],s=t==i.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(s||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)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:s}=t,a=o.before(s+1),l=i.after(s+1),c=a,u=l,d=r.FK.empty,p=0;for(let e=s,t=!1;e>n;e--)t||o.index(e)>0?(t=!0,d=r.FK.from(o.node(e).copy(d)),p++):c--;let f=r.FK.empty,h=0;for(let e=s,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=r.FK.from(i.node(e).copy(f)),h++):u++;e.step(new v(c,u,a,l,new r.Ji(d.append(f),p,h),d.size-p,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let o=new y(t-n,t+n,r.Ji.empty,!0);e.step(o)}(this,e,t),this}wrap(e,t){return function(e,t,n){let o=r.FK.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 new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=r.FK.from(n[e].type.create(n[e].attrs,o))}let i=t.start,s=t.end;e.step(new v(i,s,i,s,new r.Ji(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 new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(o,i)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(s).map(n),o)){e.clearIncompatible(e.mapping.slice(s).map(n,1),o);let a=e.mapping.slice(s),l=a.map(n,1),c=a.map(n+t.nodeSize,1);return e.step(new v(l,c,l+1,c-1,new r.Ji(r.FK.from(o.create(i,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,o),this}setNodeMarkup(e,t,n=null,o){return function(e,t,n,o,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(o,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new v(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new r.Ji(r.FK.from(a),0,0),1,!0))}(this,e,t,n,o),this}setNodeAttribute(e,t,n){return this.step(new z(e,t,n)),this}addNodeMark(e,t){return this.step(new m(e,t)),this}removeNodeMark(e,t){if(!(t instanceof r.CU)){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(n.marks)))return this}return this.step(new g(e,t)),this}split(e,t=1,n){return function(e,t,n=1,o){let i=e.doc.resolve(t),s=r.FK.empty,a=r.FK.empty;for(let e=i.depth,t=i.depth-n,l=n-1;e>t;e--,l--){s=r.FK.from(i.node(e).copy(s));let t=o&&o[l];a=r.FK.from(t?t.type.create(t.attrs,a):i.node(e).copy(a))}e.step(new y(t,t,new r.Ji(s.append(a),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,i,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),d=Math.min(l+e.nodeSize,n),p=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(p)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=d:s.push(o=new h(c,d,u[e])));i&&i.to==c?i.to=d:a.push(i=new f(c,d,r))}})),s.forEach((t=>e.step(t))),a.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,o){let i=[],s=0;e.doc.nodesBetween(t,n,((e,a)=>{if(!e.isInline)return;s++;let l=null;if(o instanceof r.sX){let t,n=e.marks;for(;t=o.isInSet(n);)(l||(l=[])).push(t),n=t.removeFromSet(n)}else o?o.isInSet(e.marks)&&(l=[o]):l=e.marks;if(l&&l.length){let r=Math.min(a+e.nodeSize,n);for(let e=0;e<l.length;e++){let n,o=l[e];for(let e=0;e<i.length;e++){let t=i[e];t.step==s-1&&o.eq(i[e].style)&&(n=t)}n?(n.to=r,n.step=s):i.push({style:o,from:Math.max(a,t),to:r,step:s})}}})),i.forEach((t=>e.step(new h(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,o=n.contentMatch){let i=e.doc.nodeAt(t),s=[],a=t+1;for(let t=0;t<i.childCount;t++){let l=i.child(t),c=a+l.nodeSize,u=o.matchType(l.type);if(u){o=u;for(let t=0;t<l.marks.length;t++)n.allowsMarkType(l.marks[t].type)||e.step(new h(a,c,l.marks[t]))}else s.push(new y(a,c,r.Ji.empty));a=c}if(!o.validEnd){let t=o.fillBefore(r.FK.empty,!0);e.replace(a,a,new r.Ji(t,0,0))}for(let t=s.length-1;t>=0;t--)e.step(s[t])}(this,e,t,n),this}}},1369:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7545);function o(e){var t=function(e){if("object"!=(0,r.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=(0,r.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,r.A)(t)?t:t+""}},1382:(e,t,n)=>{"use strict";n.d(t,{aF:()=>ke,Kq:()=>m,Ay:()=>xe});var r=n(4586),o=n(9740),i=n(689),s=n(7545),a=n(3373),l=n.n(a),c=n(8299),u=n(9284),d=n(8769),p=n(4223),f=["children"],h=d.createContext({});function m(e){var t=e.children,n=(0,p.A)(e,f);return d.createElement(h.Provider,{value:n},t)}var g=n(5152),y=n(414),v=n(9296),b=n(857);const w=function(e){(0,v.A)(n,e);var t=(0,b.A)(n);function n(){return(0,g.A)(this,n),t.apply(this,arguments)}return(0,y.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(d.Component);var k=n(9973),x=n(9348),A=n(9449),S="none",E="appear",C="enter",O="leave",M="none",N="prepare",T="start",I="active",R="end",D="prepared",P=n(7169);function F(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var L,_,z,$=(L=(0,P.A)(),_="undefined"!=typeof window?window:{},z={animationend:F("Animation","AnimationEnd"),transitionend:F("Transition","TransitionEnd")},L&&("AnimationEvent"in _||delete z.animationend.animation,"TransitionEvent"in _||delete z.transitionend.transition),z),j={};if((0,P.A)()){var B=document.createElement("div");j=B.style}var H={};function V(e){if(H[e])return H[e];var t=$[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in j)return H[e]=t[i],H[e]}return""}var U=V("animationend"),W=V("transitionend"),K=!(!U||!W),q=U||"animationend",G=W||"transitionend";function Y(e,t){return e?"object"===(0,s.A)(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}const J=(0,P.A)()?d.useLayoutEffect:d.useEffect;var X=function(e){return+setTimeout(e,16)},Z=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(X=function(e){return window.requestAnimationFrame(e)},Z=function(e){return window.cancelAnimationFrame(e)});var Q=0,ee=new Map;function te(e){ee.delete(e)}var ne=function(e){var t=Q+=1;return function n(r){if(0===r)te(t),e();else{var o=X((function(){n(r-1)}));ee.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};ne.cancel=function(e){var t=ee.get(e);return te(e),Z(t)};const re=ne;var oe=[N,T,I,R],ie=[N,D],se=!1;function ae(e){return e===I||e===R}function le(e,t,n,s){var a,l,c,u,p=s.motionEnter,f=void 0===p||p,h=s.motionAppear,m=void 0===h||h,g=s.motionLeave,y=void 0===g||g,v=s.motionDeadline,b=s.motionLeaveImmediately,w=s.onAppearPrepare,P=s.onEnterPrepare,F=s.onLeavePrepare,L=s.onAppearStart,_=s.onEnterStart,z=s.onLeaveStart,$=s.onAppearActive,j=s.onEnterActive,B=s.onLeaveActive,H=s.onAppearEnd,V=s.onEnterEnd,U=s.onLeaveEnd,W=s.onVisibleChanged,K=(0,x.A)(),Y=(0,i.A)(K,2),X=Y[0],Z=Y[1],Q=(a=S,l=d.useReducer((function(e){return e+1}),0),c=(0,i.A)(l,2)[1],u=d.useRef(a),[(0,A.A)((function(){return u.current})),(0,A.A)((function(e){u.current="function"==typeof e?e(u.current):e,c()}))]),ee=(0,i.A)(Q,2),te=ee[0],ne=ee[1],le=(0,x.A)(null),ce=(0,i.A)(le,2),ue=ce[0],de=ce[1],pe=te(),fe=(0,d.useRef)(!1),he=(0,d.useRef)(null);function me(){return n()}var ge=(0,d.useRef)(!1);function ye(){ne(S),de(null,!0)}var ve=(0,k._q)((function(e){var t=te();if(t!==S){var n=me();if(!e||e.deadline||e.target===n){var r,o=ge.current;t===E&&o?r=null==H?void 0:H(n,e):t===C&&o?r=null==V?void 0:V(n,e):t===O&&o&&(r=null==U?void 0:U(n,e)),o&&!1!==r&&ye()}}})),be=function(e){var t=(0,d.useRef)();function n(t){t&&(t.removeEventListener(G,e),t.removeEventListener(q,e))}return d.useEffect((function(){return function(){n(t.current)}}),[]),[function(r){t.current&&t.current!==r&&n(t.current),r&&r!==t.current&&(r.addEventListener(G,e),r.addEventListener(q,e),t.current=r)},n]}(ve),we=(0,i.A)(be,1)[0],ke=function(e){switch(e){case E:return(0,r.A)((0,r.A)((0,r.A)({},N,w),T,L),I,$);case C:return(0,r.A)((0,r.A)((0,r.A)({},N,P),T,_),I,j);case O:return(0,r.A)((0,r.A)((0,r.A)({},N,F),T,z),I,B);default:return{}}},xe=d.useMemo((function(){return ke(pe)}),[pe]),Ae=function(e,t,n){var r=(0,x.A)(M),o=(0,i.A)(r,2),s=o[0],a=o[1],l=function(){var e=d.useRef(null);function t(){re.cancel(e.current)}return d.useEffect((function(){return function(){t()}}),[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var i=re((function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)}));e.current=i},t]}(),c=(0,i.A)(l,2),u=c[0],p=c[1],f=t?ie:oe;return J((function(){if(s!==M&&s!==R){var e=f.indexOf(s),t=f[e+1],r=n(s);r===se?a(t,!0):t&&u((function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,s]),d.useEffect((function(){return function(){p()}}),[]),[function(){a(N,!0)},s]}(pe,!e,(function(e){if(e===N){var t=xe[N];return t?t(me()):se}var n;return Ce in xe&&de((null===(n=xe[Ce])||void 0===n?void 0:n.call(xe,me(),null))||null),Ce===I&&pe!==S&&(we(me()),v>0&&(clearTimeout(he.current),he.current=setTimeout((function(){ve({deadline:!0})}),v))),Ce===D&&ye(),!0})),Se=(0,i.A)(Ae,2),Ee=Se[0],Ce=Se[1],Oe=ae(Ce);ge.current=Oe;var Me=(0,d.useRef)(null);J((function(){if(!fe.current||Me.current!==t){Z(t);var n,r=fe.current;fe.current=!0,!r&&t&&m&&(n=E),r&&t&&f&&(n=C),(r&&!t&&y||!r&&b&&!t&&y)&&(n=O);var o=ke(n);n&&(e||o[N])?(ne(n),Ee()):ne(S),Me.current=t}}),[t]),(0,d.useEffect)((function(){(pe===E&&!m||pe===C&&!f||pe===O&&!y)&&ne(S)}),[m,f,y]),(0,d.useEffect)((function(){return function(){fe.current=!1,clearTimeout(he.current)}}),[]);var Ne=d.useRef(!1);(0,d.useEffect)((function(){X&&(Ne.current=!0),void 0!==X&&pe===S&&((Ne.current||X)&&(null==W||W(X)),Ne.current=!0)}),[X,pe]);var Te=ue;return xe[N]&&Ce===T&&(Te=(0,o.A)({transition:"none"},Te)),[pe,Ce,Te,null!=X?X:t]}const ce=function(e){var t=e;"object"===(0,s.A)(e)&&(t=e.transitionSupport);var n=d.forwardRef((function(e,n){var s=e.visible,a=void 0===s||s,p=e.removeOnLeave,f=void 0===p||p,m=e.forceRender,g=e.children,y=e.motionName,v=e.leavedClassName,b=e.eventProps,k=function(e,n){return!(!e.motionName||!t||!1===n)}(e,d.useContext(h).motion),x=(0,d.useRef)(),A=(0,d.useRef)(),E=le(k,a,(function(){try{return x.current instanceof HTMLElement?x.current:(0,c.Ay)(A.current)}catch(e){return null}}),e),C=(0,i.A)(E,4),O=C[0],M=C[1],I=C[2],R=C[3],D=d.useRef(R);R&&(D.current=!0);var P,F=d.useCallback((function(e){x.current=e,(0,u.Xf)(n,e)}),[n]),L=(0,o.A)((0,o.A)({},b),{},{visible:a});if(g)if(O===S)P=R?g((0,o.A)({},L),F):!f&&D.current&&v?g((0,o.A)((0,o.A)({},L),{},{className:v}),F):m||!f&&!v?g((0,o.A)((0,o.A)({},L),{},{style:{display:"none"}}),F):null;else{var _;M===N?_="prepare":ae(M)?_="active":M===T&&(_="start");var z=Y(y,"".concat(O,"-").concat(_));P=g((0,o.A)((0,o.A)({},L),{},{className:l()(Y(y,O),(0,r.A)((0,r.A)({},z,z&&_),y,"string"==typeof y)),style:I}),F)}else P=null;return d.isValidElement(P)&&(0,u.f3)(P)&&((0,u.A9)(P)||(P=d.cloneElement(P,{ref:F}))),d.createElement(w,{ref:A},P)}));return n.displayName="CSSMotion",n}(K);var ue=n(9575),de=n(2474),pe="add",fe="keep",he="remove",me="removed";function ge(e){var t;return t=e&&"object"===(0,s.A)(e)&&"key"in e?e:{key:e},(0,o.A)((0,o.A)({},t),{},{key:String(t.key)})}function ye(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(ge)}var ve=["component","children","onVisibleChanged","onAllRemoved"],be=["status"],we=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];const ke=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ce,t=function(t){(0,v.A)(i,t);var n=(0,b.A)(i);function i(){var e;(0,g.A)(this,i);for(var t=arguments.length,s=new Array(t),a=0;a<t;a++)s[a]=arguments[a];return e=n.call.apply(n,[this].concat(s)),(0,r.A)((0,de.A)(e),"state",{keyEntities:[]}),(0,r.A)((0,de.A)(e),"removeKey",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:(0,o.A)((0,o.A)({},e),{},{status:me})}))}}),(function(){0===e.state.keyEntities.filter((function(e){return e.status!==me})).length&&e.props.onAllRemoved&&e.props.onAllRemoved()}))})),e}return(0,y.A)(i,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,r=this.props,i=r.component,s=r.children,a=r.onVisibleChanged,l=(r.onAllRemoved,(0,p.A)(r,ve)),c=i||d.Fragment,u={};return we.forEach((function(e){u[e]=l[e],delete l[e]})),delete l.keys,d.createElement(c,l,n.map((function(n,r){var i=n.status,l=(0,p.A)(n,be),c=i===pe||i===fe;return d.createElement(e,(0,ue.A)({},u,{key:l.key,visible:c,eventProps:l,onVisibleChanged:function(e){null==a||a(e,{key:l.key}),e||t.removeKey(l.key)}}),(function(e,t){return s((0,o.A)((0,o.A)({},e),{},{index:r}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=ye(n),s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,s=ye(e),a=ye(t);s.forEach((function(e){for(var t=!1,s=r;s<i;s+=1){var l=a[s];if(l.key===e.key){r<s&&(n=n.concat(a.slice(r,s).map((function(e){return(0,o.A)((0,o.A)({},e),{},{status:pe})}))),r=s),n.push((0,o.A)((0,o.A)({},l),{},{status:fe})),r+=1,t=!0;break}}t||n.push((0,o.A)((0,o.A)({},e),{},{status:he}))})),r<i&&(n=n.concat(a.slice(r).map((function(e){return(0,o.A)((0,o.A)({},e),{},{status:pe})}))));var l={};return n.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1})),Object.keys(l).filter((function(e){return l[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==he}))).forEach((function(t){t.key===e&&(t.status=fe)}))})),n}(r,i);return{keyEntities:s.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==me||e.status!==he}))}}}]),i}(d.Component);return(0,r.A)(t,"defaultProps",{component:"div"}),t}(K),xe=ce},1440:(e,t,n)=>{"use strict";n.d(t,{$D:()=>d,TR:()=>p,XM:()=>l,Xm:()=>f,_K:()=>h,dI:()=>u,nr:()=>c});var r=Object.defineProperty,o=(e=>(e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e))(o||{});class i extends Error{constructor(e,t){super(t),((e,t,n)=>{((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})(this,"code"),this.name="MilkdownError",this.code=e}}const s=(e,t)=>"function"==typeof t?"[Function]":t,a=e=>JSON.stringify(e,s),l=e=>new i(o.contextNotFound,`Context "${e}" not found, do you forget to inject it?`),c=e=>new i(o.timerNotFound,`Timer "${e}" not found, do you forget to record it?`),u=()=>new i(o.ctxCallOutOfScope,"Should not call a context out of the plugin."),d=(...e)=>{const t=e.reduce(((e,t)=>{if(!t)return e;const n=e=>Array.isArray(e)?e.map((e=>n(e))).join(", "):e.toJSON?a(e.toJSON()):e.spec?a(e.spec):e.toString();return`${e}, ${n(t)}`}),"Create prosemirror node from remark failed in parser");return new i(o.createNodeInParserFail,t)},p=()=>new i(o.stackOverFlow,"Stack over flow, cannot pop on an empty stack."),f=e=>new i(o.parserMatchError,`Cannot match target parser for node: ${a(e)}.`),h=e=>new i(o.serializerMatchError,`Cannot match target serializer for node: ${a(e)}.`)},1570:(e,t,n)=>{"use strict";n.d(t,{$t:()=>A,LN:()=>s,U3:()=>u,hs:()=>M,i5:()=>h,k_:()=>E,nh:()=>p,yn:()=>a});var r=n(6090),o=n(1329);const i=Object.create(null);class s{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new a(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.Ji.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,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=e.mapping.slice(i);e.replaceRange(u.map(l.pos),u.map(c.pos),a?r.Ji.empty:t),0==a&&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:s}=r[o],a=e.mapping.slice(n),l=a.map(i.pos),c=a.map(s.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,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}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new h(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new h(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new h(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=i[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in i)throw new 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()}}s.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends s{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 s.near(n);let r=e.resolve(t.map(this.anchor));return new u(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.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 new 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=s.findFrom(t,n,!0)||s.findFrom(t,-n,!0);if(!e)return s.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(s.findFrom(e,-n,!0)||s.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new u(e,t)}}s.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 s{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?s.near(o):new p(o)}content(){return new r.Ji(r.FK.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 f(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new 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,s.jsonID("node",p);class f{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new d(n,n):new f(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&p.isSelectable(n)?new p(t):s.near(t)}}class h extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=s.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new h(e)}map(e){return new h(e)}eq(e){return e instanceof h}getBookmark(){return m}}s.jsonID("all",h);const m={map(){return this},resolve:e=>new h(e)};function g(e,t,n,r,o,i=!1){if(t.inlineContent)return u.create(e,n);for(let s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){let r=t.child(s);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=e.steps.length-1;if(r<t)return;let i,a=e.steps[r];(a instanceof o.Ln||a instanceof o.Wg)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==i&&(i=r)})),e.setSelection(s.near(e.doc.resolve(i),n)))}class v extends o.dL{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 new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,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.CU.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.CU.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(s.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}class w{constructor(e,t,n){this.name=e,this.init=b(t.init,n),this.apply=b(t.apply,n)}}const k=[new w("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new w("selection",{init:(e,t)=>e.selection||s.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 x{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=k.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new 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 A{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 s=this.config.plugins[i];if(s.spec.appendTransaction){let a=r?r[i].n:0,l=r?r[i].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,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 new RangeError("Applying a mismatched transaction");let t=new A(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 x(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new A(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 x(this.schema,e.plugins),n=t.fields,r=new A(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 new 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 new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new x(e.schema,e.plugins),i=new A(o);return o.fields.forEach((o=>{if("doc"==o.name)i.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=s.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 s=n[r],a=s.spec.state;if(s.key==o.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r))return void(i[o.name]=a.fromJSON.call(s,e,t[r],i))}i[o.name]=o.init(e,i)}})),i}}function S(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=S(o,t,{})),n[r]=o}return n}class E{constructor(e){this.spec=e,this.props={},e.props&&S(e.props,this,this.props),this.key=e.key?e.key.key:O("plugin")}getState(e){return e[this.key]}}const C=Object.create(null);function O(e){return e in C?e+"$"+ ++C[e]:(C[e]=0,e+"$")}class M{constructor(e="key"){this.key=O(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},1697:(e,t,n)=>{"use strict";n.d(t,{f:()=>s});var r=n(4269),o=n(6197),i=n(1807);function s(e,t){let n=!1;return(0,r.YR)(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,o.dc})),Boolean((!e.depth||e.depth<3)&&(0,i.d)(e)&&(t.options.setext||n))}},1740:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1807:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});const r={};function o(e,t){const n=t||r;return i(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function i(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return s(e.children,t,n)}return Array.isArray(e)?s(e,t,n):""}function s(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=i(e[o],t,n);return r.join("")}},2016:(e,t,n)=>{"use strict";function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>r})},2110:(e,t,n)=>{"use strict";n.d(t,{y:()=>a});var r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const o="text/event-stream",i=1e3,s="last-event-id";function a(e,t){var{signal:n,headers:a,onopen:c,onmessage:u,onclose:d,onerror:p,openWhenHidden:f,fetch:h}=t,m=r(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,r)=>{const g=Object.assign({},a);let y;function v(){y.abort(),document.hidden||S()}g.accept||(g.accept=o),f||document.addEventListener("visibilitychange",v);let b=i,w=0;function k(){document.removeEventListener("visibilitychange",v),window.clearTimeout(w),y.abort()}null==n||n.addEventListener("abort",(()=>{k(),t()}));const x=null!=h?h:window.fetch,A=null!=c?c:l;async function S(){var n;y=new AbortController;try{const n=await x(e,Object.assign(Object.assign({},m),{headers:g,signal:y.signal}));await A(n),await async function(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}(n.body,function(e){let t,n,r,o=!1;return function(i){void 0===t?(t=i,n=0,r=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,i);const s=t.length;let a=0;for(;n<s;){o&&(10===t[n]&&(a=++n),o=!1);let i=-1;for(;n<s&&-1===i;++n)switch(t[n]){case 58:-1===r&&(r=n-a);break;case 13:o=!0;case 10:i=n}if(-1===i)break;e(t.subarray(a,i),r),a=n,r=-1}a===s?t=void 0:0!==a&&(t=t.subarray(a),n-=a)}}(function(e,t,n){let r={data:"",event:"",id:"",retry:void 0};const o=new TextDecoder;return function(e,t){if(0===e.length)null==n||n(r),r={data:"",event:"",id:"",retry:void 0};else if(t>0){const n=o.decode(e.subarray(0,t)),a=t+(32===e[t+1]?2:1),l=o.decode(e.subarray(a));switch(n){case"data":r.data=r.data?r.data+"\n"+l:l;break;case"event":r.event=l;break;case"id":(i=r.id=l)?g[s]=i:delete g[s];break;case"retry":const e=parseInt(l,10);isNaN(e)||(e=>{b=e})(r.retry=e)}}var i}}(0,0,u))),null==d||d(),k(),t()}catch(e){if(!y.signal.aborted)try{const t=null!==(n=null==p?void 0:p(e))&&void 0!==n?n:b;window.clearTimeout(w),w=window.setTimeout(S,t)}catch(e){k(),r(e)}}}S()}))}function l(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(o)))throw new Error(`Expected content-type to be ${o}, Actual: ${t}`)}},2257:(e,t,n)=>{"use strict";n.d(t,{OF:()=>l});var r=n(8769),o=n(8764),i=n(9642),s=n(8408),a=n(7652);const{genStyleHooks:l,genComponentStyleHook:c,genSubStyleComponent:u}=(0,o.L_)({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=(0,r.useContext)(i.QO);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o]=(0,a.Ay)();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o}},useCSP:()=>{const{csp:e}=(0,r.useContext)(i.QO);return null!=e?e:{}},getResetStyles:(e,t)=>{var n;return[{"&":(0,s.av)(e)},(0,s.jz)(null!==(n=null==t?void 0:t.prefix.iconPrefixCls)&&void 0!==n?n:i.pM)]},getCommonStyle:s.vj,getCompUnitless:()=>a.Is})},2474:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},2559:(e,t,n)=>{"use strict";function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>r})},2591:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},s=[],a=0;a<e.length;a++){var l=e[a],c=r.base?l[0]+r.base:l[0],u=i[c]||0,d="".concat(c," ").concat(u);i[c]=u+1;var p=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var h=o(f,r);r.byIndex=a,t.splice(a,0,{identifier:d,updater:h,references:1})}s.push(d)}return s}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<i.length;s++){var a=n(i[s]);t[a].references--}for(var l=r(e,o),c=0;c<i.length;c++){var u=n(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=l}}},2715:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{A:()=>r})},2740:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(7545),o=n(6902);function i(e,t,n){"symbol"==(0,r.A)(t)&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+" "+t:t})}catch(e){}return e}var s=n(1369);function a(e,t,n,a,l,c){var u,d,p,f,h,m,g,y=Symbol.metadata||Symbol.for("Symbol.metadata"),v=Object.defineProperty,b=Object.create,w=[b(null),b(null)],k=t.length;function x(t,n,r){return function(o,i){n&&(i=o,o=e);for(var s=0;s<t.length;s++)i=t[s].apply(o,r?[i]:[]);return r?i:o}}function A(e,t,n,r){if("function"!=typeof e&&(r||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return e}function S(e,t,n,o,s,a,l,c,p,f,h){function m(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var g=[].concat(t[0]),y=t[3],b=!l,k=1===s,S=3===s,E=4===s,C=2===s;function O(t,n,r){return function(o,i){return n&&(i=o,o=e),r&&r(o),M[t].call(o,i)}}if(!b){var M={},N=[],T=S?"get":E||k?"set":"value";if(p?(f||k?M={get:i((function(){return y(this)}),o,"get"),set:function(e){t[4](this,e)}}:M[T]=y,f||i(M[T],o,C?"":T)):f||(M=Object.getOwnPropertyDescriptor(e,o)),!f&&!p){if((d=w[+c][o])&&7!=(d^s))throw Error("Decorating two elements with the same name ("+M[T].name+") is not supported yet");w[+c][o]=s<3?1:s}}for(var I=e,R=g.length-1;R>=0;R-=n?2:1){var D=A(g[R],"A decorator","be",!0),P=n?g[R-1]:void 0,F={},L={kind:["field","accessor","method","getter","setter","class"][s],name:o,metadata:u,addInitializer:function(e,t){if(e.v)throw Error("attempted to call addInitializer after decoration was finished");A(t,"An initializer","be",!0),a.push(t)}.bind(null,F)};if(b)d=D.call(P,I,L),F.v=1,A(d,"class decorators","return")&&(I=d);else if(L.static=c,L.private=p,d=L.access={has:p?h.bind():function(e){return o in e}},E||(d.get=p?C?function(e){return m(e),M.value}:O("get",0,m):function(e){return e[o]}),C||S||(d.set=p?O("set",0,m):function(e,t){e[o]=t}),I=D.call(P,k?{get:M.get,set:M.set}:M[T],L),F.v=1,k){if("object"==(0,r.A)(I)&&I)(d=A(I.get,"accessor.get"))&&(M.get=d),(d=A(I.set,"accessor.set"))&&(M.set=d),(d=A(I.init,"accessor.init"))&&N.unshift(d);else if(void 0!==I)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else A(I,(f?"field":"method")+" decorators","return")&&(f?N.unshift(I):M[T]=I)}return s<2&&l.push(x(N,c,1),x(a,c,0)),f||b||(p?k?l.splice(-1,0,O("get",c),O("set",c)):l.push(C?M[T]:A.call.bind(M[T])):v(e,o,M)),I}function E(e){return v(e,y,{configurable:!0,enumerable:!0,value:u})}return void 0!==c&&(u=c[y]),u=b(null==u?null:u),h=[],m=function(e){e&&h.push(x(e))},g=function(t,r){for(var i=0;i<n.length;i++){var a=n[i],c=a[1],u=7&c;if((8&c)==t&&!u==r){var d=a[2],m=!!a[3],g=16&c;S(t?e:e.prototype,a,g,m?"#"+d:(0,s.A)(d),u,u<2?[]:t?f=f||[]:p=p||[],h,!!t,m,r,t&&m?function(t){return(0,o.A)(t)===e}:l)}}},g(8,0),g(0,0),g(8,1),g(0,1),m(p),m(f),d=h,k||E(e),{e:d,get c(){var n=[];return k&&[E(e=S(e,[t],a,e.name,5,n)),x(n,1)]}}}},2762:(e,t,n)=>{"use strict";n.d(t,{Wj:()=>it});var r={};n.r(r),n.d(r,{boolean:()=>q,booleanish:()=>G,commaOrSpaceSeparated:()=>Q,commaSeparated:()=>Z,number:()=>J,overloadedBoolean:()=>Y,spaceSeparated:()=>X});var o=n(4254),i=n(1570);function s(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}function a(e){e.register(s),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}function l(e){e.register(a),function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(e)}function c(e){e.register(l),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}function u(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,s=0;s<o.length;s++)i[o[s]]=e.languages.bash[o[s]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(e)}function d(e){e.register(s),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",s="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",a="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(i),u=RegExp(l(o+" "+i+" "+s+" "+a)),d=l(i+" "+s+" "+a),p=l(o+" "+i+" "+a),f=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,g=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,g]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,v]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,h,v]),k=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),x=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[k,y,v]),A={keyword:u,punctuation:/[<>()?,.:[\]]/},S=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,E=/"(?:\\.|[^\\"\r\n])*"/.source,C=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[C]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:A},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,x]),lookbehind:!0,inside:A},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,g]),lookbehind:!0,inside:A},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:A},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:A},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[x,p,m]),inside:A}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:A},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[x,y]),inside:A,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[x]),lookbehind:!0,inside:A,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:A}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,g,m,x,u.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[g,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(x),greedy:!0,inside:A},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var O=E+"|"+S,M=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[O]),N=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[M]),2),T=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,N]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[T,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[T]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[N]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var R=/:[^}\r\n]+/.source,D=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[M]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[D,R]),F=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[O]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[F,R]);function _(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,R]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:_(P,D)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:_(L,F)}],char:{pattern:RegExp(S),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(e)}function p(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var i={};i[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}function f(e){!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(e)}function h(e){!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(e)}function m(e){e.register(s),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}function g(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}function y(e){e.register(s),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(e)}function v(e){!function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",o=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:o,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(e)}function b(e){e.register(s),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}function w(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}function k(e){e.register(s),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(e)}function x(e){e.register(f),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}function A(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}function S(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}function E(e){!function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),i=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+o+"|"+i+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(i),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(e)}function C(e){e.register(p),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],s=o.content[3];if(i&&s&&"code-language"===i.type&&"code-block"===s.type&&"string"==typeof i.content){var a=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(a=(/[a-z][\w-]*/i.exec(a)||[""])[0].toLowerCase());s.alias?"string"==typeof s.alias?s.alias=[s.alias,l]:s.alias.push(l):s.alias=[l]}}else e(o.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],s=/language-(.+)/.exec(i);if(s){n=s[1];break}}var a=e.languages[n];if(a)t.content=e.highlight(t.content.value,a,n);else if(n&&"none"!==n&&e.plugins.autoloader){var l="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=l,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(l);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}})),RegExp(e.languages.markup.tag.pattern.source,"gi"),String.fromCodePoint||String.fromCharCode,e.languages.md=e.languages.markdown}(e)}function O(e){e.register(a),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}function M(e){!function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(e)}function N(e){e.register(p),function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,i){if(n.language===r){var s=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof i&&!i(e))return e;for(var o,a=s.length;-1!==n.code.indexOf(o=t(r,a));)++a;return s[a]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,i=Object.keys(n.tokenStack);!function s(a){for(var l=0;l<a.length&&!(o>=i.length);l++){var c=a[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=i[o],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),h=p.indexOf(f);if(h>-1){++o;var m=p.substring(0,h),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=p.substring(h+f.length),v=[];m&&v.push.apply(v,s([m])),v.push(g),y&&v.push.apply(v,s([y])),"string"==typeof c?a.splice.apply(a,[l,1].concat(v)):c.content=v}}else c.content&&s(c.content)}return a}(n.tokens)}}}})}(e)}function T(e){e.register(N),function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];e.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(e)}function I(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}function R(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}function D(e){e.register(s),function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(e)}function P(e){!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(e)}function F(e){e.register(f),function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(e)}function L(e){e.register(f),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}function _(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}function z(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach((function(t){t.inside.interpolation.inside=e.languages.swift}))}function $(e){e.register(b),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(e)}function j(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}function B(e){e.register(j),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}s.displayName="clike",s.aliases=[],a.displayName="c",a.aliases=[],l.displayName="cpp",l.aliases=[],c.displayName="arduino",c.aliases=["ino"],u.displayName="bash",u.aliases=["sh","shell"],d.displayName="csharp",d.aliases=["cs","dotnet"],p.displayName="markup",p.aliases=["atom","html","mathml","rss","ssml","svg","xml"],f.displayName="css",f.aliases=[],h.displayName="diff",h.aliases=[],m.displayName="go",m.aliases=[],g.displayName="ini",g.aliases=[],y.displayName="java",y.aliases=[],v.displayName="regex",v.aliases=[],b.displayName="javascript",b.aliases=["js"],w.displayName="json",w.aliases=["webmanifest"],k.displayName="kotlin",k.aliases=["kt","kts"],x.displayName="less",x.aliases=[],A.displayName="lua",A.aliases=[],S.displayName="makefile",S.aliases=[],E.displayName="yaml",E.aliases=["yml"],C.displayName="markdown",C.aliases=["md"],O.displayName="objectivec",O.aliases=["objc"],M.displayName="perl",M.aliases=[],N.displayName="markup-templating",N.aliases=[],T.displayName="php",T.aliases=[],I.displayName="python",I.aliases=["py"],R.displayName="r",R.aliases=[],D.displayName="ruby",D.aliases=["rb"],P.displayName="rust",P.aliases=[],F.displayName="sass",F.aliases=[],L.displayName="scss",L.aliases=[],_.displayName="sql",_.aliases=[],z.displayName="swift",z.aliases=[],$.displayName="typescript",$.aliases=["ts"],j.displayName="basic",j.aliases=[],B.displayName="vbnet",B.aliases=[];class H{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function V(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new H(n,r,t)}function U(e){return e.toLowerCase()}H.prototype.property={},H.prototype.normal={},H.prototype.space=null;class W{constructor(e,t){this.property=e,this.attribute=t}}W.prototype.space=null,W.prototype.boolean=!1,W.prototype.booleanish=!1,W.prototype.overloadedBoolean=!1,W.prototype.number=!1,W.prototype.commaSeparated=!1,W.prototype.spaceSeparated=!1,W.prototype.commaOrSpaceSeparated=!1,W.prototype.mustUseProperty=!1,W.prototype.defined=!1;let K=0;const q=ee(),G=ee(),Y=ee(),J=ee(),X=ee(),Z=ee(),Q=ee();function ee(){return 2**++K}const te=Object.keys(r);class ne extends W{constructor(e,t,n,o){let i=-1;if(super(e,t),re(this,"space",o),"number"==typeof n)for(;++i<te.length;){const e=te[i];re(this,te[i],(n&r[e])===r[e])}}}function re(e,t,n){n&&(e[t]=n)}ne.prototype.defined=!0;const oe={}.hasOwnProperty;function ie(e){const t={},n={};let r;for(r in e.properties)if(oe.call(e.properties,r)){const o=e.properties[r],i=new ne(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[U(r)]=r,n[U(i.attribute)]=r}return new H(t,n,e.space)}const se=ie({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ae=ie({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function le(e,t){return t in e?e[t]:t}function ce(e,t){return le(e,t.toLowerCase())}const ue=ie({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ce,properties:{xmlns:null,xmlnsXLink:null}}),de=ie({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:G,ariaAutoComplete:null,ariaBusy:G,ariaChecked:G,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:X,ariaCurrent:null,ariaDescribedBy:X,ariaDetails:null,ariaDisabled:G,ariaDropEffect:X,ariaErrorMessage:null,ariaExpanded:G,ariaFlowTo:X,ariaGrabbed:G,ariaHasPopup:null,ariaHidden:G,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:X,ariaLevel:J,ariaLive:null,ariaModal:G,ariaMultiLine:G,ariaMultiSelectable:G,ariaOrientation:null,ariaOwns:X,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:G,ariaReadOnly:G,ariaRelevant:null,ariaRequired:G,ariaRoleDescription:X,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:G,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null}}),pe=ie({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ce,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Z,acceptCharset:X,accessKey:X,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:X,autoFocus:q,autoPlay:q,capture:q,charSet:null,checked:q,cite:null,className:X,cols:J,colSpan:null,content:null,contentEditable:G,controls:q,controlsList:X,coords:J|Z,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:Y,draggable:G,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:X,height:J,hidden:q,high:J,href:null,hrefLang:null,htmlFor:X,httpEquiv:X,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:X,itemRef:X,itemScope:q,itemType:X,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:q,optimum:J,pattern:null,ping:X,placeholder:null,playsInline:q,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:X,required:q,reversed:q,rows:J,rowSpan:J,sandbox:X,scope:null,scoped:q,seamless:q,selected:q,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:G,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:G,width:J,wrap:null,align:null,aLink:null,archive:X,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:G,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:q,disableRemotePlayback:q,prefix:null,property:null,results:J,security:null,unselectable:null}}),fe=ie({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:le,properties:{about:Q,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:X,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Z,g2:Z,glyphName:Z,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:Q,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:J,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:X,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Q,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Q,rev:Q,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Q,requiredFeatures:Q,requiredFonts:Q,requiredFormats:Q,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:Q,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Q,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Q,to:null,transform:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),he=V([ae,se,ue,de,pe],"html"),me=(V([ae,se,ue,de,fe],"svg"),/^data[-\w.:]+$/i),ge=/-[a-z]/g,ye=/[A-Z]/g;function ve(e){return"-"+e.toLowerCase()}function be(e){return e.charAt(1).toUpperCase()}const we=/[#.]/g;function ke(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function xe(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,i=!1;for(;!i;){-1===r&&(r=n.length,i=!0);const e=n.slice(o,r).trim();!e&&i||t.push(e),o=r+1,r=n.indexOf(",",o)}return t}const Ae=new Set(["menu","submit","reset","button"]),Se={}.hasOwnProperty;function Ee(e,t,n,r){const o=function(e,t){const n=U(t);let r=t,o=W;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&me.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ge,be);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ge.test(e)){let n=e.replace(ye,ve);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=ne}return new o(r,t)}(e,n);let i,s=-1;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;i=r}else i="boolean"==typeof r?r:"string"==typeof r?o.spaceSeparated?ke(r):o.commaSeparated?xe(r):o.commaOrSpaceSeparated?ke(xe(r).join(" ")):Oe(o,o.property,r):Array.isArray(r)?r.concat():"style"===o.property?function(e){const t=[];let n;for(n in e)Se.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(i)){const e=[];for(;++s<i.length;)e[s]=Oe(o,o.property,i[s]);i=e}"className"===o.property&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}function Ce(e,t){let n=-1;if(null==t);else if("string"==typeof t||"number"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Ce(e,t[n]);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?Ce(e,t.children):e.push(t)}}function Oe(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||U(n)===U(t)))return!0}return n}const Me=(Ie=he,function(e,t,...n){let r,o=-1;if(null==e)r={type:"root",children:[]},n.unshift(t);else if(r=function(e){const t=e||"",n={};let r,o,i=0;for(;i<t.length;){we.lastIndex=i;const e=we.exec(t),s=t.slice(i,e?e.index:t.length);s&&(r?"#"===r?n.id=s:Array.isArray(n.className)?n.className.push(s):n.className=[s]:o=s,i+=s.length),e&&(r=e[0],i++)}return{type:"element",tagName:o||"div",properties:n,children:[]}}(e),r.tagName=r.tagName.toLowerCase(),i=t,s=r.tagName,null==i||"object"!=typeof i||Array.isArray(i)||"input"!==s&&i.type&&"string"==typeof i.type&&("children"in i&&Array.isArray(i.children)||("button"===s?!Ae.has(i.type.toLowerCase()):"value"in i)))n.unshift(t);else{let e;for(e in t)Se.call(t,e)&&Ee(Ie,r.properties,e,t[e])}for(var i,s;++o<n.length;)Ce(r.children,n[o]);return"element"===r.type&&"template"===r.tagName&&(r.content={type:"root",children:r.children},r.children=[]),r}),Ne=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Te={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};var Ie;function Re(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function De(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Pe(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||Re(e)}var Fe=n(1157);const Le=String.fromCharCode,_e=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function ze(e,t={}){const n="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,r=[];let o,i,s=0,a=-1,l="";t.position&&("start"in t.position||"indent"in t.position?(i=t.position.indent,o=t.position.start):o=t.position);let c,u=(o?o.line:0)||1,d=(o?o.column:0)||1,p=h();for(s--;++s<=e.length;)if(10===c&&(d=(i?i[a]:0)||1),c=e.charCodeAt(s),38===c){const o=e.charCodeAt(s+1);if(9===o||10===o||12===o||32===o||38===o||60===o||Number.isNaN(o)||n&&o===n){l+=Le(c),d++;continue}const i=s+1;let a,u=i,y=i;if(35===o){y=++u;const t=e.charCodeAt(y);88===t||120===t?(a="hexadecimal",y=++u):a="decimal"}else a="named";let v="",b="",w="";const k="named"===a?Pe:"decimal"===a?Re:De;for(y--;++y<=e.length;){const t=e.charCodeAt(y);if(!k(t))break;w+=Le(t),"named"===a&&Ne.includes(w)&&(v=w,b=(0,Fe.s)(w))}let x=59===e.charCodeAt(y);if(x){y++;const e="named"===a&&(0,Fe.s)(w);e&&(v=w,b=e)}let A=1+y-i,S="";if(x||!1!==t.nonTerminated)if(w)if("named"===a){if(x&&!b)m(5,1);else if(v!==w&&(y=u+v.length,A=1+y-u,x=!1),!x){const n=v?1:3;if(t.attribute){const t=e.charCodeAt(y);61===t?(m(n,A),b=""):Pe(t)?b="":m(n,A)}else m(n,A)}S=b}else{x||m(2,A);let e=Number.parseInt(w,"hexadecimal"===a?16:10);if((f=e)>=55296&&f<=57343||f>1114111)m(7,A),S=Le(65533);else if(e in Te)m(6,A),S=Te[e];else{let t="";$e(e)&&m(6,A),e>65535&&(e-=65536,t+=Le(e>>>10|55296),e=56320|1023&e),S=t+Le(e)}}else"named"!==a&&m(4,A);if(S){g(),p=h(),s=y-1,d+=y-i+1,r.push(S);const n=h();n.offset++,t.reference&&t.reference.call(t.referenceContext,S,{start:p,end:n},e.slice(i-1,y)),p=n}else w=e.slice(i-1,y),l+=w,d+=w.length,s=y-1}else 10===c&&(u++,a++,d=0),Number.isNaN(c)?g():(l+=Le(c),d++);var f;return r.join("");function h(){return{line:u,column:d,offset:s+((o?o.offset:0)||0)}}function m(e,n){let r;t.warning&&(r=h(),r.column+=n,r.offset+=n,t.warning.call(t.warningContext,_e[e],r,e))}function g(){l&&(r.push(l),t.text&&t.text.call(t.textContext,l,{start:p,end:h()}),l="")}}function $e(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}var je=0,Be={},He={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++je}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},He.util.type(t)){case"Object":if(o=He.util.objId(t),n[o])return n[o];for(var i in r={},n[o]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return o=He.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}}},languages:{plain:Be,plaintext:Be,text:Be,txt:Be,extend:function(e,t){var n=He.util.clone(He.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||He.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a]);n.hasOwnProperty(s)||(i[s]=o[s])}var l=r[e];return r[e]=i,He.languages.DFS(He.languages,(function(t,n){n===l&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,r,o){o=o||{};var i=He.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var a=t[s],l=He.util.type(a);"Object"!==l||o[i(a)]?"Array"!==l||o[i(a)]||(o[i(a)]=!0,e(a,n,s,o)):(o[i(a)]=!0,e(a,n,null,o))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(He.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=He.tokenize(r.code,r.grammar),He.hooks.run("after-tokenize",r),Ve.stringify(He.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new Ke;return qe(o,o.head,e),We(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=He.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=He.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:Ve};function Ve(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function Ue(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function We(e,t,n,r,o,i){for(var s in n)if(n.hasOwnProperty(s)&&n[s]){var a=n[s];a=Array.isArray(a)?a:[a];for(var l=0;l<a.length;++l){if(i&&i.cause==s+","+l)return;var c=a[l],u=c.inside,d=!!c.lookbehind,p=!!c.greedy,f=c.alias;if(p&&!c.pattern.global){var h=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,h+"g")}for(var m=c.pattern||c,g=r.next,y=o;g!==t.tail&&!(i&&y>=i.reach);y+=g.value.length,g=g.next){var v=g.value;if(t.length>e.length)return;if(!(v instanceof Ve)){var b,w=1;if(p){if(!(b=Ue(m,y,e,d))||b.index>=e.length)break;var k=b.index,x=b.index+b[0].length,A=y;for(A+=g.value.length;k>=A;)A+=(g=g.next).value.length;if(y=A-=g.value.length,g.value instanceof Ve)continue;for(var S=g;S!==t.tail&&(A<x||"string"==typeof S.value);S=S.next)w++,A+=S.value.length;w--,v=e.slice(y,A),b.index-=y}else if(!(b=Ue(m,0,v,d)))continue;k=b.index;var E=b[0],C=v.slice(0,k),O=v.slice(k+E.length),M=y+v.length;i&&M>i.reach&&(i.reach=M);var N=g.prev;if(C&&(N=qe(t,N,C),y+=C.length),Ge(t,N,w),g=qe(t,N,new Ve(s,u?He.tokenize(E,u):E,f,E)),O&&qe(t,g,O),w>1){var T={cause:s+","+l,reach:M};We(e,t,n,g.prev,y,T),i&&T.reach>i.reach&&(i.reach=T.reach)}}}}}}function Ke(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function qe(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function Ge(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}const Ye=He,Je={}.hasOwnProperty;function Xe(){}Xe.prototype=Ye;const Ze=new Xe;Ze.highlight=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&"object"==typeof t)n=t;else{if(r=t,"string"!=typeof r)throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!Je.call(Ze.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=Ze.languages[r]}return{type:"root",children:Ye.highlight.call(Ze,e,n,r)}},Ze.register=function(e){if("function"!=typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Je.call(Ze.languages,e.displayName)||e(Ze)},Ze.alias=function(e,t){const n=Ze.languages;let r,o={};for(r in"string"==typeof e?t&&(o[e]=t):o=e,o)if(Je.call(o,r)){const e=o[r],t="string"==typeof e?[e]:e;let i=-1;for(;++i<t.length;)n[t[i]]=n[r]}},Ze.registered=function(e){if("string"!=typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Je.call(Ze.languages,e)},Ze.listLanguages=function(){const e=Ze.languages,t=[];let n;for(n in e)Je.call(e,n)&&"object"==typeof e[n]&&t.push(n);return t},Ze.util.encode=function(e){return e},Ze.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){const r=[];let o=-1;for(;++o<t.length;)""!==t[o]&&null!==t[o]&&void 0!==t[o]&&r.push(e(t[o],n));return r}const r={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),Ze.hooks.run("wrap",r),Me(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)Je.call(e,t)&&(e[t]=ze(e[t]));return e}(r.attributes),r.content)},Ze.register(s),Ze.register(a),Ze.register(l),Ze.register(c),Ze.register(u),Ze.register(d),Ze.register(p),Ze.register(f),Ze.register(h),Ze.register(m),Ze.register(g),Ze.register(y),Ze.register(v),Ze.register(b),Ze.register(w),Ze.register(k),Ze.register(x),Ze.register(A),Ze.register(S),Ze.register(E),Ze.register(C),Ze.register(O),Ze.register(M),Ze.register(N),Ze.register(T),Ze.register(I),Ze.register(R),Ze.register(D),Ze.register(P),Ze.register(F),Ze.register(L),Ze.register(_),Ze.register(z),Ze.register($),Ze.register(j),Ze.register(B);var Qe=n(7268),et=n(3686);function tt(e,t=[]){return e.flatMap((e=>{var n;return"element"===e.type?tt(e.children,[...t,...(null==(n=e.properties)?void 0:n.className)||[]]):[{text:e.value,className:t}]}))}function nt(e,t,n){const{highlight:r,listLanguages:i}=n,s=i(),a=[];return(0,o.xe)((e=>e.type.name===t))(e).forEach((e=>{let t=e.pos+1;const{language:n}=e.node.attrs;n&&s.includes(n)?tt(r(e.node.textContent,n).children).forEach((e=>{const n=t+e.text.length;if(e.className.length){const r=et.NZ.inline(t,n,{class:e.className.join(" ")});a.push(r)}t=n})):console.warn("Unsupported language detected, this language has not been supported by current prism config: ",n)})),et.zF.create(e,a)}const rt=(0,Qe.Qx)({configureRefractor:()=>{}},"prismConfig");rt.meta={package:"@milkdown/plugin-prism",displayName:"Ctx<prism>"};const ot=(0,Qe.Gf)((e=>{const{configureRefractor:t}=e.get(rt.key),n="code_block";return new i.k_({key:new i.hs("MILKDOWN_PRISM"),state:{init:(e,{doc:r})=>{const o=t(Ze);return nt(r,n,o??Ze)},apply:(e,t,r,i)=>{var s,a;const l=i.selection.$head.parent.type.name===n,c=r.selection.$head.parent.type.name===n,u=(0,o.xe)((e=>e.type.name===n))(r.doc),d=(0,o.xe)((e=>e.type.name===n))(i.doc);return e.docChanged&&(l||c||u.length!==d.length||(null==(s=u[0])?void 0:s.node.attrs.language)!==(null==(a=d[0])?void 0:a.node.attrs.language)||e.steps.some((e=>{const t=e;return void 0!==t.from&&void 0!==t.to&&u.some((e=>e.pos>=t.from&&e.pos+e.node.nodeSize<=t.to))})))?nt(e.doc,n,Ze):t.map(e.mapping,e.doc)}},props:{decorations(e){return this.getState(e)}}})}));ot.meta={package:"@milkdown/plugin-prism",displayName:"Prose<prism>"};const it=[ot,rt]},3051:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3219:(e,t,n)=>{"use strict";function r(e,t){return o(e,t.inConstruct,!0)&&!o(e,t.notInConstruct,!1)}function o(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}n.d(t,{q:()=>r})},3319:(e,t,n)=>{"use strict";n.d(t,{vo:()=>O,e2:()=>y,$X:()=>b});var r,o,i,s,a=n(8769),l=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},c=(e,t,n)=>(((e,t)=>{if(!t.has(e))throw TypeError("Cannot access private method")})(e,t),n);class u{constructor({node:e,view:t,getPos:n,decorations:o,innerDecorations:i,options:s}){l(this,r),this.selected=!1,this.selectNode=()=>{var e,t;this.selected=!0,null==(t=(e=this.options).selectNode)||t.call(e)},this.deselectNode=()=>{var e,t;this.selected=!1,null==(t=(e=this.options).deselectNode)||t.call(e)},this.shouldUpdate=e=>!(e.type!==this.node.type||e.sameMarkup(this.node)&&e.content.eq(this.node.content)),this.update=(e,t,n)=>{var r,o;const i=this.options.update;let s;return i&&(s=i(e,t,n)),"boolean"!=typeof s&&(s=this.shouldUpdate(e)),this.node=e,this.decorations=t,this.innerDecorations=n,s&&(null==(o=(r=this.options).onUpdate)||o.call(r)),s},this.shouldIgnoreMutation=e=>!(this.dom&&this.contentDOM&&!this.node.isLeaf&&!this.node.isAtom)||"selection"!==e.type&&(this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)),this.ignoreMutation=e=>{if(!this.dom||!this.contentDOM)return!0;let t;const n=this.options.ignoreMutation;return n&&(t=n(e)),"boolean"!=typeof t&&(t=this.shouldIgnoreMutation(e)),t},this.destroy=()=>{var e,t,n;null==(t=(e=this.options).destroy)||t.call(e),this.dom.remove(),null==(n=this.contentDOM)||n.remove()},this.setAttrs=e=>{const{dispatch:t,state:n}=this.view,r=this.getPos();if("number"==typeof r)return t(n.tr.setNodeMarkup(r,void 0,{...this.node.attrs,...e}))},this.node=e,this.view=t,this.getPos=n,this.decorations=o,this.innerDecorations=i,this.options=s,this.dom=this.createDOM(s.as),this.contentDOM=e.isLeaf?null:this.createContentDOM(s.contentAs),this.dom.setAttribute("data-node-view-root","true"),this.contentDOM&&(this.contentDOM.setAttribute("data-node-view-content","true"),this.contentDOM.style.whiteSpace="inherit"),this.setSelection=s.setSelection,this.stopEvent=s.stopEvent}createDOM(e){return c(this,r,o).call(this,e)}createContentDOM(e){return c(this,r,o).call(this,e)}get component(){return this.options.component}}r=new WeakSet,o=function(e){const{node:t}=this;return null==e?document.createElement(t.isInline?"span":"div"):e instanceof HTMLElement?e:e instanceof Function?e(t):document.createElement(e)};class d{constructor(e){this.view=e.view,this.options=e.options}get component(){return this.options.component}get root(){var e,t;let n=null==(t=(e=this.options).root)?void 0:t.call(e,this.view.dom);return n||(n=this.view.dom.parentElement??document.body),n}update(e,t){var n,r;this.view=e,this.prevState=t,null==(r=(n=this.options).update)||r.call(n,e,t)}destroy(){var e,t;null==(t=(e=this.options).destroy)||t.call(e)}}class p{constructor({pos:e,spec:t,options:n}){l(this,i),this.pos=e,this.options=n,this.spec=t,this.dom=c(this,i,s).call(this,n.as),this.dom.setAttribute("data-widget-view-root","true")}bind(e,t){this.view=e,this.getPos=t}get component(){return this.options.component}}i=new WeakSet,s=function(e){return e instanceof HTMLElement?e:document.createElement(e)};let f=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),"");var h=n(9435),m=n(3686);const g=(0,a.createContext)({contentRef:()=>{},view:null,getPos:()=>0,setAttrs:()=>{},node:null,selected:!1,decorations:[],innerDecorations:null}),y=()=>(0,a.useContext)(g),v=(0,a.createContext)((e=>{throw new Error("out of scope")})),b=()=>(0,a.useContext)(v);class w extends u{constructor(){super(...arguments),this.key=f(),this.context={contentRef:e=>{e&&this.contentDOM&&e.firstChild!==this.contentDOM&&e.appendChild(this.contentDOM)},view:this.view,getPos:this.getPos,setAttrs:this.setAttrs,node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations},this.updateContext=()=>{Object.assign(this.context,{node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations})},this.render=()=>{const e=this.component;return(0,h.createPortal)(a.createElement(g.Provider,{value:this.context},a.createElement(e,null)),this.dom,this.key)}}}const k=(0,a.createContext)({view:null}),x=(0,a.createContext)((e=>{throw new Error("out of scope")}));class A extends d{constructor(){super(...arguments),this.key=f(),this.context={view:this.view,prevState:this.prevState},this.updateContext=()=>{Object.assign(this.context,{view:this.view,prevState:this.prevState})},this.render=()=>{const e=this.component;return(0,h.createPortal)(a.createElement(k.Provider,{value:this.context},a.createElement(e,null)),this.root,this.key)}}}const S=(0,a.createContext)({view:null,getPos:()=>{}}),E=(0,a.createContext)((e=>{throw new Error("out of scope")}));class C extends p{constructor(){super(...arguments),this.key=f(),this.context={view:this.view,getPos:this.getPos,spec:this.spec},this.updateContext=()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})},this.render=()=>{const e=this.component;return(0,h.createPortal)(a.createElement(S.Provider,{value:this.context},a.createElement(e,null)),this.dom,this.key)}}}const O=({children:e})=>{const{renderReactRenderer:t,removeReactRenderer:n,portals:r}=(()=>{const[e,t]=(0,a.useState)({}),n=(0,a.useRef)(!1);(0,a.useEffect)((()=>(requestAnimationFrame((()=>{n.current=!0})),()=>{n.current=!1})),[]);const r=(0,a.useCallback)((e=>{n.current?(0,h.flushSync)(e):e()}),[]);return{portals:e,renderReactRenderer:(0,a.useCallback)(((e,n=!0)=>{r((()=>{n&&e.updateContext(),t((t=>({...t,[e.key]:e.render()})))}))}),[r]),removeReactRenderer:(0,a.useCallback)((e=>{r((()=>{t((t=>{const n={...t};return delete n[e.key],n}))}))}),[r])}})(),o=((e,t)=>(0,a.useCallback)((n=>(r,o,i,s,a)=>{const l=new w({node:r,view:o,getPos:i,decorations:s,innerDecorations:a,options:{...n,onUpdate(){var t;null==(t=n.onUpdate)||t.call(n),e(l)},selectNode(){var t;null==(t=n.selectNode)||t.call(n),e(l)},deselectNode(){var t;null==(t=n.deselectNode)||t.call(n),e(l)},destroy(){var e;null==(e=n.destroy)||e.call(n),t(l)}}});return e(l,!1),l}),[t,e]))(t,n),i=((e,t)=>(0,a.useCallback)((n=>r=>{const o=new A({view:r,options:{...n,update:(t,r)=>{var i;null==(i=n.update)||i.call(n,t,r),e(o)},destroy:()=>{var e;null==(e=n.destroy)||e.call(n),t(o)}}});return e(o,!1),o}),[t,e]))(t,n),s=((e,t)=>(0,a.useCallback)((n=>(r,o={})=>{const i=new C({pos:r,options:n}),s={...o,destroy:e=>{var n;null==(n=o.destroy)||n.call(o,e),t(i)}};return i.spec=s,m.NZ.widget(r,((t,n)=>(i.bind(t,n),e(i),i.dom)),s)}),[t,e]))(t,n),l=(0,a.useMemo)((()=>Object.values(r)),[r]);return a.createElement(v.Provider,{value:o},a.createElement(x.Provider,{value:i},a.createElement(E.Provider,{value:s},e,l)))}},3373:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},3656:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3686:(e,t,n)=>{"use strict";n.d(t,{Lz:()=>an,NZ:()=>Lt,zF:()=>$t});var r=n(1570),o=n(6090),i=n(1329);const s=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},a=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let l=null;const c=function(e,t,n){let r=l||(l=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},u=function(e,t,n,r){return n&&(p(e,t,n,r,-1)||p(e,t,n,r,1))},d=/^(img|br|input|textarea|hr)$/i;function p(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:f(e))){let n=e.parentNode;if(!n||1!=n.nodeType||h(e)||d.test(e.nodeName)||"false"==e.contentEditable)return!1;t=s(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?f(e):0}}}function f(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function h(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const m=function(e){return e.focusNode&&u(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function g(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const y="undefined"!=typeof navigator?navigator:null,v="undefined"!=typeof document?document:null,b=y&&y.userAgent||"",w=/Edge\/(\d+)/.exec(b),k=/MSIE \d/.exec(b),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),A=!!(k||x||w),S=k?document.documentMode:x?+x[1]:w?+w[1]:0,E=!A&&/gecko\/(\d+)/i.test(b);E&&(/Firefox\/(\d+)/.exec(b)||[0,0])[1];const C=!A&&/Chrome\/(\d+)/.exec(b),O=!!C,M=C?+C[1]:0,N=!A&&!!y&&/Apple Computer/.test(y.vendor),T=N&&(/Mobile\/\w+/.test(b)||!!y&&y.maxTouchPoints>2),I=T||!!y&&/Mac/.test(y.platform),R=!!y&&/Win/.test(y.platform),D=/Android \d/.test(b),P=!!v&&"webkitFontSmoothing"in v.documentElement.style,F=P?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function L(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function _(e,t){return"number"==typeof e?e:e[t]}function z(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function $(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;s=a(s)){if(1!=s.nodeType)continue;let e=s,n=e==i.body,a=n?L(i):z(e),l=0,c=0;if(t.top<a.top+_(r,"top")?c=-(a.top-t.top+_(o,"top")):t.bottom>a.bottom-_(r,"bottom")&&(c=t.bottom-a.bottom+_(o,"bottom")),t.left<a.left+_(r,"left")?l=-(a.left-t.left+_(o,"left")):t.right>a.right-_(r,"right")&&(l=t.right-a.right+_(o,"right")),l||c)if(n)i.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let o=e.scrollLeft-n,i=e.scrollTop-r;t={left:t.left-o,top:t.top-i,right:t.right-o,bottom:t.bottom-i}}if(n)break}}function j(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=a(r));return t}function B(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let H=null;function V(e,t){let n,r,o,i,s=2e8,a=0,l=t.top,u=t.top;for(let d=e.firstChild,p=0;d;d=d.nextSibling,p++){let e;if(1==d.nodeType)e=d.getClientRects();else{if(3!=d.nodeType)continue;e=c(d).getClientRects()}for(let c=0;c<e.length;c++){let f=e[c];if(f.top<=l&&f.bottom>=u){l=Math.max(f.bottom,l),u=Math.min(f.top,u);let e=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(e<s){n=d,s=e,r=e&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==d.nodeType&&e&&(a=p+(t.left>=(f.left+f.right)/2?1:0));continue}}else f.top>t.top&&!o&&f.left<=t.left&&f.right>=t.left&&(o=d,i={left:Math.max(f.left,Math.min(f.right,t.left)),top:f.top});!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(a=p+1)}}return!n&&o&&(n=o,r=i,s=0),n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=G(r,1);if(n.top!=n.bottom&&U(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||s&&1==n.nodeType?{node:e,offset:a}:V(n,r)}function U(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function W(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=e.childNodes[i];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let o=e[r];if(U(t,o))return W(n,t,o)}}if((i=(i+1)%r)==o)break}return e}function K(e,t){let n,r=e.dom.ownerDocument,o=0,i=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch(e){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}(r,t.left,t.top);i&&({node:n,offset:o}=i);let s,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=e.dom.getBoundingClientRect();if(!U(t,n))return null;if(l=W(e.dom,t,n),!l)return null}if(N)for(let e=l;n&&e;e=a(e))e.draggable&&(n=void 0);if(l=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(E&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let e,r=n.childNodes[o];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){let o=-1;for(let n=t,i=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent&&!i||!t.contentDOM)){let e=t.dom.getBoundingClientRect();if(t.node.isBlock&&t.parent&&!i&&(i=!0,e.left>r.left||e.top>r.top?o=t.posBefore:(e.right<r.left||e.bottom<r.top)&&(o=t.posAfter)),!t.contentDOM&&o<0)return(t.node.isBlock?r.top<(e.top+e.bottom)/2:r.left<(e.left+e.right)/2)?t.posBefore:t.posAfter}n=t.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}(e,n,o,t))}null==s&&(s=function(e,t,n){let{node:r,offset:o}=V(t,n),i=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();i=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}(e,l,t));let c=e.docView.nearestDesc(l,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function q(e){return e.top<e.bottom||e.left<e.right}function G(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(q(e))return e}return Array.prototype.find.call(n,q)||e.getBoundingClientRect()}const Y=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function J(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),s=P||E;if(3==r.nodeType){if(!s||!Y.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let e=o,t=o,i=n<0?1:-1;return n<0&&!o?(t++,i=-1):n>=0&&o==r.nodeValue.length?(e--,i=1):n<0?e--:t++,X(G(c(r,e,t),i),i<0)}{let e=G(c(r,o,o),n);if(E&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=G(c(r,o-1,o-1),-1);if(t.top==e.top){let n=G(c(r,o,o+1),-1);if(n.top!=e.top)return X(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(null==i&&o&&(n<0||o==f(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return Z(e.getBoundingClientRect(),!1)}if(null==i&&o<f(r)){let e=r.childNodes[o];if(1==e.nodeType)return Z(e.getBoundingClientRect(),!0)}return Z(r.getBoundingClientRect(),n>=0)}if(null==i&&o&&(n<0||o==f(r))){let e=r.childNodes[o-1],t=3==e.nodeType?c(e,f(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return X(G(t,1),!1)}if(null==i&&o<f(r)){let e=r.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?c(e,0,s?0:1):1==e.nodeType?e:null:null;if(t)return X(G(t,-1),!0)}return X(G(3==r.nodeType?c(r):r,-n),n>=0)}function X(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Z(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Q(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}const ee=/[\u0590-\u08ac]/;let te=null,ne=null,re=!1;class oe{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>s(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!t||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return i;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let o=this.children[n],i=t+o.size;if(i>e||o instanceof de){r=e-t;break}t=i}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof ie&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?s(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?s(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,a=0;;a++){let n=this.children[a],l=i+n.size;if(-1==r&&e<=l){let o=i+n.border;if(e>=o&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=i;for(let t=a;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=s(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(let e=a+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=s(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),i=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(o>a&&i<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let s=this.domFromPos(e,e?-1:1),a=t==e?s:this.domFromPos(t,t?-1:1),l=n.getSelection(),c=!1;if((E||N)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType)c=!(!t||"\n"!=e.nodeValue[t-1]);else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(E&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let e=l.focusNode.childNodes[l.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&N)&&u(s.node,s.offset,l.anchorNode,l.anchorOffset)&&u(a.node,a.offset,l.focusNode,l.focusOffset))return;let d=!1;if((l.extend||e==t)&&!c){l.collapse(s.node,s.offset);try{e!=t&&l.extend(a.node,a.offset),d=!0}catch(e){}}if(!d){if(e>t){let e=s;s=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){let r=n+o.border,s=i-o.border;if(e>=r&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=r||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-r,t-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class ie extends oe{constructor(e,t,n,r){let o,i=t.type.toDOM;if("function"==typeof i&&(i=i(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!t.type.spec.raw){if(1!=i.nodeType){let e=document.createElement("span");e.appendChild(i),i=e}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class se extends oe{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class ae extends oe{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let i=r.nodeViews[t.type.name],s=i&&i(t,r,n);return s&&s.dom||(s=o.ZF.renderSpec(document,t.type.spec.toDOM(t,n))),new ae(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=ae.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;t<i&&(o=Se(o,t,i,n)),e>0&&(o=Se(o,0,e,n));for(let e=0;e<o.length;e++)o[e].parent=r;return r.children=o,r}}class le extends oe{constructor(e,t,n,r,o,i,s,a,l){super(e,[],o,i),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(e,t,n,r,i,s){let a,l=i.nodeViews[t.type.name],c=l&&l(t,i,(()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s),n,r),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(t.text);else u||({dom:u,contentDOM:d}=o.ZF.renderSpec(document,t.type.spec.toDOM(t)));d||t.isText||"BR"==u.nodeName||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let p=u;return u=be(u,n,t),c?a=new pe(e,t,n,r,u,d||null,p,c,i,s+1):t.isText?new ue(e,t,n,r,u,p,i):new le(e,t,n,r,u,d||null,p,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>o.FK.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&we(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new xe(this,s&&s.node,e);!function(e,t,n,r){let o=t.locals(e),i=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,o,t.forChild(i,s),n),i+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){if(s<o.length&&o[s].to==i){let e,t=o[s++];for(;s<o.length&&o[s].to==i;)(e||(e=[t])).push(o[s++]);if(e){e.sort(Ae);for(let t=0;t<e.length;t++)n(e[t],c,!!l)}else n(t,c,!!l)}let u,d;if(l)d=-1,u=l,l=null;else{if(!(c<e.childCount))break;d=c,u=e.child(c++)}for(let e=0;e<a.length;e++)a[e].to<=i&&a.splice(e--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let p=i+u.nodeSize;if(u.isText){let e=p;s<o.length&&o[s].from<e&&(e=o[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<p&&(l=u.cut(e-i),u=u.cut(0,e-i),p=e,d=-1)}r(u,u.isInline&&!u.isLeaf?a.filter((e=>!e.inline)):a.slice(),t.forChild(i,u),d),i=p}}(this.node,this.innerDeco,((t,i,s)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!s&&l.syncToMarks(i==this.node.childCount?o.CU.none:this.node.child(i).marks,n,e),l.placeWidget(t,e,r)}),((t,o,s,c)=>{let u;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,o,s,c)||a&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,o,s,u,e)||l.updateNextNode(t,o,s,e,c,r)||l.addNode(t,o,s,e,r),r+=t.nodeSize})),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),fe(this.contentDOM,this.children,e),T&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:o}=e.state.selection;if(!(e.state.selection instanceof r.U3)||n<t||o>t+this.node.content.size)return null;let i=e.domSelectionRange(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=f(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let e=s.nodeValue,r=function(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let s=e.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<e.childCount;){let t=e.child(o++);if(i+=t.nodeSize,!t.isText)break;l+=t.text}if(i>=n){let e=a<r?l.lastIndexOf(t,r-a-1):-1;if(e>=0&&e+t.length+a>=n)return a+e;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}(this.node.content,e,n-t,o-t);return r<0?null:{node:s,pos:r,text:e}}return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new se(this,o,t,r);e.input.compositionNodes.push(i),this.children=Se(this.children,n,n+r.length,e,i)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node)||(this.updateInner(e,t,n,r),0))}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(we(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=ye(this.dom,this.nodeDOM,ge(this.outerDeco,this.node,t),ge(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ce(e,t,n,r,o){be(r,t,e);let i=new le(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class ue extends le{constructor(e,t,n,r,o,i,s){super(e,t,n,r,o,null,i,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node)||(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,0))}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new ue(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class de extends oe{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class pe extends le{constructor(e,t,n,r,o,i,s,a,l,c){super(e,t,n,r,o,i,s,l,c),this.spec=a}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function fe(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let s=t[i],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=ke(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(a,r);if(s instanceof ae){let t=r?r.previousSibling:e.lastChild;fe(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=ke(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const he=function(e){e&&(this.nodeName=e)};he.prototype=Object.create(null);const me=[new he];function ge(e,t,n){if(0==e.length)return me;let r=n?me[0]:new he,o=[r];for(let i=0;i<e.length;i++){let s=e[i].type.attrs;if(s){s.nodeName&&o.push(r=new he(s.nodeName));for(let e in s){let i=s[e];null!=i&&(n&&1==o.length&&o.push(r=new he(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+i:"style"==e?r.style=(r.style?r.style+";":"")+i:"nodeName"!=e&&(r[e]=i))}}}return o}function ye(e,t,n,r){if(n==me&&r==me)return t;let o=t;for(let t=0;t<r.length;t++){let i=r[t],s=n[t];if(t){let t;s&&s.nodeName==i.nodeName&&o!=e&&(t=o.parentNode)&&t.nodeName.toLowerCase()==i.nodeName||(t=document.createElement(i.nodeName),t.pmIsDeco=!0,t.appendChild(o),s=me[0]),o=t}ve(o,s||me[0],i)}return o}function ve(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function be(e,t,n){return ye(e,e,me,ge(t,n,1!=e.nodeType))}function we(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function ke(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class xe{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,o=e.childCount,i=new Map,s=[];e:for(;o>0;){let a;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof ae)){a=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,i=Math.min(o,e.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++){let n=this.top.children[t];if(n.matchesMark(e[o])&&!this.isLocked(n.dom)){r=t;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=ae.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r<o;r++){let o=this.top.children[r];if(o.matchesNode(e,t,n)&&!this.preMatch.matched.has(o)){i=r;break}}return!(i<0||(this.destroyBetween(this.index,i),this.index++,0))}updateNodeAt(e,t,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,o,i){for(let s=this.index;s<this.top.children.length;s++){let a=this.top.children[s];if(a instanceof le){let l=this.preMatch.matched.get(a);if(null!=l&&l!=o)return!1;let c,u=a.dom,d=this.isLocked(u)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&we(t,a.outerDeco));if(!d&&a.update(e,t,n,r))return this.destroyBetween(this.index,s),a.dom!=u&&(this.changed=!0),this.index++,!0;if(!d&&(c=this.recreateWrapper(a,e,t,n,r,i)))return this.top.children[this.index]=c,c.dirty=2,c.updateChildren(r,i+1),c.dirty=0,this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,o,i){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let s=le.create(this.top,t,n,r,o,i);if(!s.contentDOM)return null;s.children=e.children,e.children=[];for(let e of s.children)e.parent=s;return s}addNode(e,t,n,r,o){let i=le.create(this.top,e,t,n,r,o);i.contentDOM&&i.updateChildren(r,o+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new ie(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof ae;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof ue)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((N||O)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new de(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function Ae(e,t){return e.type.side-t.type.side}function Se(e,t,n,r,o){let i=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function Ee(e,t=null){let n=e.domSelectionRange(),o=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&0==i.size,l=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c,u,d=o.resolve(l);if(m(n)){for(c=d;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&r.nh.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==f(e);r||o;){if(e==n)return!0;let t=s(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==f(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;u=new r.nh(l==e?d:o.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;c=o.resolve(t)}return u||(u=Pe(e,c,d,"pointer"==t||e.state.selection.head<d.pos&&!a?1:-1)),u}function Ce(e){return e.editable?e.hasFocus():Le(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Oe(e,t=!1){let n=e.state.selection;if(Re(e,n),Ce(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&O){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&u(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,s(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&A&&S<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let o,i,{anchor:s,head:a}=n;!Me||n instanceof r.U3||(n.$from.parent.inlineContent||(o=Ne(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Ne(e,n.to))),e.docView.setSelection(s,a,e.root,t),Me&&(o&&Ie(o),i&&Ie(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Ce(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Me=N||O&&M<63;function Ne(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(N&&o&&"false"==o.contentEditable)return Te(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return Te(o);if(i)return Te(i)}}function Te(e){return e.contentEditable="true",N&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ie(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Re(e,t){if(t instanceof r.nh){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(De(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else De(e)}function De(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Pe(e,t,n,o){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||r.U3.between(t,n,o)}function Fe(e){return!(e.editable&&!e.hasFocus())&&Le(e)}function Le(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function _e(e,t){let{$anchor:n,$head:o}=e.selection,i=t>0?n.max(o):n.min(o),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&r.LN.findFrom(s,t)}function ze(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function $e(e,t,n){let o=e.state.selection;if(!(o instanceof r.U3)){if(o instanceof r.nh&&o.node.isInline)return ze(e,new r.U3(t>0?o.$to:o.$from));{let n=_e(e.state,t);return!!n&&ze(e,n)}}if(!o.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let n=_e(e.state,t);return!!(n&&n instanceof r.nh)&&ze(e,n)}if(!(I&&n.indexOf("m")>-1)){let n,i=o.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText)return!1;let a=t<0?i.pos-s.nodeSize:i.pos;return!!(s.isAtom||(n=e.docView.descAt(a))&&!n.contentDOM)&&(r.nh.isSelectable(s)?ze(e,new r.nh(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):!!P&&ze(e,new r.U3(e.state.doc.resolve(t<0?a:a+s.nodeSize))))}}function je(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Be(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function He(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=!1;for(E&&1==n.nodeType&&r<je(n)&&Be(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(Be(e))o=n,i=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Ue(n))break;{let t=n.previousSibling;for(;t&&Be(t);)o=n.parentNode,i=s(t),t=t.previousSibling;if(t)n=t,r=je(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?We(e,n,r):o&&We(e,o,i)}(e):Ve(e)}function Ve(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=je(n);for(;;)if(r<a){if(1!=n.nodeType)break;if(!Be(n.childNodes[r]))break;o=n,i=++r}else{if(Ue(n))break;{let t=n.nextSibling;for(;t&&Be(t);)o=t.parentNode,i=s(t)+1,t=t.nextSibling;if(t)n=t,r=0,a=je(n);else{if(n=n.parentNode,n==e.dom)break;r=a=0}}}o&&We(e,o,i)}function Ue(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function We(e,t,n){let r=e.domSelection();if(m(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&Oe(e)}),50)}function Ke(e,t){let n=e.state.doc.resolve(t);if(!O&&!R&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function qe(e,t,n){let o=e.state.selection;if(o instanceof r.U3&&!o.empty||n.indexOf("s")>-1)return!1;if(I&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=o;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=_e(e.state,t);if(n&&n instanceof r.nh)return ze(e,n)}if(!i.parent.inlineContent){let n=t<0?i:s,a=o instanceof r.i5?r.LN.near(n,t):r.LN.findFrom(n,t);return!!a&&ze(e,a)}return!1}function Ge(e,t){if(!(e.state.selection instanceof r.U3))return!0;let{$head:n,$anchor:o,empty:i}=e.state.selection;if(!n.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=e.state.tr;return t<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),e.dispatch(r),!0}return!1}function Ye(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Je(e,t){e.someProp("transformCopied",(n=>{t=n(t,e)}));let n=[],{content:r,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,s--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let a=e.someProp("clipboardSerializer")||o.ZF.fromSchema(e.state.schema),l=st(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));let u,d=c.firstChild,p=0;for(;d&&1==d.nodeType&&(u=ot[d.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=l.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),p++}d=c.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",`${i} ${s}${p?` -${p}`:""} ${JSON.stringify(n)}`),{dom:c,text:e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n")}}function Xe(e,t,n,r,i){let s,a,l=i.parent.type.spec.code;if(!n&&!t)return null;let c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",(n=>{t=n(t,l||r,e)})),l)return t?new o.Ji(o.FK.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):o.Ji.empty;let n=e.someProp("clipboardTextParser",(n=>n(t,i,r,e)));if(n)a=n;else{let n=i.marks(),{schema:r}=e.state,a=o.ZF.fromSchema(r);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=s.appendChild(document.createElement("p"));e&&t.appendChild(a.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(t=>{n=t(n,e)})),s=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=st().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);if((n=o&&ot[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join("")),r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),P&&function(e){let t=e.querySelectorAll(O?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(s);let u=s&&s.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let e=+d[3];e>0;e--){let e=s.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;s=e}if(!a){let t=e.someProp("clipboardParser")||e.someProp("domParser")||o.S4.fromSchema(e.state.schema);a=t.parseSlice(s,{preserveWhitespace:!(!c&&!d),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Ze.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(d)a=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:i,openStart:s,openEnd:a}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;i=o.FK.from(t.create(n[e+1],i)),s++,a++}return new o.Ji(i,s,a)}(rt(a,+d[1],+d[2]),d[4]);else if(a=o.Ji.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),s=[];if(e.forEach((e=>{if(!s)return;let t,n=i.findWrapping(e.type);if(!n)return s=null;if(t=s.length&&r.length&&et(n,r,e,s[s.length-1],0))s[s.length-1]=t;else{s.length&&(s[s.length-1]=tt(s[s.length-1],r.length));let t=Qe(e,n);s.push(t),i=i.matchType(t.type),r=n}})),s)return o.FK.from(s)}return e}(a.content,i),!0),a.openStart||a.openEnd){let e=0,t=0;for(let t=a.content.firstChild;e<a.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=a.content.lastChild;t<a.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);a=rt(a,e,t)}return e.someProp("transformPasted",(t=>{a=t(a,e)})),a}const Ze=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Qe(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,o.FK.from(e));return e}function et(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let s=et(e,t,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(o.FK.from(Qe(n,e,i+1))))}}function tt(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,tt(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(o.FK.empty,!0);return e.copy(n.append(r))}function nt(e,t,n,r,i,s){let a=t<0?e.firstChild:e.lastChild,l=a.content;return e.childCount>1&&(s=0),i<r-1&&(l=nt(l,t,n,r,i+1,s)),i>=n&&(l=t<0?a.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(o.FK.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(l))}function rt(e,t,n){return t<e.openStart&&(e=new o.Ji(nt(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new o.Ji(nt(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const ot={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let it=null;function st(){return it||(it=document.implementation.createHTMLDocument("title"))}const at={},lt={},ct={touchstart:!0,touchmove:!0};class ut{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function dt(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function pt(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>ft(e,t))}))}function ft(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function ht(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function mt(e){return{left:e.clientX,top:e.clientY}}function gt(e,t,n,r,o){if(-1==r)return!1;let i=e.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(e.someProp(t,(t=>r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function yt(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function vt(e,t,n,r){return gt(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function bt(e,t,n,o){return gt(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(n=>n(e,t,o)))||function(e,t,n){if(0!=n.button)return!1;let o=e.state.doc;if(-1==t)return!!o.inlineContent&&(yt(e,r.U3.create(o,0,o.content.size),"pointer"),!0);let i=o.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),s=i.before(t);if(n.inlineContent)yt(e,r.U3.create(o,s+1,s+1+n.content.size),"pointer");else{if(!r.nh.isSelectable(n))continue;yt(e,r.nh.create(o,s),"pointer")}return!0}}(e,n,o)}function wt(e){return Ot(e)}lt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!At(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!D||!O||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!T||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||function(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);if(8==n||I&&72==n&&"c"==r)return Ge(e,-1)||He(e,-1);if(46==n||I&&68==n&&"c"==r)return Ge(e,1)||He(e,1);if(13==n||27==n)return!0;if(37==n||I&&66==n&&"c"==r){let t=37==n?"ltr"==Ke(e,e.state.selection.from)?-1:1:-1;return $e(e,t,r)||He(e,t)}if(39==n||I&&70==n&&"c"==r){let t=39==n?"ltr"==Ke(e,e.state.selection.from)?1:-1:1;return $e(e,t,r)||He(e,t)}return 38==n||I&&80==n&&"c"==r?qe(e,-1,r)||He(e,-1):40==n||I&&78==n&&"c"==r?function(e){if(!N||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Ye(e,n,"true"),setTimeout((()=>Ye(e,n,"false")),20)}return!1}(e)||qe(e,1,r)||Ve(e):r==(I?"m":"c")&&(66==n||73==n||89==n||90==n)}(e,n)?n.preventDefault():dt(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},lt.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},lt.keypress=(e,t)=>{let n=t;if(At(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||I&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let o=e.state.selection;if(!(o instanceof r.U3&&o.$from.sameParent(o.$to))){let t=String.fromCharCode(n.charCode);/[\r\n]/.test(t)||e.someProp("handleTextInput",(n=>n(e,o.$from.pos,o.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const kt=I?"metaKey":"ctrlKey";at.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=wt(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[kt]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(mt(n));s&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new xt(e,s,n,!!r)):("doubleClick"==i?vt:bt)(e,s.pos,s.inside,n)?n.preventDefault():dt(e,"pointer"))};class xt{constructor(e,t,n,o){let i,s;if(this.view=e,this.pos=t,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[kt],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,s=n.depth?n.before():0}const a=o?null:n.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||c instanceof r.nh&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!E||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),dt(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Oe(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(mt(e))),this.updateAllowDefault(e),this.allowDefault||!t?dt(this.view,"pointer"):function(e,t,n,o,i){return gt(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(n=>n(e,t,o)))||(i?function(e,t){if(-1==t)return!1;let n,o,i=e.state.selection;i instanceof r.nh&&(n=i.node);let s=e.state.doc.resolve(t);for(let e=s.depth+1;e>0;e--){let t=e>s.depth?s.nodeAfter:s.node(e);if(r.nh.isSelectable(t)){o=n&&i.$from.depth>0&&e>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(e);break}}return null!=o&&(yt(e,r.nh.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.nh.isSelectable(o))&&(yt(e,new r.nh(n),"pointer"),!0)}(e,n))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||N&&this.mightDrag&&!this.mightDrag.node.isAtom||O&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(yt(this.view,r.LN.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):dt(this.view,"pointer")}move(e){this.updateAllowDefault(e),dt(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function At(e,t){return!!e.composing||!!(N&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}at.touchstart=e=>{e.input.lastTouch=Date.now(),wt(e),dt(e,"pointer")},at.touchmove=e=>{e.input.lastTouch=Date.now(),dt(e,"pointer")},at.contextmenu=e=>wt(e);const St=D?5e3:-1;function Et(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>Ot(e)),t))}function Ct(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Ot(e,t=!1){if(!(D&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ct(e),t||e.docView&&e.docView.dirty){let t=Ee(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}lt.compositionstart=lt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),Ot(e,!0),e.markCursor=null;else if(Ot(e),E&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}Et(e,St)},lt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionID++,Et(e,20))};const Mt=A&&S<15||T&&F<604;function Nt(e,t,n,r,i){let s=Xe(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,i,s||o.Ji.empty))))return!0;if(!s)return!1;let a=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(s),l=a?e.state.tr.replaceSelectionWith(a,e.input.shiftKey):e.state.tr.replaceSelection(s);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}at.copy=lt.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let i=Mt?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Je(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},lt.paste=(e,t)=>{let n=t;if(e.composing&&!D)return;let r=Mt?null:n.clipboardData;r&&Nt(e,r.getData("text/plain"),r.getData("text/html"),e.input.shiftKey,n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Nt(e,r.value,null,e.input.shiftKey,t):Nt(e,r.textContent,r.innerHTML,e.input.shiftKey,t)}),50)}(e,n)};class Tt{constructor(e,t){this.slice=e,this.move=t}}const It=I?"altKey":"ctrlKey";at.dragstart=(e,t)=>{let n=t,o=e.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(mt(n));if(s&&s.pos>=i.from&&s.pos<=(i instanceof r.nh?i.to-1:i.to));else if(o&&o.mightDrag)e.dispatch(e.state.tr.setSelection(r.nh.create(e.state.doc,o.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(r.nh.create(e.state.doc,t.posBefore)))}let a=e.state.selection.content(),{dom:l,text:c}=Je(e,a);n.dataTransfer.clearData(),n.dataTransfer.setData(Mt?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Mt||n.dataTransfer.setData("text/plain",c),e.dragging=new Tt(a,!n[It])},at.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},lt.dragover=lt.dragenter=(e,t)=>t.preventDefault(),lt.drop=(e,t)=>{let n=t,s=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let a=e.posAtCoords(mt(n));if(!a)return;let l=e.state.doc.resolve(a.pos),c=s&&s.slice;c?e.someProp("transformPasted",(t=>{c=t(c,e)})):c=Xe(e,n.dataTransfer.getData(Mt?"Text":"text/plain"),Mt?null:n.dataTransfer.getData("text/html"),!1,l);let u=!(!s||n[It]);if(e.someProp("handleDrop",(t=>t(e,n,c||o.Ji.empty,u))))return void n.preventDefault();if(!c)return;n.preventDefault();let d=c?(0,i.Um)(e.state.doc,l.pos,c):l.pos;null==d&&(d=l.pos);let p=e.state.tr;u&&p.deleteSelection();let f=p.mapping.map(d),h=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=p.doc;if(h?p.replaceRangeWith(f,f,c.content.firstChild):p.replaceRange(f,f,c),p.doc.eq(m))return;let g=p.doc.resolve(f);if(h&&r.nh.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))p.setSelection(new r.nh(g));else{let t=p.mapping.map(d);p.mapping.maps[p.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),p.setSelection(Pe(e,g,p.doc.resolve(t)))}e.focus(),e.dispatch(p.setMeta("uiEvent","drop"))},at.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Oe(e)}),20))},at.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},at.beforeinput=(e,t)=>{if(O&&D&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,g(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in lt)at[e]=lt[e];function Rt(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Dt{constructor(e,t){this.toDOM=e,this.spec=t||zt,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:i}=e.mapResult(t.from+r,this.side<0?-1:1);return i?null:new Lt(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Dt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Rt(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Pt{constructor(e,t){this.attrs=e,this.spec=t||zt}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Lt(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Pt&&Rt(this.attrs,e.attrs)&&Rt(this.spec,e.spec)}static is(e){return e.type instanceof Pt}destroy(){}}class Ft{constructor(e,t){this.attrs=e,this.spec=t||zt}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Lt(o.pos-n,i.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof Ft&&Rt(this.attrs,e.attrs)&&Rt(this.spec,e.spec)}destroy(){}}class Lt{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Lt(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Lt(e,e,new Dt(t,n))}static inline(e,t,n,r){return new Lt(e,t,new Pt(n,r))}static node(e,t,n,r){return new Lt(e,t,new Ft(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pt}}const _t=[],zt={};class $t{constructor(e,t){this.local=e.length?e:_t,this.children=t.length?t:_t}static create(e,t){return t.length?Wt(t,e,0,zt):jt}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let s=this.children[i]+1;this.children[i+2].findInner(e-s,t-s,n,r+s,o)}}map(e,t,n){return this==jt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||zt)}mapInner(e,t,n,r,o){let i;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,s){let a=e.slice();for(let e=0,t=i;e<n.maps.length;e++){let r=0;n.maps[e].forEach(((e,n,i,s)=>{let l=s-i-(n-e);for(let s=0;s<a.length;s+=3){let c=a[s+1];if(c<0||e>c+t-r)continue;let u=a[s]+t-r;n>=u?a[s+1]=e<=u?-2:-1:i>=o&&l&&(a[s]+=l,a[s+1]+=l)}r+=l})),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){l=!0,a[t+1]=-1;continue}let c=n.map(e[t]+i),u=c-o;if(u<0||u>=r.content.size){l=!0;continue}let d=n.map(e[t+1]+i,-1)-o,{index:p,offset:f}=r.content.findIndex(u),h=r.maybeChild(p);if(h&&f==u&&f+h.nodeSize==d){let r=a[t+2].mapInner(n,h,c+1,e[t]+i+1,s);r!=jt?(a[t]=u,a[t+1]=d,a[t+2]=r):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=function(e,t,n,r,o,i,s){function a(e,t){for(let i=0;i<e.local.length;i++){let a=e.local[i].map(r,o,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[i].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+i+1);return n}(a,e,t,n,o,i,s),c=Wt(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new $t(t.sort(Kt),a)}(this.children,i||[],e,t,n,r,o):i?new $t(i.sort(Kt),_t):jt}add(e,t){return t.length?this==jt?$t.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,i)=>{let s,a=i+n;if(s=Vt(t,e,a)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(e,s,a+1):r.splice(o,0,i,i+e.nodeSize,Wt(s,e,a+1,zt)),o+=3}}));let i=Ht(o?Ut(t):t,-n);for(let t=0;t<i.length;t++)i[t].type.valid(e,i[t])||i.splice(t--,1);return new $t(i.length?this.local.concat(i).sort(Kt):this.local,r||this.children)}remove(e){return 0==e.length||this==jt?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o,i=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>i&&t.to<s&&(e[n]=null,(o||(o=[])).push(t));if(!o)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(o,i+1);a!=jt?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,o=0;o<e.length;o++)if(n=e[o])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new $t(r,n):jt}forChild(e,t){if(this==jt)return this;if(t.isLeaf)return $t.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let o=e+1,i=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<i&&t.to>o&&t.type instanceof Pt){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new $t(r.sort(Kt),_t);return n?new Bt([e,n]):e}return n||jt}eq(e){if(this==e)return!0;if(!(e instanceof $t)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return qt(this.localsInner(e))}localsInner(e){if(this==jt)return _t;if(e.inlineContent||!this.local.some(Pt.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Pt||t.push(this.local[e]);return t}}$t.empty=new $t([],[]),$t.removeOverlap=qt;const jt=$t.empty;class Bt{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,zt)));return Bt.from(n)}forChild(e,t){if(t.isLeaf)return $t.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=jt&&(o instanceof Bt?n=n.concat(o.members):n.push(o))}return Bt.from(n)}eq(e){if(!(e instanceof Bt)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?qt(n?t:t.sort(Kt)):_t}static from(e){switch(e.length){case 0:return jt;case 1:return e[0];default:return new Bt(e.every((e=>e instanceof $t))?e:e.reduce(((e,t)=>e.concat(t instanceof $t?t:t.members)),[]))}}}function Ht(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new Lt(o.from+t,o.to+t,o.type))}return n}function Vt(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let t,i=0;i<e.length;i++)(t=e[i])&&t.from>n&&t.to<r&&((o||(o=[])).push(t),e[i]=null);return o}function Ut(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Wt(e,t,n,r){let o=[],i=!1;t.forEach(((t,s)=>{let a=Vt(e,t,s+n);if(a){i=!0;let e=Wt(a,t,n+s+1,r);e!=jt&&o.push(s,s+t.nodeSize,e)}}));let s=Ht(i?Ut(e):e,-n).sort(Kt);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||o.length?new $t(s,o):jt}function Kt(e,t){return e.from-t.from||e.to-t.to}function qt(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Gt(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Gt(t,o+1,i.copy(r.to,i.to)))}}return t}function Gt(e,t,n){for(;t<e.length&&Kt(n,e[t])>0;)t++;e.splice(t,0,n)}function Yt(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=jt&&t.push(r)})),e.cursorWrapper&&t.push($t.create(e.state.doc,[e.cursorWrapper.deco])),Bt.from(t)}const Jt={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Xt=A&&S<=11;class Zt{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Qt{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Zt,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);A&&S<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Xt&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Jt)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Fe(this.view)){if(this.suppressingSelectionUpdates)return Oe(this.view);if(A&&S<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&u(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let t=e.focusNode;t;t=a(t))n.add(t);for(let r=e.anchorNode;r;r=a(r))if(n.has(r)){t=r;break}let r=t&&this.view.docView.nearestDesc(t);return r&&r.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let n=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Fe(e)&&!this.ignoreSelectionChange(n),i=-1,s=-1,a=!1,l=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],l);n&&(i=i<0?n.from:Math.min(n.from,i),s=s<0?n.to:Math.max(n.to,s),n.typeOver&&(a=!0))}if(E&&l.length>1){let e=l.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let c=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&m(n)&&(c=Ee(e))&&c.eq(r.LN.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Oe(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),function(e){if(!en.has(e)&&(en.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))){if(e.requiresGeckoHackNode=E,tn)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),tn=!0}}(e)),this.handleDOMChange(i,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Oe(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(A&&S<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:i}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(e.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==e.target?s(r)+1:0,a=n.localPosFromDOM(e.target,i,-1),l=o&&o.parentNode==e.target?s(o):e.target.childNodes.length;return{from:a,to:n.localPosFromDOM(e.target,l,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let en=new WeakMap,tn=!1;function nn(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(N&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||N&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const rn=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function on(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Pe(e,t.resolve(n.anchor),t.resolve(n.head))}function sn(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}class an{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ut,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(pn),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=un(this),cn(this),this.nodeViews=dn(this),this.docView=ce(this.state.doc,ln(this),Yt(this),this.dom,this),this.domObserver=new Qt(this,((e,t,n,i)=>function(e,t,n,i,s){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Ee(e,t);if(n&&!e.state.selection.eq(n)){if(O&&D&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))))return;let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.composing&&r.setMeta("composition",e.input.compositionID),e.dispatch(r)}return}let a=e.state.doc.resolve(t),l=a.sharedDepth(n);t=a.before(l+1),n=e.state.doc.resolve(n).after(l+1);let c,u,d=e.state.selection,p=function(e,t,n){let r,{node:i,fromOffset:s,toOffset:a,from:l,to:c}=e.docView.parseRange(t,n),u=e.domSelectionRange(),d=u.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:u.anchorOffset}],m(u)||r.push({node:u.focusNode,offset:u.focusOffset})),O&&8===e.input.lastKeyCode)for(let e=a;e>s;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){a=e;break}if(!n||n.size)break}let p=e.state.doc,f=e.someProp("domParser")||o.S4.fromSchema(e.state.schema),h=p.resolve(l),g=null,y=f.parse(i,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:s,to:a,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:nn,context:h});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),g={anchor:e+l,head:t+l}}return{doc:y,sel:g,from:l,to:c}}(e,t,n),f=e.state.doc,h=f.slice(p.from,p.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(c=e.state.selection.to,u="end"):(c=e.state.selection.from,u="start"),e.input.lastKeyCode=null;let y=function(e,t,n,r,o){let i=e.findDiffStart(t,n);if(null==i)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);return"end"==o&&(r-=s+Math.max(0,i-Math.min(s,a))-i),s<i&&e.size<t.size?(i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i):a<i&&(i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i),{start:i,endA:s,endB:a}}(h.content,p.doc.content,p.from,c,u);if((T&&e.input.lastIOSEnter>Date.now()-225||D)&&s.some((e=>1==e.nodeType&&!rn.test(e.nodeName)))&&(!y||y.endA>=y.endB)&&e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!y){if(!(i&&d instanceof r.U3&&!d.empty&&d.$head.sameParent(d.$anchor))||e.composing||p.sel&&p.sel.anchor!=p.sel.head){if(p.sel){let t=on(e,e.state.doc,p.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);e.composing&&n.setMeta("composition",e.input.compositionID),e.dispatch(n)}}return}y={start:d.from,endA:d.to,endB:d.to}}if(O&&e.cursorWrapper&&p.sel&&p.sel.anchor==e.cursorWrapper.deco.from&&p.sel.head==p.sel.anchor){let e=y.endB-y.start;p.sel={anchor:p.sel.anchor+e,head:p.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&y.start==y.endB&&e.state.selection instanceof r.U3&&(y.start>e.state.selection.from&&y.start<=e.state.selection.from+2&&e.state.selection.from>=p.from?y.start=e.state.selection.from:y.endA<e.state.selection.to&&y.endA>=e.state.selection.to-2&&e.state.selection.to<=p.to&&(y.endB+=e.state.selection.to-y.endA,y.endA=e.state.selection.to)),A&&S<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>p.from&&" "==p.doc.textBetween(y.start-p.from-1,y.start-p.from+1)&&(y.start--,y.endA--,y.endB--);let v,b=p.doc.resolveNoCache(y.start-p.from),w=p.doc.resolveNoCache(y.endB-p.from),k=f.resolve(y.start),x=b.sameParent(w)&&b.parent.inlineContent&&k.end()>=y.endA;if((T&&e.input.lastIOSEnter>Date.now()-225&&(!x||s.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!x&&b.pos<p.doc.content.size&&(v=r.LN.findFrom(p.doc.resolve(b.pos+1),1,!0))&&v.head==w.pos)&&e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>y.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||sn(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=e.resolve(sn(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||sn(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(f,y.start,y.endA,b,w)&&e.someProp("handleKeyDown",(t=>t(e,g(8,"Backspace")))))return void(D&&O&&e.domObserver.suppressSelectionUpdates());O&&D&&y.endB==y.start&&(e.input.lastAndroidDelete=Date.now()),D&&!x&&b.start()!=w.start()&&0==w.parentOffset&&b.depth==w.depth&&p.sel&&p.sel.anchor==p.sel.head&&p.sel.head==y.endA&&(y.endB-=2,w=p.doc.resolveNoCache(y.endB-p.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,g(13,"Enter"))}))}),20));let E,C,M,N=y.start,I=y.endA;if(x)if(b.pos==w.pos)A&&S<=11&&0==b.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Oe(e)),20)),E=e.state.tr.delete(N,I),C=f.resolve(y.start).marksAcross(f.resolve(y.endA));else if(y.endA==y.endB&&(M=function(e,t){let n,r,i,s=e.firstChild.marks,a=t.firstChild.marks,l=s,c=a;for(let e=0;e<a.length;e++)l=a[e].removeFromSet(l);for(let e=0;e<s.length;e++)c=s[e].removeFromSet(c);if(1==l.length&&0==c.length)r=l[0],n="add",i=e=>e.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",i=e=>e.mark(r.removeFromSet(e.marks))}let u=[];for(let e=0;e<t.childCount;e++)u.push(i(t.child(e)));if(o.FK.from(u).eq(e))return{mark:r,type:n}}(b.parent.content.cut(b.parentOffset,w.parentOffset),k.parent.content.cut(k.parentOffset,y.endA-k.start()))))E=e.state.tr,"add"==M.type?E.addMark(N,I,M.mark):E.removeMark(N,I,M.mark);else if(b.parent.child(b.index()).isText&&b.index()==w.index()-(w.textOffset?0:1)){let t=b.parent.textBetween(b.parentOffset,w.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,N,I,t))))return;E=e.state.tr.insertText(t,N,I)}if(E||(E=e.state.tr.replace(N,I,p.doc.slice(y.start-p.from,y.endB-p.from))),p.sel){let t=on(e,E.doc,p.sel);t&&!(O&&D&&e.composing&&t.empty&&(y.start!=y.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==N||t.head==E.mapping.map(I)-1)||A&&t.empty&&t.head==N)&&E.setSelection(t)}C&&E.ensureMarks(C),e.composing&&E.setMeta("composition",e.input.compositionID),e.dispatch(E.scrollIntoView())}(this,e,t,n,i))),this.domObserver.start(),function(e){for(let t in at){let n=at[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!ht(e,t)||ft(e,t)||!e.editable&&t.type in lt||n(e,t)},ct[t]?{passive:!0}:void 0)}N&&e.dom.addEventListener("input",(()=>null)),pt(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&pt(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(pn),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,o=!1;e.storedMarks&&this.composing&&(Ct(this),o=!0),this.state=e;let i=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(i||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=dn(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(i||t.handleDOMEvents!=this._props.handleDOMEvents)&&pt(this),this.editable=un(this),cn(this);let s=Yt(this),a=ln(this),l=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(e.doc,a,s);!c&&e.selection.eq(n.selection)||(o=!0);let d="preserve"==l&&o&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(i,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=o-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:j(e.dom)}}(this);if(o){this.domObserver.stop();let t=c&&(A||O)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(c){let n=O?this.trackWrites=this.domSelectionRange().focusNode:null;!r&&this.docView.update(e.doc,a,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ce(e.doc,a,s,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return u(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Oe(this,t):(Re(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():d&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;B(n,0==r?0:r-t)}(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof r.nh){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&$(this,t.getBoundingClientRect(),e)}else $(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let o=this.directPlugins[r].props[e];if(null!=o&&(n=t?t(o):o))return n}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let i=o[r].props[e];if(null!=i&&(n=t?t(i):i))return n}}hasFocus(){if(A){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(H)return e.focus(H);let t=j(e);e.focus(null==H?{get preventScroll(){return H={preventScroll:!0},!0}}:void 0),H||(H=!1,B(t,0))}(this.dom),Oe(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}posAtCoords(e){return K(this,e)}coordsAtPos(e,t=1){return J(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){return te==t&&ne==n?re:(te=t,ne=n,re="up"==n||"down"==n?function(e,t,n){let r=t.selection,o="up"==n?r.$from:r.$to;return Q(e,t,(()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=J(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=c(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return ee.test(r.parent.textContent)&&a.modify?Q(e,t,(()=>{let{focusNode:t,focusOffset:o,anchorNode:i,anchorOffset:s}=e.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),p=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&o==d;try{a.collapse(i,s),t&&(t!=i||o!=s)&&a.extend&&a.extend(t,o)}catch(e){}return null!=l&&(a.caretBidiLevel=l),p})):"left"==n||"backward"==n?i:s}(e,t,n))}(this,t||this.state,e)}pasteHTML(e,t){return Nt(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Nt(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Yt(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){ft(e,t)||!at[t.type]||!e.editable&&t.type in lt||at[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return N&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom?function(e){let t;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}e.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",n,!0);let r=t.startContainer,o=t.startOffset,i=t.endContainer,s=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return u(a.node,a.offset,i,s)&&([r,o,i,s]=[i,s,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function ln(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),t.translate||(t.translate="no"),[Lt.node(0,e.state.doc.content.size,t)]}function cn(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Lt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function un(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function dn(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function pn(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}},3705:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6284),o=n(4430),i=n(7985);function s(e){return function(e){if(Array.isArray(e))return(0,r.A)(e)}(e)||(0,o.A)(e)||(0,i.A)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},3790:(e,t,n)=>{"use strict";e.exports=n(4898)},3795:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,h:()=>p});var r=n(7545),o=n(9740),i=n(3705),s=n(7756),a=n(231);function l(e,t,n,r){if(!t.length)return n;var a,c=(0,s.A)(t),u=c[0],d=c.slice(1);return a=e||"number"!=typeof u?Array.isArray(e)?(0,i.A)(e):(0,o.A)({},e):[],r&&void 0===n&&1===d.length?delete a[u][d[0]]:a[u]=l(a[u],d,n,r),a}function c(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!(0,a.A)(e,t.slice(0,-1))?e:l(e,t,n,r)}function u(e){return Array.isArray(e)?[]:{}}var d="undefined"==typeof Reflect?Object.keys:Reflect.ownKeys;function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=u(t[0]);return t.forEach((function(e){!function t(n,s){var l,p=new Set(s),f=(0,a.A)(e,n),h=Array.isArray(f);if(h||(l=f,"object"===(0,r.A)(l)&&null!==l&&Object.getPrototypeOf(l)===Object.prototype)){if(!p.has(f)){p.add(f);var m=(0,a.A)(o,n);h?o=c(o,n,[]):m&&"object"===(0,r.A)(m)||(o=c(o,n,u(f))),d(f).forEach((function(e){t([].concat((0,i.A)(n),[e]),p)}))}}else o=c(o,n,f)}([])})),o}},4001:(e,t,n)=>{"use strict";n.d(t,{hG:()=>a,pb:()=>s,y5:()=>i});var r=n(8769);const o=(0,r.createContext)({}),i=()=>{const e=function(){const{dom:e,editor:t,setLoading:n,editorFactory:i}=(0,r.useContext)(o),s=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const r=s.current;if(!i||!r)return;e.current=r;const o=i(r);return o?(n(!0),o.create().then((e=>{t.current=e})).finally((()=>{n(!1)})).catch(console.error),()=>{var e;null==(e=t.current)||e.destroy()}):void 0}),[e,t,i,n]),s}();return r.createElement("div",{"data-milkdown-root":!0,ref:e})},s=({children:e})=>{const t=(0,r.useRef)(void 0),[n,i]=(0,r.useState)(void 0),s=(0,r.useRef)(),[a,l]=(0,r.useState)(!0),c=(0,r.useMemo)((()=>({loading:a,dom:t,editor:s,setLoading:l,editorFactory:n,setEditorFactory:i})),[a,n]);return r.createElement(o.Provider,{value:c},e)};function a(e,t=[]){const n=(0,r.useContext)(o),i=(0,r.useCallback)(e,t);return(0,r.useLayoutEffect)((()=>{n.setEditorFactory((()=>i))}),[n,i]),{loading:n.loading,get:()=>n.editor.current}}},4223:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(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}n.d(t,{A:()=>r})},4229:(e,t,n)=>{"use strict";n.d(t,{A:()=>_n});var r=n(8769),o=n.n(r),i=n(3373),s=n.n(i);function a(e){var t=e.children,n=e.prefixCls,o=e.id,i=e.overlayInnerStyle,a=e.bodyClassName,l=e.className,c=e.style;return r.createElement("div",{className:s()("".concat(n,"-content"),l),style:c},r.createElement("div",{className:s()("".concat(n,"-inner"),a),id:o,role:"tooltip",style:i},"function"==typeof t?t():t))}var l=n(9575),c=n(9740),u=n(4223),d=n(689),p=n(9435),f=n(7169),h=n(4445),m=n(9284);const g=r.createContext(null);var y=n(3705),v=n(4238),b=[],w=n(9055);var k="rc-util-locker-".concat(Date.now()),x=0;function A(e){var t=!!e,n=r.useState((function(){return x+=1,"".concat(k,"_").concat(x)})),o=(0,d.A)(n,1)[0];(0,v.A)((function(){if(t){var e=(r=document.body,"undefined"!=typeof document&&r&&r instanceof Element?function(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r,o,i=n.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var s=getComputedStyle(e);i.scrollbarColor=s.scrollbarColor,i.scrollbarWidth=s.scrollbarWidth;var a=getComputedStyle(e,"::-webkit-scrollbar"),l=parseInt(a.width,10),c=parseInt(a.height,10);try{var u=l?"width: ".concat(a.width,";"):"",d=c?"height: ".concat(a.height,";"):"";(0,w.BD)("\n#".concat(t,"::-webkit-scrollbar {\n").concat(u,"\n").concat(d,"\n}"),t)}catch(e){console.error(e),r=l,o=c}}document.body.appendChild(n);var p=e&&r&&!isNaN(r)?r:n.offsetWidth-n.clientWidth,f=e&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),(0,w.m6)(t),{width:p,height:f}}(r):{width:0,height:0}).width,n=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;(0,w.BD)("\nhtml body {\n overflow-y: hidden;\n ".concat(n?"width: calc(100% - ".concat(e,"px);"):"","\n}"),o)}else(0,w.m6)(o);var r;return function(){(0,w.m6)(o)}}),[t,o])}var S=!1,E=function(e){return!1!==e&&((0,f.A)()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)};const C=r.forwardRef((function(e,t){var n=e.open,o=e.autoLock,i=e.getContainer,s=(e.debug,e.autoDestroy),a=void 0===s||s,l=e.children,c=r.useState(n),u=(0,d.A)(c,2),h=u[0],w=u[1],k=h||n;r.useEffect((function(){(a||n)&&w(n)}),[n,a]);var x=r.useState((function(){return E(i)})),C=(0,d.A)(x,2),O=C[0],M=C[1];r.useEffect((function(){var e=E(i);M(null!=e?e:null)}));var N=function(e){var t=r.useState((function(){return(0,f.A)()?document.createElement("div"):null})),n=(0,d.A)(t,1)[0],o=r.useRef(!1),i=r.useContext(g),s=r.useState(b),a=(0,d.A)(s,2),l=a[0],c=a[1],u=i||(o.current?void 0:function(e){c((function(t){return[e].concat((0,y.A)(t))}))});function p(){n.parentElement||document.body.appendChild(n),o.current=!0}function h(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),o.current=!1}return(0,v.A)((function(){return e?i?i(p):p():h(),h}),[e]),(0,v.A)((function(){l.length&&(l.forEach((function(e){return e()})),c(b))}),[l]),[n,u]}(k&&!O),T=(0,d.A)(N,2),I=T[0],R=T[1],D=null!=O?O:I;A(o&&n&&(0,f.A)()&&(D===I||D===document.body));var P=null;l&&(0,m.f3)(l)&&t&&(P=l.ref);var F=(0,m.xK)(P,t);if(!k||!(0,f.A)()||void 0===O)return null;var L=!1===D||S,_=l;return t&&(_=r.cloneElement(l,{ref:F})),r.createElement(g.Provider,{value:R},L?_:(0,p.createPortal)(_,D))}));var O=n(785);function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return o().Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(M(e)):(0,O.A)(e)&&e.props?n=n.concat(M(e.props.children,t)):n.push(e))})),n}var N=n(7545),T=n(8299),I=r.createContext(null),R=n(9126),D=new Map,P=new R.A((function(e){e.forEach((function(e){var t,n=e.target;null===(t=D.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))})),F=n(5152),L=n(414),_=n(9296),z=n(857),$=function(e){(0,_.A)(n,e);var t=(0,z.A)(n);function n(){return(0,F.A)(this,n),t.apply(this,arguments)}return(0,L.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);function j(e,t){var n=e.children,o=e.disabled,i=r.useRef(null),s=r.useRef(null),a=r.useContext(I),l="function"==typeof n,u=l?n(i):n,d=r.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),p=!l&&r.isValidElement(u)&&(0,m.f3)(u),f=p?(0,m.A9)(u):null,h=(0,m.xK)(f,i),g=function(){var e;return(0,T.Ay)(i.current)||(i.current&&"object"===(0,N.A)(i.current)?(0,T.Ay)(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||(0,T.Ay)(s.current)};r.useImperativeHandle(t,(function(){return g()}));var y=r.useRef(e);y.current=e;var v=r.useCallback((function(e){var t=y.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),i=o.width,s=o.height,l=e.offsetWidth,u=e.offsetHeight,p=Math.floor(i),f=Math.floor(s);if(d.current.width!==p||d.current.height!==f||d.current.offsetWidth!==l||d.current.offsetHeight!==u){var h={width:p,height:f,offsetWidth:l,offsetHeight:u};d.current=h;var m=l===Math.round(i)?i:l,g=u===Math.round(s)?s:u,v=(0,c.A)((0,c.A)({},h),{},{offsetWidth:m,offsetHeight:g});null==a||a(v,e,r),n&&Promise.resolve().then((function(){n(v,e)}))}}),[]);return r.useEffect((function(){var e,t,n=g();return n&&!o&&(e=n,t=v,D.has(e)||(D.set(e,new Set),P.observe(e)),D.get(e).add(t)),function(){return function(e,t){D.has(e)&&(D.get(e).delete(t),D.get(e).size||(P.unobserve(e),D.delete(e)))}(n,v)}}),[i.current,o]),r.createElement($,{ref:s},p?r.cloneElement(u,{ref:h}):u)}const B=r.forwardRef(j);function H(e,t){var n=e.children;return("function"==typeof n?[n]:M(n)).map((function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return r.createElement(B,(0,l.A)({},e,{key:i,ref:0===o?t:void 0}),n)}))}var V=r.forwardRef(H);V.Collection=function(e){var t=e.children,n=e.onBatchResize,o=r.useRef(0),i=r.useRef([]),s=r.useContext(I),a=r.useCallback((function(e,t,r){o.current+=1;var a=o.current;i.current.push({size:e,element:t,data:r}),Promise.resolve().then((function(){a===o.current&&(null==n||n(i.current),i.current=[])})),null==s||s(e,t,r)}),[n,s]);return r.createElement(I.Provider,{value:a},t)};const U=V;var W=n(9116),K=n(9449),q=0,G=(0,c.A)({},r).useId;const Y=G?function(e){var t=G();return e||t}:function(e){var t=r.useState("ssr-id"),n=(0,d.A)(t,2),o=n[0],i=n[1];return r.useEffect((function(){var e=q;q+=1,i("rc_unique_".concat(e))}),[]),e||o};var J=n(1382);function X(e){var t=e.prefixCls,n=e.align,o=e.arrow,i=e.arrowPos,a=o||{},l=a.className,c=a.content,u=i.x,d=void 0===u?0:u,p=i.y,f=void 0===p?0:p,h=r.useRef();if(!n||!n.points)return null;var m={position:"absolute"};if(!1!==n.autoArrow){var g=n.points[0],y=n.points[1],v=g[0],b=g[1],w=y[0],k=y[1];v!==w&&["t","b"].includes(v)?"t"===v?m.top=0:m.bottom=0:m.top=f,b!==k&&["l","r"].includes(b)?"l"===b?m.left=0:m.right=0:m.left=d}return r.createElement("div",{ref:h,className:s()("".concat(t,"-arrow"),l),style:m},c)}function Z(e){var t=e.prefixCls,n=e.open,o=e.zIndex,i=e.mask,a=e.motion;return i?r.createElement(J.Ay,(0,l.A)({},a,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return r.createElement("div",{style:{zIndex:o},className:s()("".concat(t,"-mask"),n)})})):null}const Q=r.memo((function(e){return e.children}),(function(e,t){return t.cache}));var ee=r.forwardRef((function(e,t){var n=e.popup,o=e.className,i=e.prefixCls,a=e.style,u=e.target,p=e.onVisibleChanged,f=e.open,h=e.keepDom,g=e.fresh,y=e.onClick,b=e.mask,w=e.arrow,k=e.arrowPos,x=e.align,A=e.motion,S=e.maskMotion,E=e.forceRender,C=e.getPopupContainer,O=e.autoDestroy,M=e.portal,N=e.zIndex,T=e.onMouseEnter,I=e.onMouseLeave,R=e.onPointerEnter,D=e.onPointerDownCapture,P=e.ready,F=e.offsetX,L=e.offsetY,_=e.offsetR,z=e.offsetB,$=e.onAlign,j=e.onPrepare,B=e.stretch,H=e.targetWidth,V=e.targetHeight,W="function"==typeof n?n():n,K=f||h,q=(null==C?void 0:C.length)>0,G=r.useState(!C||!q),Y=(0,d.A)(G,2),ee=Y[0],te=Y[1];if((0,v.A)((function(){!ee&&q&&u&&te(!0)}),[ee,q,u]),!ee)return null;var ne="auto",re={left:"-1000vw",top:"-1000vh",right:ne,bottom:ne};if(P||!f){var oe,ie=x.points,se=x.dynamicInset||(null===(oe=x._experimental)||void 0===oe?void 0:oe.dynamicInset),ae=se&&"r"===ie[0][1],le=se&&"b"===ie[0][0];ae?(re.right=_,re.left=ne):(re.left=F,re.right=ne),le?(re.bottom=z,re.top=ne):(re.top=L,re.bottom=ne)}var ce={};return B&&(B.includes("height")&&V?ce.height=V:B.includes("minHeight")&&V&&(ce.minHeight=V),B.includes("width")&&H?ce.width=H:B.includes("minWidth")&&H&&(ce.minWidth=H)),f||(ce.pointerEvents="none"),r.createElement(M,{open:E||K,getContainer:C&&function(){return C(u)},autoDestroy:O},r.createElement(Z,{prefixCls:i,open:f,zIndex:N,mask:b,motion:S}),r.createElement(U,{onResize:$,disabled:!f},(function(e){return r.createElement(J.Ay,(0,l.A)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:"".concat(i,"-hidden")},A,{onAppearPrepare:j,onEnterPrepare:j,visible:f,onVisibleChanged:function(e){var t;null==A||null===(t=A.onVisibleChanged)||void 0===t||t.call(A,e),p(e)}}),(function(n,l){var u=n.className,d=n.style,p=s()(i,u,o);return r.createElement("div",{ref:(0,m.K4)(e,t,l),className:p,style:(0,c.A)((0,c.A)((0,c.A)((0,c.A)({"--arrow-x":"".concat(k.x||0,"px"),"--arrow-y":"".concat(k.y||0,"px")},re),ce),d),{},{boxSizing:"border-box",zIndex:N},a),onMouseEnter:T,onMouseLeave:I,onPointerEnter:R,onClick:y,onPointerDownCapture:D},w&&r.createElement(X,{prefixCls:i,arrow:w,arrowPos:k,align:x}),r.createElement(Q,{cache:!f&&!g},W))}))})))}));const te=ee,ne=r.forwardRef((function(e,t){var n=e.children,o=e.getTriggerDOMNode,i=(0,m.f3)(n),s=r.useCallback((function(e){(0,m.Xf)(t,o?o(e):e)}),[o]),a=(0,m.xK)(s,(0,m.A9)(n));return i?r.cloneElement(n,{ref:a}):n})),re=r.createContext(null);function oe(e){return e?Array.isArray(e)?e:[e]:[]}function ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function se(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function ae(e){return e.ownerDocument.defaultView}function le(e){for(var t=[],n=null==e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=ae(n).getComputedStyle(n);[o.overflowX,o.overflowY,o.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function ue(e){return ce(parseFloat(e),0)}function de(e,t){var n=(0,c.A)({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=ae(e).getComputedStyle(e),r=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,s=t.borderBottomWidth,a=t.borderLeftWidth,l=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,p=e.offsetWidth,f=e.clientWidth,h=ue(i),m=ue(s),g=ue(a),y=ue(l),v=ce(Math.round(c.width/p*1e3)/1e3),b=ce(Math.round(c.height/u*1e3)/1e3),w=(p-f-g-y)*v,k=(u-d-h-m)*b,x=h*b,A=m*b,S=g*v,E=y*v,C=0,O=0;if("clip"===r){var M=ue(o);C=M*v,O=M*b}var N=c.x+S-C,T=c.y+x-O,I=N+c.width+2*C-S-E-w,R=T+c.height+2*O-x-A-k;n.left=Math.max(n.left,N),n.top=Math.max(n.top,T),n.right=Math.min(n.right,I),n.bottom=Math.min(n.bottom,R)}})),n}function pe(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function fe(e,t){var n=t||[],r=(0,d.A)(n,2),o=r[0],i=r[1];return[pe(e.width,o),pe(e.height,i)]}function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function me(e,t){var n,r=t[0],o=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:n}}function ge(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}var ye=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];const ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=r.forwardRef((function(t,n){var o=t.prefixCls,i=void 0===o?"rc-trigger-popup":o,a=t.children,l=t.action,p=void 0===l?"hover":l,f=t.showAction,h=t.hideAction,m=t.popupVisible,g=t.defaultPopupVisible,b=t.onPopupVisibleChange,w=t.afterPopupVisibleChange,k=t.mouseEnterDelay,x=t.mouseLeaveDelay,A=void 0===x?.1:x,S=t.focusDelay,E=t.blurDelay,C=t.mask,O=t.maskClosable,M=void 0===O||O,N=t.getPopupContainer,I=t.forceRender,R=t.autoDestroy,D=t.destroyPopupOnHide,P=t.popup,F=t.popupClassName,L=t.popupStyle,_=t.popupPlacement,z=t.builtinPlacements,$=void 0===z?{}:z,j=t.popupAlign,B=t.zIndex,H=t.stretch,V=t.getPopupClassNameFromAlign,q=t.fresh,G=t.alignPoint,J=t.onPopupClick,X=t.onPopupAlign,Z=t.arrow,Q=t.popupMotion,ee=t.maskMotion,ue=t.popupTransitionName,pe=t.popupAnimation,ve=t.maskTransitionName,be=t.maskAnimation,we=t.className,ke=t.getTriggerDOMNode,xe=(0,u.A)(t,ye),Ae=R||D||!1,Se=r.useState(!1),Ee=(0,d.A)(Se,2),Ce=Ee[0],Oe=Ee[1];(0,v.A)((function(){Oe(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}())}),[]);var Me=r.useRef({}),Ne=r.useContext(re),Te=r.useMemo((function(){return{registerSubPopup:function(e,t){Me.current[e]=t,null==Ne||Ne.registerSubPopup(e,t)}}}),[Ne]),Ie=Y(),Re=r.useState(null),De=(0,d.A)(Re,2),Pe=De[0],Fe=De[1],Le=r.useRef(null),_e=(0,K.A)((function(e){Le.current=e,(0,T.fk)(e)&&Pe!==e&&Fe(e),null==Ne||Ne.registerSubPopup(Ie,e)})),ze=r.useState(null),$e=(0,d.A)(ze,2),je=$e[0],Be=$e[1],He=r.useRef(null),Ve=(0,K.A)((function(e){(0,T.fk)(e)&&je!==e&&(Be(e),He.current=e)})),Ue=r.Children.only(a),We=(null==Ue?void 0:Ue.props)||{},Ke={},qe=(0,K.A)((function(e){var t,n,r=je;return(null==r?void 0:r.contains(e))||(null===(t=(0,W.j)(r))||void 0===t?void 0:t.host)===e||e===r||(null==Pe?void 0:Pe.contains(e))||(null===(n=(0,W.j)(Pe))||void 0===n?void 0:n.host)===e||e===Pe||Object.values(Me.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),Ge=se(i,Q,pe,ue),Ye=se(i,ee,be,ve),Je=r.useState(g||!1),Xe=(0,d.A)(Je,2),Ze=Xe[0],Qe=Xe[1],et=null!=m?m:Ze,tt=(0,K.A)((function(e){void 0===m&&Qe(e)}));(0,v.A)((function(){Qe(m||!1)}),[m]);var nt=r.useRef(et);nt.current=et;var rt=r.useRef([]);rt.current=[];var ot=(0,K.A)((function(e){var t;tt(e),(null!==(t=rt.current[rt.current.length-1])&&void 0!==t?t:et)!==e&&(rt.current.push(e),null==b||b(e))})),it=r.useRef(),st=function(){clearTimeout(it.current)},at=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;st(),0===t?ot(e):it.current=setTimeout((function(){ot(e)}),1e3*t)};r.useEffect((function(){return st}),[]);var lt=r.useState(!1),ct=(0,d.A)(lt,2),ut=ct[0],dt=ct[1];(0,v.A)((function(e){e&&!et||dt(!0)}),[et]);var pt=r.useState(null),ft=(0,d.A)(pt,2),ht=ft[0],mt=ft[1],gt=r.useState(null),yt=(0,d.A)(gt,2),vt=yt[0],bt=yt[1],wt=function(e){bt([e.clientX,e.clientY])},kt=function(e,t,n,o,i,s,a){var l=r.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[o]||{}}),u=(0,d.A)(l,2),p=u[0],f=u[1],h=r.useRef(0),m=r.useMemo((function(){return t?le(t):[]}),[t]),g=r.useRef({});e||(g.current={});var y=(0,K.A)((function(){if(t&&n&&e){var r,l,u,p,h,y=t,v=y.ownerDocument,b=ae(y).getComputedStyle(y),w=b.width,k=b.height,x=b.position,A=y.style.left,S=y.style.top,E=y.style.right,C=y.style.bottom,O=y.style.overflow,M=(0,c.A)((0,c.A)({},i[o]),s),N=v.createElement("div");if(null===(r=y.parentElement)||void 0===r||r.appendChild(N),N.style.left="".concat(y.offsetLeft,"px"),N.style.top="".concat(y.offsetTop,"px"),N.style.position=x,N.style.height="".concat(y.offsetHeight,"px"),N.style.width="".concat(y.offsetWidth,"px"),y.style.left="0",y.style.top="0",y.style.right="auto",y.style.bottom="auto",y.style.overflow="hidden",Array.isArray(n))h={x:n[0],y:n[1],width:0,height:0};else{var I,R,D=n.getBoundingClientRect();D.x=null!==(I=D.x)&&void 0!==I?I:D.left,D.y=null!==(R=D.y)&&void 0!==R?R:D.top,h={x:D.x,y:D.y,width:D.width,height:D.height}}var P=y.getBoundingClientRect();P.x=null!==(l=P.x)&&void 0!==l?l:P.left,P.y=null!==(u=P.y)&&void 0!==u?u:P.top;var F=v.documentElement,L=F.clientWidth,_=F.clientHeight,z=F.scrollWidth,$=F.scrollHeight,j=F.scrollTop,B=F.scrollLeft,H=P.height,V=P.width,U=h.height,W=h.width,K={left:0,top:0,right:L,bottom:_},q={left:-B,top:-j,right:z-B,bottom:$-j},G=M.htmlRegion,Y="visible",J="visibleFirst";"scroll"!==G&&G!==J&&(G=Y);var X=G===J,Z=de(q,m),Q=de(K,m),ee=G===Y?Q:Z,te=X?Q:ee;y.style.left="auto",y.style.top="auto",y.style.right="0",y.style.bottom="0";var ne=y.getBoundingClientRect();y.style.left=A,y.style.top=S,y.style.right=E,y.style.bottom=C,y.style.overflow=O,null===(p=y.parentElement)||void 0===p||p.removeChild(N);var re=ce(Math.round(V/parseFloat(w)*1e3)/1e3),oe=ce(Math.round(H/parseFloat(k)*1e3)/1e3);if(0===re||0===oe||(0,T.fk)(n)&&!function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,s=o.height;if(i||s)return!0}}return!1}(n))return;var ie=M.offset,se=M.targetOffset,le=fe(P,ie),ue=(0,d.A)(le,2),pe=ue[0],ye=ue[1],ve=fe(h,se),be=(0,d.A)(ve,2),we=be[0],ke=be[1];h.x-=we,h.y-=ke;var xe=M.points||[],Ae=(0,d.A)(xe,2),Se=Ae[0],Ee=he(Ae[1]),Ce=he(Se),Oe=me(h,Ee),Me=me(P,Ce),Ne=(0,c.A)({},M),Te=Oe.x-Me.x+pe,Ie=Oe.y-Me.y+ye;function St(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ee,r=P.x+e,o=P.y+t,i=r+V,s=o+H,a=Math.max(r,n.left),l=Math.max(o,n.top),c=Math.min(i,n.right),u=Math.min(s,n.bottom);return Math.max(0,(c-a)*(u-l))}var Re,De,Pe,Fe,Le=St(Te,Ie),_e=St(Te,Ie,Q),ze=me(h,["t","l"]),$e=me(P,["t","l"]),je=me(h,["b","r"]),Be=me(P,["b","r"]),He=M.overflow||{},Ve=He.adjustX,Ue=He.adjustY,We=He.shiftX,Ke=He.shiftY,qe=function(e){return"boolean"==typeof e?e:e>=0};function Et(){Re=P.y+Ie,De=Re+H,Pe=P.x+Te,Fe=Pe+V}Et();var Ge=qe(Ue),Ye=Ce[0]===Ee[0];if(Ge&&"t"===Ce[0]&&(De>te.bottom||g.current.bt)){var Je=Ie;Ye?Je-=H-U:Je=ze.y-Be.y-ye;var Xe=St(Te,Je),Ze=St(Te,Je,Q);Xe>Le||Xe===Le&&(!X||Ze>=_e)?(g.current.bt=!0,Ie=Je,ye=-ye,Ne.points=[ge(Ce,0),ge(Ee,0)]):g.current.bt=!1}if(Ge&&"b"===Ce[0]&&(Re<te.top||g.current.tb)){var Qe=Ie;Ye?Qe+=H-U:Qe=je.y-$e.y-ye;var et=St(Te,Qe),tt=St(Te,Qe,Q);et>Le||et===Le&&(!X||tt>=_e)?(g.current.tb=!0,Ie=Qe,ye=-ye,Ne.points=[ge(Ce,0),ge(Ee,0)]):g.current.tb=!1}var nt=qe(Ve),rt=Ce[1]===Ee[1];if(nt&&"l"===Ce[1]&&(Fe>te.right||g.current.rl)){var ot=Te;rt?ot-=V-W:ot=ze.x-Be.x-pe;var it=St(ot,Ie),st=St(ot,Ie,Q);it>Le||it===Le&&(!X||st>=_e)?(g.current.rl=!0,Te=ot,pe=-pe,Ne.points=[ge(Ce,1),ge(Ee,1)]):g.current.rl=!1}if(nt&&"r"===Ce[1]&&(Pe<te.left||g.current.lr)){var at=Te;rt?at+=V-W:at=je.x-$e.x-pe;var lt=St(at,Ie),ct=St(at,Ie,Q);lt>Le||lt===Le&&(!X||ct>=_e)?(g.current.lr=!0,Te=at,pe=-pe,Ne.points=[ge(Ce,1),ge(Ee,1)]):g.current.lr=!1}Et();var ut=!0===We?0:We;"number"==typeof ut&&(Pe<Q.left&&(Te-=Pe-Q.left-pe,h.x+W<Q.left+ut&&(Te+=h.x-Q.left+W-ut)),Fe>Q.right&&(Te-=Fe-Q.right-pe,h.x>Q.right-ut&&(Te+=h.x-Q.right+ut)));var dt=!0===Ke?0:Ke;"number"==typeof dt&&(Re<Q.top&&(Ie-=Re-Q.top-ye,h.y+U<Q.top+dt&&(Ie+=h.y-Q.top+U-dt)),De>Q.bottom&&(Ie-=De-Q.bottom-ye,h.y>Q.bottom-dt&&(Ie+=h.y-Q.bottom+dt)));var pt=P.x+Te,ft=pt+V,ht=P.y+Ie,mt=ht+H,gt=h.x,yt=gt+W,vt=h.y,bt=vt+U,wt=(Math.max(pt,gt)+Math.min(ft,yt))/2-pt,kt=(Math.max(ht,vt)+Math.min(mt,bt))/2-ht;null==a||a(t,Ne);var xt=ne.right-P.x-(Te+P.width),At=ne.bottom-P.y-(Ie+P.height);1===re&&(Te=Math.round(Te),xt=Math.round(xt)),1===oe&&(Ie=Math.round(Ie),At=Math.round(At)),f({ready:!0,offsetX:Te/re,offsetY:Ie/oe,offsetR:xt/re,offsetB:At/oe,arrowX:wt/re,arrowY:kt/oe,scaleX:re,scaleY:oe,align:Ne})}})),b=function(){f((function(e){return(0,c.A)((0,c.A)({},e),{},{ready:!1})}))};return(0,v.A)(b,[o]),(0,v.A)((function(){e||b()}),[e]),[p.ready,p.offsetX,p.offsetY,p.offsetR,p.offsetB,p.arrowX,p.arrowY,p.scaleX,p.scaleY,p.align,function(){h.current+=1;var e=h.current;Promise.resolve().then((function(){h.current===e&&y()}))}]}(et,Pe,G&&null!==vt?vt:je,_,$,j,X),xt=(0,d.A)(kt,11),At=xt[0],St=xt[1],Et=xt[2],Ct=xt[3],Ot=xt[4],Mt=xt[5],Nt=xt[6],Tt=xt[7],It=xt[8],Rt=xt[9],Dt=xt[10],Pt=function(e,t,n,o){return r.useMemo((function(){var r=oe(null!=n?n:t),i=oe(null!=o?o:t),s=new Set(r),a=new Set(i);return e&&(s.has("hover")&&(s.delete("hover"),s.add("click")),a.has("hover")&&(a.delete("hover"),a.add("click"))),[s,a]}),[e,t,n,o])}(Ce,p,f,h),Ft=(0,d.A)(Pt,2),Lt=Ft[0],_t=Ft[1],zt=Lt.has("click"),$t=_t.has("click")||_t.has("contextMenu"),jt=(0,K.A)((function(){ut||Dt()}));!function(e,t,n,r){(0,v.A)((function(){if(e&&t&&n){var o=n,i=le(t),s=le(o),a=ae(o),l=new Set([a].concat((0,y.A)(i),(0,y.A)(s)));function c(){r(),nt.current&&G&&$t&&at(!1)}return l.forEach((function(e){e.addEventListener("scroll",c,{passive:!0})})),a.addEventListener("resize",c,{passive:!0}),r(),function(){l.forEach((function(e){e.removeEventListener("scroll",c),a.removeEventListener("resize",c)}))}}}),[e,t,n])}(et,je,Pe,jt),(0,v.A)((function(){jt()}),[vt,_]),(0,v.A)((function(){!et||null!=$&&$[_]||jt()}),[JSON.stringify(j)]);var Bt=r.useMemo((function(){var e=function(e,t,n,r){for(var o=n.points,i=Object.keys(e),s=0;s<i.length;s+=1){var a,l=i[s];if(ie(null===(a=e[l])||void 0===a?void 0:a.points,o,r))return"".concat(t,"-placement-").concat(l)}return""}($,i,Rt,G);return s()(e,null==V?void 0:V(Rt))}),[Rt,V,$,i,G]);r.useImperativeHandle(n,(function(){return{nativeElement:He.current,popupElement:Le.current,forceAlign:jt}}));var Ht=r.useState(0),Vt=(0,d.A)(Ht,2),Ut=Vt[0],Wt=Vt[1],Kt=r.useState(0),qt=(0,d.A)(Kt,2),Gt=qt[0],Yt=qt[1],Jt=function(){if(H&&je){var e=je.getBoundingClientRect();Wt(e.width),Yt(e.height)}};function Xt(e,t,n,r){Ke[e]=function(o){var i;null==r||r(o),at(t,n);for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];null===(i=We[e])||void 0===i||i.call.apply(i,[We,o].concat(a))}}(0,v.A)((function(){ht&&(Dt(),ht(),mt(null))}),[ht]),(zt||$t)&&(Ke.onClick=function(e){var t;nt.current&&$t?at(!1):!nt.current&&zt&&(wt(e),at(!0));for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=We.onClick)||void 0===t||t.call.apply(t,[We,e].concat(r))});var Zt,Qt,en=function(e,t,n,o,i,s,a,l){var c=r.useRef(e);c.current=e;var u=r.useRef(!1);return r.useEffect((function(){if(t&&o&&(!i||s)){var e=function(){u.current=!1},r=function(e){var t;!c.current||a((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)||u.current||l(!1)},d=ae(o);d.addEventListener("pointerdown",e,!0),d.addEventListener("mousedown",r,!0),d.addEventListener("contextmenu",r,!0);var p=(0,W.j)(n);return p&&(p.addEventListener("mousedown",r,!0),p.addEventListener("contextmenu",r,!0)),function(){d.removeEventListener("pointerdown",e,!0),d.removeEventListener("mousedown",r,!0),d.removeEventListener("contextmenu",r,!0),p&&(p.removeEventListener("mousedown",r,!0),p.removeEventListener("contextmenu",r,!0))}}}),[t,n,o,i,s]),function(){u.current=!0}}(et,$t,je,Pe,C,M,qe,at),tn=Lt.has("hover"),nn=_t.has("hover");tn&&(Xt("onMouseEnter",!0,k,(function(e){wt(e)})),Xt("onPointerEnter",!0,k,(function(e){wt(e)})),Zt=function(e){(et||ut)&&null!=Pe&&Pe.contains(e.target)&&at(!0,k)},G&&(Ke.onMouseMove=function(e){var t;null===(t=We.onMouseMove)||void 0===t||t.call(We,e)})),nn&&(Xt("onMouseLeave",!1,A),Xt("onPointerLeave",!1,A),Qt=function(){at(!1,A)}),Lt.has("focus")&&Xt("onFocus",!0,S),_t.has("focus")&&Xt("onBlur",!1,E),Lt.has("contextMenu")&&(Ke.onContextMenu=function(e){var t;nt.current&&_t.has("contextMenu")?at(!1):(wt(e),at(!0)),e.preventDefault();for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=We.onContextMenu)||void 0===t||t.call.apply(t,[We,e].concat(r))}),we&&(Ke.className=s()(We.className,we));var rn=(0,c.A)((0,c.A)({},We),Ke),on={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){xe[e]&&(on[e]=function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null===(t=rn[e])||void 0===t||t.call.apply(t,[rn].concat(r)),xe[e].apply(xe,r)})}));var sn=r.cloneElement(Ue,(0,c.A)((0,c.A)({},rn),on)),an={x:Mt,y:Nt},ln=Z?(0,c.A)({},!0!==Z?Z:{}):null;return r.createElement(r.Fragment,null,r.createElement(U,{disabled:!et,ref:Ve,onResize:function(){Jt(),jt()}},r.createElement(ne,{getTriggerDOMNode:ke},sn)),r.createElement(re.Provider,{value:Te},r.createElement(te,{portal:e,ref:_e,prefixCls:i,popup:P,className:s()(F,Bt),style:L,target:je,onMouseEnter:Zt,onMouseLeave:Qt,onPointerEnter:Zt,zIndex:B,open:et,keepDom:ut,fresh:q,onClick:J,onPointerDownCapture:en,mask:C,motion:Ge,maskMotion:Ye,onVisibleChanged:function(e){dt(!1),Dt(),null==w||w(e)},onPrepare:function(){return new Promise((function(e){Jt(),mt((function(){return e}))}))},forceRender:I,autoDestroy:Ae,getPopupContainer:N,align:Rt,arrow:ln,arrowPos:an,ready:At,offsetX:St,offsetY:Et,offsetR:Ct,offsetB:Ot,onAlign:jt,stretch:H,targetWidth:Ut/Tt,targetHeight:Gt/It})))}));return t}(C);var be={shiftX:64,adjustY:1},we={adjustX:1,shiftY:!0},ke=[0,0],xe={left:{points:["cr","cl"],overflow:we,offset:[-4,0],targetOffset:ke},right:{points:["cl","cr"],overflow:we,offset:[4,0],targetOffset:ke},top:{points:["bc","tc"],overflow:be,offset:[0,-4],targetOffset:ke},bottom:{points:["tc","bc"],overflow:be,offset:[0,4],targetOffset:ke},topLeft:{points:["bl","tl"],overflow:be,offset:[0,-4],targetOffset:ke},leftTop:{points:["tr","tl"],overflow:we,offset:[-4,0],targetOffset:ke},topRight:{points:["br","tr"],overflow:be,offset:[0,-4],targetOffset:ke},rightTop:{points:["tl","tr"],overflow:we,offset:[4,0],targetOffset:ke},bottomRight:{points:["tr","br"],overflow:be,offset:[0,4],targetOffset:ke},rightBottom:{points:["bl","br"],overflow:we,offset:[4,0],targetOffset:ke},bottomLeft:{points:["tl","bl"],overflow:be,offset:[0,4],targetOffset:ke},leftBottom:{points:["br","bl"],overflow:we,offset:[-4,0],targetOffset:ke}},Ae=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],Se=function(e,t){var n=e.overlayClassName,o=e.trigger,i=void 0===o?["hover"]:o,d=e.mouseEnterDelay,p=void 0===d?0:d,f=e.mouseLeaveDelay,h=void 0===f?.1:f,m=e.overlayStyle,g=e.prefixCls,y=void 0===g?"rc-tooltip":g,v=e.children,b=e.onVisibleChange,w=e.afterVisibleChange,k=e.transitionName,x=e.animation,A=e.motion,S=e.placement,E=void 0===S?"right":S,C=e.align,O=void 0===C?{}:C,M=e.destroyTooltipOnHide,N=void 0!==M&&M,T=e.defaultVisible,I=e.getTooltipContainer,R=e.overlayInnerStyle,D=(e.arrowContent,e.overlay),P=e.id,F=e.showArrow,L=void 0===F||F,_=e.classNames,z=e.styles,$=(0,u.A)(e,Ae),j=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(function(){return j.current}));var B=(0,c.A)({},$);return"visible"in e&&(B.popupVisible=e.visible),r.createElement(ve,(0,l.A)({popupClassName:s()(n,null==_?void 0:_.root),prefixCls:y,popup:function(){return r.createElement(a,{key:"content",prefixCls:y,id:P,bodyClassName:null==_?void 0:_.body,overlayInnerStyle:(0,c.A)((0,c.A)({},R),null==z?void 0:z.body)},D)},action:i,builtinPlacements:xe,popupPlacement:E,ref:j,popupAlign:O,getPopupContainer:I,onPopupVisibleChange:b,afterPopupVisibleChange:w,popupTransitionName:k,popupAnimation:x,popupMotion:A,defaultPopupVisible:T,autoDestroy:N,mouseLeaveDelay:h,popupStyle:(0,c.A)((0,c.A)({},m),null==z?void 0:z.root),mouseEnterDelay:p,arrow:L},B),v)};const Ee=(0,r.forwardRef)(Se);var Ce=n(4948),Oe=n(1258),Me=n(6330),Ne=n(2474),Te=n(4586),Ie=n(8257),Re="RC_FORM_INTERNAL_HOOKS",De=function(){(0,h.Ay)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};const Pe=r.createContext({getFieldValue:De,getFieldsValue:De,getFieldError:De,getFieldWarning:De,getFieldsError:De,isFieldsTouched:De,isFieldTouched:De,isFieldValidating:De,isFieldsValidating:De,resetFields:De,setFields:De,setFieldValue:De,setFieldsValue:De,validateFields:De,submit:De,getInternalHooks:function(){return De(),{dispatch:De,initEntityValue:De,registerField:De,useSubscribe:De,setInitialValues:De,destroyForm:De,setCallbacks:De,registerWatch:De,getFields:De,setValidateMessages:De,setPreserve:De,getInitialValue:De}}}),Fe=r.createContext(null);function Le(e){return null==e?[]:Array.isArray(e)?e:[e]}function _e(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var ze=_e(),$e=n(2715),je=n(1087),Be=n(9105);function He(e){var t="function"==typeof Map?new Map:void 0;return He=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if((0,Be.A)())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&(0,je.A)(o,n.prototype),o}(e,arguments,(0,$e.A)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,je.A)(n,e)},He(e)}var Ve=/%[sdj%]/g;function Ue(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function We(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i=n.length;return"function"==typeof e?e.apply(null,n):"string"==typeof e?e.replace(Ve,(function(e){if("%%"===e)return"%";if(o>=i)return e;switch(e){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch(e){return"[Circular]"}break;default:return e}})):e}function Ke(e,t){return null==e||!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e)}function qe(e,t,n){var r=0,o=e.length;!function i(s){if(s&&s.length)n(s);else{var a=r;r+=1,a<o?t(e[a],i):n([])}}([])}"undefined"!=typeof process&&process.env;var Ge=function(e){(0,_.A)(n,e);var t=(0,z.A)(n);function n(e,r){var o;return(0,F.A)(this,n),o=t.call(this,"Async Validation Error"),(0,Te.A)((0,Ne.A)(o),"errors",void 0),(0,Te.A)((0,Ne.A)(o),"fields",void 0),o.errors=e,o.fields=r,o}return(0,L.A)(n)}(He(Error));function Ye(e,t){return function(n){var r,o;return r=e.fullFields?function(e,t){for(var n=e,r=0;r<t.length;r++){if(null==n)return n;n=n[t[r]]}return n}(t,e.fullFields):t[n.field||e.fullField],(o=n)&&void 0!==o.message?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:"function"==typeof n?n():n,fieldValue:r,field:n.field||e.fullField}}}function Je(e,t){if(t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];"object"===(0,N.A)(r)&&"object"===(0,N.A)(e[n])?e[n]=(0,c.A)((0,c.A)({},e[n]),r):e[n]=r}return e}var Xe="enum";const Ze=function(e,t,n,r,o,i){!e.required||n.hasOwnProperty(e.field)&&!Ke(t,i||e.type)||r.push(We(o.messages.required,e.fullField))};var Qe,et=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tt=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,nt={integer:function(e){return nt.number(e)&&parseInt(e,10)===e},float:function(e){return nt.number(e)&&!nt.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"===(0,N.A)(e)&&!nt.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(et)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(function(){if(Qe)return Qe;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:".concat(o.join("|"),")").concat("(?:%[0-9a-zA-Z]{1,})?"),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(i,"$)")),a=new RegExp("^".concat(n,"$")),l=new RegExp("^".concat(i,"$")),c=function(e){return e&&e.exact?s:new RegExp("(?:".concat(t(e)).concat(n).concat(t(e),")|(?:").concat(t(e)).concat(i).concat(t(e),")"),"g")};c.v4=function(e){return e&&e.exact?a:new RegExp("".concat(t(e)).concat(n).concat(t(e)),"g")},c.v6=function(e){return e&&e.exact?l:new RegExp("".concat(t(e)).concat(i).concat(t(e)),"g")};var u=c.v4().source,d=c.v6().source,p="(?:".concat("(?:(?:[a-z]+:)?//)","|www\\.)").concat("(?:\\S+(?::\\S*)?@)?","(?:localhost|").concat(u,"|").concat(d,"|").concat("(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)").concat("(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*").concat("(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",")").concat("(?::\\d{2,5})?").concat('(?:[/?#][^\\s"]*)?');return Qe=new RegExp("(?:^".concat(p,"$)"),"i")}())},hex:function(e){return"string"==typeof e&&!!e.match(tt)}};const rt=Ze,ot=function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(We(o.messages.whitespace,e.fullField))},it=function(e,t,n,r,o){if(e.required&&void 0===t)Ze(e,t,n,r,o);else{var i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?nt[i](t)||r.push(We(o.messages.types[i],e.fullField,e.type)):i&&(0,N.A)(t)!==e.type&&r.push(We(o.messages.types[i],e.fullField,e.type))}},st=function(e,t,n,r,o){var i="number"==typeof e.len,s="number"==typeof e.min,a="number"==typeof e.max,l=t,c=null,u="number"==typeof t,d="string"==typeof t,p=Array.isArray(t);if(u?c="number":d?c="string":p&&(c="array"),!c)return!1;p&&(l=t.length),d&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),i?l!==e.len&&r.push(We(o.messages[c].len,e.fullField,e.len)):s&&!a&&l<e.min?r.push(We(o.messages[c].min,e.fullField,e.min)):a&&!s&&l>e.max?r.push(We(o.messages[c].max,e.fullField,e.max)):s&&a&&(l<e.min||l>e.max)&&r.push(We(o.messages[c].range,e.fullField,e.min,e.max))},at=function(e,t,n,r,o){e[Xe]=Array.isArray(e[Xe])?e[Xe]:[],-1===e[Xe].indexOf(t)&&r.push(We(o.messages[Xe],e.fullField,e[Xe].join(", ")))},lt=function(e,t,n,r,o){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(We(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"==typeof e.pattern&&(new RegExp(e.pattern).test(t)||r.push(We(o.messages.pattern.mismatch,e.fullField,t,e.pattern))))},ct=function(e,t,n,r,o){var i=e.type,s=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t,i)&&!e.required)return n();rt(e,t,r,s,o,i),Ke(t,i)||it(e,t,r,s,o)}n(s)},ut={string:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t,"string")&&!e.required)return n();rt(e,t,r,i,o,"string"),Ke(t,"string")||(it(e,t,r,i,o),st(e,t,r,i,o),lt(e,t,r,i,o),!0===e.whitespace&&ot(e,t,r,i,o))}n(i)},method:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&it(e,t,r,i,o)}n(i)},number:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&(it(e,t,r,i,o),st(e,t,r,i,o))}n(i)},boolean:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&it(e,t,r,i,o)}n(i)},regexp:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),Ke(t)||it(e,t,r,i,o)}n(i)},integer:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&(it(e,t,r,i,o),st(e,t,r,i,o))}n(i)},float:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&(it(e,t,r,i,o),st(e,t,r,i,o))}n(i)},array:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();rt(e,t,r,i,o,"array"),null!=t&&(it(e,t,r,i,o),st(e,t,r,i,o))}n(i)},object:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&it(e,t,r,i,o)}n(i)},enum:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o),void 0!==t&&at(e,t,r,i,o)}n(i)},pattern:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t,"string")&&!e.required)return n();rt(e,t,r,i,o),Ke(t,"string")||lt(e,t,r,i,o)}n(i)},date:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t,"date")&&!e.required)return n();var s;rt(e,t,r,i,o),Ke(t,"date")||(s=t instanceof Date?t:new Date(t),it(e,s,r,i,o),s&&st(e,s.getTime(),r,i,o))}n(i)},url:ct,hex:ct,email:ct,required:function(e,t,n,r,o){var i=[],s=Array.isArray(t)?"array":(0,N.A)(t);rt(e,t,r,i,o,s),n(i)},any:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ke(t)&&!e.required)return n();rt(e,t,r,i,o)}n(i)}};var dt=function(){function e(t){(0,F.A)(this,e),(0,Te.A)(this,"rules",null),(0,Te.A)(this,"_messages",ze),this.define(t)}return(0,L.A)(e,[{key:"define",value:function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==(0,N.A)(e)||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))}},{key:"messages",value:function(e){return e&&(this._messages=Je(_e(),e)),this._messages}},{key:"validate",value:function(t){var n=this,r=t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if("function"==typeof o&&(i=o,o={}),!this.rules||0===Object.keys(this.rules).length)return i&&i(null,r),Promise.resolve(r);if(o.messages){var s=this.messages();s===ze&&(s=_e()),Je(s,o.messages),o.messages=s}else o.messages=this.messages();var a={};(o.keys||Object.keys(this.rules)).forEach((function(e){var o=n.rules[e],i=r[e];o.forEach((function(o){var s=o;"function"==typeof s.transform&&(r===t&&(r=(0,c.A)({},r)),null!=(i=r[e]=s.transform(i))&&(s.type=s.type||(Array.isArray(i)?"array":(0,N.A)(i)))),(s="function"==typeof s?{validator:s}:(0,c.A)({},s)).validator=n.getValidationMethod(s),s.validator&&(s.field=e,s.fullField=s.fullField||e,s.type=n.getType(s),a[e]=a[e]||[],a[e].push({rule:s,value:i,source:r,field:e}))}))}));var l={};return function(e,t,n,r,o){if(t.first){var i=new Promise((function(t,i){var s=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,(0,y.A)(e[n]||[]))})),t}(e);qe(s,n,(function(e){return r(e),e.length?i(new Ge(e,Ue(e))):t(o)}))}));return i.catch((function(e){return e})),i}var s=!0===t.firstFields?Object.keys(e):t.firstFields||[],a=Object.keys(e),l=a.length,c=0,u=[],d=new Promise((function(t,i){var d=function(e){if(u.push.apply(u,e),++c===l)return r(u),u.length?i(new Ge(u,Ue(u))):t(o)};a.length||(r(u),t(o)),a.forEach((function(t){var r=e[t];-1!==s.indexOf(t)?qe(r,n,d):function(e,t,n){var r=[],o=0,i=e.length;function s(e){r.push.apply(r,(0,y.A)(e||[])),++o===i&&n(r)}e.forEach((function(e){t(e,s)}))}(r,n,d)}))}));return d.catch((function(e){return e})),d}(a,o,(function(t,n){var i,s=t.rule,a=!("object"!==s.type&&"array"!==s.type||"object"!==(0,N.A)(s.fields)&&"object"!==(0,N.A)(s.defaultField));function u(e,t){return(0,c.A)((0,c.A)({},t),{},{fullField:"".concat(s.fullField,".").concat(e),fullFields:s.fullFields?[].concat((0,y.A)(s.fullFields),[e]):[e]})}function d(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],d=Array.isArray(i)?i:[i];!o.suppressWarning&&d.length&&e.warning("async-validator:",d),d.length&&void 0!==s.message&&(d=[].concat(s.message));var p=d.map(Ye(s,r));if(o.first&&p.length)return l[s.field]=1,n(p);if(a){if(s.required&&!t.value)return void 0!==s.message?p=[].concat(s.message).map(Ye(s,r)):o.error&&(p=[o.error(s,We(o.messages.required,s.field))]),n(p);var f={};s.defaultField&&Object.keys(t.value).map((function(e){f[e]=s.defaultField})),f=(0,c.A)((0,c.A)({},f),t.rule.fields);var h={};Object.keys(f).forEach((function(e){var t=f[e],n=Array.isArray(t)?t:[t];h[e]=n.map(u.bind(null,e))}));var m=new e(h);m.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),m.validate(t.value,t.rule.options||o,(function(e){var t=[];p&&p.length&&t.push.apply(t,(0,y.A)(p)),e&&e.length&&t.push.apply(t,(0,y.A)(e)),n(t.length?t:null)}))}else n(p)}if(a=a&&(s.required||!s.required&&t.value),s.field=t.field,s.asyncValidator)i=s.asyncValidator(s,t.value,d,t.source,o);else if(s.validator){try{i=s.validator(s,t.value,d,t.source,o)}catch(e){var p,f;null===(p=(f=console).error)||void 0===p||p.call(f,e),o.suppressValidatorError||setTimeout((function(){throw e}),0),d(e.message)}!0===i?d():!1===i?d("function"==typeof s.message?s.message(s.fullField||s.field):s.message||"".concat(s.fullField||s.field," fails")):i instanceof Array?d(i):i instanceof Error&&d(i.message)}i&&i.then&&i.then((function(){return d()}),(function(e){return d(e)}))}),(function(e){!function(e){for(var t,n,o=[],s={},a=0;a<e.length;a++)t=e[a],n=void 0,Array.isArray(t)?o=(n=o).concat.apply(n,(0,y.A)(t)):o.push(t);o.length?(s=Ue(o),i(o,s)):i(null,r)}(e)}),r)}},{key:"getType",value:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!ut.hasOwnProperty(e.type))throw new Error(We("Unknown rule type %s",e.type));return e.type||"string"}},{key:"getValidationMethod",value:function(e){if("function"==typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?ut.required:ut[this.getType(e)]||void 0}}]),e}();(0,Te.A)(dt,"register",(function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");ut[e]=t})),(0,Te.A)(dt,"warning",(function(){})),(0,Te.A)(dt,"messages",ze),(0,Te.A)(dt,"validators",ut);const pt=dt;var ft="'${name}' is not a valid ${type}",ht={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:ft,method:ft,array:ft,object:ft,number:ft,date:ft,boolean:ft,integer:ft,float:ft,regexp:ft,email:ft,url:ft,hex:ft},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},mt=n(3795),gt=pt;function yt(e,t){return e.replace(/\\?\$\{\w+\}/g,(function(e){if(e.startsWith("\\"))return e.slice(1);var n=e.slice(2,-1);return t[n]}))}var vt="CODE_LOGIC_ERROR";function bt(e,t,n,r,o){return wt.apply(this,arguments)}function wt(){return wt=(0,Me.A)((0,Oe.A)().mark((function e(t,n,o,i,s){var a,l,u,d,p,f,h,m,g;return(0,Oe.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(a=(0,c.A)({},o)).ruleIndex,gt.warning=function(){},a.validator&&(l=a.validator,a.validator=function(){try{return l.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(vt)}}),u=null,a&&"array"===a.type&&a.defaultField&&(u=a.defaultField,delete a.defaultField),d=new gt((0,Te.A)({},t,[a])),p=(0,mt.h)(ht,i.validateMessages),d.messages(p),f=[],e.prev=10,e.next=13,Promise.resolve(d.validate((0,Te.A)({},t,n),(0,c.A)({},i)));case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(10),e.t0.errors&&(f=e.t0.errors.map((function(e,t){var n=e.message,o=n===vt?p.default:n;return r.isValidElement(o)?r.cloneElement(o,{key:"error_".concat(t)}):o})));case 18:if(f.length||!u){e.next=23;break}return e.next=21,Promise.all(n.map((function(e,n){return bt("".concat(t,".").concat(n),e,u,i,s)})));case 21:return h=e.sent,e.abrupt("return",h.reduce((function(e,t){return[].concat((0,y.A)(e),(0,y.A)(t))}),[]));case 23:return m=(0,c.A)((0,c.A)({},o),{},{name:t,enum:(o.enum||[]).join(", ")},s),g=f.map((function(e){return"string"==typeof e?yt(e,m):e})),e.abrupt("return",g);case 26:case"end":return e.stop()}}),e,null,[[10,15]])}))),wt.apply(this,arguments)}function kt(e,t,n,r,o,i){var s,a=e.join("."),l=n.map((function(e,t){var n=e.validator,r=(0,c.A)((0,c.A)({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var o=!1,i=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){(0,h.Ay)(!o,"Your validator function has already return a promise. `callback` will be ignored."),o||r.apply(void 0,t)}))}));o=i&&"function"==typeof i.then&&"function"==typeof i.catch,(0,h.Ay)(o,"`callback` is deprecated. Please return a promise instead."),o&&i.then((function(){r()})).catch((function(e){r(e||" ")}))}),r})).sort((function(e,t){var n=e.warningOnly,r=e.ruleIndex,o=t.warningOnly,i=t.ruleIndex;return!!n==!!o?r-i:n?1:-1}));if(!0===o)s=new Promise(function(){var e=(0,Me.A)((0,Oe.A)().mark((function e(n,o){var s,c,u;return(0,Oe.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=0;case 1:if(!(s<l.length)){e.next=12;break}return c=l[s],e.next=5,bt(a,t,c,r,i);case 5:if(!(u=e.sent).length){e.next=9;break}return o([{errors:u,rule:c}]),e.abrupt("return");case 9:s+=1,e.next=1;break;case 12:n([]);case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var u=l.map((function(e){return bt(a,t,e,r,i).then((function(t){return{errors:t,rule:e}}))}));s=(o?function(e){return At.apply(this,arguments)}(u):function(e){return xt.apply(this,arguments)}(u)).then((function(e){return Promise.reject(e)}))}return s.catch((function(e){return e})),s}function xt(){return(xt=(0,Me.A)((0,Oe.A)().mark((function e(t){return(0,Oe.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,(0,y.A)(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function At(){return(At=(0,Me.A)((0,Oe.A)().mark((function e(t){var n;return(0,Oe.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.errors.length&&e([r]),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var St=n(231);function Et(e){return Le(e)}function Ct(e,t){var n={};return t.forEach((function(t){var r=(0,St.A)(e,t);n=(0,mt.A)(n,t,r)})),n}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return Mt(t,e,n)}))}function Mt(e,t){return!(!e||!t)&&!(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&e.length!==t.length)&&t.every((function(t,n){return e[n]===t}))}function Nt(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===(0,N.A)(t.target)&&e in t.target?t.target[e]:t}function Tt(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],i=t-n;return i>0?[].concat((0,y.A)(e.slice(0,n)),[o],(0,y.A)(e.slice(n,t)),(0,y.A)(e.slice(t+1,r))):i<0?[].concat((0,y.A)(e.slice(0,t)),(0,y.A)(e.slice(t+1,n+1)),[o],(0,y.A)(e.slice(n+1,r))):e}var It=["name"],Rt=[];function Dt(e,t,n,r,o,i){return"function"==typeof e?e(t,n,"source"in i?{source:i.source}:{}):r!==o}var Pt=function(e){(0,_.A)(n,e);var t=(0,z.A)(n);function n(e){var o;return(0,F.A)(this,n),o=t.call(this,e),(0,Te.A)((0,Ne.A)(o),"state",{resetCount:0}),(0,Te.A)((0,Ne.A)(o),"cancelRegisterFunc",null),(0,Te.A)((0,Ne.A)(o),"mounted",!1),(0,Te.A)((0,Ne.A)(o),"touched",!1),(0,Te.A)((0,Ne.A)(o),"dirty",!1),(0,Te.A)((0,Ne.A)(o),"validatePromise",void 0),(0,Te.A)((0,Ne.A)(o),"prevValidating",void 0),(0,Te.A)((0,Ne.A)(o),"errors",Rt),(0,Te.A)((0,Ne.A)(o),"warnings",Rt),(0,Te.A)((0,Ne.A)(o),"cancelRegister",(function(){var e=o.props,t=e.preserve,n=e.isListField,r=e.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(n,t,Et(r)),o.cancelRegisterFunc=null})),(0,Te.A)((0,Ne.A)(o),"getNamePath",(function(){var e=o.props,t=e.name,n=e.fieldContext.prefixName,r=void 0===n?[]:n;return void 0!==t?[].concat((0,y.A)(r),(0,y.A)(t)):[]})),(0,Te.A)((0,Ne.A)(o),"getRules",(function(){var e=o.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"==typeof e?e(r):e}))})),(0,Te.A)((0,Ne.A)(o),"refresh",(function(){o.mounted&&o.setState((function(e){return{resetCount:e.resetCount+1}}))})),(0,Te.A)((0,Ne.A)(o),"metaCache",null),(0,Te.A)((0,Ne.A)(o),"triggerMetaEvent",(function(e){var t=o.props.onMetaChange;if(t){var n=(0,c.A)((0,c.A)({},o.getMeta()),{},{destroy:e});(0,Ie.A)(o.metaCache,n)||t(n),o.metaCache=n}else o.metaCache=null})),(0,Te.A)((0,Ne.A)(o),"onStoreChange",(function(e,t,n){var r=o.props,i=r.shouldUpdate,s=r.dependencies,a=void 0===s?[]:s,l=r.onReset,c=n.store,u=o.getNamePath(),d=o.getValue(e),p=o.getValue(c),f=t&&Ot(t,u);switch("valueUpdate"!==n.type||"external"!==n.source||(0,Ie.A)(d,p)||(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Rt,o.warnings=Rt,o.triggerMetaEvent()),n.type){case"reset":if(!t||f)return o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Rt,o.warnings=Rt,o.triggerMetaEvent(),null==l||l(),void o.refresh();break;case"remove":if(i&&Dt(i,e,c,d,p,n))return void o.reRender();break;case"setField":var h=n.data;if(f)return"touched"in h&&(o.touched=h.touched),"validating"in h&&!("originRCField"in h)&&(o.validatePromise=h.validating?Promise.resolve([]):null),"errors"in h&&(o.errors=h.errors||Rt),"warnings"in h&&(o.warnings=h.warnings||Rt),o.dirty=!0,o.triggerMetaEvent(),void o.reRender();if("value"in h&&Ot(t,u,!0))return void o.reRender();if(i&&!u.length&&Dt(i,e,c,d,p,n))return void o.reRender();break;case"dependenciesUpdate":if(a.map(Et).some((function(e){return Ot(n.relatedFields,e)})))return void o.reRender();break;default:if(f||(!a.length||u.length||i)&&Dt(i,e,c,d,p,n))return void o.reRender()}!0===i&&o.reRender()})),(0,Te.A)((0,Ne.A)(o),"validateRules",(function(e){var t=o.getNamePath(),n=o.getValue(),r=e||{},i=r.triggerName,s=r.validateOnly,a=void 0!==s&&s,l=Promise.resolve().then((0,Me.A)((0,Oe.A)().mark((function r(){var s,a,c,u,d,p,f;return(0,Oe.A)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o.mounted){r.next=2;break}return r.abrupt("return",[]);case 2:if(s=o.props,a=s.validateFirst,c=void 0!==a&&a,u=s.messageVariables,d=s.validateDebounce,p=o.getRules(),i&&(p=p.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||Le(t).includes(i)}))),!d||!i){r.next=10;break}return r.next=8,new Promise((function(e){setTimeout(e,d)}));case 8:if(o.validatePromise===l){r.next=10;break}return r.abrupt("return",[]);case 10:return(f=kt(t,n,p,e,c,u)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rt;if(o.validatePromise===l){var t;o.validatePromise=null;var n=[],r=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,o=e.errors,i=void 0===o?Rt:o;t?r.push.apply(r,(0,y.A)(i)):n.push.apply(n,(0,y.A)(i))})),o.errors=n,o.warnings=r,o.triggerMetaEvent(),o.reRender()}})),r.abrupt("return",f);case 13:case"end":return r.stop()}}),r)}))));return a||(o.validatePromise=l,o.dirty=!0,o.errors=Rt,o.warnings=Rt,o.triggerMetaEvent(),o.reRender()),l})),(0,Te.A)((0,Ne.A)(o),"isFieldValidating",(function(){return!!o.validatePromise})),(0,Te.A)((0,Ne.A)(o),"isFieldTouched",(function(){return o.touched})),(0,Te.A)((0,Ne.A)(o),"isFieldDirty",(function(){return!(!o.dirty&&void 0===o.props.initialValue)||void 0!==(0,o.props.fieldContext.getInternalHooks(Re).getInitialValue)(o.getNamePath())})),(0,Te.A)((0,Ne.A)(o),"getErrors",(function(){return o.errors})),(0,Te.A)((0,Ne.A)(o),"getWarnings",(function(){return o.warnings})),(0,Te.A)((0,Ne.A)(o),"isListField",(function(){return o.props.isListField})),(0,Te.A)((0,Ne.A)(o),"isList",(function(){return o.props.isList})),(0,Te.A)((0,Ne.A)(o),"isPreserve",(function(){return o.props.preserve})),(0,Te.A)((0,Ne.A)(o),"getMeta",(function(){return o.prevValidating=o.isFieldValidating(),{touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:null===o.validatePromise}})),(0,Te.A)((0,Ne.A)(o),"getOnlyChild",(function(e){if("function"==typeof e){var t=o.getMeta();return(0,c.A)((0,c.A)({},o.getOnlyChild(e(o.getControlled(),t,o.props.fieldContext))),{},{isFunction:!0})}var n=M(e);return 1===n.length&&r.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}})),(0,Te.A)((0,Ne.A)(o),"getValue",(function(e){var t=o.props.fieldContext.getFieldsValue,n=o.getNamePath();return(0,St.A)(e||t(!0),n)})),(0,Te.A)((0,Ne.A)(o),"getControlled",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.props,n=t.name,r=t.trigger,i=t.validateTrigger,s=t.getValueFromEvent,a=t.normalize,l=t.valuePropName,u=t.getValueProps,d=t.fieldContext,p=void 0!==i?i:d.validateTrigger,f=o.getNamePath(),h=d.getInternalHooks,m=d.getFieldsValue,g=h(Re).dispatch,y=o.getValue(),v=u||function(e){return(0,Te.A)({},l,e)},b=e[r],w=void 0!==n?v(y):{},k=(0,c.A)((0,c.A)({},e),w);return k[r]=function(){var e;o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e=s?s.apply(void 0,n):Nt.apply(void 0,[l].concat(n)),a&&(e=a(e,y,m(!0))),e!==y&&g({type:"updateValue",namePath:f,value:e}),b&&b.apply(void 0,n)},Le(p||[]).forEach((function(e){var t=k[e];k[e]=function(){t&&t.apply(void 0,arguments);var n=o.props.rules;n&&n.length&&g({type:"validateField",namePath:f,triggerName:e})}})),k})),e.fieldContext&&(0,(0,e.fieldContext.getInternalHooks)(Re).initEntityValue)((0,Ne.A)(o)),o}return(0,L.A)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(Re).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,t=this.state.resetCount,n=this.props.children,o=this.getOnlyChild(n),i=o.child;return o.isFunction?e=i:r.isValidElement(i)?e=r.cloneElement(i,this.getControlled(i.props)):((0,h.Ay)(!i,"`children` of Field is not validate ReactElement."),e=i),r.createElement(r.Fragment,{key:t},e)}}]),n}(r.Component);(0,Te.A)(Pt,"contextType",Pe),(0,Te.A)(Pt,"defaultProps",{trigger:"onChange",valuePropName:"value"});const Ft=function(e){var t,n=e.name,o=(0,u.A)(e,It),i=r.useContext(Pe),s=r.useContext(Fe),a=void 0!==n?Et(n):void 0,c=null!==(t=o.isListField)&&void 0!==t?t:!!s,d="keep";return c||(d="_".concat((a||[]).join("_"))),r.createElement(Pt,(0,l.A)({key:d,name:a,isListField:c},o,{fieldContext:i}))};var Lt="__@field_split__";function _t(e){return e.map((function(e){return"".concat((0,N.A)(e),":").concat(e)})).join(Lt)}const zt=function(){function e(){(0,F.A)(this,e),(0,Te.A)(this,"kvs",new Map)}return(0,L.A)(e,[{key:"set",value:function(e,t){this.kvs.set(_t(e),t)}},{key:"get",value:function(e){return this.kvs.get(_t(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(_t(e))}},{key:"map",value:function(e){return(0,y.A)(this.kvs.entries()).map((function(t){var n=(0,d.A)(t,2),r=n[0],o=n[1],i=r.split(Lt);return e({key:i.map((function(e){var t=e.match(/^([^:]*):(.*)$/),n=(0,d.A)(t,3),r=n[1],o=n[2];return"number"===r?Number(o):o})),value:o})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}();var $t=["name"],jt=(0,L.A)((function e(t){var n=this;(0,F.A)(this,e),(0,Te.A)(this,"formHooked",!1),(0,Te.A)(this,"forceRootUpdate",void 0),(0,Te.A)(this,"subscribable",!0),(0,Te.A)(this,"store",{}),(0,Te.A)(this,"fieldEntities",[]),(0,Te.A)(this,"initialValues",{}),(0,Te.A)(this,"callbacks",{}),(0,Te.A)(this,"validateMessages",null),(0,Te.A)(this,"preserve",null),(0,Te.A)(this,"lastValidatePromise",null),(0,Te.A)(this,"getForm",(function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}})),(0,Te.A)(this,"getInternalHooks",(function(e){return e===Re?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):((0,h.Ay)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)})),(0,Te.A)(this,"useSubscribe",(function(e){n.subscribable=e})),(0,Te.A)(this,"prevWithoutPreserves",null),(0,Te.A)(this,"setInitialValues",(function(e,t){if(n.initialValues=e||{},t){var r,o=(0,mt.h)(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;o=(0,mt.A)(o,n,(0,St.A)(e,n))})),n.prevWithoutPreserves=null,n.updateStore(o)}})),(0,Te.A)(this,"destroyForm",(function(e){if(e)n.updateStore({});else{var t=new zt;n.getFieldEntities(!0).forEach((function(e){n.isMergedPreserve(e.isPreserve())||t.set(e.getNamePath(),!0)})),n.prevWithoutPreserves=t}})),(0,Te.A)(this,"getInitialValue",(function(e){var t=(0,St.A)(n.initialValues,e);return e.length?(0,mt.h)(t):t})),(0,Te.A)(this,"setCallbacks",(function(e){n.callbacks=e})),(0,Te.A)(this,"setValidateMessages",(function(e){n.validateMessages=e})),(0,Te.A)(this,"setPreserve",(function(e){n.preserve=e})),(0,Te.A)(this,"watchList",[]),(0,Te.A)(this,"registerWatch",(function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}})),(0,Te.A)(this,"notifyWatch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach((function(n){n(t,r,e)}))}})),(0,Te.A)(this,"timeoutId",null),(0,Te.A)(this,"warningUnhooked",(function(){})),(0,Te.A)(this,"updateStore",(function(e){n.store=e})),(0,Te.A)(this,"getFieldEntities",(function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities})),(0,Te.A)(this,"getFieldsMap",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new zt;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t})),(0,Te.A)(this,"getFieldEntitiesForNamePathList",(function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=Et(e);return t.get(n)||{INVALIDATE_NAME_PATH:Et(e)}}))})),(0,Te.A)(this,"getFieldsValue",(function(e,t){var r,o,i;if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,o=t):e&&"object"===(0,N.A)(e)&&(i=e.strict,o=e.filter),!0===r&&!o)return n.store;var s=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),a=[];return s.forEach((function(e){var t,n,s,l,c="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(i){if(null!==(s=(l=e).isList)&&void 0!==s&&s.call(l))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(o){var u="getMeta"in e?e.getMeta():null;o(u)&&a.push(c)}else a.push(c)})),Ct(n.store,a.map(Et))})),(0,Te.A)(this,"getFieldValue",(function(e){n.warningUnhooked();var t=Et(e);return(0,St.A)(n.store,t)})),(0,Te.A)(this,"getFieldsError",(function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:Et(e[n]),errors:[],warnings:[]}}))})),(0,Te.A)(this,"getFieldError",(function(e){n.warningUnhooked();var t=Et(e);return n.getFieldsError([t])[0].errors})),(0,Te.A)(this,"getFieldWarning",(function(e){n.warningUnhooked();var t=Et(e);return n.getFieldsError([t])[0].warnings})),(0,Te.A)(this,"isFieldsTouched",(function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o,i=t[0],s=t[1],a=!1;0===t.length?o=null:1===t.length?Array.isArray(i)?(o=i.map(Et),a=!1):(o=null,a=i):(o=i.map(Et),a=s);var l=n.getFieldEntities(!0),c=function(e){return e.isFieldTouched()};if(!o)return a?l.every((function(e){return c(e)||e.isList()})):l.some(c);var u=new zt;o.forEach((function(e){u.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();o.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&u.update(n,(function(t){return[].concat((0,y.A)(t),[e])}))}))}));var d=function(e){return e.some(c)},p=u.map((function(e){return e.value}));return a?p.every(d):p.some(d)})),(0,Te.A)(this,"isFieldTouched",(function(e){return n.warningUnhooked(),n.isFieldsTouched([e])})),(0,Te.A)(this,"isFieldsValidating",(function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(Et);return t.some((function(e){var t=e.getNamePath();return Ot(r,t)&&e.isFieldValidating()}))})),(0,Te.A)(this,"isFieldValidating",(function(e){return n.warningUnhooked(),n.isFieldsValidating([e])})),(0,Te.A)(this,"resetWithFieldInitialValue",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new zt,o=n.getFieldEntities(!0);o.forEach((function(e){var t=e.props.initialValue,n=e.getNamePath();if(void 0!==t){var o=r.get(n)||new Set;o.add({entity:e,value:t}),r.set(n,o)}})),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach((function(t){var n,o=r.get(t);o&&(n=e).push.apply(n,(0,y.A)((0,y.A)(o).map((function(e){return e.entity}))))}))):e=o,e.forEach((function(e){if(void 0!==e.props.initialValue){var o=e.getNamePath();if(void 0!==n.getInitialValue(o))(0,h.Ay)(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var i=r.get(o);if(i&&i.size>1)(0,h.Ay)(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(i){var s=n.getFieldValue(o);e.isListField()||t.skipExist&&void 0!==s||n.updateStore((0,mt.A)(n.store,o,(0,y.A)(i)[0].value))}}}}))})),(0,Te.A)(this,"resetFields",(function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore((0,mt.h)(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var r=e.map(Et);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore((0,mt.A)(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)})),(0,Te.A)(this,"setFields",(function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var o=e.name,i=(0,u.A)(e,$t),s=Et(o);r.push(s),"value"in i&&n.updateStore((0,mt.A)(n.store,s,i.value)),n.notifyObservers(t,[s],{type:"setField",data:e})})),n.notifyWatch(r)})),(0,Te.A)(this,"getFields",(function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=e.getMeta(),o=(0,c.A)((0,c.A)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(o,"originRCField",{value:!0}),o}))})),(0,Te.A)(this,"initEntityValue",(function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===(0,St.A)(n.store,r)&&n.updateStore((0,mt.A)(n.store,r,t))}})),(0,Te.A)(this,"isMergedPreserve",(function(e){var t=void 0!==e?e:n.preserve;return null==t||t})),(0,Te.A)(this,"registerField",(function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(o)&&(!r||i.length>1)){var s=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==s&&n.fieldEntities.every((function(e){return!Mt(e.getNamePath(),t)}))){var a=n.store;n.updateStore((0,mt.A)(a,t,s,!0)),n.notifyObservers(a,[t],{type:"remove"}),n.triggerDependenciesUpdate(a,t)}}n.notifyWatch([t])}})),(0,Te.A)(this,"dispatch",(function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,i=e.triggerName;n.validateFields([o],{triggerName:i})}})),(0,Te.A)(this,"notifyObservers",(function(e,t,r){if(n.subscribable){var o=(0,c.A)((0,c.A)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,o)}))}else n.forceRootUpdate()})),(0,Te.A)(this,"triggerDependenciesUpdate",(function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat((0,y.A)(r))}),r})),(0,Te.A)(this,"updateValue",(function(e,t){var r=Et(e),o=n.store;n.updateStore((0,mt.A)(n.store,r,t)),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var i=n.triggerDependenciesUpdate(o,r),s=n.callbacks.onValuesChange;s&&s(Ct(n.store,[r]),n.getFieldsValue()),n.triggerOnFieldsChange([r].concat((0,y.A)(i)))})),(0,Te.A)(this,"setFieldsValue",(function(e){n.warningUnhooked();var t=n.store;if(e){var r=(0,mt.h)(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()})),(0,Te.A)(this,"setFieldValue",(function(e,t){n.setFields([{name:e,value:t,errors:[],warnings:[]}])})),(0,Te.A)(this,"getDependencyChildrenFields",(function(e){var t=new Set,r=[],o=new zt;return n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=Et(t);o.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))})),function e(n){(o.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}}))}(e),r})),(0,Te.A)(this,"triggerOnFieldsChange",(function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var i=new zt;t.forEach((function(e){var t=e.name,n=e.errors;i.set(t,n)})),o.forEach((function(e){e.errors=i.get(e.name)||e.errors}))}var s=o.filter((function(t){var n=t.name;return Ot(e,n)}));s.length&&r(s,o)}})),(0,Te.A)(this,"validateFields",(function(e,t){var r,o;n.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(r=e,o=t):o=e;var i=!!r,s=i?r.map(Et):[],a=[],l=String(Date.now()),u=new Set,d=o||{},p=d.recursive,f=d.dirty;n.getFieldEntities(!0).forEach((function(e){if(i||s.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!f||e.isFieldDirty())){var t=e.getNamePath();if(u.add(t.join(l)),!i||Ot(s,t,p)){var r=e.validateRules((0,c.A)({validateMessages:(0,c.A)((0,c.A)({},ht),n.validateMessages)},o));a.push(r.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var n,r=[],o=[];return null===(n=e.forEach)||void 0===n||n.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors;t?o.push.apply(o,(0,y.A)(n)):r.push.apply(r,(0,y.A)(n))})),r.length?Promise.reject({name:t,errors:r,warnings:o}):{name:t,errors:r,warnings:o}})))}}}));var h=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(o,i){e.forEach((function(e,s){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[s]=e,n>0||(t&&i(r),o(r))}))}))})):Promise.resolve([])}(a);n.lastValidatePromise=h,h.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var m=h.then((function(){return n.lastValidatePromise===h?Promise.resolve(n.getFieldsValue(s)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(s),errorFields:t,outOfDate:n.lastValidatePromise!==h})}));m.catch((function(e){return e}));var g=s.filter((function(e){return u.has(e.join(l))}));return n.triggerOnFieldsChange(g),m})),(0,Te.A)(this,"submit",(function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))})),this.forceRootUpdate=t}));const Bt=function(e){var t=r.useRef(),n=r.useState({}),o=(0,d.A)(n,2)[1];if(!t.current)if(e)t.current=e;else{var i=new jt((function(){o({})}));t.current=i.getForm()}return[t.current]};var Ht=r.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}});const Vt=Ht;var Ut=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"];const Wt=function(e,t){var n=e.name,o=e.initialValues,i=e.fields,s=e.form,a=e.preserve,p=e.children,f=e.component,h=void 0===f?"form":f,m=e.validateMessages,g=e.validateTrigger,v=void 0===g?"onChange":g,b=e.onValuesChange,w=e.onFieldsChange,k=e.onFinish,x=e.onFinishFailed,A=e.clearOnDestroy,S=(0,u.A)(e,Ut),E=r.useRef(null),C=r.useContext(Vt),O=Bt(s),M=(0,d.A)(O,1)[0],T=M.getInternalHooks(Re),I=T.useSubscribe,R=T.setInitialValues,D=T.setCallbacks,P=T.setValidateMessages,F=T.setPreserve,L=T.destroyForm;r.useImperativeHandle(t,(function(){return(0,c.A)((0,c.A)({},M),{},{nativeElement:E.current})})),r.useEffect((function(){return C.registerForm(n,M),function(){C.unregisterForm(n)}}),[C,M,n]),P((0,c.A)((0,c.A)({},C.validateMessages),m)),D({onValuesChange:b,onFieldsChange:function(e){if(C.triggerFormChange(n,e),w){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];w.apply(void 0,[e].concat(r))}},onFinish:function(e){C.triggerFormFinish(n,e),k&&k(e)},onFinishFailed:x}),F(a);var _,z=r.useRef(null);R(o,!z.current),z.current||(z.current=!0),r.useEffect((function(){return function(){return L(A)}}),[]);var $="function"==typeof p;_=$?p(M.getFieldsValue(!0),M):p,I(!$);var j=r.useRef();r.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==(0,N.A)(e)||"object"!==(0,N.A)(t))return!1;var n=Object.keys(e),r=Object.keys(t),o=new Set([].concat(n,r));return(0,y.A)(o).every((function(n){var r=e[n],o=t[n];return"function"==typeof r&&"function"==typeof o||r===o}))})(j.current||[],i||[])||M.setFields(i||[]),j.current=i}),[i,M]);var B=r.useMemo((function(){return(0,c.A)((0,c.A)({},M),{},{validateTrigger:v})}),[M,v]),H=r.createElement(Fe.Provider,{value:null},r.createElement(Pe.Provider,{value:B},_));return!1===h?H:r.createElement(h,(0,l.A)({},S,{ref:E,onSubmit:function(e){e.preventDefault(),e.stopPropagation(),M.submit()},onReset:function(e){var t;e.preventDefault(),M.resetFields(),null===(t=S.onReset)||void 0===t||t.call(S,e)}}),H)};function Kt(e){try{return JSON.stringify(e)}catch(e){return Math.random()}}var qt=r.forwardRef(Wt);qt.FormProvider=function(e){var t=e.validateMessages,n=e.onFormChange,o=e.onFormFinish,i=e.children,s=r.useContext(Ht),a=r.useRef({});return r.createElement(Ht.Provider,{value:(0,c.A)((0,c.A)({},s),{},{validateMessages:(0,c.A)((0,c.A)({},s.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:a.current}),s.triggerFormChange(e,t)},triggerFormFinish:function(e,t){o&&o(e,{values:t,forms:a.current}),s.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(a.current=(0,c.A)((0,c.A)({},a.current),{},(0,Te.A)({},e,t))),s.registerForm(e,t)},unregisterForm:function(e){var t=(0,c.A)({},a.current);delete t[e],a.current=t,s.unregisterForm(e)}})},i)},qt.Field=Ft,qt.List=function(e){var t=e.name,n=e.initialValue,o=e.children,i=e.rules,s=e.validateTrigger,a=e.isListField,l=r.useContext(Pe),u=r.useContext(Fe),d=r.useRef({keys:[],id:0}).current,p=r.useMemo((function(){var e=Et(l.prefixName)||[];return[].concat((0,y.A)(e),(0,y.A)(Et(t)))}),[l.prefixName,t]),f=r.useMemo((function(){return(0,c.A)((0,c.A)({},l),{},{prefixName:p})}),[l,p]),m=r.useMemo((function(){return{getKey:function(e){var t=p.length,n=e[t];return[d.keys[n],e.slice(t+1)]}}}),[p]);return"function"!=typeof o?((0,h.Ay)(!1,"Form.List only accepts function as children."),null):r.createElement(Fe.Provider,{value:m},r.createElement(Pe.Provider,{value:f},r.createElement(Ft,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:i,validateTrigger:s,initialValue:n,isList:!0,isListField:null!=a?a:!!u},(function(e,t){var n=e.value,r=void 0===n?[]:n,i=e.onChange,s=l.getFieldValue,a=function(){return s(p||[])||[]},c={add:function(e,t){var n=a();t>=0&&t<=n.length?(d.keys=[].concat((0,y.A)(d.keys.slice(0,t)),[d.id],(0,y.A)(d.keys.slice(t))),i([].concat((0,y.A)(n.slice(0,t)),[e],(0,y.A)(n.slice(t))))):(d.keys=[].concat((0,y.A)(d.keys),[d.id]),i([].concat((0,y.A)(n),[e]))),d.id+=1},remove:function(e){var t=a(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(d.keys=d.keys.filter((function(e,t){return!n.has(t)})),i(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=a();e<0||e>=n.length||t<0||t>=n.length||(d.keys=Tt(d.keys,e,t),i(Tt(n,e,t)))}}},u=r||[];return Array.isArray(u)||(u=[]),o(u.map((function(e,t){var n=d.keys[t];return void 0===n&&(d.keys[t]=d.id,n=d.keys[t],d.id+=1),{name:t,key:n,isListField:!0}})),c,t)}))))},qt.useForm=Bt,qt.useWatch=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],i=t[1],s=void 0===i?{}:i,a=function(e){return e&&!!e._init}(s)?{form:s}:s,l=a.form,c=(0,r.useState)(),u=(0,d.A)(c,2),p=u[0],f=u[1],h=(0,r.useMemo)((function(){return Kt(p)}),[p]),m=(0,r.useRef)(h);m.current=h;var g=(0,r.useContext)(Pe),y=l||g,v=y&&y._init,b=Et(o),w=(0,r.useRef)(b);return w.current=b,(0,r.useEffect)((function(){if(v){var e=y.getFieldsValue,t=(0,y.getInternalHooks)(Re).registerWatch,n=function(e,t){var n=a.preserve?t:e;return"function"==typeof o?o(n):(0,St.A)(n,w.current)},r=t((function(e,t){var r=n(e,t),o=Kt(r);m.current!==o&&(m.current=o,f(r))})),i=n(e(),e(!0));return p!==i&&f(i),r}}),[v]),p};const Gt=r.createContext({}),Yt=e=>{let{children:t,status:n,override:o}=e;const i=r.useContext(Gt),s=r.useMemo((()=>{const e=Object.assign({},i);return o&&delete e.isFormItemInput,n&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[n,o,i]);return r.createElement(Gt.Provider,{value:s},t)},Jt=r.createContext(null),Xt=e=>{let{children:t}=e;return r.createElement(Jt.Provider,{value:null},t)},Zt=e=>{const{space:t,form:n,children:r}=e;if(null==r)return null;let i=r;return n&&(i=o().createElement(Yt,{override:!0,status:!0},i)),t&&(i=o().createElement(Xt,null,i)),i};var Qt=n(7010);const en=(e,t,n)=>void 0!==n?n:`${e}-${t}`;var tn=n(5694);const nn=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:s,borderRadiusXS:a,calc:l}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,tn.zA)(a)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}};function rn(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function on(e,t){return e?t:{}}function sn(e,t,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:s}=e,{arrowDistance:a=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},nn(e,t,o)),{"&:before":{background:t}})]},on(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:a,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":s,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,tn.zA)(s)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),on(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:a,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":s,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,tn.zA)(s)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),on(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:a},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}})),on(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:a},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}))}}const an={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},ln={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},cn=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);var un=n(1136),dn=n(6561),pn=n(9642),fn=n(7652),hn=n(8408);const mn=e=>({animationDuration:e,animationFillMode:"both"}),gn=e=>({animationDuration:e,animationFillMode:"both"}),yn=function(e,t,n,r){const o=arguments.length>4&&void 0!==arguments[4]&&arguments[4]?"&":"";return{[`\n ${o}${e}-enter,\n ${o}${e}-appear\n `]:Object.assign(Object.assign({},mn(r)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},gn(r)),{animationPlayState:"paused"}),[`\n ${o}${e}-enter${e}-enter-active,\n ${o}${e}-appear${e}-appear-active\n `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},vn=new tn.Mo("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),bn=new tn.Mo("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),wn=new tn.Mo("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),kn=new tn.Mo("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),xn=new tn.Mo("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),An=new tn.Mo("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Sn={zoom:{inKeyframes:vn,outKeyframes:bn},"zoom-big":{inKeyframes:wn,outKeyframes:kn},"zoom-big-fast":{inKeyframes:wn,outKeyframes:kn},"zoom-left":{inKeyframes:new tn.Mo("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),outKeyframes:new tn.Mo("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}})},"zoom-right":{inKeyframes:new tn.Mo("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),outKeyframes:new tn.Mo("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}})},"zoom-up":{inKeyframes:xn,outKeyframes:An},"zoom-down":{inKeyframes:new tn.Mo("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),outKeyframes:new tn.Mo("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}})}},En=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=Sn[t];return[yn(r,o,i,"zoom-big-fast"===t?e.motionDurationFast:e.motionDurationMid),{[`\n ${r}-enter,\n ${r}-appear\n `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Cn=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function On(e,t){return Cn.reduce(((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],s=e[`${r}6`],a=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:i,darkColor:s,textColor:a}))}),{})}var Mn=n(8764),Nn=n(2257);const Tn=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:s,zIndexPopup:a,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:p,sizePopupArrow:f}=e,h=t(s).add(f).add(p).equal(),m=t(s).mul(2).add(f).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,hn.dF)(e)),{position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${n}-inner`]:{minWidth:m,minHeight:l,padding:`${(0,tn.zA)(e.calc(u).div(2).equal())} ${(0,tn.zA)(d)}`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:s,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:h},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(s,8)}},[`${n}-content`]:{position:"relative"}}),On(e,((e,t)=>{let{darkColor:r}=t;return{[`&${n}-${e}`]:{[`${n}-inner`]:{backgroundColor:r},[`${n}-arrow`]:{"--antd-arrow-background-color":r}}}}))),{"&-rtl":{direction:"rtl"}})},sn(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},In=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},rn({contentRadius:e.borderRadius,limitVerticalRadius:!0})),function(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=o,s=1*r/Math.sqrt(2),a=o-r*(1-1/Math.sqrt(2)),l=o-n*(1/Math.sqrt(2)),c=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),u=2*o-l,d=c,p=2*o-s,f=a,h=2*o-0,m=i,g=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),y=r*(Math.sqrt(2)-1);return{arrowShadowWidth:g,arrowPath:`path('M 0 ${i} A ${r} ${r} 0 0 0 ${s} ${a} L ${l} ${c} A ${n} ${n} 0 0 1 ${u} ${d} L ${p} ${f} A ${r} ${r} 0 0 0 ${h} ${m} Z')`,arrowPolygon:`polygon(${y}px 100%, 50% ${y}px, ${2*o-y}px 100%, ${y}px 100%)`}}((0,Mn.oX)(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),Rn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,Nn.OF)("Tooltip",(e=>{const{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e,o=(0,Mn.oX)(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r});return[Tn(o),En(e,"zoom-big-fast")]}),In,{resetStyle:!1,injectStyle:t})(e)},Dn=Cn.map((e=>`${e}-inverse`));function Pn(e,t){const n=function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?Cn.includes(e):[].concat((0,y.A)(Dn),(0,y.A)(Cn)).includes(e)}(t),r=s()({[`${e}-${t}`]:t&&n}),o={},i={};return t&&!n&&(o.background=t,i["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:i}}const Fn=r.forwardRef(((e,t)=>{var n,i,a,l,c,u;const{prefixCls:d,openClassName:p,getTooltipContainer:f,color:h,overlayInnerStyle:m,children:g,afterOpenChange:y,afterVisibleChange:v,destroyTooltipOnHide:b,arrow:w=!0,title:k,overlay:x,builtinPlacements:A,arrowPointAtCenter:S=!1,autoAdjustOverflow:E=!0}=e,C=!!w,[,O]=(0,fn.Ay)(),{getPopupContainer:M,getPrefixCls:N,direction:T,tooltip:I}=r.useContext(pn.QO),R=(0,un.rJ)("Tooltip"),D=r.useRef(null),P=()=>{var e;null===(e=D.current)||void 0===e||e.forceAlign()};r.useImperativeHandle(t,(()=>{var e;return{forceAlign:P,forcePopupAlign:()=>{R.deprecated(!1,"forcePopupAlign","forceAlign"),P()},nativeElement:null===(e=D.current)||void 0===e?void 0:e.nativeElement}}));const[F,L]=(0,Ce.A)(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(i=e.defaultOpen)&&void 0!==i?i:e.defaultVisible}),_=!k&&!x&&0!==k,z=r.useMemo((()=>{var e,t;let n=S;return"object"==typeof w&&(n=null!==(t=null!==(e=w.pointAtCenter)&&void 0!==e?e:w.arrowPointAtCenter)&&void 0!==t?t:S),A||function(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:s}=e,a=t/2,l={};return Object.keys(an).forEach((e=>{const c=r&&ln[e]||an[e],u=Object.assign(Object.assign({},c),{offset:[0,0],dynamicInset:!0});switch(l[e]=u,cn.has(e)&&(u.autoArrow=!1),e){case"top":case"topLeft":case"topRight":u.offset[1]=-a-o;break;case"bottom":case"bottomLeft":case"bottomRight":u.offset[1]=a+o;break;case"left":case"leftTop":case"leftBottom":u.offset[0]=-a-o;break;case"right":case"rightTop":case"rightBottom":u.offset[0]=a+o}const d=rn({contentRadius:i,limitVerticalRadius:!0});if(r)switch(e){case"topLeft":case"bottomLeft":u.offset[0]=-d.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":u.offset[0]=d.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":u.offset[1]=2*-d.arrowOffsetHorizontal+a;break;case"leftBottom":case"rightBottom":u.offset[1]=2*d.arrowOffsetHorizontal-a}u.overflow=function(e,t,n,r){if(!1===r)return{adjustX:!1,adjustY:!1};const o=r&&"object"==typeof r?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=2*t.arrowOffsetHorizontal+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=2*t.arrowOffsetVertical+n,i.shiftX=!0,i.adjustX=!0}const s=Object.assign(Object.assign({},i),o);return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}(e,d,t,n),s&&(u.htmlRegion="visibleFirst")})),l}({arrowPointAtCenter:n,autoAdjustOverflow:E,arrowWidth:C?O.sizePopupArrow:0,borderRadius:O.borderRadius,offset:O.marginXXS,visibleFirst:!0})}),[S,w,A,O]),$=r.useMemo((()=>0===k?k:x||k||""),[x,k]),j=r.createElement(Zt,{space:!0},"function"==typeof $?$():$),{getPopupContainer:B,placement:H="top",mouseEnterDelay:V=.1,mouseLeaveDelay:U=.1,overlayStyle:W,rootClassName:K,overlayClassName:q,styles:G,classNames:Y}=e,J=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),X=N("tooltip",d),Z=N(),Q=e["data-popover-inject"];let ee=F;"open"in e||"visible"in e||!_||(ee=!1);const te=r.isValidElement(g)&&!function(e){return e&&o().isValidElement(e)&&e.type===o().Fragment}(g)?g:r.createElement("span",null,g),ne=te.props,re=ne.className&&"string"!=typeof ne.className?ne.className:s()(ne.className,p||`${X}-open`),[oe,ie,se]=Rn(X,!Q),ae=Pn(X,h),le=ae.arrowStyle,ce=s()(q,{[`${X}-rtl`]:"rtl"===T},ae.className,K,ie,se,null==I?void 0:I.className,null===(a=null==I?void 0:I.classNames)||void 0===a?void 0:a.root,null==Y?void 0:Y.root),ue=s()(null===(l=null==I?void 0:I.classNames)||void 0===l?void 0:l.body,null==Y?void 0:Y.body),[de,pe]=(0,Qt.YK)("Tooltip",J.zIndex),fe=r.createElement(Ee,Object.assign({},J,{zIndex:de,showArrow:C,placement:H,mouseEnterDelay:V,mouseLeaveDelay:U,prefixCls:X,classNames:{root:ce,body:ue},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},le),null===(c=null==I?void 0:I.styles)||void 0===c?void 0:c.root),null==I?void 0:I.style),W),null==G?void 0:G.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},null===(u=null==I?void 0:I.styles)||void 0===u?void 0:u.body),m),null==G?void 0:G.body),ae.overlayStyle)},getTooltipContainer:B||f||M,ref:D,builtinPlacements:z,overlay:j,visible:ee,onVisibleChange:t=>{var n,r;L(!_&&t),_||(null===(n=e.onOpenChange)||void 0===n||n.call(e,t),null===(r=e.onVisibleChange)||void 0===r||r.call(e,t))},afterVisibleChange:null!=y?y:v,arrowContent:r.createElement("span",{className:`${X}-arrow-content`}),motion:{motionName:en(Z,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!b}),ee?function(e,t){return((e,t,n)=>o().isValidElement(e)?o().cloneElement(e,"function"==typeof n?n(e.props||{}):n):t)(e,e,t)}(te,{className:re}):te);return oe(r.createElement(dn.A.Provider,{value:pe},fe))})),Ln=Fn;Ln._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:t,className:n,placement:o="top",title:i,color:l,overlayInnerStyle:c}=e,{getPrefixCls:u}=r.useContext(pn.QO),d=u("tooltip",t),[p,f,h]=Rn(d),m=Pn(d,l),g=m.arrowStyle,y=Object.assign(Object.assign({},c),m.overlayStyle),v=s()(f,h,d,`${d}-pure`,`${d}-placement-${o}`,n,m.className);return p(r.createElement("div",{className:v,style:g},r.createElement("div",{className:`${d}-arrow`}),r.createElement(a,Object.assign({},e,{className:f,prefixCls:d,overlayInnerStyle:y}),i)))};const _n=Ln},4238:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,o:()=>s});var r=n(8769),o=(0,n(7169).A)()?r.useLayoutEffect:r.useEffect,i=function(e,t){var n=r.useRef(!0);o((function(){return e(n.current)}),t),o((function(){return n.current=!1,function(){n.current=!0}}),[])},s=function(e,t){i((function(t){if(!t)return e()}),t)};const a=i},4254:(e,t,n)=>{"use strict";n.d(t,{I9:()=>N,KP:()=>I,T:()=>S,UM:()=>R,Z6:()=>O,uX:()=>M,xe:()=>T});var r=n(1570),o=n(96);const i="undefined"!=typeof navigator?navigator:null,s="undefined"!=typeof document?document:null,a=i&&i.userAgent||"",l=/Edge\/(\d+)/.exec(a),c=/MSIE \d/.exec(a),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(a),d=!!(c||u||l),p=c?document.documentMode:u?+u[1]:l?+l[1]:0,f=!d&&/gecko\/(\d+)/i.test(a),h=f&&+(/Firefox\/(\d+)/.exec(a)||[0,0])[1],m=!d&&/Chrome\/(\d+)/.exec(a),g=!!m,y=m?+m[1]:0,v=!d&&!!i&&/Apple Computer/.test(i.vendor),b=v&&(/Mobile\/\w+/.test(a)||!!i&&i.maxTouchPoints>2),w=b||!!i&&/Mac/.test(i.platform),k=/Android \d/.test(a),x=!!s&&"webkitFontSmoothing"in s.documentElement.style,A=x?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var S=Object.freeze({__proto__:null,ie:d,ie_version:p,gecko:f,gecko_version:h,chrome:g,chrome_version:y,safari:v,ios:b,mac:w,android:k,webkit:x,webkit_version:A});function E(e,t,n,r,o,i){if(e.composing)return!1;const s=e.state,a=s.doc.resolve(t);if(a.parent.type.spec.code)return!1;const l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,void 0,"")+r;for(let a=0;a<o.length;a++){const c=o[a].match.exec(l),u=c&&c[0]&&o[a].handler(s,c,t-(c[0].length-r.length),n);if(u)return e.dispatch(u.setMeta(i,{transform:u,from:t,to:n,text:r})),!0}return!1}const C=new r.hs("MILKDOWN_CUSTOM_INPUTRULES"),O=({rules:e})=>{const t=new r.k_({key:C,isInputRules:!0,state:{init:()=>null,apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,o,i)=>E(n,r,o,i,e,t),handleDOMEvents:{compositionend:n=>(setTimeout((()=>{const{$cursor:r}=n.state.selection;r&&E(n,r.pos,r.pos,"",e,t)})),!1)},handleKeyDown(n,r){if("Enter"!==r.key)return!1;const{$cursor:o}=n.state.selection;return!!o&&E(n,o.pos,o.pos,"\n",e,t)}}});return t};function M(e,t){return new o.fV(e,((e,n,r,o)=>{const{tr:i}=e,s=n.length;let a=r,l=o;if(n[s-1]){const c=n[0],u=n[s-1],d=n[s-2],p=r+c.indexOf(d),f=p+d.length-1,h=p+d.lastIndexOf(u),m=h+u.length,g=function(e,t,n){let r=[];return n.doc.nodesBetween(e,t,((e,t)=>{r=[...r,...e.marks.map((n=>({start:t,end:t+e.nodeSize,mark:n})))]})),r}(r,o,e).filter((e=>e.mark.type.excludes(t))).filter((e=>e.end>p));if(g.length)return null;m<f&&i.delete(m,f),h>p&&i.delete(p,h),a=p,l=a+u.length}return i.addMark(a,l,t.create()),i.removeStoredMark(t),i}))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const N=e=>Object.assign(Object.create(e),e).setTime(Date.now()),T=e=>(t,n)=>((e,t=!0)=>{const n=[];return e.descendants(((e,r)=>{if(n.push({node:e,pos:r}),!t)return!1})),n})(t,n).filter((t=>e(t.node))),I=e=>t=>(e=>t=>{for(let n=t.depth;n>0;n--){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}})(e)(t.$from),R=(e,t)=>{if(!(e instanceof r.nh))return;const{node:n,$from:o}=e;return((e,t)=>Array.isArray(e)&&e.includes(t.type)||t.type===e)(t,n)?{node:n,pos:o.pos,start:o.start(o.depth),depth:o.depth}:void 0}},4269:(e,t,n)=>{"use strict";n.d(t,{YR:()=>o});var r=n(6197);function o(e,t,n,o){let i,s,a;"function"==typeof t&&"function"!=typeof n?(s=void 0,a=t,i=n):(s=t,a=n,i=o),(0,r.VG)(e,s,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)}),i)}},4430:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{A:()=>r})},4445:(e,t,n)=>{"use strict";n.d(t,{$e:()=>i,Ay:()=>c});var r={},o=[];function i(e,t){}function s(e,t){}function a(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}function l(e,t){a(i,e,t)}l.preMessage=function(e){o.push(e)},l.resetWarned=function(){r={}},l.noteOnce=function(e,t){a(s,e,t)};const c=l},4511:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8769);function o(e,t,n){var o=r.useRef({});return"value"in o.current&&!n(o.current.condition,t)||(o.current.value=e(),o.current.condition=t),o.current.value}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1369);function o(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},4635:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2016);function o(e,t){(0,r.A)(e,t),t.add(e)}},4895:(e,t,n)=>{"use strict";n.d(t,{E:()=>s});var r=n(5119);function o(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=o(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const i=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r};function s(e){e.update(r.QM,(e=>{const t=e.attributes;return{...e,attributes:e=>{const n="function"==typeof t?t(e):t;return{...n,class:i("prose dark:prose-invert outline-none",(null==n?void 0:n.class)||"","milkdown-theme-nord")}}}}))}},4898:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.ForwardRef=u,t.isMemo=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case s:case i:case d:case p:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case h:case f:case a:return e;default:return t}}case r:return t}}}(e)===f}},4948:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(689),o=n(9449),i=n(4238),s=n(9348);function a(e){return void 0!==e}function l(e,t){var n=t||{},l=n.defaultValue,c=n.value,u=n.onChange,d=n.postState,p=(0,s.A)((function(){return a(c)?c:a(l)?"function"==typeof l?l():l:"function"==typeof e?e():e})),f=(0,r.A)(p,2),h=f[0],m=f[1],g=void 0!==c?c:h,y=d?d(g):g,v=(0,o.A)(u),b=(0,s.A)([g]),w=(0,r.A)(b,2),k=w[0],x=w[1];return(0,i.o)((function(){var e=k[0];h!==e&&v(h,e)}),[k]),(0,i.o)((function(){a(c)||m(c)}),[c]),[y,(0,o.A)((function(e,t){m(e,t),x([g],t)}))]}},5119:(e,t,n)=>{"use strict";n.d(t,{A2:()=>Zr,KE:()=>go,ge:()=>tr,x8:()=>pr,MD:()=>Jr,qf:()=>Yr,CI:()=>Nr,Sr:()=>Ir,kY:()=>zr,QM:()=>jr,f4:()=>or,aD:()=>lr,u7:()=>gr,pe:()=>ar,P_:()=>mr,bQ:()=>kr,TP:()=>ir,eM:()=>sr,P5:()=>ur,k:()=>Br,pZ:()=>hr});var r={};n.r(r),n.d(r,{attentionMarkers:()=>ze,contentInitial:()=>Re,disable:()=>$e,document:()=>Ie,flow:()=>Pe,flowInitial:()=>De,insideSpan:()=>_e,string:()=>Fe,text:()=>Le});var o=n(7488),i=n(6090);const s={};function a(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return l(e.children,t,n)}return Array.isArray(e)?l(e,t,n):""}function l(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=a(e[o],t,n);return r.join("")}function c(e,t,n,r){const o=e.length;let i,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<r.length;)i=r.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function u(e,t){return e.length>0?(c(e,e.length,0,t),e):t}function d(e){const t={};let n,r,o,i,s,a,l,u=-1;for(;++u<e.length;){for(;u in t;)u=t[u];if(n=e[u],u&&"chunkFlow"===n[1].type&&"listItemPrefix"===e[u-1][1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,p(e,u)),u=t[u],l=!0);else if(n[1]._container){for(o=u,r=void 0;o--&&(i=e[o],"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type);)"enter"===i[0]&&(r&&(e[r][1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);r&&(n[1].end=Object.assign({},e[r][1].start),s=e.slice(r,u),s.unshift(n),c(e,r,u-r+1,s))}}return!l}function p(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const i=[],s=n._tokenizer||r.parser[n.contentType](n.start),a=s.events,l=[],u={};let d,p,f=-1,h=n,m=0,g=0;const y=[g];for(;h;){for(;e[++o][1]!==h;);i.push(o),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),p&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=n;++f<a.length;)"exit"===a[f][0]&&"enter"===a[f-1][0]&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(g=f+1,y.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):y.pop(),f=y.length;f--;){const t=a.slice(y[f],y[f+1]),n=i.pop();l.unshift([n,n+t.length-1]),c(e,n,2,t)}for(f=-1;++f<l.length;)u[m+l[f][0]]=m+l[f][1],m+=l[f][1]-l[f][0]-1;return u}const f={}.hasOwnProperty;function h(e,t){let n;for(n in t){const r=(f.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){f.call(r,i)||(r[i]=[]);const e=o[i];m(r[i],Array.isArray(e)?e:e?[e]:[])}}}function m(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);c(e,0,0,r)}const g=M(/[A-Za-z]/),y=M(/[\dA-Za-z]/),v=M(/[#-'*+\--9=?A-Z^-~]/);function b(e){return null!==e&&(e<32||127===e)}const w=M(/\d/),k=M(/[\dA-Fa-f]/),x=M(/[!-/:-@[-`{-~]/);function A(e){return null!==e&&e<-2}function S(e){return null!==e&&(e<0||32===e)}function E(e){return-2===e||-1===e||32===e}const C=M(/\p{P}|\p{S}/u),O=M(/\s/);function M(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function N(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return E(r)?(e.enter(n),s(r)):t(r)};function s(r){return E(r)&&i++<o?(e.consume(r),s):(e.exit(n),t(r))}}const T={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),N(e,t,"linePrefix");e.consume(n)}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):A(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}},I={tokenize:function(e){const t=this,n=[];let r,o,i,s=0;return a;function a(r){if(s<n.length){const o=n[s];return t.containerState=o[1],e.attempt(o[0].continuation,l,u)(r)}return u(r)}function l(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}v(s);let a=n;for(;a<t.events.length;)t.events[a][1].end=Object.assign({},o),a++;return c(t.events,i+1,0,t.events.slice(n)),t.events.length=a,u(e)}return a(e)}function u(o){if(s===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return m(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(R,d,p)(o)}function d(e){return r&&b(),v(s),f(e)}function p(e){return t.parser.lazy[t.now().line]=s!==n.length,i=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(R,h,m)(n)}function h(e){return s++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){return null===n?(r&&b(),v(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:r}),g(n))}function g(n){return null===n?(y(e.exit("chunkFlow"),!0),v(0),void e.consume(n)):A(n)?(e.consume(n),y(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(n),g)}function y(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,a,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){a=t.events[l][1].end;break}o=!0}for(v(s),e=n;e<t.events.length;)t.events[e][1].end=Object.assign({},a),e++;c(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function v(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},R={tokenize:function(e,t,n){return N(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},D={tokenize:function(e,t,n){return function(t){return E(t)?N(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||A(e)?t(e):n(e)}},partial:!0},P={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):A(t)?e.check(F,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return d(e),e}},F={tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N(e,o,"linePrefix")};function o(o){if(null===o||A(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}},partial:!0},L={tokenize:function(e){const t=this,n=e.attempt(D,(function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)}),e.attempt(this.parser.constructs.flowInitial,r,N(e,e.attempt(this.parser.constructs.flow,r,e.attempt(P,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},_={resolveAll:B()},z=j("string"),$=j("text");function j(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,s);return i;function i(e){return l(e)?o(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:B("text"===e?H:void 0)}}function B(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function H(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,s=o.length,a=-1,l=0;for(;s--;){const e=o[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)i=!0,l++;else if(-1!==e){s++;break}}if(l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+s,_bufferIndex:s?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},o.start),r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}function V(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}function U(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let s=[],a=[],l=!0;const d={consume:function(e){A(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,k()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),p.previous=e,l=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=g(),p.events.push(["enter",n,p]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=g(),p.events.push(["exit",t,p]),t},attempt:b((function(e,t){w(e,t.from)})),check:b(v),interrupt:b(v,{interrupt:!0})},p={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:m,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let s;if("string"==typeof i)s=i;else switch(i){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&o)continue;s=" ";break;default:s=String.fromCharCode(i)}o=-2===i,r.push(s)}return r.join("")}(m(e),t)},now:g,defineSkip:function(e){o[e.line]=e.column,k()},write:function(e){return s=u(s,e),function(){let e;for(;r._index<s.length;){const t=s[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)y(t.charCodeAt(r._bufferIndex));else y(t)}}(),null!==s[s.length-1]?[]:(w(t,0),p.events=V(i,p.events,p),p.events)}};let f,h=t.tokenize.call(p,d);return t.resolveAll&&i.push(t),p;function m(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let s;if(n===o)s=[e[n].slice(r,i)];else{if(s=e.slice(n,o),r>-1){const e=s[0];"string"==typeof e?s[0]=e.slice(r):s.shift()}i>0&&s.push(e[o].slice(0,i))}return s}(s,e)}function g(){const{line:e,column:t,offset:n,_index:o,_bufferIndex:i}=r;return{line:e,column:t,offset:n,_index:o,_bufferIndex:i}}function y(e){l=void 0,f=e,h=h(e)}function v(e,t){t.restore()}function b(e,t){return function(n,o,i){let s,c,u,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return s=e,c=0,0===e.length?i:m(e[c])}function m(e){return function(n){return f=function(){const e=g(),t=p.previous,n=p.currentConstruct,o=p.events.length,i=Array.from(a);return{restore:function(){r=e,p.previous=t,p.currentConstruct=n,p.events.length=o,a=i,k()},from:o}}(),u=e,e.partial||(p.currentConstruct=e),e.name&&p.parser.constructs.disable.null.includes(e.name)?v():e.tokenize.call(t?Object.assign(Object.create(p),t):p,d,y,v)(n)}}function y(t){return l=!0,e(u,f),o}function v(e){return l=!0,f.restore(),++c<s.length?m(s[c]):i}}}function w(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&c(p.events,t,p.events.length-t,e.resolve(p.events.slice(t),p)),e.resolveTo&&(p.events=e.resolveTo(p.events,p))}function k(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const W={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),s(i)):o>=3&&(null===i||A(i))?(e.exit("thematicBreak"),t(i)):n(i)}function s(t){return t===r?(e.consume(t),o++,s):(e.exit("thematicBreakSequence"),E(t)?N(e,i,"whitespace")(t):i(t))}}},K={name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,s=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:w(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(W,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return w(t)&&++s<10?(e.consume(t),a):(!r.interrupt||s<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(D,r.interrupt?n:c,e.attempt(q,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return E(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(D,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,N(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){return r.containerState.furtherBlankLines||!E(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(G,t,o)(n))}));function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,N(e,e.attempt(K,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)}},q={tokenize:function(e,t,n){const r=this;return N(e,(function(e){const o=r.events[r.events.length-1];return!E(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},G={tokenize:function(e,t,n){const r=this;return N(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0},Y={name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return E(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){const r=this;return function(t){return E(t)?N(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(Y,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function J(e,t,n,r,o,i,s,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d):null===t||32===t||41===t||b(t)?n(t):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||A(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(o){return u||null!==o&&41!==o&&!S(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||b(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function X(e,t,n,r,o,i){const s=this;let a,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!a||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):A(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||A(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!E(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Z(e,t,n,r,o,i){let s;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),s=40===t?41:t,a):n(t)};function a(n){return n===s?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===s?(e.exit(i),a(s)):null===t?n(t):A(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||A(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===s||92===t?(e.consume(t),c):c(t)}}function Q(e,t){let n;return function r(o){return A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):E(o)?N(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}function ee(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const te={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return X.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return S(t)?Q(e,a)(t):a(t)}function a(t){return J(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(ne,c,c)(t)}function c(t){return E(t)?N(e,u,"whitespace")(t):u(t)}function u(i){return null===i||A(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},ne={tokenize:function(e,t,n){return function(t){return S(t)?Q(e,r)(t):n(t)};function r(t){return Z(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return E(t)?N(e,i,"whitespace")(t):i(t)}function i(e){return null===e||A(e)?t(e):n(e)}},partial:!0},re={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),N(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?a(t):A(t)?e.attempt(oe,i,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||A(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),s)}function a(n){return e.exit("codeIndented"),t(n)}}},oe={tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):A(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):N(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):A(e)?o(e):n(e)}},partial:!0},ie={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||S(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||A(n)?(e.exit("atxHeading"),t(n)):E(n)?N(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||S(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}},resolve:function(e,t){let n,r,o=e.length-2,i=3;return"whitespace"===e[i][1].type&&(i+=2),o-2>i&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},c(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}},se={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let o;return function(t){let s,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){s="paragraph"===r.events[a][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!s?n(t):(e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t))};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),E(t)?N(e,s,"lineSuffix")(t):s(t))}function s(r){return null===r||A(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const s={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",s,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[o][1].end)):e[n][1]=s,e.push(["exit",s,t]),e}},ae=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],le=["pre","script","style","textarea"],ce={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let o,i,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),o=3,r.interrupt?t:$):g(a)?(e.consume(a),s=String.fromCharCode(a),h):n(a)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,a=0,p):g(i)?(e.consume(i),o=4,r.interrupt?t:$):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:$):n(o)}function p(o){return o==="CDATA[".charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:I:p):n(o)}function f(t){return g(t)?(e.consume(t),s=String.fromCharCode(t),h):n(t)}function h(a){if(null===a||47===a||62===a||S(a)){const l=47===a,c=s.toLowerCase();return l||i||!le.includes(c)?ae.includes(s.toLowerCase())?(o=6,l?(e.consume(a),m):r.interrupt?t(a):I(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?v(a):b(a)):(o=1,r.interrupt?t(a):I(a))}return 45===a||y(a)?(e.consume(a),s+=String.fromCharCode(a),h):n(a)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:I):n(o)}function v(t){return E(t)?(e.consume(t),v):N(t)}function b(t){return 47===t?(e.consume(t),N):58===t||95===t||g(t)?(e.consume(t),w):E(t)?(e.consume(t),b):N(t)}function w(t){return 45===t||46===t||58===t||95===t||y(t)?(e.consume(t),w):k(t)}function k(t){return 61===t?(e.consume(t),x):E(t)?(e.consume(t),k):b(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,C):E(t)?(e.consume(t),x):O(t)}function C(t){return t===l?(e.consume(t),l=null,M):null===t||A(t)?n(t):(e.consume(t),C)}function O(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||S(t)?k(t):(e.consume(t),O)}function M(e){return 47===e||62===e||E(e)?b(e):n(e)}function N(t){return 62===t?(e.consume(t),T):n(t)}function T(t){return null===t||A(t)?I(t):E(t)?(e.consume(t),T):n(t)}function I(t){return 45===t&&2===o?(e.consume(t),F):60===t&&1===o?(e.consume(t),L):62===t&&4===o?(e.consume(t),j):63===t&&3===o?(e.consume(t),$):93===t&&5===o?(e.consume(t),z):!A(t)||6!==o&&7!==o?null===t||A(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),I):(e.exit("htmlFlowData"),e.check(ue,B,R)(t))}function R(t){return e.check(de,D,B)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||A(t)?R(t):(e.enter("htmlFlowData"),I(t))}function F(t){return 45===t?(e.consume(t),$):I(t)}function L(t){return 47===t?(e.consume(t),s="",_):I(t)}function _(t){if(62===t){const n=s.toLowerCase();return le.includes(n)?(e.consume(t),j):I(t)}return g(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),_):I(t)}function z(t){return 93===t?(e.consume(t),$):I(t)}function $(t){return 62===t?(e.consume(t),j):45===t&&2===o?(e.consume(t),$):I(t)}function j(t){return null===t||A(t)?(e.exit("htmlFlowData"),B(t)):(e.consume(t),j)}function B(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},ue={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(D,t,n)}},partial:!0},de={tokenize:function(e,t,n){const r=this;return function(t){return A(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},pe={tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},fe={name:"codeFenced",tokenize:function(e,t,n){const r=this,o={tokenize:function(e,t,n){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s};function s(t){return e.enter("codeFencedFence"),E(t)?N(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),E(t)?N(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||A(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let i,s=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return s=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(a++,e.consume(t),l):a<3?n(t):(e.exit("codeFencedFenceSequence"),E(t)?N(e,c,"whitespace")(t):c(t))}function c(n){return null===n||A(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(pe,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||A(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):E(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),N(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||A(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||A(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return s>0&&E(t)?N(e,g,"linePrefix",s+1)(t):g(t)}function g(t){return null===t||A(t)?e.check(pe,f,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||A(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}},concrete:!0};var he=n(1157);const me={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=y,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=k,c):(e.enter("characterReferenceValue"),o=7,i=w,c(t))}function c(a){if(59===a&&s){const o=e.exit("characterReferenceValue");return i!==y||(0,he.s)(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&s++<o?(e.consume(a),c):n(a)}}},ge={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return x(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},ye={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),N(e,t,"linePrefix")}}},ve={name:"labelEnd",tokenize:function(e,t,n){const r=this;let o,i,s=r.events.length;for(;s--;)if(("labelImage"===r.events[s][1].type||"labelLink"===r.events[s][1].type)&&!r.events[s][1]._balanced){o=r.events[s][1];break}return function(t){return o?o._inactive?u(t):(i=r.parser.defined.includes(ee(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(be,c,i?c:u)(t):91===t?e.attempt(we,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(ke,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,o,i,s=e.length,a=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=s);const l={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},d={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[o][1].end)},p={type:"labelText",start:Object.assign({},e[r+a+2][1].end),end:Object.assign({},e[o-2][1].start)};return i=[["enter",l,t],["enter",d,t]],i=u(i,e.slice(r+1,r+a+3)),i=u(i,[["enter",p,t]]),i=u(i,V(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=u(i,[["exit",p,t],e[o-2],e[o-1],["exit",d,t]]),i=u(i,e.slice(o+1)),i=u(i,[["exit",l,t]]),c(e,r,e.length,i),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const n=e[t][1];"labelImage"!==n.type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},be={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return S(t)?Q(e,o)(t):o(t)}function o(t){return 41===t?c(t):J(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return S(t)?Q(e,a)(t):c(t)}function s(e){return n(e)}function a(t){return 34===t||39===t||40===t?Z(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return S(t)?Q(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},we={tokenize:function(e,t,n){const r=this;return function(t){return X.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},ke={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},xe={name:"labelStartImage",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:ve.resolveAll};function Ae(e){return null===e||S(e)||O(e)?1:C(e)?2:void 0}const Se={name:"attention",tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ae(r);let i;return function(t){return i=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===i)return e.consume(a),s;const l=e.exit("attentionSequence"),c=Ae(a),u=!c||2===c&&o||n.includes(a),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(a)}},resolveAll:function(e,t){let n,r,o,i,s,a,l,d,p=-1;for(;++p<e.length;)if("enter"===e[p][0]&&"attentionSequence"===e[p][1].type&&e[p][1]._close)for(n=p;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[p][1]).charCodeAt(0)){if((e[n][1]._close||e[p][1]._open)&&(e[p][1].end.offset-e[p][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[p][1].end.offset-e[p][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[p][1].end.offset-e[p][1].start.offset>1?2:1;const f=Object.assign({},e[n][1].end),h=Object.assign({},e[p][1].start);Ee(f,-a),Ee(h,a),i={type:a>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[n][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[p][1].start),end:h},o={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[p][1].start)},r={type:a>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},i.start),e[p][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=u(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=u(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=u(l,V(t.parser.constructs.insideSpan.null,e.slice(n+1,p),t)),l=u(l,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[p][1].end.offset-e[p][1].start.offset?(d=2,l=u(l,[["enter",e[p][1],t],["exit",e[p][1],t]])):d=0,c(e,n-1,p-n+3,l),p=n+l.length-d-2;break}for(p=-1;++p<e.length;)"attentionSequence"===e[p][1].type&&(e[p][1].type="data");return e}};function Ee(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ce={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return g(t)?(e.consume(t),i):l(t)}function i(e){return 43===e||45===e||46===e||y(e)?(r=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||y(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||b(r)?n(r):(e.consume(r),a)}function l(t){return 64===t?(e.consume(t),c):v(t)?(e.consume(t),l):n(t)}function c(e){return y(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||y(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}},Oe={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),w):g(t)?(e.consume(t),M):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):g(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):A(t)?(s=u,z(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?_(e):45===e?d(e):u(e)}function f(t){return t==="CDATA[".charCodeAt(i++)?(e.consume(t),6===i?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):A(t)?(s=h,z(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),v):h(t)}function v(t){return 62===t?_(t):93===t?(e.consume(t),v):h(t)}function b(t){return null===t||62===t?_(t):A(t)?(s=b,z(t)):(e.consume(t),b)}function w(t){return null===t?n(t):63===t?(e.consume(t),k):A(t)?(s=w,z(t)):(e.consume(t),w)}function k(e){return 62===e?_(e):w(e)}function x(t){return g(t)?(e.consume(t),C):n(t)}function C(t){return 45===t||y(t)?(e.consume(t),C):O(t)}function O(t){return A(t)?(s=O,z(t)):E(t)?(e.consume(t),O):_(t)}function M(t){return 45===t||y(t)?(e.consume(t),M):47===t||62===t||S(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),_):58===t||95===t||g(t)?(e.consume(t),I):A(t)?(s=T,z(t)):E(t)?(e.consume(t),T):_(t)}function I(t){return 45===t||46===t||58===t||95===t||y(t)?(e.consume(t),I):R(t)}function R(t){return 61===t?(e.consume(t),D):A(t)?(s=R,z(t)):E(t)?(e.consume(t),R):T(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,P):A(t)?(s=D,z(t)):E(t)?(e.consume(t),D):(e.consume(t),F)}function P(t){return t===o?(e.consume(t),o=void 0,L):null===t?n(t):A(t)?(s=P,z(t)):(e.consume(t),P)}function F(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||S(t)?T(t):(e.consume(t),F)}function L(e){return 47===e||62===e||S(e)?T(e):n(e)}function _(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function z(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$}function $(t){return E(t)?N(e,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):j(t)}function j(t){return e.enter("htmlTextData"),s(t)}}},Me={name:"labelStartLink",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:ve.resolveAll},Ne={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return A(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},Te={name:"codeText",tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),i++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):A(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||A(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}},Ie={42:K,43:K,45:K,48:K,49:K,50:K,51:K,52:K,53:K,54:K,55:K,56:K,57:K,62:Y},Re={91:te},De={[-2]:re,[-1]:re,32:re},Pe={35:ie,42:W,45:[se,W],60:ce,61:se,95:W,96:fe,126:fe},Fe={38:me,92:ge},Le={[-5]:ye,[-4]:ye,[-3]:ye,33:xe,38:me,42:Se,60:[Ce,Oe],91:Me,92:[Ne,ge],93:ve,95:Se,96:Te},_e={null:[Se,_]},ze={null:[42,95]},$e={null:[]};const je=/[\0\t\n\r]/g;function Be(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}const He=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ve(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Be(n.slice(t?2:1),t?16:10)}return(0,he.s)(n)||e}function Ue(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function We(e){return e&&"object"==typeof e?"position"in e||"type"in e?qe(e.position):"start"in e||"end"in e?qe(e):"line"in e||"column"in e?Ke(e):"":""}function Ke(e){return Ge(e&&e.line)+":"+Ge(e&&e.column)}function qe(e){return Ke(e&&e.start)+"-"+Ke(e&&e.end)}function Ge(e){return e&&"number"==typeof e?e:1}const Ye={}.hasOwnProperty;function Je(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(w),autolinkProtocol:p,autolinkEmail:p,atxHeading:o(y),blockQuote:o((function(){return{type:"blockquote",children:[]}})),characterEscape:p,characterReference:p,codeFenced:o(g),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(g,i),codeText:o((function(){return{type:"inlineCode",value:""}}),i),codeTextData:p,data:p,codeFlowValue:p,definition:o((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:o(v),hardBreakTrailing:o(v),htmlFlow:o(b,i),htmlFlowData:p,htmlText:o(b,i),htmlTextData:p,image:o((function(){return{type:"image",title:null,url:"",alt:null}})),label:i,link:o(w),listItem:o((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:o(k,(function(){this.data.expectingFirstListItemValue=!0})),listUnordered:o(k),paragraph:o((function(){return{type:"paragraph",children:[]}})),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(y),strong:o((function(){return{type:"strong",children:[]}})),thematicBreak:o((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:c(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:c(),autolinkEmail:function(e){f.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){f.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:c(),characterEscapeValue:f,characterReferenceMarkerHexadecimal:m,characterReferenceMarkerNumeric:m,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=Be(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=(0,he.s)(t);const o=this.stack.pop();o.value+=r,o.position.end=Xe(e.end)},codeFenced:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0})),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:f,codeIndented:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")})),codeText:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:f,data:f,definition:c(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:c(),hardBreakEscape:c(h),hardBreakTrailing:c(h),htmlFlow:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:f,htmlText:c((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:f,image:c((function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0})),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(He,Ve)}(t),n.identifier=Ue(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak)return n.children[n.children.length-1].position.end=Xe(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(p.call(this,e),f.call(this,e))},link:c((function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0})),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:c((function(){this.data.setextHeadingSlurpLineEnding=void 0})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:c(),thematicBreak:c()}};Ze(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let o={type:"root",children:[]};const s={stack:[o],tokenStack:[],config:t,enter:l,exit:u,buffer:i,resume:d,data:n},a=[];let c=-1;for(;++c<e.length;)"listOrdered"!==e[c][1].type&&"listUnordered"!==e[c][1].type||("enter"===e[c][0]?a.push(c):c=r(e,a.pop(),c));for(c=-1;++c<e.length;){const n=t[e[c][0]];Ye.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},s),e[c][1])}if(s.tokenStack.length>0){const e=s.tokenStack[s.tokenStack.length-1];(e[1]||et).call(s,void 0,e[0])}for(o.position={start:Xe(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Xe(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)o=t.transforms[c](o)||o;return o};function r(e,t,n){let r,o,i,s,a=t-1,l=-1,c=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||s||l||i||(i=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let s=a;for(o=void 0;s--;){const t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,i=void 0,s=!0}}}return e[t][1]._spread=c,n}function o(e,t){return function(n){l.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:Xe(t.start),end:void 0}}function c(e){return function(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+We({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||et).call(this,e,r[0])),n.position.end=Xe(e.end)}function d(){return function(e){return a(e,"boolean"!=typeof s.includeImageAlt||s.includeImageAlt,"boolean"!=typeof s.includeHtml||s.includeHtml)}(this.stack.pop())}function p(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:""},n.position={start:Xe(e.start),end:void 0},t.push(n)),this.stack.push(n)}function f(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Xe(e.end)}function h(){this.data.atHardBreak=!0}function m(e){this.data.characterReferenceType=e.type}function g(){return{type:"code",lang:null,meta:null,value:""}}function y(){return{type:"heading",depth:0,children:[]}}function v(){return{type:"break"}}function b(){return{type:"html",value:""}}function w(){return{type:"link",title:null,url:"",children:[]}}function k(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!d(e););return e}(function(e){const t=function(e){const t={};let n=-1;for(;++n<e.length;)h(t,e[n]);return t}([r,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:t,content:o(T),document:o(I),flow:o(L),string:o(z),text:o($)};return n;function o(e){return function(t){return U(n,e,t)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,s){const a=[];let l,c,u,d,p;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(je.lastIndex=u,l=je.exec(o),d=l&&void 0!==l.index?l.index:o.length,p=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===p&&u===d&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),u<d&&(a.push(o.slice(u,d)),t+=d-u),p){case 0:a.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),a.push(-2);t++<c;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return s&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function Xe(e){return{line:e.line,column:e.column,offset:e.offset}}function Ze(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ze(e,r):Qe(e,r)}}function Qe(e,t){let n;for(n in t)if(Ye.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function et(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+We({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+We({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+We({start:t.start,end:t.end})+") is still open")}function tt(e){const t=this;t.parser=function(n){return Je(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const nt={}.hasOwnProperty,rt={}.hasOwnProperty;function ot(e,t){let n,r=-1;if(t.extensions)for(;++r<t.extensions.length;)ot(e,t.extensions[r]);for(n in t)if(rt.call(t,n))switch(n){case"extensions":break;case"unsafe":case"join":o=e[n],(i=t[n])&&o.push(...i);break;case"handlers":it(e[n],t[n]);break;default:e.options[n]=t[n]}var o,i;return e}function it(e,t){t&&Object.assign(e,t)}var st=n(6313),at=n(8468),lt=n(1697);const ct=[function(e,t,n,r){if("code"===t.type&&(0,at.m)(t,r)&&("list"===e.type||e.type===t.type&&(0,at.m)(e,r)))return!1;if("spread"in n&&"boolean"==typeof n.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&(0,lt.f)(t,r)))return;return n.spread?1:0}}],ut=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],dt=[{character:"\t",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:ut},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:ut},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ \t\r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:ut},{atBreak:!0,character:"+",after:"(?:[ \t\r\n])"},{atBreak:!0,character:"-",after:"(?:[ \t\r\n-])"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:ut},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:ut},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:ut},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:ut},{atBreak:!0,character:"~"}],pt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ft(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return function(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}(n.slice(t?2:1),t?16:10)}return(0,he.s)(n)||e}function ht(e){return e.label||!e.identifier?e.label||"":e.identifier.replace(pt,ft)}function mt(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function gt(e,t,n,r){let o=r.join.length;for(;o--;){const i=r.join[o](e,t,n,r);if(!0===i||1===i)break;if("number"==typeof i)return"\n".repeat(1+i);if(!1===i)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const yt=/\r?\n|\r/g;function vt(e,t){const n=[];let r,o=0,i=0;for(;r=yt.exec(e);)s(e.slice(o,r.index)),n.push(r[0]),o=r.index+r[0].length,i++;return s(e.slice(o)),n.join("");function s(e){n.push(t(e,i,!e))}}var bt=n(3219);function wt(e,t){return e-t}function kt(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],o=[],i=e+t;let s,a=-1,l=0;for(;s=n.exec(i);)r.push(s.index);for(;++a<r.length;)l!==r[a]&&o.push(e.slice(l,r[a])),o.push("\\"),l=r[a];return o.push(e.slice(l)),o.join("")}function xt(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,o=n.line||1,i=n.column||1;return{move:function(e){const t=e||"",n=t.split(/\r?\n|\r/g),s=n[n.length-1];return o+=n.length-1,i=1===n.length?i+s.length:1+s.length+r,t},current:function(){return{now:{line:o,column:i},lineShift:r}},shift:function(e){r+=e}}}function At(e,t={}){const n={enter:function(e){return n.stack.push(e),function(){n.stack.pop()}},indentLines:vt,associationId:ht,containerPhrasing:Ot,containerFlow:Mt,createTracker:xt,compilePattern:mt,safe:Nt,stack:[],unsafe:[...dt],join:[...ct],handlers:{...st.p},options:{},indexStack:[],handle:void 0};ot(n,t),n.options.tightDefinitions&&n.join.push(Ct),n.handle=function(e,t){const n=t||{};function r(t,...n){let o=r.invalid;const i=r.handlers;if(t&&nt.call(t,e)){const n=String(t[e]);o=nt.call(i,n)?i[n]:r.unknown}if(o)return o.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}("type",{invalid:St,unknown:Et,handlers:n.handlers});let r=n.handle(e,void 0,n,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0});return r&&10!==r.charCodeAt(r.length-1)&&13!==r.charCodeAt(r.length-1)&&(r+="\n"),r}function St(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Et(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function Ct(e,t){if("definition"===e.type&&e.type===t.type)return 0}function Ot(e,t){return function(e,t,n){const r=t.indexStack,o=e.children||[],i=[];let s=-1,a=n.before;r.push(-1);let l=t.createTracker(n);for(;++s<o.length;){const c=o[s];let u;if(r[r.length-1]=s,s+1<o.length){let n=t.handle.handlers[o[s+1].type];n&&n.peek&&(n=n.peek),u=n?n(o[s+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else u=n.after;i.length>0&&("\r"===a||"\n"===a)&&"html"===c.type&&(i[i.length-1]=i[i.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(i.join(""))),i.push(l.move(t.handle(c,e,t,{...l.current(),before:a,after:u}))),a=i[i.length-1].slice(-1)}return r.pop(),i.join("")}(e,this,t)}function Mt(e,t){return function(e,t,n){const r=t.indexStack,o=e.children||[],i=t.createTracker(n),s=[];let a=-1;for(r.push(-1);++a<o.length;){const n=o[a];r[r.length-1]=a,s.push(i.move(t.handle(n,e,t,{before:"\n",after:"\n",...i.current()}))),"list"!==n.type&&(t.bulletLastUsed=void 0),a<o.length-1&&s.push(i.move(gt(n,o[a+1],e,t)))}return r.pop(),s.join("")}(e,this,t)}function Nt(e,t){return function(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),o=[],i=[],s={};let a=-1;for(;++a<e.unsafe.length;){const t=e.unsafe[a];if(!(0,bt.q)(e.stack,t))continue;const n=e.compilePattern(t);let i;for(;i=n.exec(r);){const e="before"in t||Boolean(t.atBreak),n="after"in t,r=i.index+(e?i[1].length:0);o.includes(r)?(s[r].before&&!e&&(s[r].before=!1),s[r].after&&!n&&(s[r].after=!1)):(o.push(r),s[r]={before:e,after:n})}}o.sort(wt);let l=n.before?n.before.length:0;const c=r.length-(n.after?n.after.length:0);for(a=-1;++a<o.length;){const e=o[a];e<l||e>=c||e+1<c&&o[a+1]===e+1&&s[e].after&&!s[e+1].before&&!s[e+1].after||o[a-1]===e-1&&s[e].before&&!s[e-1].before&&!s[e-1].after||(l!==e&&i.push(kt(r.slice(l,e),"\\")),l=e,!/[!-/:-@[-`{-~]/.test(r.charAt(e))||n.encode&&n.encode.includes(r.charAt(e))?(i.push("&#x"+r.charCodeAt(e).toString(16).toUpperCase()+";"),l++):i.push("\\"))}return i.push(kt(r.slice(l,c),n.after)),i.join("")}(this,e,t)}function Tt(e){const t=this;t.compiler=function(n){return At(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function It(e){if(e)throw e}var Rt=n(9710),Dt=n(9820);function Pt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}class Ft extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=s?s.line:void 0,this.name=We(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ft.prototype.file="",Ft.prototype.name="",Ft.prototype.reason="",Ft.prototype.message="",Ft.prototype.stack="",Ft.prototype.column=void 0,Ft.prototype.line=void 0,Ft.prototype.ancestors=void 0,Ft.prototype.cause=void 0,Ft.prototype.fatal=void 0,Ft.prototype.place=void 0,Ft.prototype.ruleId=void 0,Ft.prototype.source=void 0;const Lt=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Bt(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else s<0&&(n=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=s));return r===o?o=s:o<0&&(o=e.length),e.slice(r,o)},_t=function(e){if(Bt(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},zt=function(e){Bt(e);let t,n=e.length,r=-1,o=0,i=-1,s=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==s&&(s=1):i>-1&&(s=-1);else if(t){o=n+1;break}}return i<0||r<0||0===s||1===s&&i===r-1&&i===o+1?"":e.slice(i,r)},$t=function(...e){let t,n=-1;for(;++n<e.length;)Bt(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Bt(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),s=l,a=0;continue}}else if(o.length>0){o="",i=0,s=l,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(s+1,l):o=e.slice(s+1,l),i=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},jt="/";function Bt(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ht=function(){return"/"};function Vt(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}const Ut=["history","path","basename","stem","extname","dirname"];class Wt{constructor(e){let t;t=e?Vt(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd=Ht(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Ut.length;){const e=Ut[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Ut.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Lt(this.path):void 0}set basename(e){qt(e,"basename"),Kt(e,"basename"),this.path=$t(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?_t(this.path):void 0}set dirname(e){Gt(this.basename,"dirname"),this.path=$t(e||"",this.basename)}get extname(){return"string"==typeof this.path?zt(this.path):void 0}set extname(e){if(Kt(e,"extname"),Gt(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=$t(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Vt(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!Vt(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),qt(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Lt(this.path,this.extname):void 0}set stem(e){qt(e,"stem"),Kt(e,"stem"),this.path=$t(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Ft(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Kt(e,t){if(e&&e.includes(jt))throw new Error("`"+t+"` cannot be a path: did not expect `"+jt+"`")}function qt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Gt(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Yt=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};Object.setPrototypeOf(r,t);const o=Object.getOwnPropertyNames(n);for(const e of o){const t=Object.getOwnPropertyDescriptor(n,e);t&&Object.defineProperty(r,e,t)}return r},Jt={}.hasOwnProperty;class Xt extends Yt{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...s){const a=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==s[l]&&void 0!==s[l]||(s[l]=t[l]);t=s,a?function(e,t){let n;return function(...t){const i=e.length>t.length;let s;i&&t.push(r);try{s=e.apply(this,t)}catch(e){if(i&&n)throw e;return r(e)}i||(s instanceof Promise?s.then(o,r):s instanceof Error?r(s):o(s))};function r(e,...r){n||(n=!0,t(e,...r))}function o(e){r(null,e)}}(a,o)(...s):r(null,...s)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){const e=new Xt;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Rt(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(tn("data",this.frozen),this.namespace[e]=t,this):Jt.call(this.namespace,e)&&this.namespace[e]||void 0:e?(tn("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=on(e),n=this.parser||this.Parser;return Qt("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Qt("process",this.parser||this.Parser),en("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=on(e),s=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):((0,Dt.ok)(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(s,i,(function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var s;"string"==typeof(s=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(s)?r.value=i:r.result=i,a(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),Qt("processSync",this.parser||this.Parser),en("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,It(e),t=r})),rn("processSync","process",n),(0,Dt.ok)(t,"we either bailed on an error or have a tree"),t}run(e,t,n){nn(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){(0,Dt.ok)("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");const s=on(t);r.run(e,s,(function(t,r,s){const a=r||e;t?i(t):o?o(a):((0,Dt.ok)(n,"`done` is defined if `resolve` is not"),n(void 0,a,s))}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){It(e),n=t,r=!0})),rn("runSync","run",r),(0,Dt.ok)(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();const n=on(t),r=this.compiler||this.Compiler;return en("stringify",r),nn(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(tn("use",this.frozen),null==e);else if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?s(e):i(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(r.settings=Rt(!0,r.settings,e.settings))}function s(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)o(e[t])}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const s=n[o][1];Pt(s)&&Pt(r)&&(r=Rt(!0,s,r)),n[o]=[e,r,...i]}}}}const Zt=(new Xt).freeze();function Qt(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function en(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function tn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nn(e){if(!Pt(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function rn(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function on(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Wt(e)}var sn,an,ln,cn,un,dn,pn,fn=n(7043),hn=n(1440),mn=Object.defineProperty,gn=(e,t,n)=>(((e,t,n)=>{t in e?mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),yn=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},vn=(e,t,n)=>(yn(e,t,"read from private field"),n?n.call(e):t.get(e)),bn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},wn=(e,t,n,r)=>(yn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class kn{}class xn{constructor(){gn(this,"elements",[]),gn(this,"size",(()=>this.elements.length)),gn(this,"top",(()=>this.elements.at(-1))),gn(this,"push",(e=>{var t;null==(t=this.top())||t.push(e)})),gn(this,"open",(e=>{this.elements.push(e)})),gn(this,"close",(()=>{const e=this.elements.pop();if(!e)throw(0,hn.TR)();return e}))}}class An extends kn{constructor(e,t,n){super(),this.type=e,this.content=t,this.attrs=n}push(e,...t){this.content.push(e,...t)}pop(){return this.content.pop()}static create(e,t,n){return new An(e,t,n)}}const Sn=class extends xn{constructor(e){super(),gn(this,"schema"),bn(this,sn,i.CU.none),bn(this,an,(e=>e.isText)),bn(this,ln,((e,t)=>{if(vn(this,an).call(this,e)&&vn(this,an).call(this,t)&&i.CU.sameSet(e.marks,t.marks))return this.schema.text(e.text+t.text,e.marks)})),bn(this,cn,(e=>{const t=Object.values({...this.schema.nodes,...this.schema.marks}).find((t=>t.spec.parseMarkdown.match(e)));if(!t)throw(0,hn.Xm)(e);return t})),bn(this,un,(e=>{const t=vn(this,cn).call(this,e);t.spec.parseMarkdown.runner(this,e,t)})),gn(this,"injectRoot",((e,t,n)=>(this.openNode(t,n),this.next(e.children),this))),gn(this,"openNode",((e,t)=>(this.open(An.create(e,[],t)),this))),bn(this,dn,(()=>{wn(this,sn,i.CU.none);const e=this.close();return vn(this,pn).call(this,e.type,e.attrs,e.content)})),gn(this,"closeNode",(()=>(vn(this,dn).call(this),this))),bn(this,pn,((e,t,n)=>{const r=e.createAndFill(t,n,vn(this,sn));if(!r)throw(0,hn.$D)(e,t,n);return this.push(r),r})),gn(this,"addNode",((e,t,n)=>(vn(this,pn).call(this,e,t,n),this))),gn(this,"openMark",((e,t)=>{const n=e.create(t);return wn(this,sn,n.addToSet(vn(this,sn))),this})),gn(this,"closeMark",(e=>(wn(this,sn,e.removeFromSet(vn(this,sn))),this))),gn(this,"addText",(e=>{const t=this.top();if(!t)throw(0,hn.TR)();const n=t.pop(),r=this.schema.text(e,vn(this,sn));if(!n)return t.push(r),this;const o=vn(this,ln).call(this,n,r);return o?(t.push(o),this):(t.push(n,r),this)})),gn(this,"build",(()=>{let e;do{e=vn(this,dn).call(this)}while(this.size());return e})),gn(this,"next",((e=[])=>([e].flat().forEach((e=>vn(this,un).call(this,e))),this))),gn(this,"toDoc",(()=>this.build())),gn(this,"run",((e,t)=>{const n=e.runSync(e.parse(t),t);return this.next(n),this})),this.schema=e}};let En=Sn;sn=new WeakMap,an=new WeakMap,ln=new WeakMap,cn=new WeakMap,un=new WeakMap,dn=new WeakMap,pn=new WeakMap,gn(En,"create",((e,t)=>{const n=new Sn(e);return e=>(n.run(t,e),n.toDoc())}));const Cn=class extends kn{constructor(e,t,n,r={}){super(),gn(this,"push",((e,...t)=>{this.children||(this.children=[]),this.children.push(e,...t)})),gn(this,"pop",(()=>{var e;return null==(e=this.children)?void 0:e.pop()})),this.type=e,this.children=t,this.value=n,this.props=r}};let On=Cn;var Mn,Nn,Tn,In,Rn,Dn,Pn,Fn,Ln,_n,zn,$n;gn(On,"create",((e,t,n,r={})=>new Cn(e,t,n,r)));const jn=class extends xn{constructor(e){super(),bn(this,Mn,i.CU.none),gn(this,"schema"),bn(this,Nn,(e=>{const t=Object.values({...this.schema.nodes,...this.schema.marks}).find((t=>t.spec.toMarkdown.match(e)));if(!t)throw(0,hn._K)(e.type);return t})),bn(this,Tn,(e=>vn(this,Nn).call(this,e).spec.toMarkdown.runner(this,e))),bn(this,In,((e,t)=>vn(this,Nn).call(this,e).spec.toMarkdown.runner(this,e,t))),bn(this,Rn,(e=>{const{marks:t}=e,n=e=>e.type.spec.priority??50;[...t].sort(((e,t)=>n(e)-n(t))).every((t=>!vn(this,In).call(this,t,e)))&&vn(this,Tn).call(this,e),t.forEach((e=>vn(this,$n).call(this,e)))})),bn(this,Dn,((e,t)=>{var n;if(e.type===t||1!==(null==(n=e.children)?void 0:n.length))return e;const r=e=>{var n;if(e.type===t)return e;if(1!==(null==(n=e.children)?void 0:n.length))return null;const[o]=e.children;return o?r(o):null},o=r(e);if(!o)return e;const i=o.children?[...o.children]:void 0,s={...e,children:i};return s.children=i,o.children=[s],o})),bn(this,Pn,(e=>{const{children:t}=e;return t&&(e.children=t.reduce(((e,t,n)=>{if(0===n)return[t];const r=e.at(-1);if(r&&r.isMark&&t.isMark){t=vn(this,Dn).call(this,t,r.type);const{children:n,...o}=t,{children:i,...s}=r;if(t.type===r.type&&n&&i&&JSON.stringify(o)===JSON.stringify(s)){const t={...s,children:[...i,...n]};return e.slice(0,-1).concat(vn(this,Pn).call(this,t))}}return e.concat(t)}),[])),e})),bn(this,Fn,(e=>{const t={...e.props,type:e.type};return e.children&&(t.children=e.children),e.value&&(t.value=e.value),t})),gn(this,"openNode",((e,t,n)=>(this.open(On.create(e,void 0,t,n)),this))),bn(this,Ln,(()=>{const e=this.close();return vn(this,_n).call(this,e.type,e.children,e.value,e.props)})),gn(this,"closeNode",(()=>(vn(this,Ln).call(this),this))),bn(this,_n,((e,t,n,r)=>{const o=On.create(e,t,n,r),i=vn(this,Pn).call(this,vn(this,Fn).call(this,o));return this.push(i),i})),gn(this,"addNode",((e,t,n,r)=>(vn(this,_n).call(this,e,t,n,r),this))),bn(this,zn,((e,t,n,r)=>e.isInSet(vn(this,Mn))?this:(wn(this,Mn,e.addToSet(vn(this,Mn))),this.openNode(t,n,{...r,isMark:!0})))),bn(this,$n,(e=>{!e.isInSet(vn(this,Mn))||(wn(this,Mn,e.type.removeFromSet(vn(this,Mn))),vn(this,Ln).call(this))})),gn(this,"withMark",((e,t,n,r)=>(vn(this,zn).call(this,e,t,n,r),this))),gn(this,"closeMark",(e=>(vn(this,$n).call(this,e),this))),gn(this,"build",(()=>{let e=null;do{e=vn(this,Ln).call(this)}while(this.size());return e})),gn(this,"next",(e=>{return t=e,Object.prototype.hasOwnProperty.call(t,"size")?(e.forEach((e=>{vn(this,Rn).call(this,e)})),this):(vn(this,Rn).call(this,e),this);var t})),gn(this,"toString",(e=>e.stringify(this.build()))),gn(this,"run",(e=>(this.next(e),this))),this.schema=e}};let Bn=jn;Mn=new WeakMap,Nn=new WeakMap,Tn=new WeakMap,In=new WeakMap,Rn=new WeakMap,Dn=new WeakMap,Pn=new WeakMap,Fn=new WeakMap,Ln=new WeakMap,_n=new WeakMap,zn=new WeakMap,$n=new WeakMap,gn(Bn,"create",((e,t)=>{const n=new jn(e);return e=>(n.run(e),n.toString(t))}));var Hn=n(1570),Vn=n(3686),Un=n(4254),Wn=n(5715),Kn=n(96),qn=n(5939),Gn=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Yn=(e,t,n)=>(Gn(e,t,"read from private field"),n?n.call(e):t.get(e)),Jn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Xn=(e,t,n,r)=>(Gn(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function Zn(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}const Qn={strong:(e,t,n,r)=>{const o=e.marker||n.options.strong||"*",i=n.enter("strong"),s=n.createTracker(r);let a=s.move(o+o);return a+=s.move(n.containerPhrasing(e,{before:a,after:o,...s.current()})),a+=s.move(o+o),i(),a},emphasis:(e,t,n,r)=>{const o=e.marker||n.options.emphasis||"*",i=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(o);return a+=s.move(n.containerPhrasing(e,{before:a,after:o,...s.current()})),a+=s.move(o),i(),a}},er=(0,o.CR)("ConfigReady"),tr=(0,o.CR)("InitReady"),nr=(0,o.Z0)([],"initTimer"),rr=(0,o.Z0)({},"editor"),or=(0,o.Z0)([],"inputRules"),ir=(0,o.Z0)([],"prosePlugins"),sr=(0,o.Z0)([],"remarkPlugins"),ar=(0,o.Z0)([],"nodeView"),lr=(0,o.Z0)([],"markView"),cr=(0,o.Z0)(Zt().use(tt).use(Tt),"remark"),ur=(0,o.Z0)({handlers:Qn},"remarkStringifyOptions");function dr(e){const t=t=>(t.inject(rr,e).inject(ir,[]).inject(sr,[]).inject(or,[]).inject(ar,[]).inject(lr,[]).inject(ur,{handlers:Qn}).inject(cr,Zt().use(tt).use(Tt)).inject(nr,[er]).record(tr),async()=>{await t.waitTimers(nr);const e=t.get(ur);return t.set(cr,Zt().use(tt).use(Tt,e)),t.done(tr),()=>{t.remove(rr).remove(ir).remove(sr).remove(or).remove(ar).remove(lr).remove(ur).remove(cr).remove(nr).clearTimer(tr)}});return Zn(t,{displayName:"Init"}),t}const pr=(0,o.CR)("SchemaReady"),fr=(0,o.Z0)([],"schemaTimer"),hr=(0,o.Z0)({},"schema"),mr=(0,o.Z0)([],"nodes"),gr=(0,o.Z0)([],"marks");function yr(e){var t;return{...e,parseDOM:null==(t=e.parseDOM)?void 0:t.map((t=>({priority:e.priority,...t})))}}const vr=e=>(e.inject(hr,{}).inject(mr,[]).inject(gr,[]).inject(fr,[tr]).record(pr),async()=>{await e.waitTimers(fr);const t=e.get(cr),n=e.get(sr).reduce(((e,t)=>e.use(t.plugin,t.options)),t);e.set(cr,n);const r=Object.fromEntries(e.get(mr).map((([e,t])=>[e,yr(t)]))),o=Object.fromEntries(e.get(gr).map((([e,t])=>[e,yr(t)]))),s=new i.Sj({nodes:r,marks:o});return e.set(hr,s),e.done(pr),()=>{e.remove(hr).remove(mr).remove(gr).remove(fr).clearTimer(pr)}});Zn(vr,{displayName:"Schema"});const br=(0,o.CR)("ParserReady"),wr=()=>{throw(0,fn.dI)()},kr=(0,o.Z0)(wr,"parser"),xr=(0,o.Z0)([],"parserTimer"),Ar=e=>(e.inject(kr,wr).inject(xr,[pr]).record(br),async()=>{await e.waitTimers(xr);const t=e.get(cr),n=e.get(hr);return e.set(kr,En.create(n,t)),e.done(br),()=>{e.remove(kr).remove(xr).clearTimer(br)}});Zn(Ar,{displayName:"Parser"});const Sr=(0,o.CR)("SerializerReady"),Er=(0,o.Z0)([],"serializerTimer"),Cr=()=>{throw(0,fn.dI)()},Or=(0,o.Z0)(Cr,"serializer"),Mr=e=>(e.inject(Or,Cr).inject(Er,[pr]).record(Sr),async()=>{await e.waitTimers(Er);const t=e.get(cr),n=e.get(hr);return e.set(Or,Bn.create(n,t)),e.done(Sr),()=>{e.remove(Or).remove(Er).clearTimer(Sr)}});Zn(Mr,{displayName:"Serializer"});const Nr=(0,o.Z0)("","defaultValue"),Tr=(0,o.Z0)({},"editorState"),Ir=(0,o.Z0)((e=>e),"stateOptions"),Rr=(0,o.Z0)([],"editorStateTimer"),Dr=(0,o.CR)("EditorStateReady"),Pr=new Hn.hs("MILKDOWN_STATE_TRACKER");function Fr(e){const t=(0,Wn.st)(Kn.dv,Wn.ic,Wn.Qv,Wn._e);return e.Backspace=t,e}const Lr=e=>(e.inject(Nr,"").inject(Tr,{}).inject(Ir,(e=>e)).inject(Rr,[br,Sr,Zr]).record(Dr),async()=>{await e.waitTimers(Rr);const t=e.get(hr),n=e.get(kr),r=e.get(or),o=e.get(Ir),s=e.get(ir),a=function(e,t,n){if("string"==typeof e)return t(e);if("html"===e.type)return i.S4.fromSchema(n).parse(e.dom);if("json"===e.type)return i.bP.fromJSON(n,e.value);throw(0,fn.j7)(e)}(e.get(Nr),n,t),l=[...s,new Hn.k_({key:Pr,state:{init:()=>{},apply:(t,n,r,o)=>{e.set(Tr,o)}}}),(0,Un.Z6)({rules:r}),(0,qn.w)(Fr(Wn.RV))];e.set(ir,l);const c=o({schema:t,doc:a,plugins:l}),u=Hn.$t.create(c);return e.set(Tr,u),e.done(Dr),()=>{e.remove(Nr).remove(Tr).remove(Ir).remove(Rr).clearTimer(Dr)}});Zn(Lr,{displayName:"EditorState"});const _r=(0,o.CR)("EditorViewReady"),zr=(0,o.Z0)({},"editorView"),$r=(0,o.Z0)([],"editorViewTimer"),jr=(0,o.Z0)({},"editorViewOptions"),Br=(0,o.Z0)(null,"root"),Hr=(0,o.Z0)(null,"rootDOM"),Vr=(0,o.Z0)({},"rootAttrs"),Ur=new Hn.hs("MILKDOWN_VIEW_CLEAR"),Wr=e=>(e.inject(Br,document.body).inject(zr,{}).inject(jr,{}).inject(Hr,null).inject(Vr,{}).inject($r,[Dr]).record(_r),async()=>{await e.wait(tr);const t=e.get(Br)||document.body,n="string"==typeof t?document.querySelector(t):t;e.update(ir,(t=>[new Hn.k_({key:Ur,view:t=>{const r=n?function(e,t){const n=document.createElement("div");n.className="milkdown",e.appendChild(n),t.set(Hr,n);const r=t.get(Vr);return Object.entries(r).forEach((([e,t])=>n.setAttribute(e,t))),n}(n,e):void 0;return(()=>{if(r&&n){const e=t.dom;n.replaceChild(r,e),r.appendChild(e)}})(),{destroy:()=>{null!=r&&r.parentNode&&(null==r||r.parentNode.replaceChild(t.dom,r)),null==r||r.remove()}}}}),...t])),await e.waitTimers($r);const r=e.get(Tr),o=e.get(jr),i=Object.fromEntries(e.get(ar)),s=Object.fromEntries(e.get(lr)),a=new Vn.Lz(n,{state:r,nodeViews:i,markViews:s,...o});return function(e){e.classList.add("editor"),e.setAttribute("role","textbox")}(a.dom),e.set(zr,a),e.done(_r),()=>{null==a||a.destroy(),e.remove(Br).remove(zr).remove(jr).remove(Hr).remove(Vr).remove($r).clearTimer(_r)}});var Kr,qr;Zn(Wr,{displayName:"EditorView"});class Gr{constructor(){Jn(this,Kr,void 0),Jn(this,qr,void 0),Xn(this,Kr,new o.mc),Xn(this,qr,null),this.setCtx=e=>{Xn(this,qr,e)}}get ctx(){return Yn(this,qr)}create(e,t){const n=e.create(Yn(this,Kr).sliceMap);return n.set(t),n}get(e){return Yn(this,Kr).get(e).get()}remove(e){return Yn(this,Kr).remove(e)}call(e,t){if(null==Yn(this,qr))throw(0,fn.zD)();const n=this.get(e)(t),r=Yn(this,qr).get(zr);return n(r.state,r.dispatch,r)}}function Yr(e="cmdKey"){return(0,o.Z0)((()=>()=>!1),e)}Kr=new WeakMap,qr=new WeakMap;const Jr=(0,o.Z0)(new Gr,"commands"),Xr=(0,o.Z0)([pr],"commandsTimer"),Zr=(0,o.CR)("CommandsReady"),Qr=e=>{const t=new Gr;return t.setCtx(e),e.inject(Jr,t).inject(Xr,[pr]).record(Zr),async()=>(await e.waitTimers(Xr),e.done(Zr),()=>{e.remove(Jr).remove(Xr).clearTimer(Zr)})};var eo,to,no,ro,oo,io,so,ao,lo,co,uo,po,fo,ho,mo;Zn(Qr,{displayName:"Commands"}),eo=new WeakMap,to=new WeakMap,no=new WeakMap,ro=new WeakMap,oo=new WeakMap,io=new WeakMap,so=new WeakMap,ao=new WeakMap,lo=new WeakMap,co=new WeakMap,uo=new WeakMap,po=new WeakMap,fo=new WeakMap,ho=new WeakMap,mo=new WeakMap;let go=class e{constructor(){Jn(this,eo,void 0),Jn(this,to,void 0),Jn(this,no,void 0),Jn(this,ro,void 0),Jn(this,oo,void 0),Jn(this,io,void 0),Jn(this,so,void 0),Jn(this,ao,void 0),Jn(this,lo,void 0),Jn(this,co,void 0),Jn(this,uo,void 0),Jn(this,po,void 0),Jn(this,fo,void 0),Jn(this,ho,void 0),Jn(this,mo,void 0),Xn(this,eo,!1),Xn(this,to,"Idle"),Xn(this,no,[]),Xn(this,ro,(()=>{})),Xn(this,oo,new o.mc),Xn(this,io,new o.zD),Xn(this,so,new Map),Xn(this,ao,new Map),Xn(this,lo,new o.Kj(Yn(this,oo),Yn(this,io))),Xn(this,co,(()=>{const e=function(e){const t=t=>(t.record(er),async()=>(await e(t),t.done(er),()=>{t.clearTimer(er)}));return Zn(t,{displayName:"Config"}),t}((async e=>{await Promise.all(Yn(this,no).map((t=>t(e))))})),t=[vr,Ar,Mr,Qr,Lr,Wr,dr(this),e];Yn(this,uo).call(this,t,Yn(this,ao))})),Xn(this,uo,((e,t)=>{e.forEach((e=>{const n=Yn(this,lo).produce(Yn(this,eo)?e.meta:void 0),r=e(n);t.set(e,{ctx:n,handler:r,cleanup:void 0})}))})),Xn(this,po,((e,t=!1)=>Promise.all([e].flat().map((e=>{const n=Yn(this,so).get(e),r=null==n?void 0:n.cleanup;return t?Yn(this,so).delete(e):Yn(this,so).set(e,{ctx:void 0,handler:void 0,cleanup:void 0}),"function"==typeof r?r():r}))))),Xn(this,fo,(async()=>{await Promise.all([...Yn(this,ao).entries()].map((([e,{cleanup:t}])=>"function"==typeof t?t():t))),Yn(this,ao).clear()})),Xn(this,ho,(e=>{Xn(this,to,e),Yn(this,ro).call(this,e)})),Xn(this,mo,(e=>[...e.entries()].map((async([t,n])=>{const{ctx:r,handler:o}=n;if(!o)return;const i=await o();e.set(t,{ctx:r,handler:o,cleanup:i})})))),this.enableInspector=(e=!0)=>(Xn(this,eo,e),this),this.onStatusChange=e=>(Xn(this,ro,e),this),this.config=e=>(Yn(this,no).push(e),this),this.removeConfig=e=>(Xn(this,no,Yn(this,no).filter((t=>t!==e))),this),this.use=e=>{const t=[e].flat();return t.flat().forEach((e=>{Yn(this,so).set(e,{ctx:void 0,handler:void 0,cleanup:void 0})})),"Created"===Yn(this,to)&&Yn(this,uo).call(this,t,Yn(this,so)),this},this.remove=async e=>"OnCreate"===Yn(this,to)?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise((t=>{setTimeout((()=>{t(this.remove(e))}),50)}))):(await Yn(this,po).call(this,[e].flat(),!0),this),this.create=async()=>("OnCreate"===Yn(this,to)||("Created"===Yn(this,to)&&await this.destroy(),Yn(this,ho).call(this,"OnCreate"),Yn(this,co).call(this),Yn(this,uo).call(this,[...Yn(this,so).keys()],Yn(this,so)),await Promise.all([Yn(this,mo).call(this,Yn(this,ao)),Yn(this,mo).call(this,Yn(this,so))].flat()),Yn(this,ho).call(this,"Created")),this),this.destroy=async(e=!1)=>"Destroyed"===Yn(this,to)||"OnDestroy"===Yn(this,to)?this:"OnCreate"===Yn(this,to)?new Promise((t=>{setTimeout((()=>{t(this.destroy(e))}),50)})):(e&&Xn(this,no,[]),Yn(this,ho).call(this,"OnDestroy"),await Yn(this,po).call(this,[...Yn(this,so).keys()],e),await Yn(this,fo).call(this),Yn(this,ho).call(this,"Destroyed"),this),this.action=e=>e(Yn(this,lo)),this.inspect=()=>Yn(this,eo)?[...Yn(this,ao).values(),...Yn(this,so).values()].map((({ctx:e})=>{var t;return null==(t=null==e?void 0:e.inspector)?void 0:t.read()})).filter((e=>!!e)):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new e}get ctx(){return Yn(this,lo)}get status(){return Yn(this,to)}}},5152:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},5309:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(7545),o=n(2474);function i(e,t){if(t&&("object"===(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.A)(e)}},5405:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},5536:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2559);function o(e,t,n){return n((0,r.A)(e,t))}},5694:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>et,an:()=>C,Ki:()=>F,zA:()=>D,RC:()=>Ze,hV:()=>J,IV:()=>Je});var r=n(4586),o=n(689),i=n(3705),s=n(9740);const a=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};var l=n(9055),c=n(8769),u=(n(4511),n(8257),n(5152)),d=n(414),p="%";function f(e){return e.join(p)}const h=function(){function e(t){(0,u.A)(this,e),(0,r.A)(this,"instanceId",void 0),(0,r.A)(this,"cache",new Map),this.instanceId=t}return(0,d.A)(e,[{key:"get",value:function(e){return this.opGet(f(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(f(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}();var m="data-token-hash",g="data-css-hash",y="__cssinjs_instance__";const v=c.createContext({hashPriority:"low",cache:function(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(g,"]"))||[],n=document.head.firstChild;Array.from(t).forEach((function(t){t[y]=t[y]||e,t[y]===e&&document.head.insertBefore(t,n)}));var r={};Array.from(document.querySelectorAll("style[".concat(g,"]"))).forEach((function(t){var n,o=t.getAttribute(g);r[o]?t[y]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[o]=!0}))}return new h(e)}(),defaultCache:!0});var b=n(7545),w=n(7169);new RegExp("CALC_UNIT","g");var k=function(){function e(){(0,u.A)(this,e),(0,r.A)(this,"cache",void 0),(0,r.A)(this,"keys",void 0),(0,r.A)(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return(0,d.A)(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o={map:this.cache};return e.forEach((function(e){var t;o=o?null===(t=o)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):void 0})),null!==(t=o)&&void 0!==t&&t.value&&r&&(o.value[1]=this.cacheCallTimes++),null===(n=o)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce((function(e,t){var n=(0,o.A)(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e}),[this.keys[0],this.cacheCallTimes]),s=(0,o.A)(i,1)[0];this.delete(s)}this.keys.push(t)}var a=this.cache;t.forEach((function(e,o){if(o===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var i=a.get(e);i?i.map||(i.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}}))}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var o=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),o}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter((function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)})),this.deleteByPath(this.cache,e)}}]),e}();(0,r.A)(k,"MAX_CACHE_SIZE",20),(0,r.A)(k,"MAX_CACHE_OFFSET",5);var x=n(4445),A=0,S=function(){function e(t){(0,u.A)(this,e),(0,r.A)(this,"derivatives",void 0),(0,r.A)(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=A,0===t.length&&(0,x.$e)(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),A+=1}return(0,d.A)(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce((function(t,n){return n(e,t)}),void 0)}}]),e}(),E=new k;function C(e){var t=Array.isArray(e)?e:[e];return E.has(t)||E.set(t,new S(t)),E.get(t)}var O=new WeakMap,M={},N=new WeakMap;function T(e){var t=N.get(e)||"";return t||(Object.keys(e).forEach((function(n){var r=e[n];t+=n,r instanceof S?t+=r.id:r&&"object"===(0,b.A)(r)?t+=T(r):t+=r})),t=a(t),N.set(e,t)),t}function I(e,t){return a("".concat(t,"_").concat(T(e)))}"random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,"");var R=(0,w.A)();function D(e){return"number"==typeof e?"".concat(e,"px"):e}function P(e,t,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var a=(0,s.A)((0,s.A)({},i),{},(o={},(0,r.A)(o,m,t),(0,r.A)(o,g,n),o)),l=Object.keys(a).map((function(e){var t=a[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"<style ".concat(l,">").concat(e,"</style>")}var F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},L=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!=n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")})).join(""),"}"):""},_=function(e,t,n){var r={},i={};return Object.entries(e).forEach((function(e){var t,s,a=(0,o.A)(e,2),l=a[0],c=a[1];if(null!=n&&null!==(t=n.preserve)&&void 0!==t&&t[l])i[l]=c;else if(!("string"!=typeof c&&"number"!=typeof c||null!=n&&null!==(s=n.ignore)&&void 0!==s&&s[l])){var u,d=F(l,null==n?void 0:n.prefix);r[d]="number"!=typeof c||null!=n&&null!==(u=n.unitless)&&void 0!==u&&u[l]?String(c):"".concat(c,"px"),i[l]="var(".concat(d,")")}})),[i,L(r,t,{scope:null==n?void 0:n.scope})]},z=n(4238),$=(0,s.A)({},c).useInsertionEffect;const j=$?function(e,t,n){return $((function(){return e(),t()}),n)}:function(e,t,n){c.useMemo(e,n),(0,z.A)((function(){return t(!0)}),n)},B=void 0!==(0,s.A)({},c).useInsertionEffect?function(e){var t=[],n=!1;return c.useEffect((function(){return n=!1,function(){n=!0,t.length&&t.forEach((function(e){return e()}))}}),e),function(e){n||t.push(e)}}:function(){return function(e){e()}},H=function(){return!1};function V(e,t,n,r,s){var a=c.useContext(v).cache,l=f([e].concat((0,i.A)(t))),u=B([l]),d=(H(),function(e){a.opUpdate(l,(function(t){var r=t||[void 0,void 0],i=(0,o.A)(r,2),s=i[0],a=[void 0===s?0:s,i[1]||n()];return e?e(a):a}))});c.useMemo((function(){d()}),[l]);var p=a.opGet(l)[1];return j((function(){null==s||s(p)}),(function(e){return d((function(t){var n=(0,o.A)(t,2),r=n[0],i=n[1];return e&&0===r&&(null==s||s(p)),[r+1,i]})),function(){a.opUpdate(l,(function(t){var n=t||[],i=(0,o.A)(n,2),s=i[0],c=void 0===s?0:s,d=i[1];return 0==c-1?(u((function(){!e&&a.opGet(l)||null==r||r(d,!1)})),null):[c-1,d]}))}}),[l]),p}var U={},W="css",K=new Map,q=0;var G=function(e,t,n,r){var o=n.getDerivativeToken(e),i=(0,s.A)((0,s.A)({},o),t);return r&&(i=r(i)),i},Y="token";function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(0,c.useContext)(v),u=r.cache.instanceId,d=r.container,p=n.salt,f=void 0===p?"":p,h=n.override,b=void 0===h?U:h,w=n.formatToken,k=n.getComputedToken,x=n.cssVar,A=function(e,n){for(var r=O,o=0;o<n.length;o+=1){var s=n[o];r.has(s)||r.set(s,new WeakMap),r=r.get(s)}return r.has(M)||r.set(M,Object.assign.apply(Object,[{}].concat((0,i.A)(t)))),r.get(M)}(0,t),S=T(A),E=T(b),C=x?T(x):"",N=V(Y,[f,e.id,S,E,C],(function(){var t,n=k?k(A,b,e):G(A,b,e,w),r=(0,s.A)({},n),i="";if(x){var l=_(n,x.key,{prefix:x.prefix,ignore:x.ignore,unitless:x.unitless,preserve:x.preserve}),c=(0,o.A)(l,2);n=c[0],i=c[1]}var u=I(n,f);n._tokenKey=u,r._tokenKey=I(r,f);var d=null!==(t=null==x?void 0:x.key)&&void 0!==t?t:u;n._themeKey=d,function(e){K.set(e,(K.get(e)||0)+1)}(d);var p="".concat(W,"-").concat(a(u));return n._hashId=p,[n,p,r,i,(null==x?void 0:x.key)||""]}),(function(e){!function(e,t){K.set(e,(K.get(e)||0)-1);var n=Array.from(K.keys()),r=n.filter((function(e){return(K.get(e)||0)<=0}));n.length-r.length>q&&r.forEach((function(e){!function(e,t){"undefined"!=typeof document&&document.querySelectorAll("style[".concat(m,'="').concat(e,'"]')).forEach((function(e){var n;e[y]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),K.delete(e)}))}(e[0]._themeKey,u)}),(function(e){var t=(0,o.A)(e,4),n=t[0],r=t[3];if(x&&r){var i=(0,l.BD)(r,a("css-variables-".concat(n._themeKey)),{mark:g,prepend:"queue",attachTo:d,priority:-999});i[y]=u,i.setAttribute(m,n._themeKey)}}));return N}var X=n(9575);const Z={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Q="comm",ee="rule",te="decl",ne="@import",re="@keyframes",oe="@layer",ie=Math.abs,se=String.fromCharCode;function ae(e){return e.trim()}function le(e,t,n){return e.replace(t,n)}function ce(e,t,n){return e.indexOf(t,n)}function ue(e,t){return 0|e.charCodeAt(t)}function de(e,t,n){return e.slice(t,n)}function pe(e){return e.length}function fe(e,t){return t.push(e),e}function he(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function me(e,t,n,r){switch(e.type){case oe:if(e.children.length)break;case ne:case te:return e.return=e.return||e.value;case Q:return"";case re:return e.return=e.value+"{"+he(e.children,r)+"}";case ee:if(!pe(e.value=e.props.join(",")))return""}return pe(n=he(e.children,r))?e.return=e.value+"{"+n+"}":""}Object.assign;var ge=1,ye=1,ve=0,be=0,we=0,ke="";function xe(e,t,n,r,o,i,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:ge,column:ye,length:s,return:"",siblings:a}}function Ae(){return we=be>0?ue(ke,--be):0,ye--,10===we&&(ye=1,ge--),we}function Se(){return we=be<ve?ue(ke,be++):0,ye++,10===we&&(ye=1,ge++),we}function Ee(){return ue(ke,be)}function Ce(){return be}function Oe(e,t){return de(ke,e,t)}function Me(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ne(e){return ae(Oe(be-1,Re(91===e?e+2:40===e?e+1:e)))}function Te(e){for(;(we=Ee())&&we<33;)Se();return Me(e)>2||Me(we)>3?"":" "}function Ie(e,t){for(;--t&&Se()&&!(we<48||we>102||we>57&&we<65||we>70&&we<97););return Oe(e,Ce()+(t<6&&32==Ee()&&32==Se()))}function Re(e){for(;Se();)switch(we){case e:return be;case 34:case 39:34!==e&&39!==e&&Re(we);break;case 40:41===e&&Re(e);break;case 92:Se()}return be}function De(e,t){for(;Se()&&e+we!==57&&(e+we!==84||47!==Ee()););return"/*"+Oe(t,be-1)+"*"+se(47===e?e:Se())}function Pe(e){for(;!Me(Ee());)Se();return Oe(e,be)}function Fe(e){return function(e){return ke="",e}(Le("",null,null,null,[""],e=function(e){return ge=ye=1,ve=pe(ke=e),be=0,[]}(e),0,[0],e))}function Le(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,p=0,f=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,k=i,x=r,A=b;g;)switch(h=v,v=Se()){case 40:if(108!=h&&58==ue(A,d-1)){-1!=ce(A+=le(Ne(v),"&","&\f"),"&\f",ie(c?a[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:A+=Ne(v);break;case 9:case 10:case 13:case 32:A+=Te(h);break;case 92:A+=Ie(Ce()-1,7);continue;case 47:switch(Ee()){case 42:case 47:fe(ze(De(Se(),Ce()),t,n,l),l),5!=Me(h||1)&&5!=Me(Ee()||1)||!pe(A)||" "===de(A,-1,void 0)||(A+=" ");break;default:A+="/"}break;case 123*m:a[c++]=pe(A)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(A=le(A,/\f/g,"")),f>0&&(pe(A)-d||0===m&&47===h)&&fe(f>32?$e(A+";",r,n,d-1,l):$e(le(A," ","")+";",r,n,d-2,l),l);break;case 59:A+=";";default:if(fe(x=_e(A,t,n,c,u,o,a,b,w=[],k=[],d,i),i),123===v)if(0===u)Le(A,t,x,x,w,i,d,a,k);else switch(99===p&&110===ue(A,3)?100:p){case 100:case 108:case 109:case 115:Le(e,x,x,r&&fe(_e(e,x,x,0,0,o,a,b,o,w=[],d,k),k),o,k,d,a,r?w:k);break;default:Le(A,x,x,x,[""],k,0,a,k)}}c=u=f=0,m=y=1,b=A="",d=s;break;case 58:d=1+pe(A),f=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==Ae())continue;switch(A+=se(v),v*m){case 38:y=u>0?1:(A+="\f",-1);break;case 44:a[c++]=(pe(A)-1)*y,y=1;break;case 64:45===Ee()&&(A+=Ne(Se())),p=Ee(),u=d=pe(b=A+=Pe(Ce())),v++;break;case 45:45===h&&2==pe(A)&&(m=0)}}return i}function _e(e,t,n,r,o,i,s,a,l,c,u,d){for(var p=o-1,f=0===o?i:[""],h=function(e){return e.length}(f),m=0,g=0,y=0;m<r;++m)for(var v=0,b=de(e,p+1,p=ie(g=s[m])),w=e;v<h;++v)(w=ae(g>0?f[v]+" "+b:le(b,/&\f/g,f[v])))&&(l[y++]=w);return xe(e,t,n,0===o?ee:a,l,c,u,d)}function ze(e,t,n,r){return xe(e,t,n,Q,se(we),de(e,2,-2),0,r)}function $e(e,t,n,r,o){return xe(e,t,n,te,de(e,0,r),de(e,r+1,-1),r,o)}var je,Be="data-ant-cssinjs-cache-path",He="_FILE_STYLE__",Ve=!0;var Ue="_multi_value_";function We(e){return he(Fe(e),me).replace(/\{%%%\:[^;];}/g,";")}var Ke=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},a=r.root,l=r.injectHash,c=r.parentSelectors,u=n.hashId,d=n.layer,p=(n.path,n.hashPriority),f=n.transformers,h=void 0===f?[]:f,m=(n.linters,""),g={};function y(t){var r=t.getName(u);if(!g[r]){var i=e(t.style,n,{root:!1,parentSelectors:c}),s=(0,o.A)(i,1)[0];g[r]="@keyframes ".concat(t.getName(u)).concat(s)}}var v=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);return v.forEach((function(t){var r="string"!=typeof t||a?t:{};if("string"==typeof r)m+="".concat(r,"\n");else if(r._keyframe)y(r);else{var d=h.reduce((function(e,t){var n;return(null==t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),r);Object.keys(d).forEach((function(t){var r=d[t];if("object"!==(0,b.A)(r)||!r||"animationName"===t&&r._keyframe||function(e){return"object"===(0,b.A)(e)&&e&&("_skip_check_"in e||Ue in e)}(r)){var f;function C(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),r=t;Z[e]||"number"!=typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!=t&&t._keyframe&&(y(t),r=t.getName(u)),m+="".concat(n,":").concat(r,";")}var h=null!==(f=null==r?void 0:r.value)&&void 0!==f?f:r;"object"===(0,b.A)(r)&&null!=r&&r[Ue]&&Array.isArray(h)?h.forEach((function(e){C(t,e)})):C(t,h)}else{var v=!1,w=t.trim(),k=!1;(a||l)&&u?w.startsWith("@")?v=!0:w=function(e,t,n){if(!t)return e;var r=".".concat(t),o="low"===n?":where(".concat(r,")"):r;return e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",s=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(s).concat(o).concat(r.slice(s.length))].concat((0,i.A)(n.slice(1))).join(" ")})).join(",")}("&"===w?"":t,u,p):!a||u||"&"!==w&&""!==w||(w="",k=!0);var x=e(r,n,{root:k,injectHash:v,parentSelectors:[].concat((0,i.A)(c),[w])}),A=(0,o.A)(x,2),S=A[0],E=A[1];g=(0,s.A)((0,s.A)({},g),E),m+="".concat(w).concat(S)}}))}})),a?d&&(m&&(m="@layer ".concat(d.name," {").concat(m,"}")),d.dependencies&&(g["@layer ".concat(d.name)]=d.dependencies.map((function(e){return"@layer ".concat(e,", ").concat(d.name,";")})).join("\n"))):m="{".concat(m,"}"),[m,g]};function qe(e,t){return a("".concat(e.join("%")).concat(t))}function Ge(){return null}var Ye="style";function Je(e,t){var n=e.token,a=e.path,u=e.hashId,d=e.layer,p=e.nonce,f=e.clientOnly,h=e.order,b=void 0===h?0:h,k=c.useContext(v),x=k.autoClear,A=(k.mock,k.defaultCache),S=k.hashPriority,E=k.container,C=k.ssrInline,O=k.transformers,M=k.linters,N=k.cache,T=k.layer,I=n._tokenKey,D=[I];T&&D.push("layer"),D.push.apply(D,(0,i.A)(a));var P=R,F=V(Ye,D,(function(){var e=D.join("|");if(function(e){return function(){if(!je&&(je={},(0,w.A)())){var e=document.createElement("div");e.className=Be,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=e.split(":"),n=(0,o.A)(t,2),r=n[0],i=n[1];je[r]=i}));var n,r=document.querySelector("style[".concat(Be,"]"));r&&(Ve=!1,null===(n=r.parentNode)||void 0===n||n.removeChild(r)),document.body.removeChild(e)}}(),!!je[e]}(e)){var n=function(e){var t=je[e],n=null;if(t&&(0,w.A)())if(Ve)n=He;else{var r=document.querySelector("style[".concat(g,'="').concat(je[e],'"]'));r?n=r.innerHTML:delete je[e]}return[n,t]}(e),r=(0,o.A)(n,2),i=r[0],s=r[1];if(i)return[i,I,s,{},f,b]}var l=t(),c=Ke(l,{hashId:u,hashPriority:S,layer:T?d:void 0,path:a.join("-"),transformers:O,linters:M}),p=(0,o.A)(c,2),h=p[0],m=p[1],y=We(h),v=qe(D,y);return[y,I,v,m,f,b]}),(function(e,t){var n=(0,o.A)(e,3)[2];(t||x)&&R&&(0,l.m6)(n,{mark:g})}),(function(e){var t=(0,o.A)(e,4),n=t[0],r=(t[1],t[2]),i=t[3];if(P&&n!==He){var a={mark:g,prepend:!T&&"queue",attachTo:E,priority:b},c="function"==typeof p?p():p;c&&(a.csp={nonce:c});var u=[],d=[];Object.keys(i).forEach((function(e){e.startsWith("@layer")?u.push(e):d.push(e)})),u.forEach((function(e){(0,l.BD)(We(i[e]),"_layer-".concat(e),(0,s.A)((0,s.A)({},a),{},{prepend:!0}))}));var f=(0,l.BD)(n,r,a);f[y]=N.instanceId,f.setAttribute(m,I),d.forEach((function(e){(0,l.BD)(We(i[e]),"_effect-".concat(e),a)}))}})),L=(0,o.A)(F,3),_=L[0],z=L[1],$=L[2];return function(e){var t,n;return t=C&&!P&&A?c.createElement("style",(0,X.A)({},(n={},(0,r.A)(n,m,z),(0,r.A)(n,g,$),n),{dangerouslySetInnerHTML:{__html:_}})):c.createElement(Ge,null),c.createElement(c.Fragment,null,t,e)}}var Xe="cssVar";const Ze=function(e,t){var n=e.key,r=e.prefix,s=e.unitless,a=e.ignore,u=e.token,d=e.scope,p=void 0===d?"":d,f=(0,c.useContext)(v),h=f.cache.instanceId,b=f.container,w=u._tokenKey,k=[].concat((0,i.A)(e.path),[n,p,w]);return V(Xe,k,(function(){var e=t(),i=_(e,n,{prefix:r,unitless:s,ignore:a,scope:p}),l=(0,o.A)(i,2),c=l[0],u=l[1];return[c,u,qe(k,u),n]}),(function(e){var t=(0,o.A)(e,3)[2];R&&(0,l.m6)(t,{mark:g})}),(function(e){var t=(0,o.A)(e,3),r=t[1],i=t[2];if(r){var s=(0,l.BD)(r,i,{mark:g,prepend:"queue",attachTo:b,priority:-999});s[y]=h,s.setAttribute(m,n)}}))};var Qe;Qe={},(0,r.A)(Qe,Ye,(function(e,t,n){var r=(0,o.A)(e,6),i=r[0],s=r[1],a=r[2],l=r[3],c=r[4],u=r[5],d=(n||{}).plain;if(c)return null;var p=i,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return p=P(i,s,a,f,d),l&&Object.keys(l).forEach((function(e){if(!t[e]){t[e]=!0;var n=P(We(l[e]),s,"_effect-".concat(e),f,d);e.startsWith("@layer")?p=n+p:p+=n}})),[u,a,p]})),(0,r.A)(Qe,Y,(function(e,t,n){var r=(0,o.A)(e,5),i=r[2],s=r[3],a=r[4],l=(n||{}).plain;if(!s)return null;var c=i._tokenKey;return[-999,c,P(s,a,c,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]})),(0,r.A)(Qe,Xe,(function(e,t,n){var r=(0,o.A)(e,4),i=r[1],s=r[2],a=r[3],l=(n||{}).plain;return i?[-999,s,P(i,a,s,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]:null}));const et=function(){function e(t,n){(0,u.A)(this,e),(0,r.A)(this,"name",void 0),(0,r.A)(this,"style",void 0),(0,r.A)(this,"_keyframe",!0),this.name=t,this.style=n}return(0,d.A)(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();function tt(e){return e.notSplit=!0,e}tt(["borderTop","borderBottom"]),tt(["borderTop"]),tt(["borderBottom"]),tt(["borderLeft","borderRight"]),tt(["borderLeft"]),tt(["borderRight"])},5715:(e,t,n)=>{"use strict";n.d(t,{Im:()=>v,Qv:()=>a,RV:()=>C,_e:()=>c,ic:()=>s,st:()=>k,wh:()=>w,y_:()=>b});var r=n(1329),o=n(6090),i=n(1570);const s=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);const a=(e,t,n)=>{let s=function(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}(e,n);if(!s)return!1;let a=u(s);if(!a){let n=s.blockRange(),o=n&&(0,r.jP)(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let c=a.nodeBefore;if(!c.type.spec.isolating&&h(e,a,t))return!0;if(0==s.parent.content.size&&(l(c,"end")||i.nh.isSelectable(c))){let n=(0,r.$L)(e.doc,s.before(),s.after(),o.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(l(c,"end")?i.LN.findFrom(r.doc.resolve(r.mapping.map(a.pos,-1)),-1):i.nh.create(r.doc,a.pos-c.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!c.isAtom||a.depth!=s.depth-1||(t&&t(e.tr.delete(a.pos-c.nodeSize,a.pos).scrollIntoView()),0))};function l(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}const c=(e,t,n)=>{let{$head:r,empty:o}=e.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;s=u(r)}let a=s&&s.nodeBefore;return!(!a||!i.nh.isSelectable(a)||(t&&t(e.tr.setSelection(i.nh.create(e.doc,s.pos-a.nodeSize)).scrollIntoView()),0))};function u(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 d(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}function p(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var f;function h(e,t,n){let s,a,c=t.nodeBefore,u=t.nodeAfter;if(c.type.spec.isolating||u.type.spec.isolating)return!1;if(function(e,t,n){let o=t.nodeBefore,i=t.nodeAfter,s=t.index();return!(!(o&&i&&o.type.compatibleContent(i.type))||(!o.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(s,s+1)||!i.isTextblock&&!(0,r.n9)(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let d=t.parent.canReplace(t.index(),t.index()+1);if(d&&(s=(a=c.contentMatchAt(c.childCount)).findWrapping(u.type))&&a.matchType(s[0]||u.type).validEnd){if(n){let i=t.pos+u.nodeSize,a=o.FK.empty;for(let e=s.length-1;e>=0;e--)a=o.FK.from(s[e].create(null,a));a=o.FK.from(c.copy(a));let l=e.tr.step(new r.Wg(t.pos-1,i,t.pos,i,new o.Ji(a,1,0),s.length,!0)),d=i+2*s.length;(0,r.n9)(l.doc,d)&&l.join(d),n(l.scrollIntoView())}return!0}let p=i.LN.findFrom(t,1),f=p&&p.$from.blockRange(p.$to),h=f&&(0,r.jP)(f);if(null!=h&&h>=t.depth)return n&&n(e.tr.lift(f,h).scrollIntoView()),!0;if(d&&l(u,"start",!0)&&l(c,"end")){let i=c,s=[];for(;s.push(i),!i.isTextblock;)i=i.lastChild;let a=u,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(i.canReplace(i.childCount,i.childCount,a.content)){if(n){let i=o.FK.empty;for(let e=s.length-1;e>=0;e--)i=o.FK.from(s[e].copy(i));n(e.tr.step(new r.Wg(t.pos-s.length,t.pos+u.nodeSize,t.pos+l,t.pos+u.nodeSize-l,new o.Ji(i,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function m(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return!!o.node(s).isTextblock&&(n&&n(t.tr.setSelection(i.U3.create(t.doc,e<0?o.start(s):o.end(s)))),!0)}}const g=m(-1),y=m(1);function v(e,t=null){return function(n,o){let{$from:i,$to:s}=n.selection,a=i.blockRange(s),l=a&&(0,r.oM)(a,e,t);return!!l&&(o&&o(n.tr.wrap(a,l).scrollIntoView()),!0)}}function b(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:s}}=n.selection.ranges[r];n.doc.nodesBetween(i,s,((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:s}}=n.selection.ranges[r];o.setBlockType(i,s,e,t)}r(o.scrollIntoView())}return!0}}function w(e,t=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!function(e,t,n){for(let r=0;r<t.length;r++){let{$from:o,$to:i}=t[r],s=0==o.depth&&e.inlineContent&&e.type.allowsMarkType(n);if(e.nodesBetween(o.pos,i.pos,(e=>{if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return!0}return!1}(n.doc,s,e))return!1;if(r)if(i)e.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let o=!1,i=n.tr;for(let t=0;!o&&t<s.length;t++){let{$from:r,$to:i}=s[t];o=n.doc.rangeHasMark(r.pos,i.pos,e)}for(let n=0;n<s.length;n++){let{$from:r,$to:a}=s[n];if(o)i.removeMark(r.pos,a.pos,e);else{let n=r.pos,o=a.pos,s=r.nodeAfter,l=a.nodeBefore,c=s&&s.isText?/^\s*/.exec(s.text)[0].length:0,u=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<o&&(n+=c,o-=u),i.addMark(n,o,e.create(t))}}r(i.scrollIntoView())}return!0}}function k(...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 x=k(s,a,c),A=k(s,((e,t,n)=>{let s=function(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}(e,n);if(!s)return!1;let a=d(s);if(!a)return!1;let c=a.nodeAfter;if(h(e,a,t))return!0;if(0==s.parent.content.size&&(l(c,"start")||i.nh.isSelectable(c))){let n=(0,r.$L)(e.doc,s.before(),s.after(),o.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(l(c,"start")?i.LN.findFrom(r.doc.resolve(r.mapping.map(a.pos)),1):i.nh.create(r.doc,r.mapping.map(a.pos))),t(r.scrollIntoView())}return!0}}return!(!c.isAtom||a.depth!=s.depth-1||(t&&t(e.tr.delete(a.pos,a.pos+c.nodeSize).scrollIntoView()),0))}),((e,t,n)=>{let{$head:r,empty:o}=e.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;s=d(r)}let a=s&&s.nodeAfter;return!(!a||!i.nh.isSelectable(a)||(t&&t(e.tr.setSelection(i.nh.create(e.doc,s.pos)).scrollIntoView()),0))}));const S={Enter: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))}),((e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof i.i5||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=p(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=e.tr.insert(n,s.createAndFill());a.setSelection(i.U3.create(a.doc,n+1)),t(a.scrollIntoView())}return!0}),((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.zy)(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let o=n.blockRange(),i=o&&(0,r.jP)(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)}),((e,t)=>{let{$from:n,$to:o}=e.selection;if(e.selection instanceof i.nh&&e.selection.node.isBlock)return!(!n.parentOffset||!(0,r.zy)(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let s=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof i.U3||e.selection instanceof i.i5)&&a.deleteSelection();let l=0==n.depth?null:p(n.node(-1).contentMatchAt(n.indexAfter(-1))),c=f?[f]:s&&l?[{type:l}]:void 0,u=(0,r.zy)(a.doc,a.mapping.map(n.pos),1,c);if(c||u||!(0,r.zy)(a.doc,a.mapping.map(n.pos),1,l?[{type:l}]:void 0)||(l&&(c=[{type:l}]),u=!0),u&&(a.split(a.mapping.map(n.pos),1,c),!s&&!n.parentOffset&&n.parent.type!=l)){let e=a.mapping.map(n.before()),t=a.doc.resolve(e);l&&n.node(-1).canReplaceWith(t.index(),t.index()+1,l)&&a.setNodeMarkup(a.mapping.map(n.before()),l)}t(a.scrollIntoView())}return!0})),"Mod-Enter":(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),s=n.indexAfter(-1),a=p(o.contentMatchAt(s));if(!a||!o.canReplaceWith(s,s,a))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,a.createAndFill());o.setSelection(i.LN.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0},Backspace:x,"Mod-Backspace":x,"Shift-Backspace":x,Delete:A,"Mod-Delete":A,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new i.i5(e.doc))),!0)},E={"Ctrl-h":S.Backspace,"Alt-Backspace":S["Mod-Backspace"],"Ctrl-d":S.Delete,"Ctrl-Alt-Backspace":S["Mod-Delete"],"Alt-Delete":S["Mod-Delete"],"Alt-d":S["Mod-Delete"],"Ctrl-a":g,"Ctrl-e":y};for(let e in S)E[e]=S[e];const C=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&"darwin"==os.platform())?E:S},5939:(e,t,n)=>{"use strict";n.d(t,{K:()=>g,w:()=>m});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&&/Chrome\/(\d+)/.exec(navigator.userAgent),s=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),a="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=s||i&&+i[1]<57,c=0;c<10;c++)r[48+c]=r[96+c]=String(c);for(c=1;c<=24;c++)r[c+111]="F"+c;for(c=65;c<=90;c++)r[c]=String.fromCharCode(c+32),o[c]=String.fromCharCode(c);for(var u in r)o.hasOwnProperty(u)||(o[u]=r[u]);var d=n(1570);const p="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function f(e){let t,n,r,o,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let e=0;e<i.length-1;e++){let s=i[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);p?o=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function h(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function m(e){return new d.k_({props:{handleKeyDown:g(e)}})}function g(e){let t=function(e){let t=Object.create(null);for(let n in e)t[f(n)]=e[n];return t}(e);return function(e,n){let i,s=function(e){var t=!(l&&(e.ctrlKey||e.altKey||e.metaKey)||a&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?o:r)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),c=t[h(s,n)];if(c&&c(e.state,e.dispatch,e))return!0;if(1==s.length&&" "!=s){if(n.shiftKey){let r=t[h(s,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.shiftKey||n.altKey||n.metaKey||s.charCodeAt(0)>127)&&(i=r[n.keyCode])&&i!=s){let r=t[h(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},6090:(e,t,n)=>{"use strict";function r(e){this.content=e}n.d(t,{S4:()=>X,ZF:()=>ae,FK:()=>a,CU:()=>d,sX:()=>G,bP:()=>I,u$:()=>N,Z6:()=>K,vI:()=>p,Sj:()=>Y,Ji:()=>f}),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),s=o.content.slice();return-1==i?s.push(n||e,t):(s[i+1]=t,n&&(s[i]=n)),new r(s)},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(),s=o.find(e);return i.splice(-1==s?i.length:s,0,t,n),new r(i)},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)};const o=r;function i(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),s=t.child(r);if(o!=s){if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)n++;return n}if(o.content.size||s.content.size){let e=i(o.content,s.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function s(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let a=e.child(--o),l=t.child(--i),c=a.nodeSize;if(a!=l){if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let e=0,t=Math.min(a.text.length,l.text.length);for(;e<t&&a.text[a.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let e=s(a.content,l.content,n-1,r-1);if(e)return e}n-=c,r-=c}else n-=c,r-=c}}class a{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,s=0;s<t;i++){let a=this.content[i],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,e-o),Math.min(a.content.size,t-o),n,r+o)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf?(r?o+="function"==typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),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(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new a(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 s=this.content[o],a=i+s.nodeSize;a>e&&((i<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=a}return new a(n,r)}cutByIndex(e,t){return e==t?a.empty:0==e&&t==this.content.length?this:new a(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new a(r,o)}addToStart(e){return new a([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new a(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 new 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 i(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return s(this,e,t,n)}findIndex(e,t=-1){if(0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(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 a.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return a.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 a(t||e,n)}static from(e){if(!e)return a.empty;if(e instanceof a)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new a([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}a.empty=new a([],0);const l={index:0,offset:0};function c(e,t){return l.index=e,l.offset=t,l}function u(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!u(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class d{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&&u(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return d.none;if(e instanceof d)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}d.none=[];class p extends Error{}class f{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=m(this.content,e+this.openStart,t);return n&&new f(n,this.openStart,this.openEnd)}removeBetween(e,t){return new f(h(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 f.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(a.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 f(e,n,r)}}function h(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(h(i.content,t-o-1,n-o-1)))}function m(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=m(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function g(e,t,n){if(n.openStart>e.depth)throw new p("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new p("Inconsistent open depths");return y(e,t,n,0)}function y(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let s=y(e,t,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:s}=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(a.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return x(i,A(e,o,s,t,r))}{let r=e.parent,o=r.content;return x(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return x(i,S(e,t,r))}function v(e,t){if(!t.type.compatibleContent(e.type))throw new p("Cannot join "+t.type.name+" onto "+e.type.name)}function b(e,t,n){let r=e.node(n);return v(r,t.node(n)),r}function w(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 k(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(w(e.nodeAfter,r),i++));for(let e=i;e<s;e++)w(o.child(e),r);t&&t.depth==n&&t.textOffset&&w(t.nodeBefore,r)}function x(e,t){return e.type.checkContent(t),e.copy(t)}function A(e,t,n,r,o){let i=e.depth>o&&b(e,t,o+1),s=r.depth>o&&b(n,r,o+1),l=[];return k(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(v(i,s),w(x(i,A(e,t,n,r,o+1)),l)):(i&&w(x(i,S(e,t,o+1)),l),k(t,n,o,l),s&&w(x(s,S(n,r,o+1)),l)),k(r,null,o,l),new a(l)}function S(e,t,n){let r=[];return k(null,e,n,r),e.depth>n&&w(x(b(e,t,n+1),S(e,t,n+1)),r),k(t,null,n,r),new a(r)}f.empty=new f(a.empty,0,0);class E{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 new 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 new 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 d.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 N(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 new 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),s=o-i;if(n.push(t,e,r+i),!s)break;if(t=t.child(e),t.isText)break;o=s-1,r+=i+1}return new E(t,n,o)}static resolveCached(e,t){for(let n=0;n<C.length;n++){let r=C[n];if(r.pos==t&&r.doc==e)return r}let n=C[O]=E.resolve(e,t);return O=(O+1)%M,n}}let C=[],O=0,M=12;class N{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)}}const T=Object.create(null);class I{constructor(e,t,n,r=d.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||a.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&&u(this.attrs,t||e.defaultAttrs||T)&&d.sameSet(this.marks,n||d.none)}copy(e=null){return e==this.content?this:new I(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new I(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 f.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new f(a,r.depth-i,o.depth-i)}replace(e,t,n){return g(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),!t)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 E.resolveCached(this,e)}resolveNoCache(e){return E.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),D(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=a.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<o;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);let e=d.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!d.sameSet(e,this.marks))throw new 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){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=a.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}I.prototype.text=void 0;class R extends I{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):D(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 R(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new R(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 D(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class P{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new F(e,t);if(null==n.next)return P.empty;let r=L(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);H(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new P(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(B);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}(H(e,0))}(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){if("star"==t.type){let s=n();return r(i,s),o(e(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return o(e(t.expr,i),s),o(e(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){let s=i;for(let r=0;r<t.min;r++){let r=n();o(e(t.expr,s),r),s=r}if(-1==t.max)o(e(t.expr,s),s);else for(let i=t.min;i<t.max;i++){let i=n();r(s,i),o(e(t.expr,s),i),s=i}return[r(s)]}if("name"==t.type)return[r(i,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=e(t.exprs[r],i);if(r==t.exprs.length-1)return s;o(s,i=n())}}(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}function o(e,t){e.forEach((e=>e.to=t))}}(r));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:s}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}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 o(i,s){let l=i.matchFragment(e,n);if(l&&(!t||l.validEnd))return a.from(s.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(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:s}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!s.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 new 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")}}P.empty=new P(!0);class F{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 new SyntaxError(e+" (in content expression '"+this.string+"')")}}function L(e){let t=[];do{t.push(_(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function _(e){let t=[];do{t.push(z(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function z(e){let t=function(e){if(e.eat("(")){let t=L(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=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.groups.indexOf(t)>-1&&o.push(r)}return 0==o.length&&e.err("No node type or group '"+t+"' found"),o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=j(e,t)}return t}function $(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function j(e,t){let n=$(e),r=n;return e.eat(",")&&(r="}"!=e.next?$(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function B(e,t){return t-e}function H(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(B)}function V(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 U(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)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function W(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new q(e[n]);return t}class K{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=W(n.attrs),this.defaultAttrs=V(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==P.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}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:U(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new I(this,this.computeAttrs(e),a.from(t),d.setFrom(n))}createChecked(e=null,t,n){return t=a.from(t),this.checkContent(t),new I(this,this.computeAttrs(e),t,d.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=a.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(a.empty,!0);return o?new I(this,e,t.append(o),d.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!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 new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}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){if(null==this.markSet)return e;let t;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:d.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new K(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class q{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class G{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=W(r.attrs),this.excluded=null;let o=V(this.attrs);this.instance=o?new d(this,o):null}create(e=null){return!e&&this.instance?this.instance:new d(this,U(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new G(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]}excludes(e){return this.excluded.indexOf(e)>-1}}class Y{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=o.from(e.nodes),t.marks=o.from(e.marks||{}),this.nodes=K.compile(this.spec.nodes,this),this.marks=G.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",o=t.spec.marks;t.contentMatch=n[r]||(n[r]=P.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.markSet="_"==o?null:o?J(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?[]:J(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 K))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new R(n,n.defaultAttrs,e,d.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return I.fromJSON(this,e)}markFromJSON(e){return d.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function J(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],s=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(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class X{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&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 re(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new re(this,t,!0);return n.addAll(e,t.from,t.to),f.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(oe(e,n.tag)&&(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=ie(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=ie(e)),e.node||e.ignore||e.mark||(e.node=t)}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new X(e,X.schemaRules(e)))}}const Z={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},Q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ee={ol:!0,ul:!0};function te(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class ne{constructor(e,t,n,r,o,i,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=d.none,this.stashMarks=[],this.match=i||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(a.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=a.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):se(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Z.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class re{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,i=te(null,t.preserveWhitespace,0)|(n?4:0);r=o?new ne(o.type,o.attrs,d.none,d.none,!0,t.topMatch||o.type.contentMatch,i):new ne(n?null:e.schema.topNodeType,null,d.none,d.none,!0,null,i),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style");if(t){let n=this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t));if(!n)return;let[r,o]=n,i=this.top;for(let e=0;e<o.length;e++)this.removePendingMark(o[e],i);for(let e=0;e<r.length;e++)this.addPendingMark(r[e]);this.addElement(e);for(let e=0;e<r.length;e++)this.removePendingMark(r[e],i);for(let e=0;e<o.length;e++)this.addPendingMark(o[e])}else this.addElement(e)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();ee.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&&ee.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:Q.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,i=this.needsBlock;if(Z.hasOwnProperty(r))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),t&&this.sync(n),this.needsBlock=i}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=d.none,n=d.none;for(let r=0;r<e.length;r+=2)for(let o;;){let i=this.parser.matchStyle(e[r],e[r+1],this,o);if(!i)break;if(i.ignore)return null;if(i.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach((e=>{i.clearMark(e)&&(n=e.addToSet(n))})):t=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(t),!1!==i.consuming)break;o=i}return[t,n]}addElementByRule(e,t,n){let r,o,i;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace)):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let i=te(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ne(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}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,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=o;s--)if(i(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}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}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function oe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ie(e){let t={};for(let n in e)t[n]=e[n];return t}function se(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class ae{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=ce(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]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],s=this.serializeMark(n,e.isInline,t);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=ae.renderSpec(ce(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new 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&&ae.renderSpec(ce(n),r(e,t))}static renderSpec(e,t,n=null){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 r,o=t[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?e.createElementNS(n,o):e.createElement(o),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let o=l;o<t.length;o++){let i=t[o];if(0===i){if(o<t.length-1||o>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:o}=ae.renderSpec(e,i,n);if(s.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ae(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=le(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return le(e.marks)}}function le(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ce(e){return e.document||window.document}},6121:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2559);function o(e,t,n){return e.set((0,r.A)(e,t),n),n}},6127:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var r=n(4586);const o=Math.round;function i(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map((e=>parseFloat(e)));for(let e=0;e<3;e+=1)r[e]=t(r[e]||0,n[e]||"",e);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const s=(e,t,n)=>0===n?e:e/100;function a(e,t){const n=t||255;return e>n?n:e<0?0:e}class l{constructor(e){function t(t){return t[0]in e&&t[1]in e&&t[2]in e}if((0,r.A)(this,"isValid",!0),(0,r.A)(this,"r",0),(0,r.A)(this,"g",0),(0,r.A)(this,"b",0),(0,r.A)(this,"a",1),(0,r.A)(this,"_h",void 0),(0,r.A)(this,"_s",void 0),(0,r.A)(this,"_l",void 0),(0,r.A)(this,"_v",void 0),(0,r.A)(this,"_max",void 0),(0,r.A)(this,"_min",void 0),(0,r.A)(this,"_brightness",void 0),e)if("string"==typeof e){const n=e.trim();function o(e){return n.startsWith(e)}/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):o("rgb")?this.fromRgbString(n):o("hsl")?this.fromHslString(n):(o("hsv")||o("hsb"))&&this.fromHsvString(n)}else if(e instanceof l)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=a(e.r),this.g=a(e.g),this.b=a(e.b),this.a="number"==typeof e.a?a(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else{if(!t("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e));this.fromHsv(e)}}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*e(this.r)+.7152*e(this.g)+.0722*e(this.b)}getHue(){if(void 0===this._h){const e=this.getMax()-this.getMin();this._h=0===e?0:o(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(void 0===this._s){const e=this.getMax()-this.getMin();this._s=0===e?0:e/this.getMax()}return this._s}getLightness(){return void 0===this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return void 0===this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return void 0===this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){const n=this._c(e),r=t/100,i=e=>(n[e]-this[e])*r+this[e],s={r:o(i("r")),g:o(i("g")),b:o(i("b")),a:o(100*i("a"))/100};return this._c(s)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>o((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=2===t.length?t:"0"+t;const n=(this.g||0).toString(16);e+=2===n.length?n:"0"+n;const r=(this.b||0).toString(16);if(e+=2===r.length?r:"0"+r,"number"==typeof this.a&&this.a>=0&&this.a<1){const t=o(255*this.a).toString(16);e+=2===t.length?t:"0"+t}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=o(100*this.getSaturation()),n=o(100*this.getLightness());return 1!==this.a?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=a(t,n),r}_c(e){return new this.constructor(e)}getMax(){return void 0===this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return void 0===this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){if(this._h=e%360,this._s=t,this._l=n,this.a="number"==typeof r?r:1,t<=0){const e=o(255*n);this.r=e,this.g=e,this.b=e}let i=0,s=0,a=0;const l=e/60,c=(1-Math.abs(2*n-1))*t,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,s=u):l>=1&&l<2?(i=u,s=c):l>=2&&l<3?(s=c,a=u):l>=3&&l<4?(s=u,a=c):l>=4&&l<5?(i=u,a=c):l>=5&&l<6&&(i=c,a=u);const d=n-c/2;this.r=o(255*(i+d)),this.g=o(255*(s+d)),this.b=o(255*(a+d))}fromHsv({h:e,s:t,v:n,a:r}){this._h=e%360,this._s=t,this._v=n,this.a="number"==typeof r?r:1;const i=o(255*n);if(this.r=i,this.g=i,this.b=i,t<=0)return;const s=e/60,a=Math.floor(s),l=s-a,c=o(n*(1-t)*255),u=o(n*(1-t*l)*255),d=o(n*(1-t*(1-l))*255);switch(a){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;default:this.g=c,this.b=u}}fromHsvString(e){const t=i(e,s);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=i(e,s);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=i(e,((e,t)=>t.includes("%")?o(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}},6197:(e,t,n)=>{"use strict";n.d(t,{dc:()=>l,_Z:()=>c,VG:()=>u});const r=function(e){if(null==e)return i;if("function"==typeof e)return o(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=r(e[n]);return o((function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}))}(e):function(e){const t=e;return o((function(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}))}(e);if("string"==typeof e)return t=e,o((function(e){return e&&e.type===t}));var t;throw new Error("Expected function, string, or object as test")};function o(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function i(){return!0}const s=[],a=!0,l=!1,c="skip";function u(e,t,n,o){let i;"function"==typeof t&&"function"!=typeof n?(o=n,n=t):i=t;const u=r(i),d=o?-1:1;!function e(r,i,p){const f=r&&"object"==typeof r?r:{};if("string"==typeof f.type){const e="string"==typeof f.tagName?f.tagName:"string"==typeof f.name?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+r.type+(e?"<"+e+">":"")+")"})}return h;function h(){let f,h,m,g=s;if((!t||u(r,i,p[p.length-1]||void 0))&&(g=function(e){return Array.isArray(e)?e:"number"==typeof e?[a,e]:null==e?s:[e]}(n(r,p)),g[0]===l))return g;if("children"in r&&r.children){const t=r;if(t.children&&g[0]!==c)for(h=(o?t.children.length:-1)+d,m=p.concat(t);h>-1&&h<t.children.length;){const n=t.children[h];if(f=e(n,h,m)(),f[0]===l)return f;h="number"==typeof f[1]?f[1]:h+d}}return g}}(e,void 0,[])()}},6284:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>r})},6313:(e,t,n)=>{"use strict";function r(e,t,n){return">"+(n?"":" ")+e}n.d(t,{p:()=>C});var o=n(3219);function i(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&(0,o.q)(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}var s=n(8468);function a(e,t,n){return(n?"":" ")+e}function l(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function c(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(o);return a+=s.move(n.containerPhrasing(e,{before:a,after:o,...s.current()})),a+=s.move(o),i(),a}c.peek=function(e,t,n){return n.options.emphasis||"*"};var u=n(1697);function d(e){return e.value||""}function p(e,t,n,r){const o=l(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=n.enter(`title${i}`),u+=c.move(" "+o),u+=c.move(n.safe(e.title,{before:u,after:o,...c.current()})),u+=c.move(o),a()),u+=c.move(")"),s(),u}function f(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function h(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}d.peek=function(){return"<"},p.peek=function(){return"!"},f.peek=function(){return"!"},h.peek=function(){return"`"};var m=n(1807);function g(e,t){const n=(0,m.d)(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function y(e,t,n,r){const o=l(n),i='"'===o?"Quote":"Apostrophe",s=n.createTracker(r);let a,c;if(g(e,n)){const t=n.stack;n.stack=[],a=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,{before:r,after:">",...s.current()})),r+=s.move(">"),a(),n.stack=t,r}a=n.enter("link"),c=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(c=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=s.move(" "+o),u+=s.move(n.safe(e.title,{before:u,after:o,...s.current()})),u+=s.move(o),c()),u+=s.move(")"),a(),u}function v(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(d+"]"),l}function b(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function w(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}y.peek=function(e,t,n){return g(e,n)?"<":"["},v.peek=function(){return"["};const k=function(e){if(null==e)return A;if("function"==typeof e)return x(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=k(e[n]);return x((function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}))}(e):function(e){const t=e;return x((function(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}))}(e);if("string"==typeof e)return t=e,x((function(e){return e&&e.type===t}));var t;throw new Error("Expected function, string, or object as test")};function x(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function A(){return!0}const S=k(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function E(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),s=n.createTracker(r);let a=s.move(o+o);return a+=s.move(n.containerPhrasing(e,{before:a,after:o,...s.current()})),a+=s.move(o+o),i(),a}E.peek=function(e,t,n){return n.options.strong||"*"};const C={blockquote:function(e,t,n,o){const i=n.enter("blockquote"),s=n.createTracker(o);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),r);return i(),a},break:i,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",l="`"===o?"GraveAccent":"Tilde";if((0,s.m)(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,a);return e(),t}const c=n.createTracker(r),u=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>s&&(s=i):i=1,o=r+t.length,r=n.indexOf(t,o);return s}(i,o)+1,3)),d=n.enter("codeFenced");let p=c.move(u);if(e.lang){const t=n.enter(`codeFencedLang${l}`);p+=c.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...c.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${l}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,{before:p,after:"\n",encode:["`"],...c.current()})),t()}return p+=c.move("\n"),i&&(p+=c.move(i+"\n")),p+=c.move(u),d(),p},definition:function(e,t,n,r){const o=l(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":"\n",...c.current()}))),a(),e.title&&(a=n.enter(`title${i}`),u+=c.move(" "+o),u+=c.move(n.safe(e.title,{before:u,after:o,...c.current()})),u+=c.move(o),a()),s(),u},emphasis:c,hardBreak:i,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if((0,u.f)(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===o?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(o),a=n.enter("headingAtx"),l=n.enter("phrasing");i.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),a(),c},html:d,image:p,imageReference:f,inlineCode:h,link:y,linkReference:v,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):b(n);const a=e.ordered?"."===s?")":".":function(e){const t=b(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),w(n)===s&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||b(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let s=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(r);a.move(i+" ".repeat(s-i.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),(function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?i:i+" ".repeat(s-i.length))+e}));return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,r);return i(),o(),s},root:function(e,t,n,r){return(e.children.some((function(e){return S(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:E,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(w(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}}},6330:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var s=e.apply(t,n);function a(e){r(s,o,i,a,l,"next",e)}function l(e){r(s,o,i,a,l,"throw",e)}a(void 0)}))}}n.d(t,{A:()=>o})},6488:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},6561:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8769);const o=n.n(r)().createContext(void 0)},6758:e=>{"use strict";e.exports=function(e){return e[1]}},6902:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7545);function o(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==e?(0,r.A)(e):"null"));return e}},7010:(e,t,n)=>{"use strict";n.d(t,{YK:()=>d,jH:()=>l});var r=n(8769),o=n.n(r),i=n(7652),s=n(6561);const a=100,l=1e3,c={Modal:a,Drawer:a,Popover:a,Popconfirm:a,Tooltip:a,Tour:a,FloatButton:a},u={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},d=(e,t)=>{const[,n]=(0,i.Ay)(),r=o().useContext(s.A);let a;if(void 0!==t)a=[t,t];else{let o=null!=r?r:0;o+=e in c?(r?0:n.zIndexPopupBase)+c[e]:u[e],a=[void 0===r?t:o,o]}return a}},7043:(e,t,n)=>{"use strict";n.d(t,{Ik:()=>c,dI:()=>l,j7:()=>a,pj:()=>d,sm:()=>p,zD:()=>u});var r=(e=>(e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e))(r||{});class o extends Error{constructor(e,t){super(t),this.name="MilkdownError",this.code=e}}const i=(e,t)=>"function"==typeof t?"[Function]":t,s=e=>JSON.stringify(e,i);function a(e){return new o(r.docTypeError,`Doc type error, unsupported type: ${s(e)}`)}function l(){return new o(r.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function c(e){return new o(r.expectDomTypeError,`Expect to be a dom, but get: ${s(e)}.`)}function u(){return new o(r.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function d(e){return new o(r.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function p(e){return new o(r.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}},7096:(e,t,n)=>{"use strict";function r(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}n.d(t,{A:()=>r})},7169:(e,t,n)=>{"use strict";function r(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}n.d(t,{A:()=>r})},7268:(e,t,n)=>{"use strict";n.d(t,{yu:()=>c,Qx:()=>h,b_:()=>u,JY:()=>b,hk:()=>g,dz:()=>d,YR:()=>v,Yh:()=>m,Gf:()=>p,lz:()=>w,pq:()=>y,m5:()=>f,yh:()=>k});var r=n(5119),o=n(7488);var i=n(7043),s=n(5939),a=n(6090),l=n(1570);function c(e,t){const n=(0,r.qf)(e),o=i=>async()=>{o.key=n,await i.wait(r.A2);const s=t(i);return i.get(r.MD).create(n,s),o.run=t=>i.get(r.MD).call(e,t),()=>{i.get(r.MD).remove(n)}};return o}function u(e){const t=n=>async()=>{await n.wait(r.x8);const o=e(n);return n.update(r.f4,(e=>[...e,o])),t.inputRule=o,()=>{n.update(r.f4,(e=>e.filter((e=>e!==o))))}};return t}function d(e,t){const n=o=>async()=>{const i=t(o);return o.update(r.P_,(t=>[...t.filter((t=>t[0]!==e)),[e,i]])),n.id=e,n.schema=i,()=>{o.update(r.P_,(t=>t.filter((([t])=>t!==e))))}};return n.type=t=>{const n=t.get(r.pZ).nodes[e];if(!n)throw(0,i.pj)(e);return n},n}function p(e){let t;const n=n=>async()=>(await n.wait(r.x8),t=e(n),n.update(r.TP,(e=>[...e,t])),()=>{n.update(r.TP,(e=>e.filter((e=>e!==t))))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function f(e,t){const n=o=>async()=>{await o.wait(r.x8);const i=t(o);return e.type(o)instanceof a.Z6?o.update(r.pe,(t=>[...t,[e.id,i]])):o.update(r.aD,(t=>[...t,[e.id,i]])),n.view=i,n.type=e,()=>{e.type(o)instanceof a.Z6?o.update(r.pe,(t=>t.filter((t=>t[0]!==e.id)))):o.update(r.aD,(t=>t.filter((t=>t[0]!==e.id))))}};return n}function h(e,t){const n=(0,o.Z0)(e,t),r=e=>(e.inject(n),()=>()=>{e.remove(n)});return r.key=n,r}function m(e,t){const n=h(t,e),o=d(e,(e=>e.get(n.key)(e))),i=[n,o];return i.id=o.id,i.node=o,i.type=e=>o.type(e),i.schema=o.schema,i.ctx=n,i.key=n.key,i.extendSchema=t=>o=>()=>{const s=o.get(n.key),a=t(s)(o);o.update(r.P_,(t=>[...t.filter((t=>t[0]!==e)),[e,a]])),i.schema=a},i}function g(e,t){const n=h(t,e),o=function(e,t){const n=o=>async()=>{const i=t(o);return o.update(r.u7,(t=>[...t.filter((t=>t[0]!==e)),[e,i]])),n.id=e,n.schema=i,()=>{o.update(r.u7,(t=>t.filter((([t])=>t!==e))))}};return n.type=t=>{const n=t.get(r.pZ).marks[e];if(!n)throw(0,i.sm)(e);return n},n}(e,(e=>e.get(n.key)(e))),s=[n,o];return s.id=o.id,s.mark=o,s.type=o.type,s.schema=o.schema,s.ctx=n,s.key=n.key,s.extendSchema=t=>o=>()=>{const i=o.get(n.key),a=t(i)(o);o.update(r.u7,(t=>[...t.filter((t=>t[0]!==e)),[e,a]])),s.schema=a},s}function y(e,t){const n=h(Object.fromEntries(Object.entries(t).map((([e,{shortcuts:t}])=>[e,t]))),`${e}Keymap`),o=function(e){const t=n=>async()=>{await n.wait(r.x8);const o=e(n),i=(0,s.w)(o);return n.update(r.TP,(e=>[...e,i])),t.keymap=o,()=>{n.update(r.TP,(e=>e.filter((e=>e!==i))))}};return t}((e=>{const r=e.get(n.key),o=Object.entries(t).flatMap((([t,{command:n}])=>[r[t]].flat().map((t=>[t,n(e)]))));return Object.fromEntries(o)})),i=[n,o];return i.ctx=n,i.shortcuts=o,i.key=n.key,i.keymap=o.keymap,i}((e,t=21)=>{(e=>{Math.log(e.length-1),Math.LN2,e.length})("abcedfghicklmn",t)})(0,10);const v=(e,t=()=>({}))=>h(t,`${e}Attr`),b=(e,t=()=>({}))=>h(t,`${e}Attr`);function w(e,t,n){const o=h(n??{},e),i=e=>async()=>{await e.wait(r.ge);const n={plugin:t(e),options:e.get(o.key)};return e.update(r.eM,(e=>[...e,n])),()=>{e.update(r.eM,(e=>e.filter((e=>e!==n))))}},s=[o,i];return s.id=e,s.plugin=i,s.options=o,s}function k(e,t=!1){return n=>{const o=n.get(r.kY),i=n.get(r.bQ)(e);if(!i)return;if(!t){const{state:e}=o;return o.dispatch(e.tr.replace(0,e.doc.content.size,new a.Ji(i.content,0,0)))}const s=n.get(r.pZ),c=n.get(r.Sr),u=n.get(r.TP),d=l.$t.create({schema:s,doc:i,plugins:u,...c});o.updateState(d)}}},7488:(e,t,n)=>{"use strict";n.d(t,{CR:()=>H,Kj:()=>R,Z0:()=>g,mc:()=>f,zD:()=>D});var r,o,i,s=n(1440),a=Object.defineProperty,l=(e,t,n)=>(((e,t,n)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),c=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},u=(e,t,n)=>(c(e,t,"read from private field"),n?n.call(e):t.get(e)),d=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},p=(e,t,n,r)=>(c(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class f{constructor(){l(this,"sliceMap",new Map),l(this,"get",(e=>{const t="string"==typeof e?[...this.sliceMap.values()].find((t=>t.type.name===e)):this.sliceMap.get(e.id);if(!t){const t="string"==typeof e?e:e.name;throw(0,s.XM)(t)}return t})),l(this,"remove",(e=>{const t="string"==typeof e?[...this.sliceMap.values()].find((t=>t.type.name===e)):this.sliceMap.get(e.id);!t||this.sliceMap.delete(t.type.id)})),l(this,"has",(e=>"string"==typeof e?[...this.sliceMap.values()].some((t=>t.type.name===e)):this.sliceMap.has(e.id)))}}class h{constructor(e,t,n){l(this,"type"),d(this,r,[]),d(this,o,void 0),d(this,i,(()=>{u(this,r).forEach((e=>e(u(this,o))))})),l(this,"set",(e=>{p(this,o,e),u(this,i).call(this)})),l(this,"get",(()=>u(this,o))),l(this,"update",(e=>{p(this,o,e(u(this,o))),u(this,i).call(this)})),this.type=n,p(this,o,t),e.set(n.id,this)}on(e){return u(this,r).push(e),()=>{p(this,r,u(this,r).filter((t=>t!==e)))}}once(e){const t=this.on((n=>{e(n),t()}));return t}off(e){p(this,r,u(this,r).filter((t=>t!==e)))}offAll(){p(this,r,[])}}r=new WeakMap,o=new WeakMap,i=new WeakMap;class m{constructor(e,t){l(this,"id"),l(this,"name"),l(this,"_typeInfo"),l(this,"_defaultValue"),this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw(0,s.dI)()}}create(e,t=this._defaultValue){return new h(e,t,this)}}const g=(e,t)=>new m(e,t);var y,v,b,w,k,x,A,S,E,C,O,M,N;class T{constructor(e,t,n){d(this,y,void 0),d(this,v,void 0),d(this,b,void 0),d(this,w,new Set),d(this,k,new Set),d(this,x,new Map),d(this,A,new Map),l(this,"read",(()=>({metadata:u(this,y),injectedSlices:[...u(this,w)].map((e=>({name:"string"==typeof e?e:e.name,value:u(this,S).call(this,e)}))),consumedSlices:[...u(this,k)].map((e=>({name:"string"==typeof e?e:e.name,value:u(this,S).call(this,e)}))),recordedTimers:[...u(this,x)].map((([e,{duration:t}])=>({name:e.name,duration:t,status:u(this,E).call(this,e)}))),waitTimers:[...u(this,A)].map((([e,{duration:t}])=>({name:e.name,duration:t,status:u(this,E).call(this,e)})))}))),l(this,"onRecord",(e=>{u(this,x).set(e,{start:Date.now(),duration:0})})),l(this,"onClear",(e=>{u(this,x).delete(e)})),l(this,"onDone",(e=>{const t=u(this,x).get(e);!t||(t.duration=Date.now()-t.start)})),l(this,"onWait",((e,t)=>{const n=Date.now();t.finally((()=>{u(this,A).set(e,{duration:Date.now()-n})}))})),l(this,"onInject",(e=>{u(this,w).add(e)})),l(this,"onRemove",(e=>{u(this,w).delete(e)})),l(this,"onUse",(e=>{u(this,k).add(e)})),d(this,S,(e=>u(this,v).get(e).get())),d(this,E,(e=>u(this,b).get(e).status)),p(this,v,e),p(this,b,t),p(this,y,n)}}y=new WeakMap,v=new WeakMap,b=new WeakMap,w=new WeakMap,k=new WeakMap,x=new WeakMap,A=new WeakMap,S=new WeakMap,E=new WeakMap;const I=class{constructor(e,t,n){d(this,C,void 0),d(this,O,void 0),d(this,M,void 0),d(this,N,void 0),l(this,"produce",(e=>e&&Object.keys(e).length?new I(u(this,C),u(this,O),{...e}):this)),l(this,"inject",((e,t)=>{var n;const r=e.create(u(this,C).sliceMap);return null!=t&&r.set(t),null==(n=u(this,N))||n.onInject(e),this})),l(this,"remove",(e=>{var t;return u(this,C).remove(e),null==(t=u(this,N))||t.onRemove(e),this})),l(this,"record",(e=>{var t;return e.create(u(this,O).store),null==(t=u(this,N))||t.onRecord(e),this})),l(this,"clearTimer",(e=>{var t;return u(this,O).remove(e),null==(t=u(this,N))||t.onClear(e),this})),l(this,"isInjected",(e=>u(this,C).has(e))),l(this,"isRecorded",(e=>u(this,O).has(e))),l(this,"use",(e=>{var t;return null==(t=u(this,N))||t.onUse(e),u(this,C).get(e)})),l(this,"get",(e=>this.use(e).get())),l(this,"set",((e,t)=>this.use(e).set(t))),l(this,"update",((e,t)=>this.use(e).update(t))),l(this,"timer",(e=>u(this,O).get(e))),l(this,"done",(e=>{var t;this.timer(e).done(),null==(t=u(this,N))||t.onDone(e)})),l(this,"wait",(e=>{var t;const n=this.timer(e).start();return null==(t=u(this,N))||t.onWait(e,n),n})),l(this,"waitTimers",(async e=>{await Promise.all(this.get(e).map((e=>this.wait(e))))})),p(this,C,e),p(this,O,t),p(this,M,n),n&&p(this,N,new T(e,t,n))}get meta(){return u(this,M)}get inspector(){return u(this,N)}};let R=I;C=new WeakMap,O=new WeakMap,M=new WeakMap,N=new WeakMap;class D{constructor(){l(this,"store",new Map),l(this,"get",(e=>{const t=this.store.get(e.id);if(!t)throw(0,s.nr)(e.name);return t})),l(this,"remove",(e=>{this.store.delete(e.id)})),l(this,"has",(e=>this.store.has(e.id)))}}var P,F,L,_,z,$;class j{constructor(e,t){l(this,"type"),d(this,P,null),d(this,F,null),d(this,L,void 0),d(this,_,"pending"),l(this,"start",(()=>(u(this,P)??p(this,P,new Promise(((e,t)=>{p(this,F,(t=>{t instanceof CustomEvent&&t.detail.id===u(this,L)&&(p(this,_,"resolved"),u(this,z).call(this),t.stopImmediatePropagation(),e())})),u(this,$).call(this,(()=>{"pending"===u(this,_)&&p(this,_,"rejected"),u(this,z).call(this),t(new Error(`Timing ${this.type.name} timeout.`))})),p(this,_,"pending"),addEventListener(this.type.name,u(this,F))}))),u(this,P)))),l(this,"done",(()=>{const e=new CustomEvent(this.type.name,{detail:{id:u(this,L)}});dispatchEvent(e)})),d(this,z,(()=>{u(this,F)&&removeEventListener(this.type.name,u(this,F))})),d(this,$,(e=>{setTimeout((()=>{e()}),this.type.timeout)})),p(this,L,Symbol(t.name)),this.type=t,e.set(t.id,this)}get status(){return u(this,_)}}P=new WeakMap,F=new WeakMap,L=new WeakMap,_=new WeakMap,z=new WeakMap,$=new WeakMap;class B{constructor(e,t=3e3){l(this,"id"),l(this,"name"),l(this,"timeout"),l(this,"create",(e=>new j(e,this))),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}}const H=(e,t=3e3)=>new B(e,t)},7534:(e,t,n)=>{"use strict";n.d(t,{Te:()=>pr});var r,o,i=n(7043),s=n(536),a=n(96),l=n(7268),c=n(5119),u=n(1570),d=n(6090),p=n(3686),f=n(5939),h=n(1329);if("undefined"!=typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),o=(t,n)=>(e.set(t,n),n)}else{const e=[],t=10;let n=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},o=(r,o)=>(n==t&&(n=0),e[n++]=r,e[n++]=o)}var m=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++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,o=t/this.width|0;let i=r+1,s=o+1;for(let e=1;i<this.width&&this.map[t+e]==n;e++)i++;for(let e=1;s<this.height&&this.map[t+this.width*e]==n;e++)s++;return{left:r,top:o,right:i,bottom:s}}throw new 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 new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:o,top:i,bottom:s}=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:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(e,t){const{left:n,right:r,top:o,bottom:i}=this.findCell(e),{left:s,right:a,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(o,l),right:Math.max(r,a),bottom:Math.max(i,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,o==e.left&&o&&this.map[i-1]==s||r==e.top&&r&&this.map[i-this.width]==s||t.push(s))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width;const 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 new RangeError("Not a table node: "+e.type.name);const t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const o=e.child(r);let i=0;if(n)for(let t=0;t<r;t++){const n=e.child(t);for(let e=0;e<n.childCount;e++){const o=n.child(e);t+o.attrs.rowspan>r&&(i+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){const 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=[];let o=0,i=null;const s=[];for(let e=0,o=t*n;e<o;e++)r[e]=0;for(let a=0,l=0;a<n;a++){const c=e.child(a);l++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==c.childCount)break;const u=c.child(e),{colspan:d,rowspan:p,colwidth:f}=u.attrs;for(let e=0;e<p;e++){if(e+a>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:l,n:p-e});break}const c=o+e*t;for(let e=0;e<d;e++){0==r[c+e]?r[c+e]=l:(i||(i=[])).push({type:"collision",row:a,pos:l,n:d-e});const n=f&&f[e];if(n){const r=(c+e)%t*2,o=s[r];null==o||o!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):o==n&&s[r+1]++}}}o+=d,l+=u.nodeSize}const u=(a+1)*t;let d=0;for(;o<u;)0==r[o++]&&d++;d&&(i||(i=[])).push({type:"missing",row:a,n:d}),l++}const a=new m(t,n,r,i);let l=!1;for(let e=0;!l&&e<s.length;e+=2)null!=s[e]&&s[e+1]<n&&(l=!0);return l&&function(e,t,n){e.problems||(e.problems=[]);const r={};for(let o=0;o<e.map.length;o++){const i=e.map[o];if(r[i])continue;r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let a=null;const l=s.attrs;for(let n=0;n<l.colspan;n++){const r=t[(o+n)%e.width*2];null==r||l.colwidth&&l.colwidth[n]==r||((a||(a=g(l)))[n]=r)}a&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}(a,s,e),a}(e))}};function g(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function y(e,t){if("string"==typeof e)return{};const n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((e=>Number(e))):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(const n in t){const r=t[n].getFromDOM,o=r&&r(e);null!=o&&(i[n]=o)}return i}function v(e,t){const n={};1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const r in t){const o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function b(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}var w=new u.hs("selectingCells");function k(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 x(e){const 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 A(e){const 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;const n=k(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const 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--){const 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 new RangeError(`No cell found around position ${t.head}`)}function S(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function E(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function C(e,t,n){const r=e.node(-1),o=m.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return null==s?null:e.node(0).resolve(i+s)}function O(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((e=>e>0))||(r.colwidth=null)),r}function M(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}var N=class extends u.LN{constructor(e,t=e){const n=e.node(-1),r=m.get(n),o=e.start(-1),i=r.rectBetween(e.pos-o,t.pos-o),s=e.node(0),a=r.cellsInRect(i).filter((e=>e!=t.pos-o));a.unshift(t.pos-o);const l=a.map((e=>{const t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);const r=o+e+1;return new u.yn(s.resolve(r),s.resolve(r+t.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(e,t){const n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(S(n)&&S(r)&&E(n,r)){const e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?N.rowSelection(n,r):e&&this.isColSelection()?N.colSelection(n,r):new N(n,r)}return u.U3.between(n,r)}content(){const e=this.$anchorCell.node(-1),t=m.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++){const s=[];for(let i=n*t.width+r.left,a=r.left;a<r.right;a++,i++){const n=t.map[i];if(o[n])continue;o[n]=!0;const a=t.findCell(n);let l=e.nodeAt(n);if(!l)throw RangeError(`No cell with offset ${n} found`);const c=r.left-a.left,u=a.right-r.right;if(c>0||u>0){let e=l.attrs;if(c>0&&(e=O(e,0,c)),u>0&&(e=O(e,e.colspan-u,u)),a.left<r.left){if(l=l.type.createAndFill(e),!l)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else l=l.type.create(e,l.content)}if(a.top<r.top||a.bottom>r.bottom){const e={...l.attrs,rowspan:Math.min(a.bottom,r.bottom)-Math.max(a.top,r.top)};l=a.top<r.top?l.type.createAndFill(e):l.type.create(e,l.content)}s.push(l)}i.push(e.child(n).copy(d.FK.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?e:i;return new d.Ji(d.FK.from(s),1,1)}replace(e,t=d.Ji.empty){const n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){const{$from:i,$to:s}=r[o],a=e.mapping.slice(n);e.replace(a.map(i.pos),a.map(s.pos),o?d.Ji.empty:t)}const o=u.LN.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new d.Ji(d.FK.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),n=m.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(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),r=m.get(n),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(t.pos-o),a=e.node(0);return i.top<=s.top?(i.top>0&&(e=a.resolve(o+r.map[i.left])),s.bottom<r.height&&(t=a.resolve(o+r.map[r.width*(r.height-1)+s.right-1]))):(s.top>0&&(t=a.resolve(o+r.map[s.left])),i.bottom<r.height&&(e=a.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new N(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=m.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),o=t.colCount(this.$headCell.pos-n);if(Math.min(r,o)>0)return!1;const i=r+this.$anchorCell.nodeAfter.attrs.colspan,s=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==t.width}eq(e){return e instanceof N&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),r=m.get(n),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(t.pos-o),a=e.node(0);return i.left<=s.left?(i.left>0&&(e=a.resolve(o+r.map[i.top*r.width])),s.right<r.width&&(t=a.resolve(o+r.map[r.width*(s.top+1)-1]))):(s.left>0&&(t=a.resolve(o+r.map[s.top*r.width])),i.right<r.width&&(e=a.resolve(o+r.map[r.width*(i.top+1)-1]))),new N(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new N(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new N(e.resolve(t),e.resolve(n))}getBookmark(){return new T(this.$anchorCell.pos,this.$headCell.pos)}};N.prototype.visible=!1,u.LN.jsonID("cell",N);var T=class{constructor(e,t){this.anchor=e,this.head=t}map(e){return new T(e.map(this.anchor),e.map(this.head))}resolve(e){const 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&&E(t,n)?new N(t,n):u.LN.near(n,1)}};function I(e){if(!(e.selection instanceof N))return null;const t=[];return e.selection.forEachCell(((e,n)=>{t.push(p.NZ.node(n,n+e.nodeSize,{class:"selectedCell"}))})),p.zF.create(e.doc,t)}var R=new u.hs("fix-tables");function D(e,t,n,r){const o=e.childCount,i=t.childCount;e:for(let s=0,a=0;s<i;s++){const i=t.child(s);for(let t=a,r=Math.min(o,s+3);t<r;t++)if(e.child(t)==i){a=t+1,n+=i.nodeSize;continue e}r(i,n),a<o&&e.child(a).sameMarkup(i)?D(e.child(a),i,n+1,r):i.nodesBetween(0,i.content.size,r,n+1),n+=i.nodeSize}}function P(e,t){let n;const r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){const o=m.get(t);if(!o.problems)return r;r||(r=e.tr);const i=[];for(let e=0;e<o.height;e++)i.push(0);for(let e=0;e<o.problems.length;e++){const s=o.problems[e];if("collision"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;const o=e.attrs;for(let e=0;e<o.rowspan;e++)i[s.row+e]+=s.n;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,O(o,o.colspan-s.n,s.n))}else if("missing"==s.type)i[s.row]+=s.n;else if("overlong_rowspan"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-s.n})}else if("colwidth mismatch"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,{...e.attrs,colwidth:s.colwidth})}}let s,a;for(let e=0;e<i.length;e++)i[e]&&(null==s&&(s=e),a=e);for(let l=0,c=n+1;l<o.height;l++){const n=t.child(l),o=c+n.nodeSize,u=i[l];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);const i=[];for(let n=0;n<u;n++){const n=b(e.schema)[t].createAndFill();n&&i.push(n)}const d=0!=l&&s!=l-1||a!=l?o-1:c+1;r.insert(r.mapping.map(d),i)}c=o}return r.setMeta(R,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&D(t.doc,e.doc,0,r):e.doc.descendants(r),n}function F(e,t){const n=e.createAndFill();return new h.dL(n).replace(0,n.content.size,t).doc}function L(e,t,n,r,o,i,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let c=o;c<i;c++){const o=s*t.width+c,i=t.map[o];if(t.map[o-t.width]==i){l=!0;const o=n.nodeAt(i),{top:u,left:d}=t.findCell(i);e.setNodeMarkup(e.mapping.slice(a).map(i+r),null,{...o.attrs,rowspan:s-u}),e.insert(e.mapping.slice(a).map(t.positionAt(s,d,n)),o.type.createAndFill({...o.attrs,rowspan:u+o.attrs.rowspan-s})),c+=o.attrs.colspan-1}}return l}function _(e,t,n,r,o,i,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let c=o;c<i;c++){const o=c*t.width+s,i=t.map[o];if(t.map[o-1]==i){l=!0;const o=n.nodeAt(i),u=t.colCount(i),d=e.mapping.slice(a).map(i+r);e.setNodeMarkup(d,null,O(o.attrs,s-u,o.attrs.colspan-(s-u))),e.insert(d+o.nodeSize,o.type.createAndFill(O(o.attrs,0,s-u))),c+=o.attrs.rowspan-1}}return l}function z(e,t,n,r,o){let i=n?e.doc.nodeAt(n-1):e.doc;if(!i)throw new Error("No table found");let s=m.get(i);const{top:a,left:l}=r,c=l+o.width,u=a+o.height,p=e.tr;let f=0;function h(){if(i=n?p.doc.nodeAt(n-1):p.doc,!i)throw new Error("No table found");s=m.get(i),f=p.mapping.maps.length}(function(e,t,n,r,o,i,s){const a=b(e.doc.type.schema);let l,c;if(o>t.width)for(let i=0,u=0;i<t.height;i++){const d=n.child(i);u+=d.nodeSize;const p=[];let f;f=null==d.lastChild||d.lastChild.type==a.cell?l||(l=a.cell.createAndFill()):c||(c=a.header_cell.createAndFill());for(let e=t.width;e<o;e++)p.push(f);e.insert(e.mapping.slice(s).map(u-1+r),p)}if(i>t.height){const u=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){const o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==a.header_cell;u.push(o?c||(c=a.header_cell.createAndFill()):l||(l=a.cell.createAndFill()))}const p=a.row.create(null,d.FK.from(u)),f=[];for(let e=t.height;e<i;e++)f.push(p);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),f)}return!(!l&&!c)})(p,s,i,n,c,u,f)&&h(),L(p,s,i,n,l,c,a,f)&&h(),L(p,s,i,n,l,c,u,f)&&h(),_(p,s,i,n,a,u,l,f)&&h(),_(p,s,i,n,a,u,c,f)&&h();for(let e=a;e<u;e++){const t=s.positionAt(e,l,i),r=s.positionAt(e,c,i);p.replace(p.mapping.slice(f).map(t+n),p.mapping.slice(f).map(r+n),new d.Ji(o.rows[e-a],0,0))}h(),p.setSelection(new N(p.doc.resolve(n+s.positionAt(a,l,i)),p.doc.resolve(n+s.positionAt(u-1,c-1,i)))),t(p)}var $=(0,f.K)({ArrowLeft:B("horiz",-1),ArrowRight:B("horiz",1),ArrowUp:B("vert",-1),ArrowDown:B("vert",1),"Shift-ArrowLeft":H("horiz",-1),"Shift-ArrowRight":H("horiz",1),"Shift-ArrowUp":H("vert",-1),"Shift-ArrowDown":H("vert",1),Backspace:V,"Mod-Backspace":V,Delete:V,"Mod-Delete":V});function j(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function B(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof N)return j(n,r,u.LN.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;const s=q(o,e,t);if(null==s)return!1;if("horiz"==e)return j(n,r,u.LN.near(n.doc.resolve(i.head+t),t));{const o=n.doc.resolve(s),i=C(o,e,t);let a;return a=i?u.LN.near(i,1):t<0?u.LN.near(n.doc.resolve(o.before(-1)),-1):u.LN.near(n.doc.resolve(o.after(-1)),1),j(n,r,a)}}}function H(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof N)s=i;else{const r=q(o,e,t);if(null==r)return!1;s=new N(n.doc.resolve(r))}const a=C(s.$headCell,e,t);return!!a&&j(n,r,new N(s.$anchorCell,a))}}function V(e,t){const n=e.selection;if(!(n instanceof N))return!1;if(t){const r=e.tr,o=b(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 d.Ji(o,0,0))})),r.docChanged&&t(r)}return!0}function U(e,t){const n=k(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new N(n))),!0)}function W(e,t,n){if(!x(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;const 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;const i=e?0:Math.max(0,n-1),l=e<t.childCount-1?0:Math.max(0,r-1);(i||l)&&(o=F(b(s).row,new d.Ji(o,i,l)).content),a.push(o)}else{if("cell"!=i&&"header_cell"!=i)return null;a.push(n||r?F(b(s).row,new d.Ji(t,n,r)).content:t)}return function(e,t){const n=[];for(let e=0;e<t.length;e++){const r=t[e];for(let t=r.childCount-1;t>=0;t--){const{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(d.FK.empty),n[o]<r){const i=b(e).cell.createAndFill(),s=[];for(let e=n[o];e<r;e++)s.push(i);t[o]=t[o].append(d.FK.from(s))}return{height:t.length,width:r,rows:t}}(s,a)}(n);const o=e.state.selection;if(o instanceof N){r||(r={width:1,height:1,rows:[d.FK.from(F(b(e.state.schema).cell,n))]});const t=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),s=m.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){const t=[],o=[];for(let e=0;e<n.length;e++){const i=n[e],s=[];for(let n=t[e]||0,o=0;n<r;o++){let a=i.child(o%i.childCount);n+a.attrs.colspan>r&&(a=a.type.createChecked(O(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+a.attrs.colspan}o.push(d.FK.from(s))}n=o,e=r}if(t!=o){const e=[];for(let r=0,i=0;r<o;r++,i++){const 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(d.FK.from(s))}n=e,t=o}return{width:e,height:t,rows:n}}(r,s.right-s.left,s.bottom-s.top),z(e.state,e.dispatch,i,s,r),!0}if(r){const t=A(e.state),n=t.start(-1);return z(e.state,e.dispatch,n,m.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function K(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=G(e,t.target);let o;if(t.shiftKey&&e.state.selection instanceof N)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(o=k(e.state.selection.$anchor))&&(null==(n=Y(e,t))?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(t,n){let r=Y(e,n);const o=null==w.getState(e.state);if(!r||!E(t,r)){if(!o)return;r=t}const i=new N(t,r);if(o||!e.state.selection.eq(i)){const n=e.state.tr.setSelection(i);o&&n.setMeta(w,t.pos),e.dispatch(n)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),null!=w.getState(e.state)&&e.dispatch(e.state.tr.setMeta(w,-1))}function a(n){const o=n,a=w.getState(e.state);let l;if(null!=a)l=e.state.doc.resolve(a);else if(G(e,o.target)!=r&&(l=Y(e,t),!l))return s();l&&i(l,o)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function q(e,t,n){if(!(e.state.selection instanceof u.U3))return null;const{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){const i=r.before(o),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?i:null}}return null}function G(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function Y(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?k(e.state.doc.resolve(n.pos)):null}var J=class{constructor(e,t){this.node=e,this.cellMinWidth=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")),X(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,X(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function X(e,t,n,r,o,i){var s;let a=0,l=!0,c=t.firstChild;const u=e.firstChild;if(u){for(let e=0,n=0;e<u.childCount;e++){const{colspan:s,colwidth:d}=u.child(e).attrs;for(let e=0;e<s;e++,n++){const s=o==n?i:d&&d[e],u=s?s+"px":"";a+=s||r,s||(l=!1),c?(c.style.width!=u&&(c.style.width=u),c=c.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;c;){const e=c.nextSibling;null==(s=c.parentNode)||s.removeChild(c),c=e}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var Z=new u.hs("tableColumnResizing");var Q=class{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(Z);if(n&&null!=n.setHandle)return new Q(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new Q(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let n=e.mapping.map(t.activeHandle,-1);return S(e.doc.resolve(n))||(n=-1),new Q(n,t.dragging)}return t}};function ee(e,t,n){const r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;const{pos:o}=r,i=k(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;const s=m.get(i.node(-1)),a=i.start(-1),l=s.map.indexOf(i.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function te(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function ne(e,t){e.dispatch(e.state.tr.setMeta(Z,{setHandle:t}))}function re(e){const t=e.selection,n=A(e),r=n.node(-1),o=n.start(-1),i=m.get(r);return{...t instanceof N?i.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function oe(e,{map:t,tableStart:n,table:r},o){let i=o>0?-1:0;(function(e,t,n){const r=b(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(t,r,o+i)&&(i=0==o||o==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+o;if(o>0&&o<t.width&&t.map[a-1]==t.map[a]){const i=t.map[a],l=r.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,M(l.attrs,o-t.colCount(i))),s+=l.attrs.rowspan-1}else{const l=null==i?b(r.type.schema).cell:r.nodeAt(t.map[a+i]).type,c=t.positionAt(s,o,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function ie(e,t){if(!x(e))return!1;if(t){const n=re(e);t(oe(e.tr,n,n.left))}return!0}function se(e,t){if(!x(e))return!1;if(t){const n=re(e);t(oe(e.tr,n,n.right))}return!0}function ae(e,{map:t,table:n,tableStart:r},o){const i=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+o,l=t.map[a],c=n.nodeAt(l),u=c.attrs;if(o>0&&t.map[a-1]==l||o<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(i).map(r+l),null,O(u,o-t.colCount(l)));else{const t=e.mapping.slice(i).map(r+l);e.delete(t,t+c.nodeSize)}s+=u.rowspan}}function le(e,{map:t,table:n,tableStart:r},o){let i=0;for(let e=0;e<o;e++)i+=n.child(e).nodeSize;const s=i+n.child(o).nodeSize,a=e.mapping.maps.length;e.delete(i+r,s+r);for(let i=0,s=o*t.width;i<t.width;i++,s++){const l=t.map[s];if(o>0&&l==t.map[s-t.width]){const t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(a).map(l+r),null,{...t,rowspan:t.rowspan-1}),i+=t.colspan-1}else if(o<t.width&&l==t.map[s+t.width]){const s=n.nodeAt(l),c=s.attrs,u=s.type.create({...c,rowspan:s.attrs.rowspan-1},s.content),d=t.positionAt(o+1,i,n);e.insert(e.mapping.slice(a).map(r+d),u),i+=c.colspan-1}}}function ce(e,t,n){const 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++){const o=t.table.nodeAt(r[e]);if(o&&o.type!==n.header_cell)return!1}return!0}function ue(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!x(t))return!1;if(n){const r=b(t.schema),o=re(t),i=t.tr,s=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),a=s.map((e=>o.table.nodeAt(e)));for(let e=0;e<s.length;e++)a[e].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[e],r.cell,a[e].attrs);if(0==i.steps.length)for(let e=0;e<s.length;e++)i.setNodeMarkup(o.tableStart+s[e],r.header_cell,a[e].attrs);n(i)}return!0}}(e):function(t,n){if(!x(t))return!1;if(n){const r=b(t.schema),o=re(t),i=t.tr,s=ce("row",o,r),a=ce("column",o,r),l=("column"===e?s:"row"===e&&a)?1:0,c="column"==e?{left:0,top:l,right:1,bottom:o.map.height}:"row"==e?{left:l,top:0,right:o.map.width,bottom:1}:o,u="column"==e?a?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((e=>{const t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)})),n(i)}return!0}}function de(e){return function(t,n){if(!x(t))return!1;const r=function(e,t){if(t<0){const t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){const r=e.node(-1).child(t),o=r.lastChild;if(o)return n-1-o.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){const e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(A(t),e);if(null==r)return!1;if(n){const e=t.doc.resolve(r);n(t.tr.setSelection(u.U3.between(e,(o=e,o.node(0).resolve(o.pos+o.nodeAfter.nodeSize)))).scrollIntoView())}var o;return!0}}ue("row",{useDeprecatedLogic:!0}),ue("column",{useDeprecatedLogic:!0}),ue("cell",{useDeprecatedLogic:!0});var pe=n(4254),fe=n(5715);function he(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}var me=n(9820);const ge=Ae(/[A-Za-z]/),ye=Ae(/[\dA-Za-z]/);function ve(e){return null!==e&&e<-2}function be(e){return null!==e&&(e<0||32===e)}function we(e){return-2===e||-1===e||32===e}Ae(/[#-'*+\--9=?A-Z^-~]/),Ae(/\d/),Ae(/[\dA-Fa-f]/),Ae(/[!-/:-@[-`{-~]/);const ke=Ae(/\p{P}|\p{S}/u),xe=Ae(/\s/);function Ae(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}var Se=n(7096);const Ee=function(e){if(null==e)return Oe;if("function"==typeof e)return Ce(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ee(e[n]);return Ce((function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}))}(e):function(e){const t=e;return Ce((function(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}))}(e);if("string"==typeof e)return t=e,Ce((function(e){return e&&e.type===t}));var t;throw new Error("Expected function, string, or object as test")};function Ce(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Oe(){return!0}const Me=[],Ne=!1;function Te(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=Ee(o),s=r?-1:1;!function e(o,a,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Me;if((!t||i(o,a,l[l.length-1]||void 0))&&(p=function(e){return Array.isArray(e)?e:"number"==typeof e?[true,e]:null==e?Me:[e]}(n(o,l)),p[0]===Ne))return p;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+s,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Ne)return c;u="number"==typeof c[1]?c[1]:u+s}}return p}}(e,void 0,[])()}function Ie(e){return"function"==typeof e?e:function(){return e}}const Re="phrasing",De=["autolink","link","image","label"];function Pe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Fe(e){this.config.enter.autolinkProtocol.call(this,e)}function Le(e){this.config.exit.autolinkProtocol.call(this,e)}function _e(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];(0,me.ok)("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function ze(e){this.config.exit.autolinkEmail.call(this,e)}function $e(e){this.exit(e)}function je(e){!function(e,t,n){const r=Ee((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([(o=e[0],"string"==typeof o?new RegExp((0,Se.A)(o),"g"):o),Ie(e[1])])}var o;return t}(t);let i=-1;for(;++i<o.length;)Te(e,"text",s);function s(e,t){let n,s=-1;for(;++s<t.length;){const e=t[s],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],s=o[i][1];let a=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=s(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(a!==n&&u.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),a=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Be],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,He]],{ignore:["link","linkReference"]})}function Be(e,t,n,r,o){let i="";if(!Ve(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const s=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=he(e,"(");let i=he(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function He(e,t,n,r){return!(!Ve(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Ve(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||xe(n)||ke(n))&&(!t||47!==n)}function Ue(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function We(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ke(){this.buffer()}function qe(e){const t=this.resume(),n=this.stack[this.stack.length-1];(0,me.ok)("footnoteDefinition"===n.type),n.label=t,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase()}function Ge(e){this.exit(e)}function Ye(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Je(){this.buffer()}function Xe(e){const t=this.resume(),n=this.stack[this.stack.length-1];(0,me.ok)("footnoteReference"===n.type),n.label=t,n.identifier=Ue(this.sliceSerialize(e)).toLowerCase()}function Ze(e){this.exit(e)}function Qe(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),a(),s(),i+=o.move("]"),i}function et(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const s=n.enter("footnoteDefinition"),a=n.enter("label");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),a(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(n.indentLines(n.containerFlow(e,o.current()),tt)),s(),i}function tt(e,t,n){return 0===t?e:(n?"":" ")+e}Qe.peek=function(){return"["};const nt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function rt(e){this.enter({type:"delete",children:[]},e)}function ot(e){this.exit(e)}function it(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let s=o.move("~~");return s+=n.containerPhrasing(e,{...o.current(),before:s,after:"~"}),s+=o.move("~~"),i(),s}function st(e){return e.length}function at(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}it.peek=function(){return"~"};var lt=n(6313);function ct(e){const t=e._align;(0,me.ok)(t,"expected `_align` on table"),this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function ut(e){this.exit(e),this.data.inTable=void 0}function dt(e){this.enter({type:"tableRow",children:[]},e)}function pt(e){this.exit(e)}function ft(e){this.enter({type:"tableCell",children:[]},e)}function ht(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mt));const n=this.stack[this.stack.length-1];(0,me.ok)("inlineCode"===n.type),n.value=t,this.exit(e)}function mt(e,t){return"|"===t?t:e}function gt(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=lt.p.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return a(function(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return s(),i}(e,n,r),e.align)},tableCell:s,tableRow:function(e,t,n,r){const o=a([l(e,n,r)]);return o.slice(0,o.indexOf("\n"))}}};function s(e,t,n,r){const o=n.enter("tableCell"),s=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:i,after:i});return s(),o(),a}function a(e,t){return function(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||st,o=[],i=[],s=[],a=[];let l=0,c=-1;for(;++c<e.length;){const n=[],o=[];let d=-1;for(e[c].length>l&&(l=e[c].length);++d<e[c].length;){const i=null==(u=e[c][d])?"":String(u);if(!1!==t.alignDelimiters){const e=r(i);o[d]=e,(void 0===a[d]||e>a[d])&&(a[d]=e)}n.push(i)}i[c]=n,s[c]=o}var u;let d=-1;if("object"==typeof n&&"length"in n)for(;++d<l;)o[d]=at(n[d]);else{const e=at(n);for(;++d<l;)o[d]=e}d=-1;const p=[],f=[];for(;++d<l;){const e=o[d];let n="",r="";99===e?(n=":",r=":"):108===e?n=":":114===e&&(r=":");let i=!1===t.alignDelimiters?1:Math.max(1,a[d]-n.length-r.length);const s=n+"-".repeat(i)+r;!1!==t.alignDelimiters&&(i=n.length+i+r.length,i>a[d]&&(a[d]=i),f[d]=i),p[d]=s}i.splice(1,0,p),s.splice(1,0,f),c=-1;const h=[];for(;++c<i.length;){const e=i[c],n=s[c];d=-1;const r=[];for(;++d<l;){const i=e[d]||"";let s="",c="";if(!1!==t.alignDelimiters){const e=a[d]-(n[d]||0),t=o[d];114===t?s=" ".repeat(e):99===t?e%2?(s=" ".repeat(e/2+.5),c=" ".repeat(e/2-.5)):(s=" ".repeat(e/2),c=s):c=" ".repeat(e)}!1===t.delimiterStart||d||r.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===i||!1===t.delimiterStart&&!d||r.push(" "),!1!==t.alignDelimiters&&r.push(s),r.push(i),!1!==t.alignDelimiters&&r.push(c),!1!==t.padding&&r.push(" "),!1===t.delimiterEnd&&d===l-1||r.push("|")}h.push(!1===t.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("tableRow");for(;++o<r.length;)i[o]=s(r[o],0,t,n);return a(),i}}function yt(e){const t=this.stack[this.stack.length-2];(0,me.ok)("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function vt(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];(0,me.ok)("paragraph"===e.type);const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function bt(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);i&&a.move(s);let l=lt.p.listItem(e,t,n,{...r,...a.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+s}))),l}function wt(e,t,n,r){const o=e.length;let i,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<r.length;)i=r.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}const kt={}.hasOwnProperty;function xt(e,t){let n;for(n in t){const r=(kt.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){kt.call(r,i)||(r[i]=[]);const e=o[i];At(r[i],Array.isArray(e)?e:e?[e]:[])}}}function At(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);wt(e,0,0,r)}const St={tokenize:function(e,t,n){let r=0;return function t(i){return(87===i||119===i)&&r<3?(r++,e.consume(i),t):46===i&&3===r?(e.consume(i),o):n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Et={tokenize:function(e,t,n){let r,o,i;return s;function s(t){return 46===t||95===t?e.check(Ot,l,a)(t):null===t||be(t)||xe(t)||45!==t&&ke(t)?l(t):(i=!0,e.consume(t),s)}function a(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),s}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},Ct={tokenize:function(e,t){let n=0,r=0;return o;function o(s){return 40===s?(n++,e.consume(s),o):41===s&&r<n?i(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?e.check(Ot,t,i)(s):null===s||be(s)||xe(s)?t(s):(e.consume(s),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Ot={tokenize:function(e,t,n){return r;function r(s){return 33===s||34===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||63===s||95===s||126===s?(e.consume(s),r):38===s?(e.consume(s),i):93===s?(e.consume(s),o):60===s||null===s||be(s)||xe(s)?t(s):n(s)}function o(e){return null===e||40===e||91===e||be(e)||xe(e)?t(e):r(e)}function i(e){return ge(e)?s(e):n(e)}function s(t){return 59===t?(e.consume(t),r):ge(t)?(e.consume(t),s):n(t)}},partial:!0},Mt={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ye(e)?n(e):t(e)}},partial:!0},Nt={tokenize:function(e,t,n){const r=this;return function(t){return 87!==t&&119!==t||!Pt.call(r,r.previous)||zt(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(St,e.attempt(Et,e.attempt(Ct,o),n),n)(t))};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Pt},Tt={tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){return 72!==t&&104!==t||!Ft.call(r,r.previous)||zt(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),s)};function s(t){if(ge(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),s;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),i?l:(i=!0,a)):n(t)}function l(t){return null===t||function(e){return null!==e&&(e<32||127===e)}(t)||be(t)||xe(t)||ke(t)?n(t):e.attempt(Et,e.attempt(Ct,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:Ft},It={tokenize:function(e,t,n){const r=this;let o,i;return function(t){return _t(t)&&Lt.call(r,r.previous)&&!zt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(t)):n(t)};function s(t){return _t(t)?(e.consume(t),s):64===t?(e.consume(t),a):n(t)}function a(t){return 46===t?e.check(Mt,c,l)(t):45===t||95===t||ye(t)?(i=!0,e.consume(t),a):c(t)}function l(t){return e.consume(t),o=!0,a}function c(s){return i&&o&&ge(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(s)):n(s)}},previous:Lt},Rt={};let Dt=48;for(;Dt<123;)Rt[Dt]=It,Dt++,58===Dt?Dt=65:91===Dt&&(Dt=97);function Pt(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||be(e)}function Ft(e){return!ge(e)}function Lt(e){return!(47===e||_t(e))}function _t(e){return 43===e||45===e||46===e||95===e||ye(e)}function zt(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function $t(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return we(r)?(e.enter(n),s(r)):t(r)};function s(r){return we(r)&&i++<o?(e.consume(r),s):(e.exit(n),t(r))}}Rt[43]=It,Rt[45]=It,Rt[46]=It,Rt[95]=It,Rt[72]=[It,Tt],Rt[104]=[It,Tt],Rt[87]=[It,Nt],Rt[119]=[It,Nt];const jt={tokenize:function(e,t,n){return function(t){return we(t)?$t(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ve(e)?t(e):n(e)}},partial:!0},Bt={tokenize:function(e,t,n){const r=this;return $t(e,(function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function Ht(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!s||!s._balanced)return n(o);const a=Ue(r.sliceSerialize({start:s.end,end:r.now()}));return 94===a.codePointAt(0)&&i.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)):n(o)}}function Vt(e,t){let n,r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[r+1],e[r+2],["enter",o,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(r,e.length-r+1,...l),e}function Ut(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(a){if(s>999||93===a&&!i||null===a||91===a||be(a))return n(a);if(93===a){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(Ue(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return be(a)||(i=!0),s++,e.consume(a),92===a?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function Wt(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(a>999||93===t&&!s||null===t||91===t||be(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=Ue(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return be(t)||(s=!0),a++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),$t(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function Kt(e,t,n){return e.check(jt,t,e.attempt(Bt,t,n))}function qt(e){e.exit("gfmFootnoteDefinition")}function Gt(e){return null===e||be(e)||xe(e)?1:ke(e)?2:void 0}function Yt(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}function Jt(e){let t=(e||{}).singleTilde;const n={tokenize:function(e,n,r){const o=this.previous,i=this.events;let s=0;return function(t){return 126===o&&"characterEscape"!==i[i.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),a(t))};function a(i){const l=Gt(o);if(126===i)return s>1?r(i):(e.consume(i),s++,a);if(s<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=Gt(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},s=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],a=t.parser.constructs.insideSpan.null;a&&wt(s,s.length,0,Yt(a,e.slice(r+1,n),t)),wt(s,s.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),wt(e,r-1,n-r+3,s),n=r+s.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Xt{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0!==n||0!==r.length){for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}}function Zt(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function Qt(e,t,n){const r=this;let o,i=0,s=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:a;return i===w&&r.parser.lazy[r.now().line]?n(e):i(e)};function a(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(o=!0,s+=1),l(e)}(t)}function l(t){return null===t?n(t):ve(t)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):we(t)?$t(e,l,"whitespace")(t):(s+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||be(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,we(t)?$t(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):b(t)}function f(t){return we(t)?$t(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(s+=1,m(t)):null===t||ve(t)?v(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return we(t)?$t(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?p(n):(null===n||ve(n))&&o&&i===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function w(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||ve(n)?(e.exit("tableRow"),t(n)):we(n)?$t(e,k,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||be(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?A:x)}function A(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function en(e,t){let n,r,o,i=-1,s=!0,a=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Xt;for(;++i<e.length;){const f=e[i],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(nn(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(s=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",r,t]])),a="tableDelimiterRow"===h.type?2:r?3:1):!a||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(s?s=!1:(0!==l[1]&&(c[0]=c[1],o=tn(p,t,l,a,void 0,o)),l=c,c=[l[1],i,0,0])):(s=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=tn(p,t,l,a,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=tn(p,t,l,a,i,o)):0!==c[1]&&(o=tn(p,t,c,a,i,o)),a=0):!a||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&nn(p,t,d,n,r),p.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Zt(t.events,i))}return e}function tn(e,t,n,r,o,i){const s=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},rn(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const a=rn(t.events,n[1]);if(i={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=rn(t.events,n[2]),i=rn(t.events,n[3]),s={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",s,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==o&&(i.end=Object.assign({},rn(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function nn(e,t,n,r,o){const i=[],s=rn(t.events,n);o&&(o.end=Object.assign({},s),i.push(["exit",o,t])),r.end=Object.assign({},s),i.push(["exit",r,t]),e.add(n+1,0,i)}function rn(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const on={tokenize:function(e,t,n){const r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o):n(t)};function o(t){return be(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(t)}function s(r){return ve(r)?t(r):we(r)?e.check({tokenize:sn},t,n)(r):n(r)}}};function sn(e,t,n){return $t(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const an={};function ln(e){const t=e||an,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return function(e){const t={};let n=-1;for(;++n<e.length;)xt(t,e[n]);return t}([{text:Rt},{document:{91:{tokenize:Wt,continuation:{tokenize:Kt},exit:qt}},text:{91:{tokenize:Ut},93:{add:"after",tokenize:Ht,resolveTo:Vt}}},Jt(e),{flow:{null:{tokenize:Qt,resolveAll:en}}},{text:{91:on}}])}(t)),o.push([{transforms:[je],enter:{literalAutolink:Pe,literalAutolinkEmail:Fe,literalAutolinkHttp:Fe,literalAutolinkWww:Fe},exit:{literalAutolink:$e,literalAutolinkEmail:ze,literalAutolinkHttp:Le,literalAutolinkWww:_e}},{enter:{gfmFootnoteDefinition:We,gfmFootnoteDefinitionLabelString:Ke,gfmFootnoteCall:Ye,gfmFootnoteCallString:Je},exit:{gfmFootnoteDefinition:Ge,gfmFootnoteDefinitionLabelString:qe,gfmFootnoteCall:Ze,gfmFootnoteCallString:Xe}},{canContainEols:["delete"],enter:{strikethrough:rt},exit:{strikethrough:ot}},{enter:{table:ct,tableData:ft,tableHeader:ft,tableRow:dt},exit:{codeText:ht,table:ut,tableData:pt,tableHeader:pt,tableRow:pt}},{exit:{taskListCheckValueChecked:yt,taskListCheckValueUnchecked:yt,paragraph:vt}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Re,notInConstruct:De},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Re,notInConstruct:De},{character:":",before:"[ps]",after:"\\/",inConstruct:Re,notInConstruct:De}]},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:et,footnoteReference:Qe}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:nt}],handlers:{delete:it}},gt(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:bt}}]}}(t))}function cn(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e}const un=(0,l.JY)("strike_through");cn(un,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const dn=(0,l.hk)("strike_through",(e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>"line-through"===e}],toDOM:t=>["del",e.get(un.key)(t)],parseMarkdown:{match:e=>"delete"===e.type,runner:(e,t,n)=>{e.openMark(n),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"strike_through"===e.type.name,runner:(e,t)=>{e.withMark(t,"delete")}}})));cn(dn.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"}),cn(dn.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const pn=(0,l.yu)("ToggleStrikeThrough",(e=>()=>(0,fe.wh)(dn.type(e))));cn(pn,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const fn=(0,l.b_)((e=>(0,pe.uX)(/~([^~]+)~$/,dn.type(e))));cn(fn,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const hn=(0,l.pq)("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(c.MD);return()=>t.call(pn.key)}}});function mn(e,t=3,n=3){const r=Array(n).fill(0).map((()=>Rn.type(e).createAndFill())),o=Array(n).fill(0).map((()=>Dn.type(e).createAndFill())),i=Array(t).fill(0).map(((t,n)=>In.type(e).create(null,0===n?o:r)));return Tn.type(e).create(null,i)}function gn(e){return(0,pe.KP)((e=>"table"===e.type.spec.tableRole))(e)}function yn(e,t){const n=gn(t);if(!n)return;const r=m.get(n.node);return e<0||e>=r.width?void 0:r.cellsInRect({left:e,right:e+1,top:0,bottom:r.height}).map((e=>{const t=n.node.nodeAt(e);if(!t)return;const r=e+n.start;return{pos:r,start:r+1,node:t}})).filter((e=>null!=e))}function vn(e,t){const n=gn(t);if(!n)return;const r=m.get(n.node);return e<0||e>=r.height?void 0:r.cellsInRect({left:0,right:r.width,top:e,bottom:e+1}).map((e=>{const t=n.node.nodeAt(e);if(!t)return;const r=e+n.start;return{pos:r,start:r+1,node:t}})).filter((e=>null!=e))}function bn(e,t,{map:n,tableStart:r,table:o},i){const s=Array(i).fill(0).reduce(((e,t,n)=>e+o.child(n).nodeSize),r),a=Array(n.width).fill(0).map(((t,r)=>{const i=o.nodeAt(n.map[r]);return Rn.type(e).createAndFill({alignment:null==i?void 0:i.attrs.alignment})}));return t.insert(s,In.type(e).create(null,a)),t}function wn(e){return t=>n=>{const r=gn(n.selection),o="row"===e;if(r){const e=m.get(r.node);if(t>=0&&t<(o?e.height:e.width)){const i=e.positionAt(o?t:e.height-1,o?e.width-1:t,r.node),s=n.doc.resolve(r.start+i),a=o?N.rowSelection:N.colSelection,l=e.positionAt(o?t:0,o?0:t,r.node),c=n.doc.resolve(r.start+l);return(0,pe.I9)(n.setSelection(a(s,c)))}}return n}}cn(hn.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"}),cn(hn.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const kn=wn("row"),xn=wn("col");function An(e){return e[0].map(((t,n)=>e.map((e=>e[n]))))}function Sn(e,t){const n=[],r=m.get(e);for(let o=0;o<r.height;o++){const i=e.child(o),s=[];for(let n=0;n<r.width;n++){if(!t[o][n])continue;const i=r.map[o*r.width+n],a=t[o][n],l=e.nodeAt(i).type.createChecked(Object.assign({},a.attrs),a.content,a.marks);s.push(l)}n.push(i.type.createChecked(i.attrs,s,i.marks))}return e.type.createChecked(e.attrs,n,e.marks)}function En(e){const t=m.get(e),n=[];for(let r=0;r<t.height;r++){const o=[],i={};for(let n=0;n<t.width;n++){const s=t.map[r*t.width+n],a=e.nodeAt(s),l=t.findCell(s);i[s]||l.top!==r?o.push(null):(i[s]=!0,o.push(a))}n.push(o)}return n}function Cn(e,t,n,r){const o=t[0]>n[0]?-1:1,i=e.splice(t[0],t.length),s=i.length%2==0?1:0;let a;return a=-1===r&&1===o?n[0]-1:1===r&&-1===o?n[n.length-1]-s+1:-1===o?n[0]:n[n.length-1]-s,e.splice(a,0,...i),e}function On(e,t){let n=e,r=e;for(let o=e;o>=0;o--){const e=yn(o,t.selection);e&&e.forEach((e=>{const t=e.node.attrs.colspan+o-1;t>=n&&(n=o),t>r&&(r=t)}))}for(let n=e;n<=r;n++){const e=yn(n,t.selection);e&&e.forEach((e=>{const t=e.node.attrs.colspan+n-1;e.node.attrs.colspan>1&&t>r&&(r=t)}))}const o=[];for(let e=n;e<=r;e++){const n=yn(e,t.selection);n&&n.length&&o.push(e)}n=o[0],r=o[o.length-1];const i=yn(n,t.selection),s=vn(0,t.selection),a=t.doc.resolve(i[i.length-1].pos);let l;for(let e=r;e>=n;e--){const n=yn(e,t.selection);if(n&&n.length){for(let e=s.length-1;e>=0;e--)if(s[e].pos===n[0].pos){l=n[0];break}if(l)break}}return{$anchor:a,$head:t.doc.resolve(l.pos),indexes:o}}function Mn(e,t){let n=e,r=e;for(let o=e;o>=0;o--)vn(o,t.selection).forEach((e=>{const t=e.node.attrs.rowspan+o-1;t>=n&&(n=o),t>r&&(r=t)}));for(let n=e;n<=r;n++)vn(n,t.selection).forEach((e=>{const t=e.node.attrs.rowspan+n-1;e.node.attrs.rowspan>1&&t>r&&(r=t)}));const o=[];for(let e=n;e<=r;e++){const n=vn(e,t.selection);n&&n.length&&o.push(e)}n=o[0],r=o[o.length-1];const i=vn(n,t.selection),s=yn(0,t.selection),a=t.doc.resolve(i[i.length-1].pos);let l;for(let e=r;e>=n;e--){const n=vn(e,t.selection);if(n&&n.length){for(let e=s.length-1;e>=0;e--)if(s[e].pos===n[0].pos){l=n[0];break}if(l)break}}return{$anchor:a,$head:t.doc.resolve(l.pos),indexes:o}}const Nn=function(e){const t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const e in t)n[e]={default:t[e].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:()=>["table",["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:e=>y(e,t)}],toDOM:e=>["td",v(e,t),0]},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:e=>y(e,t)}],toDOM:e=>["th",v(e,t),0]}}}({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Tn=(0,l.Yh)("table",(()=>({...Nn.table,parseMarkdown:{match:e=>"table"===e.type,runner:(e,t,n)=>{const r=t.align,o=t.children.map(((e,t)=>({...e,align:r,isHeader:0===t})));e.openNode(n),e.next(o),e.closeNode()}},toMarkdown:{match:e=>"table"===e.type.name,runner:(e,t)=>{var n;const r=null==(n=t.content.firstChild)?void 0:n.content;if(!r)return;const o=[];r.forEach((e=>{o.push(e.attrs.alignment)})),e.openNode("table",void 0,{align:o}),e.next(t.content),e.closeNode()}}})));cn(Tn.node,{displayName:"NodeSchema<table>",group:"Table"}),cn(Tn.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const In=(0,l.Yh)("table_row",(()=>({...Nn.table_row,parseMarkdown:{match:e=>"tableRow"===e.type,runner:(e,t,n)=>{const r=t.align,o=t.children.map(((e,n)=>({...e,align:r[n],isHeader:t.isHeader})));e.openNode(n),e.next(o),e.closeNode()}},toMarkdown:{match:e=>"table_row"===e.type.name,runner:(e,t)=>{e.openNode("tableRow"),e.next(t.content),e.closeNode()}}})));cn(In.node,{displayName:"NodeSchema<tableRow>",group:"Table"}),cn(In.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const Rn=(0,l.Yh)("table_cell",(()=>({...Nn.table_cell,parseMarkdown:{match:e=>"tableCell"===e.type&&!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>"table_cell"===e.type.name,runner:(e,t)=>{e.openNode("tableCell").next(t.content).closeNode()}}})));cn(Rn.node,{displayName:"NodeSchema<tableCell>",group:"Table"}),cn(Rn.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const Dn=(0,l.Yh)("table_header",(()=>({...Nn.table_header,parseMarkdown:{match:e=>"tableCell"===e.type&&!!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>"table_header"===e.type.name,runner:(e,t)=>{e.openNode("tableCell"),e.next(t.content),e.closeNode()}}})));cn(Dn.node,{displayName:"NodeSchema<tableHeader>",group:"Table"}),cn(Dn.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});const Pn=(0,l.b_)((e=>new a.fV(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,((t,n,r,o)=>{var i,s;const a=t.doc.resolve(r);if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),Tn.type(e)))return null;const l=mn(e,Number(null==(i=n.groups)?void 0:i.row),Number(null==(s=n.groups)?void 0:s.col)),c=t.tr.replaceRangeWith(r,o,l);return c.setSelection(u.U3.create(c.doc,r+3)).scrollIntoView()}))));cn(Pn,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const Fn=(0,l.yu)("GoToPrevTableCell",(()=>()=>de(-1)));cn(Fn,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const Ln=(0,l.yu)("GoToNextTableCell",(()=>()=>de(1)));cn(Ln,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const _n=(0,l.yu)("BreakTable",(e=>()=>(t,n)=>{if(!x(t))return!1;const{$head:r}=t.selection,o=r.after(),i=t.tr.replaceWith(o,o,s.Wf.type(e).createAndFill());return i.setSelection(u.LN.near(i.doc.resolve(o),1)).scrollIntoView(),null==n||n(i),!0}));cn(_n,{displayName:"Command<breakTableCommand>",group:"Table"});const zn=(0,l.yu)("InsertTable",(e=>({row:t,col:n}={})=>(r,o)=>{const{selection:i,tr:s}=r,{from:a}=i,l=mn(e,t,n),c=s.replaceSelectionWith(l),d=u.LN.findFrom(c.doc.resolve(a),1,!0);return d&&c.setSelection(d),null==o||o(c),!0}));cn(zn,{displayName:"Command<insertTableCommand>",group:"Table"});const $n=(0,l.yu)("MoveRow",(()=>({from:e,to:t}={})=>(n,r)=>{const{tr:o}=n;return!!(null==r?void 0:r(function(e,t,n,r=!0){const o=gn(e.selection);if(!o)return e;const{indexes:i}=Mn(t,e),{indexes:s}=Mn(n,e);if(i.includes(n))return e;const a=function(e,t,n){let r=En(e.node);return r=Cn(r,t,n,0),Sn(e.node,r)}(o,i,s),l=(0,pe.I9)(e).replaceWith(o.pos,o.pos+o.node.nodeSize,a);if(!r)return l;const c=m.get(a),u=o.start,d=n,p=c.positionAt(d,c.width-1,a),f=l.doc.resolve(u+p),h=N.rowSelection,g=c.positionAt(d,0,a),y=l.doc.resolve(u+g);return l.setSelection(h(f,y))}(o,e??0,t??0,!0)))}));cn($n,{displayName:"Command<moveRowCommand>",group:"Table"});const jn=(0,l.yu)("MoveCol",(()=>({from:e,to:t}={})=>(n,r)=>{const{tr:o}=n;return!!(null==r?void 0:r(function(e,t,n,r=!0){const o=gn(e.selection);if(!o)return e;const{indexes:i}=On(t,e),{indexes:s}=On(n,e);if(i.includes(n))return e;const a=function(e,t,n){let r=An(En(e.node));return r=Cn(r,t,n,0),r=An(r),Sn(e.node,r)}(o,i,s),l=(0,pe.I9)(e).replaceWith(o.pos,o.pos+o.node.nodeSize,a);if(!r)return l;const c=m.get(a),u=o.start,d=n,p=c.positionAt(c.height-1,d,a),f=l.doc.resolve(u+p),h=N.colSelection,g=c.positionAt(0,d,a),y=l.doc.resolve(u+g);return l.setSelection(h(f,y))}(o,e??0,t??0,!0)))}));cn(jn,{displayName:"Command<moveColCommand>",group:"Table"});const Bn=(0,l.yu)("SelectRow",(()=>(e=0)=>(t,n)=>{const{tr:r}=t;return!!(null==n?void 0:n(kn(e)(r)))}));cn(Bn,{displayName:"Command<selectRowCommand>",group:"Table"});const Hn=(0,l.yu)("SelectCol",(()=>(e=0)=>(t,n)=>{const{tr:r}=t;return!!(null==n?void 0:n(xn(e)(r)))}));cn(Hn,{displayName:"Command<selectColCommand>",group:"Table"});const Vn=(0,l.yu)("SelectTable",(()=>()=>(e,t)=>{const{tr:n}=e;return!!(null==t?void 0:t(function(e){const t=function(e){const t=gn(e);if(!t)return;const n=m.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map((e=>{const n=t.node.nodeAt(e),r=e+t.start;return{pos:r,start:r+1,node:n}}))}(e.selection);if(t&&t[0]){const n=e.doc.resolve(t[0].pos),r=t[t.length-1];if(r){const t=e.doc.resolve(r.pos);return(0,pe.I9)(e.setSelection(new N(t,n)))}}return e}(n)))}));cn(Vn,{displayName:"Command<selectTableCommand>",group:"Table"});const Un=(0,l.yu)("DeleteSelectedCells",(()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof N))return!1;const r=n.isRowSelection(),o=n.isColSelection();return r&&o?function(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(e,t):o?function(e,t){if(!x(e))return!1;if(t){const n=re(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;ae(r,n,e),e!=n.left;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=m.get(e)}t(r)}return!0}(e,t):function(e,t){if(!x(e))return!1;if(t){const n=re(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;le(r,n,e),e!=n.top;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=m.get(n.table)}t(r)}return!0}(e,t)}));cn(Un,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const Wn=(0,l.yu)("AddColBefore",(()=>()=>ie));cn(Wn,{displayName:"Command<addColBeforeCommand>",group:"Table"});const Kn=(0,l.yu)("AddColAfter",(()=>()=>se));cn(Kn,{displayName:"Command<addColAfterCommand>",group:"Table"});const qn=(0,l.yu)("AddRowBefore",(e=>()=>(t,n)=>{if(!x(t))return!1;if(n){const r=re(t);n(bn(e,t.tr,r,r.top))}return!0}));cn(qn,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const Gn=(0,l.yu)("AddRowAfter",(e=>()=>(t,n)=>{if(!x(t))return!1;if(n){const r=re(t);n(bn(e,t.tr,r,r.bottom))}return!0}));cn(Gn,{displayName:"Command<addRowAfterCommand>",group:"Table"});const Yn=(0,l.yu)("SetAlign",(()=>(e="left")=>{return t="alignment",n=e,function(e,r){if(!x(e))return!1;const o=A(e);if(o.nodeAfter.attrs[t]===n)return!1;if(r){const i=e.tr;e.selection instanceof N?e.selection.forEachCell(((e,r)=>{e.attrs[t]!==n&&i.setNodeMarkup(r,null,{...e.attrs,[t]:n})})):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:n}),r(i)}return!0};var t,n}));cn(Yn,{displayName:"Command<setAlignCommand>",group:"Table"});const Jn=(0,l.pq)("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(c.MD);return()=>t.call(Ln.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(c.MD);return()=>t.call(Fn.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:e=>{const t=e.get(c.MD);return()=>t.call(_n.key)}}});cn(Jn.ctx,{displayName:"KeymapCtx<table>",group:"Table"}),cn(Jn.shortcuts,{displayName:"Keymap<table>",group:"Table"});const Xn="footnote_definition",Zn="footnoteDefinition",Qn=(0,l.Yh)("footnote_definition",(()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${Xn}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,i.Ik)(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":Xn},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===Zn,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===Xn,runner:(e,t)=>{e.openNode(Zn,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}})));cn(Qn.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"}),cn(Qn.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const er="footnote_reference",tr=(0,l.Yh)("footnote_reference",(()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${er}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,i.Ik)(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":er},t]},parseMarkdown:{match:({type:e})=>"footnoteReference"===e,runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===er,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}})));cn(tr.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"}),cn(tr.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const nr=s.hm.extendSchema((e=>t=>{const n=e(t);return{...n,attrs:{...n.attrs,checked:{default:null}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,i.Ik)(e);return{label:e.dataset.label,listType:e.dataset["list-type"],spread:e.dataset.spread,checked:e.dataset.checked?"true"===e.dataset.checked:null}}},...(null==n?void 0:n.parseDOM)||[]],toDOM:e=>n.toDOM&&null==e.attrs.checked?n.toDOM(e):["li",{"data-item-type":"task","data-label":e.attrs.label,"data-list-type":e.attrs.listType,"data-spread":e.attrs.spread,"data-checked":e.attrs.checked},0],parseMarkdown:{match:({type:e})=>"listItem"===e,runner:(e,t,r)=>{if(null==t.checked)return void n.parseMarkdown.runner(e,t,r);const o=null!=t.label?`${t.label}.`:"•",i=null!=t.checked?!!t.checked:null,s=null!=t.label?"ordered":"bullet",a=null!=t.spread?`${t.spread}`:"true";e.openNode(r,{label:o,listType:s,spread:a,checked:i}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>"list_item"===e.type.name,runner:(e,t)=>{if(null==t.attrs.checked)return void n.toMarkdown.runner(e,t);const r=t.attrs.label,o=t.attrs.listType,i="true"===t.attrs.spread,s=t.attrs.checked;e.openNode("listItem",void 0,{label:r,listType:o,spread:i,checked:s}),e.next(t.content),e.closeNode()}}}}));cn(nr,{displayName:"NodeSchema<listItem>",group:"ListItem"});const rr=(0,l.b_)((()=>new a.fV(/^\[(?<checked>\s|x)\]\s$/,((e,t,n,r)=>{var o;const i=e.doc.resolve(n);let s=0,a=i.node(s);for(;a&&"list_item"!==a.type.name;)s--,a=i.node(s);if(!a||null!=a.attrs.checked)return null;const l="x"===(null==(o=t.groups)?void 0:o.checked),c=i.before(s),u=e.tr;return u.deleteRange(n,r).setNodeMarkup(c,void 0,{...a.attrs,checked:l}),u}))));cn(rr,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const or=[hn,Jn].flat(),ir=[Pn,rr],sr=[fn],ar=(0,l.Gf)((e=>{const t=new u.hs("MILKDOWN_AUTO_INSERT_ZERO_SPACE"),n=t=>t.type===s.Wf.type(e);return new u.k_({key:t,props:{handleDOMEvents:{compositionstart(e){const{state:t,dispatch:r}=e,{tr:o,selection:i}=t,{$from:s}=i;return pe.T.safari&&x(t)&&i.empty&&(e=>n(e)&&2===e.nodeSize)(s.parent)&&r(o.insertText("",s.start())),!1},compositionend(e){const{state:t,dispatch:r}=e,{tr:o,selection:i}=t,{$from:s}=i;return pe.T.safari&&x(t)&&i.empty&&n(s.parent)&&s.parent.textContent.startsWith("")&&r(o.delete(s.start(),s.start()+1)),!1}}}})}));cn(ar,{displayName:"Prose<autoInsertZeroSpaceInTablePlugin>",group:"Prose"});const lr=(0,l.Gf)((()=>function({handleWidth:e=5,cellMinWidth:t=25,View:n=J,lastColumnResizable:r=!0}={}){const o=new u.k_({key:Z,state:{init:(e,r)=>(o.spec.props.nodeViews[b(r.schema).table.name]=(e,r)=>new n(e,t,r),new Q(-1,!1)),apply:(e,t)=>t.apply(e)},props:{attributes:e=>{const t=Z.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r,o){const i=Z.getState(e.state);if(i&&!i.dragging){const r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target);let s=-1;if(r){const{left:o,right:i}=r.getBoundingClientRect();t.clientX-o<=n?s=ee(e,t,"left"):i-t.clientX<=n&&(s=ee(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){const t=e.state.doc.resolve(s),n=t.node(-1),r=m.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}ne(e,s)}}}(t,n,e,0,r)},mouseleave:e=>{!function(e){const t=Z.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&ne(e,-1)}(e)},mousedown:(e,n)=>{!function(e,t,n){const r=Z.getState(e.state);if(!r||-1==r.activeHandle||r.dragging)return!1;const o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=e.domAtPos(t);let s=i.node.childNodes[i.offset].offsetWidth,a=n;if(r)for(let e=0;e<n;e++)r[e]&&(s-=r[e],a--);return s/a}(e,r.activeHandle,o.attrs);function s(t){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);const r=Z.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){const r=e.state.doc.resolve(t),o=r.node(-1),i=m.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<i.height;e++){const t=e*i.width+a;if(e&&i.map[t]==i.map[t-i.width])continue;const r=i.map[t],u=o.nodeAt(r).attrs,d=1==u.colspan?0:a-i.colCount(r);if(u.colwidth&&u.colwidth[d]==n)continue;const p=u.colwidth?u.colwidth.slice():(c=u.colspan,Array(c).fill(0));p[d]=n,l.setNodeMarkup(s+r,null,{...u,colwidth:p})}var c;l.docChanged&&e.dispatch(l)}(e,r.activeHandle,te(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Z,{setDragging:null})))}function a(t){if(!t.which)return s(t);const r=Z.getState(e.state);if(r&&r.dragging){const o=te(r.dragging,t,n);!function(e,t,n,r){const o=e.state.doc.resolve(t),i=o.node(-1),s=o.start(-1),a=m.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let l=e.domAtPos(o.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&X(i,l.firstChild,l,r,a,n)}(e,r.activeHandle,o,n)}}e.dispatch(e.state.tr.setMeta(Z,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault()}(e,n,t)}},decorations:e=>{const t=Z.getState(e);if(t&&t.activeHandle>-1)return function(e,t){const n=[],r=e.doc.resolve(t),o=r.node(-1);if(!o)return p.zF.empty;const i=m.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let e=0;e<i.height;e++){const t=a+e*i.width-1;if(!(a!=i.width&&i.map[t]==i.map[t+1]||0!=e&&i.map[t-1]==i.map[t-1-i.width])){const e=i.map[t],r=s+e+o.nodeAt(e).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(p.NZ.widget(r,a))}}return p.zF.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}({})));cn(lr,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const cr=(0,l.Gf)((()=>function({allowTableNodeSelection:e=!1}={}){return new u.k_({key:w,state:{init:()=>null,apply(e,t){const n=e.getMeta(w);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;const{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:I,handleDOMEvents:{mousedown:K},createSelectionBetween:e=>null!=w.getState(e.state)?e.state.selection:null,handleTripleClick:U,handleKeyDown:$,handlePaste:W},appendTransaction:(t,n,r)=>function(e,t,n){const r=(t||e).selection,o=(t||e).doc;let i,s;if(r instanceof u.nh&&(s=r.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)i=N.create(o,r.from);else if("row"==s){const e=o.resolve(r.from+1);i=N.rowSelection(e,e)}else if(!n){const e=m.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];i=N.create(o,t+1,n)}}else r instanceof u.U3&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.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)}(r)?i=u.U3.create(o,r.from):r instanceof u.U3&&function({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){const 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--){const 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}(r)&&(i=u.U3.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}(r,P(r,n),e)})}()));cn(cr,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const ur=(0,l.lz)("remarkGFM",(()=>ln));cn(ur.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"}),cn(ur.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const dr=[ar,lr,cr,ur].flat(),pr=[[nr,Tn,In,Dn,Rn,Qn,tr,un,dn].flat(),ir,sr,or,dr,[Ln,Fn,_n,zn,$n,jn,Bn,Hn,Vn,Un,qn,Gn,Wn,Kn,Yn,pn]].flat()},7545:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},7652:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>b,Is:()=>m});var r=n(8769),o=n.n(r),i=n(5694);const s="5.23.2";var a=n(258),l=n(9154),c=n(6127);function u(e){return e>=0&&e<=255}const d=function(e,t){const{r:n,g:r,b:o,a:i}=new c.Y(e).toRgb();if(i<1)return e;const{r:s,g:a,b:l}=new c.Y(t).toRgb();for(let e=.01;e<=1;e+=.01){const t=Math.round((n-s*(1-e))/e),i=Math.round((r-a*(1-e))/e),d=Math.round((o-l*(1-e))/e);if(u(t)&&u(i)&&u(d))return new c.Y({r:t,g:i,b:d,a:Math.round(100*e)/100}).toRgbString()}return new c.Y({r:n,g:r,b:o,a:1}).toRgbString()};var p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function f(e){const{override:t}=e,n=p(e,["override"]),r=Object.assign({},t);Object.keys(l.A).forEach((e=>{delete r[e]}));const o=Object.assign(Object.assign({},n),r);if(!1===o.motion){const e="0s";o.motionDurationFast=e,o.motionDurationMid=e,o.motionDurationSlow=e}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:d(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:d(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:d(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:3*o.lineWidth,lineWidth:o.lineWidth,controlOutlineWidth:2*o.lineWidth,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:d(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:1200,screenXLMin:1200,screenXLMax:1599,screenXXL:1600,screenXXLMin:1600,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`\n 0 1px 2px -2px ${new c.Y("rgba(0, 0, 0, 0.16)").toRgbString()},\n 0 3px 6px 0 ${new c.Y("rgba(0, 0, 0, 0.12)").toRgbString()},\n 0 5px 12px 4px ${new c.Y("rgba(0, 0, 0, 0.09)").toRgbString()}\n `,boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const m={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},g={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},y={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},v=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o}=t,i=h(t,["override"]);let s=Object.assign(Object.assign({},r),{override:o});return s=f(s),i&&Object.entries(i).forEach((e=>{let[t,n]=e;const{theme:r}=n,o=h(n,["theme"]);let i=o;r&&(i=v(Object.assign(Object.assign({},s),o),{override:o},r)),s[t]=i})),s};function b(){const{token:e,hashed:t,theme:n,override:r,cssVar:c}=o().useContext(a.vG),u=`${s}-${t||""}`,d=n||a.zQ,[p,h,b]=(0,i.hV)(d,[l.A,e],{salt:u,override:r,getComputedToken:v,formatToken:f,cssVar:c&&{prefix:c.prefix,key:c.key,unitless:m,ignore:g,preserve:y}});return[d,b,t?h:"",p,c]}},7756:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6488),o=n(4430),i=n(7985),s=n(5405);function a(e){return(0,r.A)(e)||(0,o.A)(e)||(0,i.A)(e)||(0,s.A)()}},7985:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6284);function o(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},8128:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},8257:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(7545),o=n(4445);const i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new Set;return function e(t,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=i.has(t);if((0,o.Ay)(!l,"Warning: There may be circular references"),l)return!1;if(t===s)return!0;if(n&&a>1)return!1;i.add(t);var c=a+1;if(Array.isArray(t)){if(!Array.isArray(s)||t.length!==s.length)return!1;for(var u=0;u<t.length;u++)if(!e(t[u],s[u],c))return!1;return!0}if(t&&s&&"object"===(0,r.A)(t)&&"object"===(0,r.A)(s)){var d=Object.keys(t);return d.length===Object.keys(s).length&&d.every((function(n){return e(t[n],s[n],c)}))}return!1}(e,t)}},8299:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c,fk:()=>l});var r=n(7545),o=n(8769),i=n.n(o),s=n(9435),a=n.n(s);function l(e){return e instanceof HTMLElement||e instanceof SVGElement}function c(e){var t,n=function(e){return e&&"object"===(0,r.A)(e)&&l(e.nativeElement)?e.nativeElement:l(e)?e:null}(e);return n||(e instanceof i().Component?null===(t=a().findDOMNode)||void 0===t?void 0:t.call(a(),e):null)}},8406:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(6330),o=n(1361),i=function(){var e=(0,r.A)((function*(e,t,n){return(yield o.http.post("api/gateway/cmdb.instance.PostSearchV3/v3/object/".concat(e,"/instance/_search"),t,n)).data}));return function(t,n,r){return e.apply(this,arguments)}}()},8408:(e,t,n)=>{"use strict";n.d(t,{av:()=>o,dF:()=>r,jz:()=>s,vj:()=>i}),n(5694);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},o=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),i=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let a={};return!1!==r&&(a={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},a),s),{[o]:s})}},s=e=>({[`.${e}`]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{[`.${e} .${e}-icon`]:{display:"block"}})})},8468:(e,t,n)=>{"use strict";function r(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}n.d(t,{m:()=>r})},8695:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>Ut});var r=n(3705),o=n(8769),i=n.n(o);const s=i().createContext({});var a=n(9642),l=n(5694);const c=(0,o.createContext)({});var u=n(4511),d=n(3795),p=n(1136);const f=(0,o.createContext)(void 0);var h=n(9740);const m=(0,h.A)((0,h.A)({},{yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),g={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},y={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},m),timePickerLocale:Object.assign({},g)},v="${label} is not a valid ${type}",b={locale:"en",Pagination:{items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},DatePicker:y,TimePicker:g,Calendar:y,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:v,method:v,array:v,object:v,number:v,date:v,boolean:v,integer:v,float:v,regexp:v,email:v,url:v,hex:v},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let w=Object.assign({},b.Modal),k=[];const x=()=>k.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),b.Modal),A=(0,o.createContext)(void 0),S=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;o.useEffect((()=>{const e=function(e){if(e){const t=Object.assign({},e);return k.push(t),w=x(),()=>{k=k.filter((e=>e!==t)),w=x()}}w=Object.assign({},b.Modal)}(null==t?void 0:t.Modal);return e}),[t]);const i=o.useMemo((()=>Object.assign(Object.assign({},t),{exist:!0})),[t]);return o.createElement(A.Provider,{value:i},n)};var E=n(258),C=n(9154),O=n(9424),M=n(6127),N=n(7169),T=n(9055);const I=`-ant-${Date.now()}-${Math.random()}`;const R=o.createContext(!1),D=e=>{let{children:t,disabled:n}=e;const r=o.useContext(R);return o.createElement(R.Provider,{value:null!=n?n:r},t)},P=R,F=o.createContext(void 0),L=e=>{let{children:t,size:n}=e;const r=o.useContext(F);return o.createElement(F.Provider,{value:n||r},t)},_=F;var z=n(8257);const $=Object.assign({},o),{useId:j}=$,B=void 0===j?()=>"":j;var H=n(1382),V=n(7652);function U(e){const{children:t}=e,[,n]=(0,V.Ay)(),{motion:r}=n,i=o.useRef(!1);return i.current=i.current||!1===r,i.current?o.createElement(H.Kq,{motion:r},t):t}const W=()=>null;var K=n(8408);const q=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let G,Y,J,X;function Z(){return G||a.yH}function Q(){return Y||a.pM}const ee=()=>({getPrefixCls:(e,t)=>t||(e?`${Z()}-${e}`:Z()),getIconPrefixCls:Q,getRootPrefixCls:()=>G||Z(),getTheme:()=>J,holderRender:X}),te=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:s,form:h,locale:m,componentSize:g,direction:y,space:v,splitter:w,virtual:k,dropdownMatchSelectWidth:x,popupMatchSelectWidth:A,popupOverflow:O,legacyLocale:M,parentContext:N,iconPrefixCls:T,theme:I,componentDisabled:R,segmented:P,statistic:F,spin:_,calendar:$,carousel:j,cascader:H,collapse:G,typography:Y,checkbox:J,descriptions:X,divider:Z,drawer:Q,skeleton:ee,steps:te,image:ne,layout:re,list:oe,mentions:ie,modal:se,progress:ae,result:le,slider:ce,breadcrumb:ue,menu:de,pagination:pe,input:fe,textArea:he,empty:me,badge:ge,radio:ye,rate:ve,switch:be,transfer:we,avatar:ke,message:xe,tag:Ae,table:Se,card:Ee,tabs:Ce,timeline:Oe,timePicker:Me,upload:Ne,notification:Te,tree:Ie,colorPicker:Re,datePicker:De,rangePicker:Pe,flex:Fe,wave:Le,dropdown:_e,warning:ze,tour:$e,tooltip:je,popover:Be,popconfirm:He,floatButtonGroup:Ve,variant:Ue,inputNumber:We,treeSelect:Ke}=e,qe=o.useCallback(((t,n)=>{const{prefixCls:r}=e;if(n)return n;const o=r||N.getPrefixCls("");return t?`${o}-${t}`:o}),[N.getPrefixCls,e.prefixCls]),Ge=T||N.iconPrefixCls||a.pM,Ye=n||N.csp;((e,t)=>{const[n,r]=(0,V.Ay)();(0,l.IV)({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>null==t?void 0:t.nonce,layer:{name:"antd"}},(()=>[(0,K.jz)(e)]))})(Ge,Ye);const Je=function(e,t,n){var r;(0,p.rJ)("ConfigProvider");const o=e||{},i=!1!==o.inherit&&t?t:Object.assign(Object.assign({},E.sb),{hashed:null!==(r=null==t?void 0:t.hashed)&&void 0!==r?r:E.sb.hashed,cssVar:null==t?void 0:t.cssVar}),s=B();return(0,u.A)((()=>{var r,a;if(!e)return t;const l=Object.assign({},i.components);Object.keys(e.components||{}).forEach((t=>{l[t]=Object.assign(Object.assign({},l[t]),e.components[t])}));const c=`css-var-${s.replace(/:/g,"")}`,u=(null!==(r=o.cssVar)&&void 0!==r?r:i.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:null==n?void 0:n.prefixCls},"object"==typeof i.cssVar?i.cssVar:{}),"object"==typeof o.cssVar?o.cssVar:{}),{key:"object"==typeof o.cssVar&&(null===(a=o.cssVar)||void 0===a?void 0:a.key)||c});return Object.assign(Object.assign(Object.assign({},i),o),{token:Object.assign(Object.assign({},i.token),o.token),components:l,cssVar:u})}),[o,i],((e,t)=>e.some(((e,n)=>{const r=t[n];return!(0,z.A)(e,r,!0)}))))}(I,N.theme,{prefixCls:qe("")}),Xe={csp:Ye,autoInsertSpaceInButton:r,alert:i,anchor:s,locale:m||M,direction:y,space:v,splitter:w,virtual:k,popupMatchSelectWidth:null!=A?A:x,popupOverflow:O,getPrefixCls:qe,iconPrefixCls:Ge,theme:Je,segmented:P,statistic:F,spin:_,calendar:$,carousel:j,cascader:H,collapse:G,typography:Y,checkbox:J,descriptions:X,divider:Z,drawer:Q,skeleton:ee,steps:te,image:ne,input:fe,textArea:he,layout:re,list:oe,mentions:ie,modal:se,progress:ae,result:le,slider:ce,breadcrumb:ue,menu:de,pagination:pe,empty:me,badge:ge,radio:ye,rate:ve,switch:be,transfer:we,avatar:ke,message:xe,tag:Ae,table:Se,card:Ee,tabs:Ce,timeline:Oe,timePicker:Me,upload:Ne,notification:Te,tree:Ie,colorPicker:Re,datePicker:De,rangePicker:Pe,flex:Fe,wave:Le,dropdown:_e,warning:ze,tour:$e,tooltip:je,popover:Be,popconfirm:He,floatButtonGroup:Ve,variant:Ue,inputNumber:We,treeSelect:Ke},Ze=Object.assign({},N);Object.keys(Xe).forEach((e=>{void 0!==Xe[e]&&(Ze[e]=Xe[e])})),q.forEach((t=>{const n=e[t];n&&(Ze[t]=n)})),void 0!==r&&(Ze.button=Object.assign({autoInsertSpace:r},Ze.button));const Qe=(0,u.A)((()=>Ze),Ze,((e,t)=>{const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((n=>e[n]!==t[n]))})),et=o.useMemo((()=>({prefixCls:Ge,csp:Ye})),[Ge,Ye]);let tt=o.createElement(o.Fragment,null,o.createElement(W,{dropdownMatchSelectWidth:x}),t);const nt=o.useMemo((()=>{var e,t,n,r;return(0,d.h)((null===(e=b.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(n=null===(t=Qe.locale)||void 0===t?void 0:t.Form)||void 0===n?void 0:n.defaultValidateMessages)||{},(null===(r=Qe.form)||void 0===r?void 0:r.validateMessages)||{},(null==h?void 0:h.validateMessages)||{})}),[Qe,null==h?void 0:h.validateMessages]);Object.keys(nt).length>0&&(tt=o.createElement(f.Provider,{value:nt},tt)),m&&(tt=o.createElement(S,{locale:m,_ANT_MARK__:"internalMark"},tt)),(Ge||Ye)&&(tt=o.createElement(c.Provider,{value:et},tt)),g&&(tt=o.createElement(L,{size:g},tt)),tt=o.createElement(U,null,tt);const rt=o.useMemo((()=>{const e=Je||{},{algorithm:t,token:n,components:r,cssVar:o}=e,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["algorithm","token","components","cssVar"]),s=t&&(!Array.isArray(t)||t.length>0)?(0,l.an)(t):E.zQ,a={};Object.entries(r||{}).forEach((e=>{let[t,n]=e;const r=Object.assign({},n);"algorithm"in r&&(!0===r.algorithm?r.theme=s:(Array.isArray(r.algorithm)||"function"==typeof r.algorithm)&&(r.theme=(0,l.an)(r.algorithm)),delete r.algorithm),a[t]=r}));const c=Object.assign(Object.assign({},C.A),n);return Object.assign(Object.assign({},i),{theme:s,token:c,components:a,override:Object.assign({override:c},a),cssVar:o})}),[Je]);return I&&(tt=o.createElement(E.vG.Provider,{value:rt},tt)),Qe.warning&&(tt=o.createElement(p._n.Provider,{value:Qe.warning},tt)),void 0!==R&&(tt=o.createElement(D,{disabled:R},tt)),o.createElement(a.QO.Provider,{value:Qe},tt)},ne=e=>{const t=o.useContext(a.QO),n=o.useContext(A);return o.createElement(te,Object.assign({parentContext:t,legacyLocale:n},e))};ne.ConfigContext=a.QO,ne.SizeContext=_,ne.config=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;void 0!==t&&(G=t),void 0!==n&&(Y=n),"holderRender"in e&&(X=o),r&&(function(e){return Object.keys(e).some((e=>e.endsWith("Color")))}(r)?function(e,t){const n=function(e,t){const n={},r=(e,t)=>{let n=e.clone();return n=(null==t?void 0:t(n))||n,n.toRgbString()},o=(e,t)=>{const o=new M.Y(e),i=(0,O.cM)(o.toRgbString());n[`${t}-color`]=r(o),n[`${t}-color-disabled`]=i[1],n[`${t}-color-hover`]=i[4],n[`${t}-color-active`]=i[6],n[`${t}-color-outline`]=o.clone().setA(.2).toRgbString(),n[`${t}-color-deprecated-bg`]=i[0],n[`${t}-color-deprecated-border`]=i[2]};if(t.primaryColor){o(t.primaryColor,"primary");const e=new M.Y(t.primaryColor),i=(0,O.cM)(e.toRgbString());i.forEach(((e,t)=>{n[`primary-${t+1}`]=e})),n["primary-color-deprecated-l-35"]=r(e,(e=>e.lighten(35))),n["primary-color-deprecated-l-20"]=r(e,(e=>e.lighten(20))),n["primary-color-deprecated-t-20"]=r(e,(e=>e.tint(20))),n["primary-color-deprecated-t-50"]=r(e,(e=>e.tint(50))),n["primary-color-deprecated-f-12"]=r(e,(e=>e.setA(.12*e.a)));const s=new M.Y(i[0]);n["primary-color-active-deprecated-f-30"]=r(s,(e=>e.setA(.3*e.a))),n["primary-color-active-deprecated-d-02"]=r(s,(e=>e.darken(2)))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`\n :root {\n ${Object.keys(n).map((t=>`--${e}-${t}: ${n[t]};`)).join("\n")}\n }\n `.trim()}(e,t);(0,N.A)()&&(0,T.BD)(n,`${I}-dynamic-theme`)}(Z(),r):J=r)},ne.useConfig=function(){return{componentDisabled:(0,o.useContext)(P),componentSize:(0,o.useContext)(_)}},Object.defineProperty(ne,"SizeContext",{get:()=>_});const re=ne;var oe,ie=n(9435),se=n(1258),ae=n(6330),le=n(7545),ce=(0,h.A)({},ie),ue=ce.version,de=ce.render,pe=ce.unmountComponentAtNode;try{Number((ue||"").split(".")[0])>=18&&(oe=ce.createRoot)}catch(e){}function fe(e){var t=ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===(0,le.A)(t)&&(t.usingClientEntryPoint=e)}var he="__rc_react_root__";function me(e){return ge.apply(this,arguments)}function ge(){return(ge=(0,ae.A)((0,se.A)().mark((function e(t){return(0,se.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[he])||void 0===e||e.unmount(),delete t[he]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ye(e){pe(e)}function ve(){return(ve=(0,ae.A)((0,se.A)().mark((function e(t){return(0,se.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===oe){e.next=2;break}return e.abrupt("return",me(t));case 2:ye(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}let be=(e,t)=>(function(e,t){oe?function(e,t){fe(!0);var n=t[he]||oe(t);fe(!1),n.render(e),t[he]=n}(e,t):function(e,t){null==de||de(e,t)}(e,t)}(e,t),()=>function(e){return ve.apply(this,arguments)}(t));var we=n(9575);const ke={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};var xe=n(689),Ae=n(4586),Se=n(4223),Ee=n(3373),Ce=n.n(Ee),Oe=n(9116),Me=n(4445);function Ne(e){return"object"===(0,le.A)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,le.A)(e.icon)||"function"==typeof e.icon)}function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r,o=e[n];return"class"===n?(t.className=o,delete t.class):(delete t[n],t[(r=n,r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=o),t}),{})}function Ie(e,t,n){return n?i().createElement(e.tag,(0,h.A)((0,h.A)({key:t},Te(e.attrs)),n),(e.children||[]).map((function(n,r){return Ie(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):i().createElement(e.tag,(0,h.A)({key:t},Te(e.attrs)),(e.children||[]).map((function(n,r){return Ie(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function Re(e){return(0,O.cM)(e)[0]}function De(e){return e?Array.isArray(e)?e:[e]:[]}var Pe=["icon","className","onClick","style","primaryColor","secondaryColor"],Fe={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1},Le=function(e){var t,n,r,i,s,a=e.icon,l=e.className,u=e.onClick,d=e.style,p=e.primaryColor,f=e.secondaryColor,m=(0,Se.A)(e,Pe),g=o.useRef(),y=Fe;if(p&&(y={primaryColor:p,secondaryColor:f||Re(p)}),t=g,n=(0,o.useContext)(c),r=n.csp,i=n.prefixCls,s="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",i&&(s=s.replace(/anticon/g,i)),(0,o.useEffect)((function(){var e=t.current,n=(0,Oe.j)(e);(0,T.BD)(s,"@ant-design-icons",{prepend:!0,csp:r,attachTo:n})}),[]),function(e,t){(0,Me.Ay)(e,"[@ant-design/icons] ".concat(t))}(Ne(a),"icon should be icon definiton, but got ".concat(a)),!Ne(a))return null;var v=a;return v&&"function"==typeof v.icon&&(v=(0,h.A)((0,h.A)({},v),{},{icon:v.icon(y.primaryColor,y.secondaryColor)})),Ie(v.icon,"svg-".concat(v.name),(0,h.A)((0,h.A)({className:l,onClick:u,style:d,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},m),{},{ref:g}))};Le.displayName="IconReact",Le.getTwoToneColors=function(){return(0,h.A)({},Fe)},Le.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;Fe.primaryColor=t,Fe.secondaryColor=n||Re(t),Fe.calculated=!!n};const _e=Le;function ze(e){var t=De(e),n=(0,xe.A)(t,2),r=n[0],o=n[1];return _e.setTwoToneColors({primaryColor:r,secondaryColor:o})}var $e=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];ze(O.z1.primary);var je=o.forwardRef((function(e,t){var n=e.className,r=e.icon,i=e.spin,s=e.rotate,a=e.tabIndex,l=e.onClick,u=e.twoToneColor,d=(0,Se.A)(e,$e),p=o.useContext(c),f=p.prefixCls,h=void 0===f?"anticon":f,m=p.rootClassName,g=Ce()(m,h,(0,Ae.A)((0,Ae.A)({},"".concat(h,"-").concat(r.name),!!r.name),"".concat(h,"-spin"),!!i||"loading"===r.name),n),y=a;void 0===y&&l&&(y=-1);var v=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,b=De(u),w=(0,xe.A)(b,2),k=w[0],x=w[1];return o.createElement("span",(0,we.A)({role:"img","aria-label":r.name},d,{ref:t,tabIndex:y,onClick:l,className:g}),o.createElement(_e,{icon:r,primaryColor:k,secondaryColor:x,style:v}))}));je.displayName="AntdIcon",je.getTwoToneColor=function(){var e=_e.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},je.setTwoToneColor=ze;const Be=je;var He=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:ke}))};const Ve=o.forwardRef(He),Ue={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var We=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:Ue}))};const Ke=o.forwardRef(We),qe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var Ge=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:qe}))};const Ye=o.forwardRef(Ge),Je={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var Xe=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:Je}))};const Ze=o.forwardRef(Xe),Qe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var et=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:Qe}))};const tt=o.forwardRef(et);var nt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=nt.F1&&t<=nt.F12)return!1;switch(t){case nt.ALT:case nt.CAPS_LOCK:case nt.CONTEXT_MENU:case nt.CTRL:case nt.DOWN:case nt.END:case nt.ESC:case nt.HOME:case nt.INSERT:case nt.LEFT:case nt.MAC_FF_META:case nt.META:case nt.NUMLOCK:case nt.NUM_CENTER:case nt.PAGE_DOWN:case nt.PAGE_UP:case nt.PAUSE:case nt.PRINT_SCREEN:case nt.RIGHT:case nt.SHIFT:case nt.UP:case nt.WIN_KEY:case nt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=nt.ZERO&&e<=nt.NINE)return!0;if(e>=nt.NUM_ZERO&&e<=nt.NUM_MULTIPLY)return!0;if(e>=nt.A&&e<=nt.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case nt.SPACE:case nt.QUESTION_MARK:case nt.NUM_PLUS:case nt.NUM_MINUS:case nt.NUM_PERIOD:case nt.NUM_DIVISION:case nt.SEMICOLON:case nt.DASH:case nt.EQUALS:case nt.COMMA:case nt.PERIOD:case nt.SLASH:case nt.APOSTROPHE:case nt.SINGLE_QUOTE:case nt.OPEN_SQUARE_BRACKET:case nt.BACKSLASH:case nt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const rt=nt;var ot="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function it(e,t){return 0===e.indexOf(t)}var st=o.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,i=e.className,s=e.duration,a=void 0===s?4.5:s,l=e.showProgress,c=e.pauseOnHover,u=void 0===c||c,d=e.eventKey,p=e.content,f=e.closable,m=e.closeIcon,g=void 0===m?"x":m,y=e.props,v=e.onClick,b=e.onNoticeClose,w=e.times,k=e.hovering,x=o.useState(!1),A=(0,xe.A)(x,2),S=A[0],E=A[1],C=o.useState(0),O=(0,xe.A)(C,2),M=O[0],N=O[1],T=o.useState(0),I=(0,xe.A)(T,2),R=I[0],D=I[1],P=k||S,F=a>0&&l,L=function(){b(d)};o.useEffect((function(){if(!P&&a>0){var e=Date.now()-R,t=setTimeout((function(){L()}),1e3*a-R);return function(){u&&clearTimeout(t),D(Date.now()-e)}}}),[a,P,w]),o.useEffect((function(){if(!P&&F&&(u||0===R)){var e,t=performance.now();return function n(){cancelAnimationFrame(e),e=requestAnimationFrame((function(e){var r=e+R-t,o=Math.min(r/(1e3*a),1);N(100*o),o<1&&n()}))}(),function(){u&&cancelAnimationFrame(e)}}}),[a,R,P,F,w]);var _=o.useMemo((function(){return"object"===(0,le.A)(f)&&null!==f?f:f?{closeIcon:g}:{}}),[f,g]),z=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:(0,h.A)({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||it(n,"aria-"))||t.data&&it(n,"data-")||t.attr&&ot.includes(n))&&(r[n]=e[n])})),r}(_,!0),$=100-(!M||M<0?0:M>100?100:M),j="".concat(n,"-notice");return o.createElement("div",(0,we.A)({},y,{ref:t,className:Ce()(j,i,(0,Ae.A)({},"".concat(j,"-closable"),f)),style:r,onMouseEnter:function(e){var t;E(!0),null==y||null===(t=y.onMouseEnter)||void 0===t||t.call(y,e)},onMouseLeave:function(e){var t;E(!1),null==y||null===(t=y.onMouseLeave)||void 0===t||t.call(y,e)},onClick:v}),o.createElement("div",{className:"".concat(j,"-content")},p),f&&o.createElement("a",(0,we.A)({tabIndex:0,className:"".concat(j,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==rt.ENTER||L()},"aria-label":"Close"},z,{onClick:function(e){e.preventDefault(),e.stopPropagation(),L()}}),_.closeIcon),F&&o.createElement("progress",{className:"".concat(j,"-progress"),max:"100",value:$},$+"%"))}));const at=st;var lt=i().createContext({});const ct=function(e){var t=e.children,n=e.classNames;return i().createElement(lt.Provider,{value:{classNames:n}},t)};var ut=["className","style","classNames","styles"];const dt=function(e){var t,n,s,a,l,c=e.configList,u=e.placement,d=e.prefixCls,p=e.className,f=e.style,m=e.motion,g=e.onAllNoticeRemoved,y=e.onNoticeClose,v=e.stack,b=(0,o.useContext)(lt).classNames,w=(0,o.useRef)({}),k=(0,o.useState)(null),x=(0,xe.A)(k,2),A=x[0],S=x[1],E=(0,o.useState)([]),C=(0,xe.A)(E,2),O=C[0],M=C[1],N=c.map((function(e){return{config:e,key:String(e.key)}})),T=(l={offset:8,threshold:3,gap:16},(t=v)&&"object"===(0,le.A)(t)&&(l.offset=null!==(n=t.offset)&&void 0!==n?n:8,l.threshold=null!==(s=t.threshold)&&void 0!==s?s:3,l.gap=null!==(a=t.gap)&&void 0!==a?a:16),[!!t,l]),I=(0,xe.A)(T,2),R=I[0],D=I[1],P=D.offset,F=D.threshold,L=D.gap,_=R&&(O.length>0||N.length<=F),z="function"==typeof m?m(u):m;return(0,o.useEffect)((function(){R&&O.length>1&&M((function(e){return e.filter((function(e){return N.some((function(t){var n=t.key;return e===n}))}))}))}),[O,N,R]),(0,o.useEffect)((function(){var e,t;R&&w.current[null===(e=N[N.length-1])||void 0===e?void 0:e.key]&&S(w.current[null===(t=N[N.length-1])||void 0===t?void 0:t.key])}),[N,R]),i().createElement(H.aF,(0,we.A)({key:u,className:Ce()(d,"".concat(d,"-").concat(u),null==b?void 0:b.list,p,(0,Ae.A)((0,Ae.A)({},"".concat(d,"-stack"),!!R),"".concat(d,"-stack-expanded"),_)),style:f,keys:N,motionAppear:!0},z,{onAllRemoved:function(){g(u)}}),(function(e,t){var n=e.config,o=e.className,s=e.style,a=e.index,l=n,c=l.key,p=l.times,f=String(c),m=n,g=m.className,v=m.style,k=m.classNames,x=m.styles,S=(0,Se.A)(m,ut),E=N.findIndex((function(e){return e.key===f})),C={};if(R){var T=N.length-1-(E>-1?E:a-1),I="top"===u||"bottom"===u?"-50%":"0";if(T>0){var D,F,z;C.height=_?null===(D=w.current[f])||void 0===D?void 0:D.offsetHeight:null==A?void 0:A.offsetHeight;for(var $=0,j=0;j<T;j++){var B;$+=(null===(B=w.current[N[N.length-1-j].key])||void 0===B?void 0:B.offsetHeight)+L}var H=(_?$:T*P)*(u.startsWith("top")?1:-1),V=!_&&null!=A&&A.offsetWidth&&null!==(F=w.current[f])&&void 0!==F&&F.offsetWidth?((null==A?void 0:A.offsetWidth)-2*P*(T<3?T:3))/(null===(z=w.current[f])||void 0===z?void 0:z.offsetWidth):1;C.transform="translate3d(".concat(I,", ").concat(H,"px, 0) scaleX(").concat(V,")")}else C.transform="translate3d(".concat(I,", 0, 0)")}return i().createElement("div",{ref:t,className:Ce()("".concat(d,"-notice-wrapper"),o,null==k?void 0:k.wrapper),style:(0,h.A)((0,h.A)((0,h.A)({},s),C),null==x?void 0:x.wrapper),onMouseEnter:function(){return M((function(e){return e.includes(f)?e:[].concat((0,r.A)(e),[f])}))},onMouseLeave:function(){return M((function(e){return e.filter((function(e){return e!==f}))}))}},i().createElement(at,(0,we.A)({},S,{ref:function(e){E>-1?w.current[f]=e:delete w.current[f]},prefixCls:d,classNames:k,styles:x,className:Ce()(g,null==b?void 0:b.notice),style:v,times:p,key:c,eventKey:c,onNoticeClose:y,hovering:R&&O.length>0})))}))};var pt=o.forwardRef((function(e,t){var n=e.prefixCls,i=void 0===n?"rc-notification":n,s=e.container,a=e.motion,l=e.maxCount,c=e.className,u=e.style,d=e.onAllRemoved,p=e.stack,f=e.renderNotifications,m=o.useState([]),g=(0,xe.A)(m,2),y=g[0],v=g[1],b=function(e){var t,n=y.find((function(t){return t.key===e}));null==n||null===(t=n.onClose)||void 0===t||t.call(n),v((function(t){return t.filter((function(t){return t.key!==e}))}))};o.useImperativeHandle(t,(function(){return{open:function(e){v((function(t){var n,o=(0,r.A)(t),i=o.findIndex((function(t){return t.key===e.key})),s=(0,h.A)({},e);return i>=0?(s.times=((null===(n=t[i])||void 0===n?void 0:n.times)||0)+1,o[i]=s):(s.times=0,o.push(s)),l>0&&o.length>l&&(o=o.slice(-l)),o}))},close:function(e){b(e)},destroy:function(){v([])}}}));var w=o.useState({}),k=(0,xe.A)(w,2),x=k[0],A=k[1];o.useEffect((function(){var e={};y.forEach((function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))})),Object.keys(x).forEach((function(t){e[t]=e[t]||[]})),A(e)}),[y]);var S=function(e){A((function(t){var n=(0,h.A)({},t);return(n[e]||[]).length||delete n[e],n}))},E=o.useRef(!1);if(o.useEffect((function(){Object.keys(x).length>0?E.current=!0:E.current&&(null==d||d(),E.current=!1)}),[x]),!s)return null;var C=Object.keys(x);return(0,ie.createPortal)(o.createElement(o.Fragment,null,C.map((function(e){var t=x[e],n=o.createElement(dt,{key:e,configList:t,placement:e,prefixCls:i,className:null==c?void 0:c(e),style:null==u?void 0:u(e),motion:a,onNoticeClose:b,onAllNoticeRemoved:S,stack:p});return f?f(n,{prefixCls:i,key:e}):n}))),s)}));const ft=pt;var ht=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],mt=function(){return document.body},gt=0;const yt=e=>{const[,,,,t]=(0,V.Ay)();return t?`${e}-css-var`:""};var vt=n(7010),bt=n(2257),wt=n(8764);const kt=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:o,colorSuccess:i,colorError:s,colorWarning:a,colorInfo:c,fontSizeLG:u,motionEaseInOutCirc:d,motionDurationSlow:p,marginXS:f,paddingXS:h,borderRadiusLG:m,zIndexPopup:g,contentPadding:y,contentBg:v}=e,b=`${t}-notice`,w=new l.Mo("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:h,transform:"translateY(0)",opacity:1}}),k=new l.Mo("MessageMoveOut",{"0%":{maxHeight:e.height,padding:h,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),x={padding:h,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:f,fontSize:u},[`${b}-content`]:{display:"inline-block",padding:y,background:v,borderRadius:m,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:i},[`${t}-error > ${n}`]:{color:s},[`${t}-warning > ${n}`]:{color:a},[`${t}-info > ${n},\n ${t}-loading > ${n}`]:{color:c}};return[{[t]:Object.assign(Object.assign({},(0,K.dF)(e)),{color:o,position:"fixed",top:f,width:"100%",pointerEvents:"none",zIndex:g,[`${t}-move-up`]:{animationFillMode:"forwards"},[`\n ${t}-move-up-appear,\n ${t}-move-up-enter\n `]:{animationName:w,animationDuration:p,animationPlayState:"paused",animationTimingFunction:d},[`\n ${t}-move-up-appear${t}-move-up-appear-active,\n ${t}-move-up-enter${t}-move-up-enter-active\n `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:k,animationDuration:p,animationPlayState:"paused",animationTimingFunction:d},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${b}-wrapper`]:Object.assign({},x)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},x),{padding:0,textAlign:"start"})}]},xt=(0,bt.OF)("Message",(e=>{const t=(0,wt.oX)(e,{height:150});return[kt(t)]}),(e=>({zIndexPopup:e.zIndexPopupBase+vt.jH+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})));const At={info:o.createElement(Ze,null),success:o.createElement(Ve,null),error:o.createElement(Ke,null),warning:o.createElement(Ye,null),loading:o.createElement(tt,null)},St=e=>{let{prefixCls:t,type:n,icon:r,children:i}=e;return o.createElement("div",{className:Ce()(`${t}-custom-content`,`${t}-${n}`)},r||At[n],o.createElement("span",null,i))},Et={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var Ct=function(e,t){return o.createElement(Be,(0,we.A)({},e,{ref:t,icon:Et}))};const Ot=o.forwardRef(Ct);function Mt(e){let t;const n=new Promise((n=>{t=e((()=>{n(!0)}))})),r=()=>{null==t||t()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}const Nt=3,Tt=e=>{let{children:t,prefixCls:n}=e;const r=yt(n),[i,s,a]=xt(n,r);return i(o.createElement(ct,{classNames:{list:Ce()(s,a,r)}},t))},It=(e,t)=>{let{prefixCls:n,key:r}=t;return o.createElement(Tt,{prefixCls:n,key:r},e)},Rt=o.forwardRef(((e,t)=>{const{top:n,prefixCls:i,getContainer:s,maxCount:l,duration:c=Nt,rtl:u,transitionName:d,onAllRemoved:p}=e,{getPrefixCls:f,getPopupContainer:h,message:m,direction:g}=o.useContext(a.QO),y=i||f("message"),v=o.createElement("span",{className:`${y}-close-x`},o.createElement(Ot,{className:`${y}-close-icon`})),[b,w]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?mt:t,i=e.motion,s=e.prefixCls,a=e.maxCount,l=e.className,c=e.style,u=e.onAllRemoved,d=e.stack,p=e.renderNotifications,f=(0,Se.A)(e,ht),h=o.useState(),m=(0,xe.A)(h,2),g=m[0],y=m[1],v=o.useRef(),b=o.createElement(ft,{container:g,ref:v,prefixCls:s,motion:i,maxCount:a,className:l,style:c,onAllRemoved:u,stack:d,renderNotifications:p}),w=o.useState([]),k=(0,xe.A)(w,2),x=k[0],A=k[1],S=o.useMemo((function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&Object.keys(t).forEach((function(n){var r=t[n];void 0!==r&&(e[n]=r)}))})),e}(f,e);null!==t.key&&void 0!==t.key||(t.key="rc-notification-".concat(gt),gt+=1),A((function(e){return[].concat((0,r.A)(e),[{type:"open",config:t}])}))},close:function(e){A((function(t){return[].concat((0,r.A)(t),[{type:"close",key:e}])}))},destroy:function(){A((function(e){return[].concat((0,r.A)(e),[{type:"destroy"}])}))}}}),[]);return o.useEffect((function(){y(n())})),o.useEffect((function(){v.current&&x.length&&(x.forEach((function(e){switch(e.type){case"open":v.current.open(e.config);break;case"close":v.current.close(e.key);break;case"destroy":v.current.destroy()}})),A((function(e){return e.filter((function(e){return!x.includes(e)}))})))}),[x]),[S,b]}({prefixCls:y,style:()=>({left:"50%",transform:"translateX(-50%)",top:null!=n?n:8}),className:()=>Ce()({[`${y}-rtl`]:null!=u?u:"rtl"===g}),motion:()=>function(e,t){return{motionName:null!=t?t:`${e}-move-up`}}(y,d),closable:!1,closeIcon:v,duration:c,getContainer:()=>(null==s?void 0:s())||(null==h?void 0:h())||document.body,maxCount:l,onAllRemoved:p,renderNotifications:It});return o.useImperativeHandle(t,(()=>Object.assign(Object.assign({},b),{prefixCls:y,message:m}))),w}));let Dt=0;function Pt(e){const t=o.useRef(null),n=((0,p.rJ)("Message"),o.useMemo((()=>{const e=e=>{var n;null===(n=t.current)||void 0===n||n.close(e)},n=n=>{if(!t.current){const e=()=>{};return e.then=()=>{},e}const{open:r,prefixCls:i,message:s}=t.current,a=`${i}-notice`,{content:l,icon:c,type:u,key:d,className:p,style:f,onClose:h}=n,m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(n,["content","icon","type","key","className","style","onClose"]);let g=d;return null==g&&(Dt+=1,g=`antd-message-${Dt}`),Mt((t=>(r(Object.assign(Object.assign({},m),{key:g,content:o.createElement(St,{prefixCls:i,type:u,icon:c},l),placement:"top",className:Ce()(u&&`${a}-${u}`,p,null==s?void 0:s.className),style:Object.assign(Object.assign({},null==s?void 0:s.style),f),onClose:()=>{null==h||h(),t()}})),()=>{e(g)})))},r={open:n,destroy:n=>{var r;void 0!==n?e(n):null===(r=t.current)||void 0===r||r.destroy()}};return["info","success","warning","error","loading"].forEach((e=>{r[e]=(t,r,o)=>{let i,s,a;i=t&&"object"==typeof t&&"content"in t?t:{content:t},"function"==typeof r?a=r:(s=r,a=o);const l=Object.assign(Object.assign({onClose:a,duration:s},i),{type:e});return n(l)}})),r}),[]));return[n,o.createElement(Rt,Object.assign({key:"message-holder"},e,{ref:t}))]}let Ft=null,Lt=e=>e(),_t=[],zt={};function $t(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:o}=zt,i=(null==e?void 0:e())||document.body;return{getContainer:()=>i,duration:t,rtl:n,maxCount:r,top:o}}const jt=i().forwardRef(((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:l}=(0,o.useContext)(a.QO),c=zt.prefixCls||l("message"),u=(0,o.useContext)(s),[d,p]=Pt(Object.assign(Object.assign(Object.assign({},n),{prefixCls:c}),u.message));return i().useImperativeHandle(t,(()=>{const e=Object.assign({},d);return Object.keys(e).forEach((t=>{e[t]=function(){return r(),d[t].apply(d,arguments)}})),{instance:e,sync:r}})),p})),Bt=i().forwardRef(((e,t)=>{const[n,r]=i().useState($t),o=()=>{r($t)};i().useEffect(o,[]);const s=ee(),a=s.getRootPrefixCls(),l=s.getIconPrefixCls(),c=s.getTheme(),u=i().createElement(jt,{ref:t,sync:o,messageConfig:n});return i().createElement(re,{prefixCls:a,iconPrefixCls:l,theme:c},s.holderRender?s.holderRender(u):u)}));function Ht(){if(!Ft){const e=document.createDocumentFragment(),t={fragment:e};return Ft=t,void Lt((()=>{be(i().createElement(Bt,{ref:e=>{const{instance:n,sync:r}=e||{};Promise.resolve().then((()=>{!t.instance&&n&&(t.instance=n,t.sync=r,Ht())}))}}),e)}))}Ft.instance&&(_t.forEach((e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":Lt((()=>{const t=Ft.instance.open(Object.assign(Object.assign({},zt),e.config));null==t||t.then(e.resolve),e.setCloseFn(t)}));break;case"destroy":Lt((()=>{null==Ft||Ft.instance.destroy(e.key)}));break;default:Lt((()=>{var n;const o=(n=Ft.instance)[t].apply(n,(0,r.A)(e.args));null==o||o.then(e.resolve),e.setCloseFn(o)}))}})),_t=[])}const Vt={open:function(e){const t=Mt((t=>{let n;const r={type:"open",config:e,resolve:t,setCloseFn:e=>{n=e}};return _t.push(r),()=>{n?Lt((()=>{n()})):r.skipped=!0}}));return Ht(),t},destroy:e=>{_t.push({type:"destroy",key:e}),Ht()},config:function(e){zt=Object.assign(Object.assign({},zt),e),Lt((()=>{var e;null===(e=null==Ft?void 0:Ft.sync)||void 0===e||e.call(Ft)}))},useMessage:function(e){return Pt(e)},_InternalPanelDoNotUseOrYouWillBeFired:e=>{const{prefixCls:t,className:n,type:r,icon:i,content:s}=e,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:c}=o.useContext(a.QO),u=t||c("message"),d=yt(u),[p,f,h]=xt(u,d);return p(o.createElement(at,Object.assign({},l,{prefixCls:u,className:Ce()(n,f,`${u}-notice-pure-panel`,h,d),eventKey:"pure",duration:null,content:o.createElement(St,{prefixCls:u,type:r,icon:i},s)})))}};["success","info","warning","error","loading"].forEach((e=>{Vt[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){ee();const n=Mt((n=>{let r;const o={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return _t.push(o),()=>{r?Lt((()=>{r()})):o.skipped=!0}}));return Ht(),n}(e,n)}}));const Ut=Vt},8764:(e,t,n)=>{"use strict";n.d(t,{L_:()=>I,oX:()=>E});var r=n(7545),o=n(689),i=n(4586),s=n(9740),a=n(8769),l=n.n(a),c=n(5694),u=n(5152),d=n(414),p=n(2474),f=n(9296),h=n(857);const m=(0,d.A)((function e(){(0,u.A)(this,e)}));var g="CALC_UNIT",y=new RegExp(g,"g");function v(e){return"number"==typeof e?"".concat(e).concat(g):e}var b=function(e){(0,f.A)(n,e);var t=(0,h.A)(n);function n(e,o){var s;(0,u.A)(this,n),s=t.call(this),(0,i.A)((0,p.A)(s),"result",""),(0,i.A)((0,p.A)(s),"unitlessCssVar",void 0),(0,i.A)((0,p.A)(s),"lowPriority",void 0);var a=(0,r.A)(e);return s.unitlessCssVar=o,e instanceof n?s.result="(".concat(e.result,")"):"number"===a?s.result=v(e):"string"===a&&(s.result=e),s}return(0,d.A)(n,[{key:"add",value:function(e){return e instanceof n?this.result="".concat(this.result," + ").concat(e.getResult()):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," + ").concat(v(e))),this.lowPriority=!0,this}},{key:"sub",value:function(e){return e instanceof n?this.result="".concat(this.result," - ").concat(e.getResult()):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," - ").concat(v(e))),this.lowPriority=!0,this}},{key:"mul",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," * ").concat(e.getResult(!0)):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," * ").concat(e)),this.lowPriority=!1,this}},{key:"div",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," / ").concat(e.getResult(!0)):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," / ").concat(e)),this.lowPriority=!1,this}},{key:"getResult",value:function(e){return this.lowPriority||e?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(e){var t=this,n=(e||{}).unit,r=!0;return"boolean"==typeof n?r=n:Array.from(this.unitlessCssVar).some((function(e){return t.result.includes(e)}))&&(r=!1),this.result=this.result.replace(y,r?"px":""),void 0!==this.lowPriority?"calc(".concat(this.result,")"):this.result}}]),n}(m);const w=function(e){(0,f.A)(n,e);var t=(0,h.A)(n);function n(e){var r;return(0,u.A)(this,n),r=t.call(this),(0,i.A)((0,p.A)(r),"result",0),e instanceof n?r.result=e.result:"number"==typeof e&&(r.result=e),r}return(0,d.A)(n,[{key:"add",value:function(e){return e instanceof n?this.result+=e.result:"number"==typeof e&&(this.result+=e),this}},{key:"sub",value:function(e){return e instanceof n?this.result-=e.result:"number"==typeof e&&(this.result-=e),this}},{key:"mul",value:function(e){return e instanceof n?this.result*=e.result:"number"==typeof e&&(this.result*=e),this}},{key:"div",value:function(e){return e instanceof n?this.result/=e.result:"number"==typeof e&&(this.result/=e),this}},{key:"equal",value:function(){return this.result}}]),n}(m),k=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};n(9973);const x=function(e,t,n,r){var i=(0,s.A)({},t[e]);null!=r&&r.deprecatedTokens&&r.deprecatedTokens.forEach((function(e){var t,n=(0,o.A)(e,2),r=n[0],s=n[1];(null!=i&&i[r]||null!=i&&i[s])&&(null!==(t=i[s])&&void 0!==t||(i[s]=null==i?void 0:i[r]))}));var a=(0,s.A)((0,s.A)({},n),i);return Object.keys(a).forEach((function(e){a[e]===t[e]&&delete a[e]})),a};var A="undefined"!=typeof CSSINJS_STATISTIC,S=!0;function E(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!A)return Object.assign.apply(Object,[{}].concat(t));S=!1;var o={};return t.forEach((function(e){"object"===(0,r.A)(e)&&Object.keys(e).forEach((function(t){Object.defineProperty(o,t,{configurable:!0,enumerable:!0,get:function(){return e[t]}})}))})),S=!0,o}var C={};function O(){}const M=function(e,t,n){var r;return"function"==typeof n?n(E(t,null!==(r=t[e])&&void 0!==r?r:{})):null!=n?n:{}};var N=new(function(){function e(){(0,u.A)(this,e),(0,i.A)(this,"map",new Map),(0,i.A)(this,"objectIDMap",new WeakMap),(0,i.A)(this,"nextID",0),(0,i.A)(this,"lastAccessBeat",new Map),(0,i.A)(this,"accessBeat",0)}return(0,d.A)(e,[{key:"set",value:function(e,t){this.clear();var n=this.getCompositeKey(e);this.map.set(n,t),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(e){var t=this.getCompositeKey(e),n=this.map.get(t);return this.lastAccessBeat.set(t,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(e){var t=this;return e.map((function(e){return e&&"object"===(0,r.A)(e)?"obj_".concat(t.getObjectID(e)):"".concat((0,r.A)(e),"_").concat(e)})).join("|")}},{key:"getObjectID",value:function(e){if(this.objectIDMap.has(e))return this.objectIDMap.get(e);var t=this.nextID;return this.objectIDMap.set(e,t),this.nextID+=1,t}},{key:"clear",value:function(){var e=this;if(this.accessBeat>1e4){var t=Date.now();this.lastAccessBeat.forEach((function(n,r){t-n>6e5&&(e.map.delete(r),e.lastAccessBeat.delete(r))})),this.accessBeat=0}}}]),e}());const T=function(){return{}},I=function(e){var t=e.useCSP,n=void 0===t?T:t,a=e.useToken,u=e.usePrefix,d=e.getResetStyles,p=e.getCommonStyle,f=e.getCompUnitless;function h(t,i,f){var h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},m=Array.isArray(t)?t:[t,t],g=(0,o.A)(m,1)[0],y=m.join("-"),v=e.layer||{name:"antd"};return function(e){var t,o,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,T=a(),I=T.theme,R=T.realToken,D=T.hashId,P=T.token,F=T.cssVar,L=u(),_=L.rootPrefixCls,z=L.iconPrefixCls,$=n(),j=F?"css":"js",B=(t=function(){var e=new Set;return F&&Object.keys(h.unitless||{}).forEach((function(t){e.add((0,c.Ki)(t,F.prefix)),e.add((0,c.Ki)(t,k(g,F.prefix)))})),function(e,t){var n="css"===e?b:w;return function(e){return new n(e,t)}}(j,e)},o=[j,g,null==F?void 0:F.prefix],l().useMemo((function(){var e=N.get(o);if(e)return e;var n=t();return N.set(o,n),n}),o)),H=function(e){return"js"===e?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"max(".concat(t.map((function(e){return(0,c.zA)(e)})).join(","),")")},min:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"min(".concat(t.map((function(e){return(0,c.zA)(e)})).join(","),")")}}}(j),V=H.max,U=H.min,W={theme:I,token:P,hashId:D,nonce:function(){return $.nonce},clientOnly:h.clientOnly,layer:v,order:h.order||-999};return"function"==typeof d&&(0,c.IV)((0,s.A)((0,s.A)({},W),{},{clientOnly:!1,path:["Shared",_]}),(function(){return d(P,{prefix:{rootPrefixCls:_,iconPrefixCls:z},csp:$})})),[(0,c.IV)((0,s.A)((0,s.A)({},W),{},{path:[y,e,z]}),(function(){if(!1===h.injectStyle)return[];var t=function(e){var t,n=e,r=O;return A&&"undefined"!=typeof Proxy&&(t=new Set,n=new Proxy(e,{get:function(e,n){var r;return S&&(null===(r=t)||void 0===r||r.add(n)),e[n]}}),r=function(e,n){var r;C[e]={global:Array.from(t),component:(0,s.A)((0,s.A)({},null===(r=C[e])||void 0===r?void 0:r.component),n)}}),{token:n,keys:t,flush:r}}(P),n=t.token,o=t.flush,a=M(g,R,f),l=".".concat(e),u=x(g,R,a,{deprecatedTokens:h.deprecatedTokens});F&&a&&"object"===(0,r.A)(a)&&Object.keys(a).forEach((function(e){a[e]="var(".concat((0,c.Ki)(e,k(g,F.prefix)),")")}));var d=E(n,{componentCls:l,prefixCls:e,iconCls:".".concat(z),antCls:".".concat(_),calc:B,max:V,min:U},F?a:u),y=i(d,{hashId:D,prefixCls:e,rootPrefixCls:_,iconPrefixCls:z});o(g,u);var v="function"==typeof p?p(d,e,m,h.resetFont):null;return[!1===h.resetStyle?null:v,y]})),D]}}return{genStyleHooks:function(e,t,n,r){var u=Array.isArray(e)?e[0]:e;function d(e){return"".concat(String(u)).concat(e.slice(0,1).toUpperCase()).concat(e.slice(1))}var p=(null==r?void 0:r.unitless)||{},m="function"==typeof f?f(e):{},g=(0,s.A)((0,s.A)({},m),{},(0,i.A)({},d("zIndexPopup"),!0));Object.keys(p).forEach((function(e){g[d(e)]=p[e]}));var y=(0,s.A)((0,s.A)({},r),{},{unitless:g,prefixToken:d}),v=h(e,t,n,y),b=function(e,t,n){var r=n.unitless,o=n.injectStyle,i=void 0===o||o,s=n.prefixToken,u=n.ignore,d=function(o){var i=o.rootCls,l=o.cssVar,d=void 0===l?{}:l,p=a().realToken;return(0,c.RC)({path:[e],prefix:d.prefix,key:d.key,unitless:r,ignore:u,token:p,scope:i},(function(){var r=M(e,p,t),o=x(e,p,r,{deprecatedTokens:null==n?void 0:n.deprecatedTokens});return Object.keys(r).forEach((function(e){o[s(e)]=o[e],delete o[e]})),o})),null};return function(t){var n=a().cssVar;return[function(r){return i&&n?l().createElement(l().Fragment,null,l().createElement(d,{rootCls:t,cssVar:n,component:e}),r):r},null==n?void 0:n.key]}}(u,n,y);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=v(e,t),r=(0,o.A)(n,2)[1],i=b(t),s=(0,o.A)(i,2);return[s[0],r,s[1]]}},genSubStyleComponent:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=h(e,t,n,(0,s.A)({resetStyle:!1,order:-998},r));return function(e){var t=e.prefixCls,n=e.rootCls;return o(t,void 0===n?t:n),null}},genComponentStyleHook:h}}},9055:(e,t,n)=>{"use strict";n.d(t,{m6:()=>h,BD:()=>m});var r=n(9740),o=n(7169),i="data-rc-order",s="data-rc-priority",a="rc-util-key",l=new Map;function c(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):a}function u(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function d(e){return Array.from((l.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,o.A)())return null;var n=t.csp,r=t.prepend,a=t.priority,l=void 0===a?0:a,c=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),p="prependQueue"===c,f=document.createElement("style");f.setAttribute(i,c),p&&l&&f.setAttribute(s,"".concat(l)),null!=n&&n.nonce&&(f.nonce=null==n?void 0:n.nonce),f.innerHTML=e;var h=u(t),m=h.firstChild;if(r){if(p){var g=(t.styles||d(h)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(i)))return!1;var t=Number(e.getAttribute(s)||0);return l>=t}));if(g.length)return h.insertBefore(f,g[g.length-1].nextSibling),f}h.insertBefore(f,m)}else h.appendChild(f);return f}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u(t);return(t.styles||d(n)).find((function(n){return n.getAttribute(c(t))===e}))}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=f(e,t);n&&u(t).removeChild(n)}function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=u(n),i=d(o),s=(0,r.A)((0,r.A)({},n),{},{styles:i});!function(e,t){var n=l.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var r=p("",t),o=r.parentNode;l.set(e,o),e.removeChild(r)}}(o,s);var a,h,m,g=f(t,s);if(g)return null!==(a=s.csp)&&void 0!==a&&a.nonce&&g.nonce!==(null===(h=s.csp)||void 0===h?void 0:h.nonce)&&(g.nonce=null===(m=s.csp)||void 0===m?void 0:m.nonce),g.innerHTML!==e&&(g.innerHTML=e),g;var y=p(e,s);return y.setAttribute(c(s),t),y}},9105:(e,t,n)=>{"use strict";function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}n.d(t,{A:()=>r})},9116:(e,t,n)=>{"use strict";function r(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function o(e){return function(e){return r(e)instanceof ShadowRoot}(e)?r(e):null}n.d(t,{j:()=>o})},9126:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var r=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),o="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),s="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},a=["top","right","bottom","left","width","height","size","weight"],l="undefined"!=typeof MutationObserver,c=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,r=0;function o(){t&&(t=!1,e()),n&&a()}function i(){s(o)}function a(){var e=Date.now();if(t){if(e-r<2)return;n=!0}else t=!0,n=!1,setTimeout(i,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){o&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){o&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},p=y(0,0,0,0);function f(e){return parseFloat(e)||0}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+f(e["border-"+n+"-width"])}),0)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return o?m(e)?function(e){var t=e.getBBox();return y(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=d(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=f(i)}return t}(r),i=o.left+o.right,s=o.top+o.bottom,a=f(r.width),l=f(r.height);if("border-box"===r.boxSizing&&(Math.round(a+i)!==t&&(a-=h(r,"left","right")+i),Math.round(l+s)!==n&&(l-=h(r,"top","bottom")+s)),!function(e){return e===d(e).document.documentElement}(e)){var c=Math.round(a+i)-t,u=Math.round(l+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(u)&&(l-=u)}return y(o.left,o.top,a,l)}(e):p}function y(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,o,i,s,a,l,c=(r=(n=t).x,o=n.y,i=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),u(l,{x:r,y:o,width:i,height:s,top:o,right:r+i,bottom:s+o,left:r}),l);u(this,{target:e,contentRect:c})},w=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),k="undefined"!=typeof WeakMap?new WeakMap:new r,x=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new w(t,n,this);k.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){x.prototype[e]=function(){var t;return(t=k.get(this))[e].apply(t,arguments)}}));const A=void 0!==i.ResizeObserver?i.ResizeObserver:x},9154:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,r:()=>r});const r={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},o=Object.assign(Object.assign({},r),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'",fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0})},9284:(e,t,n)=>{"use strict";n.d(t,{A9:()=>f,K4:()=>c,Xf:()=>l,f3:()=>d,xK:()=>u});var r=n(7545),o=n(8769),i=n(3790),s=n(4511),a=n(785),l=function(e,t){"function"==typeof e?e(t):"object"===(0,r.A)(e)&&e&&"current"in e&&(e.current=t)},c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);return r.length<=1?r[0]:function(e){t.forEach((function(t){l(t,e)}))}},u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.A)((function(){return c.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))},d=function(e){var t,n;if(!e)return!1;if(p(e)&&e.props.propertyIsEnumerable("ref"))return!0;var r=(0,i.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render||r.$$typeof===i.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===i.ForwardRef)};function p(e){return(0,o.isValidElement)(e)&&!(0,a.A)(e)}var f=function(e){if(e&&p(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null}},9296:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1087);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},9348:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(689),o=n(8769);function i(e){var t=o.useRef(!1),n=o.useState(e),i=(0,r.A)(n,2),s=i[0],a=i[1];return o.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[s,function(e,n){n&&t.current||a(e)}]}},9424:(e,t,n)=>{"use strict";n.d(t,{z1:()=>E,cM:()=>m,UA:()=>T,uy:()=>g});var r=n(6127),o=2,i=.16,s=.05,a=.05,l=.15,c=5,u=4,d=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function p(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-o*t:Math.round(e.h)+o*t:n?Math.round(e.h)+o*t:Math.round(e.h)-o*t)<0?r+=360:r>=360&&(r-=360),r}function f(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-i*t:t===u?e.s+i:e.s+s*t)>1&&(r=1),n&&t===c&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(100*r)/100);var r}function h(e,t,n){var r;return r=n?e.v+a*t:e.v-l*t,r=Math.max(0,Math.min(1,r)),Math.round(100*r)/100}function m(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],o=new r.Y(e),i=o.toHsv(),s=c;s>0;s-=1){var a=new r.Y({h:p(i,s,!0),s:f(i,s,!0),v:h(i,s,!0)});n.push(a)}n.push(o);for(var l=1;l<=u;l+=1){var m=new r.Y({h:p(i,l),s:f(i,l),v:h(i,l)});n.push(m)}return"dark"===t.theme?d.map((function(e){var o=e.index,i=e.amount;return new r.Y(t.backgroundColor||"#141414").mix(n[o],i).toHexString()})):n.map((function(e){return e.toHexString()}))}var g={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},y=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];y.primary=y[5];var v=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];v.primary=v[5];var b=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];b.primary=b[5];var w=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];w.primary=w[5];var k=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];k.primary=k[5];var x=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];x.primary=x[5];var A=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];A.primary=A[5];var S=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];S.primary=S[5];var E=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];E.primary=E[5];var C=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];C.primary=C[5];var O=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];O.primary=O[5];var M=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];M.primary=M[5];var N=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];N.primary=N[5];var T={red:y,volcano:v,orange:b,gold:w,yellow:k,lime:x,green:A,cyan:S,blue:E,geekblue:C,purple:O,magenta:M,grey:N},I=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];I.primary=I[5];var R=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];R.primary=R[5];var D=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];D.primary=D[5];var P=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];P.primary=P[5];var F=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];F.primary=F[5];var L=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];L.primary=L[5];var _=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];_.primary=_[5];var z=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];z.primary=z[5];var $=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];$.primary=$[5];var j=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];j.primary=j[5];var B=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];B.primary=B[5];var H=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];H.primary=H[5];var V=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];V.primary=V[5]},9449:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8769);function o(e){var t=r.useRef();t.current=e;var n=r.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[]);return n}},9575:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},9642:(e,t,n)=>{"use strict";n.d(t,{QO:()=>s,pM:()=>i,yH:()=>o});var r=n(8769);const o="ant",i="anticon",s=r.createContext({getPrefixCls:(e,t)=>t||(e?`${o}-${e}`:o),iconPrefixCls:i}),{Consumer:a}=s},9710:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(s(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&s(r)?r:{},a(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&a(d,{name:n,newValue:o}));return d}},9740:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(4586);function o(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},9820:(e,t,n)=>{"use strict";function r(){}n.d(t,{ok:()=>r})},9973:(e,t,n)=>{"use strict";n.d(t,{_q:()=>r.A});var r=n(9449);n(4948),n(9284),n(3795),n(4445)}}]);
|
|
3
|
+
//# sourceMappingURL=1599.59abead2.js.map
|