b0y-101 Mini Shell


Current Path : E:/www2/risk/administrator/components/com_sppagebuilder/assets/editor/dist/js/
File Upload :
Current File : E:/www2/risk/administrator/components/com_sppagebuilder/assets/editor/dist/js/vendors.min.js

/*! For license information please see vendors.min.js.LICENSE.txt */
(self.webpackChunkreact_typescript_webpack_backend_editor=self.webpackChunkreact_typescript_webpack_backend_editor||[]).push([[216],{6214:(e,t,n)=>{"use strict";function r(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function i(e){return Math.min(1,Math.max(0,e))}function o(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function s(e){return e<=1?"".concat(100*Number(e),"%"):e}function a(e){return 1===e.length?"0"+e:String(e)}function l(e,t,n){e=r(e,255),t=r(t,255),n=r(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),s=0,a=0,l=(i+o)/2;if(i===o)a=0,s=0;else{var c=i-o;switch(a=l>.5?c/(2-i-o):c/(i+o),i){case e:s=(t-n)/c+(t<n?6:0);break;case t:s=(n-e)/c+2;break;case n:s=(e-t)/c+4}s/=6}return{h:s,s:a,l}}function c(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function u(e,t,n){e=r(e,255),t=r(t,255),n=r(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),s=0,a=i,l=i-o,c=0===i?0:l/i;if(i===o)s=0;else{switch(i){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4}s/=6}return{h:s,s:c,v:a}}function h(e,t,n,r){var i=[a(Math.round(e).toString(16)),a(Math.round(t).toString(16)),a(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function f(e){return d(e)/255}function d(e){return parseInt(e,16)}n.d(t,{C:()=>w});var p={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var m="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),g="[\\s|\\(]+(".concat(m,")[,|\\s]+(").concat(m,")[,|\\s]+(").concat(m,")\\s*\\)?"),y="[\\s|\\(]+(".concat(m,")[,|\\s]+(").concat(m,")[,|\\s]+(").concat(m,")[,|\\s]+(").concat(m,")\\s*\\)?"),v={CSS_UNIT:new RegExp(m),rgb:new RegExp("rgb"+g),rgba:new RegExp("rgba"+y),hsl:new RegExp("hsl"+g),hsla:new RegExp("hsla"+y),hsv:new RegExp("hsv"+g),hsva:new RegExp("hsva"+y),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function b(e){return Boolean(v.CSS_UNIT.exec(String(e)))}var w=function(){function e(t,n){var i;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"==typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var a=function(e){var t,n,i,a={r:0,g:0,b:0},l=1,u=null,h=null,m=null,g=!1,y=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(p[e])e=p[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=v.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=v.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=v.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=v.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=v.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=v.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=v.hex8.exec(e))?{r:d(n[1]),g:d(n[2]),b:d(n[3]),a:f(n[4]),format:t?"name":"hex8"}:(n=v.hex6.exec(e))?{r:d(n[1]),g:d(n[2]),b:d(n[3]),format:t?"name":"hex"}:(n=v.hex4.exec(e))?{r:d(n[1]+n[1]),g:d(n[2]+n[2]),b:d(n[3]+n[3]),a:f(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=v.hex3.exec(e))&&{r:d(n[1]+n[1]),g:d(n[2]+n[2]),b:d(n[3]+n[3]),format:t?"name":"hex"}}(e)),"object"==typeof e&&(b(e.r)&&b(e.g)&&b(e.b)?(t=e.r,n=e.g,i=e.b,a={r:255*r(t,255),g:255*r(n,255),b:255*r(i,255)},g=!0,y="%"===String(e.r).substr(-1)?"prgb":"rgb"):b(e.h)&&b(e.s)&&b(e.v)?(u=s(e.s),h=s(e.v),a=function(e,t,n){e=6*r(e,360),t=r(t,100),n=r(n,100);var i=Math.floor(e),o=e-i,s=n*(1-t),a=n*(1-o*t),l=n*(1-(1-o)*t),c=i%6;return{r:255*[n,a,s,s,l,n][c],g:255*[l,n,n,a,s,s][c],b:255*[s,s,l,n,n,a][c]}}(e.h,u,h),g=!0,y="hsv"):b(e.h)&&b(e.s)&&b(e.l)&&(u=s(e.s),m=s(e.l),a=function(e,t,n){var i,o,s;if(e=r(e,360),t=r(t,100),n=r(n,100),0===t)o=n,s=n,i=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=c(l,a,e+1/3),o=c(l,a,e),s=c(l,a,e-1/3)}return{r:255*i,g:255*o,b:255*s}}(e.h,u,m),g=!0,y="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(l=e.a)),l=o(l),{ok:g,format:e.format||y,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:l}}(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(i=n.format)&&void 0!==i?i:a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=o(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=u(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=u(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=l(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=l(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),h(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,i){var o,s=[a(Math.round(e).toString(16)),a(Math.round(t).toString(16)),a(Math.round(n).toString(16)),a((o=r,Math.round(255*parseFloat(o)).toString(16)))];return i&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*r(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*r(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+h(this.r,this.g,this.b,!1),t=0,n=Object.entries(p);t<n.length;t++){var r=n[t],i=r[0];if(e===r[1])return i}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!=e?e:this.format;var n=!1,r=this.a<1&&this.a>=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=i(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=i(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=i(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=i(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100;return new e({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/t;t--;)s.push(new e({h:r,s:i,v:o})),o=(o+a)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,s=1;s<t;s++)i.push(new e({h:(r+s*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}()},9752:(e,t,n)=>{"use strict";n.d(t,{LB:()=>Je,y9:()=>pt,g4:()=>oe,Lg:()=>ue,uN:()=>ke,MA:()=>ve,we:()=>me,pE:()=>E,ey:()=>A,Ai:()=>ut,VK:()=>F,_8:()=>O,hI:()=>z,j2:()=>D,Xo:()=>_,Cj:()=>et,IJ:()=>h,O1:()=>Ze,Zj:()=>rt,VT:()=>y,Dy:()=>v});var r=n(7294),i=n(3935),o=n(4285);const s={display:"none"};function a(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:s},n)}const l={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function c(e){let{id:t,announcement:n}=e;return r.createElement("div",{id:t,style:l,role:"status","aria-live":"assertive","aria-atomic":!0},n)}const u=(0,r.createContext)(null);function h(e){const t=(0,r.useContext)(u);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}const f={draggable:"\n    To pick up a draggable item, press the space bar.\n    While dragging, use the arrow keys to move the item.\n    Press space again to drop the item in its new position, or press escape to cancel.\n  "},d={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function p(e){let{announcements:t=d,container:n,hiddenTextDescribedById:s,screenReaderInstructions:l=f}=e;const{announce:u,announcement:p}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),m=(0,o.Ld)("DndLiveRegion"),[g,y]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{y(!0)}),[]),h((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;u(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&u(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;u(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;u(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;u(t.onDragCancel({active:n,over:r}))}})),[u,t])),!g)return null;const v=r.createElement(r.Fragment,null,r.createElement(a,{id:s,value:l.draggable}),r.createElement(c,{id:m,announcement:p}));return n?(0,i.createPortal)(v,n):v}var m;function g(){}function y(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function v(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(m||(m={}));const b=Object.freeze({x:0,y:0});function w(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x(e,t){const n=(0,o.DC)(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function S(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function k(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function C(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function O(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function M(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const E=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=M(t,t.left,t.top),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=w(M(r),i);o.push({id:t,data:{droppableContainer:e,value:n}})}}return o.sort(S)},A=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=C(t),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=C(r),s=i.reduce(((e,t,r)=>e+w(n[r],t)),0),a=Number((s/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:a}})}}return o.sort(S)};function T(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const n=t.width*t.height,r=e.width*e.height,i=s*a;return Number((i/(n+r-i)).toFixed(4))}return 0}const _=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=n.get(r);if(o){const n=T(o,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(k)};function R(e,t){const{top:n,left:r,bottom:i,right:o}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=o}const D=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const i=[];for(const e of t){const{id:t}=e,o=n.get(t);if(o&&R(r,o)){const n=C(o).reduce(((e,t)=>e+w(r,t)),0),s=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:s}})}}return i.sort(S)};function P(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:b}function N(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const I=N(1);function L(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const j={ignoreTransform:!1};function F(e,t){void 0===t&&(t=j);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,o.Jj)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=L(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,h=o?e.height/o:e.height;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l}}(n,t,r))}const{top:r,left:i,width:s,height:a,bottom:l,right:c}=n;return{top:r,left:i,width:s,height:a,bottom:l,right:c}}function B(e){return F(e,{ignoreTransform:!0})}function z(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if((0,o.qk)(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!(0,o.Re)(i)||(0,o.vZ)(i))return n;if(n.includes(i))return n;const s=(0,o.Jj)(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=(0,o.Jj)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(i,s)&&n.push(i),function(e,t){return void 0===t&&(t=(0,o.Jj)(e).getComputedStyle(e)),"fixed"===t.position}(i,s)?n:r(i.parentNode)}(e):n}function $(e){const[t]=z(e,1);return null!=t?t:null}function H(e){return o.Nq&&e?(0,o.FJ)(e)?e:(0,o.UG)(e)?(0,o.qk)(e)||e===(0,o.r3)(e).scrollingElement?window:(0,o.Re)(e)?e:null:null:null}function V(e){return(0,o.FJ)(e)?e.scrollX:e.scrollLeft}function U(e){return(0,o.FJ)(e)?e.scrollY:e.scrollTop}function W(e){return{x:V(e),y:U(e)}}var q;function K(e){return!(!o.Nq||!e)&&e===document.scrollingElement}function G(e){const t={x:0,y:0},n=K(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(q||(q={}));const J={x:.2,y:.2};function Q(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=J);const{isTop:c,isBottom:u,isLeft:h,isRight:f}=G(e),d={x:0,y:0},p={x:0,y:0},m=t.height*i.y,g=t.width*i.x;return!c&&o<=t.top+m?(d.y=q.Backward,p.y=r*Math.abs((t.top+m-o)/m)):!u&&l>=t.bottom-m&&(d.y=q.Forward,p.y=r*Math.abs((t.bottom-m-l)/m)),!f&&a>=t.right-g?(d.x=q.Forward,p.x=r*Math.abs((t.right-g-a)/g)):!h&&s<=t.left+g&&(d.x=q.Backward,p.x=r*Math.abs((t.left+g-s)/g)),{direction:d,speed:p}}function Y(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function X(e){return e.reduce(((e,t)=>(0,o.IH)(e,W(t))),b)}function Z(e,t){if(void 0===t&&(t=F),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);$(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ee=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+V(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+U(t)),0)}]];class te{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=z(t),r=X(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of ee)for(const o of t)Object.defineProperty(this,o,{get:()=>{const t=i(n),s=r[e]-t;return this.rect[o]+s},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ne{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function re(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var ie,oe;function se(e){e.preventDefault()}function ae(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ie||(ie={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(oe||(oe={}));const le={start:[oe.Space,oe.Enter],cancel:[oe.Esc],end:[oe.Space,oe.Enter]},ce=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case oe.Right:return{...n,x:n.x+25};case oe.Left:return{...n,x:n.x-25};case oe.Down:return{...n,y:n.y+25};case oe.Up:return{...n,y:n.y-25}}};class ue{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ne((0,o.r3)(t)),this.windowListeners=new ne((0,o.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ie.Resize,this.handleCancel),this.windowListeners.add(ie.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(ie.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Z(n),t(b)}handleKeyDown(e){if((0,o.vd)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=le,coordinateGetter:s=ce,scrollBehavior:a="smooth"}=r,{code:l}=e;if(i.end.includes(l))return void this.handleEnd(e);if(i.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:b;this.referenceCoordinates||(this.referenceCoordinates=u);const h=s(e,{active:t,context:n.current,currentCoordinates:u});if(h){const t=(0,o.$X)(h,u),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:o,isRight:s,isLeft:l,isBottom:c,maxScroll:u,minScroll:f}=G(n),d=Y(n),p={x:Math.min(i===oe.Right?d.right-d.width/2:d.right,Math.max(i===oe.Right?d.left:d.left+d.width/2,h.x)),y:Math.min(i===oe.Down?d.bottom-d.height/2:d.bottom,Math.max(i===oe.Down?d.top:d.top+d.height/2,h.y))},m=i===oe.Right&&!s||i===oe.Left&&!l,g=i===oe.Down&&!c||i===oe.Up&&!o;if(m&&p.x!==h.x){const e=n.scrollLeft+t.x,o=i===oe.Right&&e<=u.x||i===oe.Left&&e>=f.x;if(o&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=o?n.scrollLeft-e:i===oe.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(g&&p.y!==h.y){const e=n.scrollTop+t.y,o=i===oe.Down&&e<=u.y||i===oe.Up&&e>=f.y;if(o&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=o?n.scrollTop-e:i===oe.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,(0,o.IH)((0,o.$X)(h,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function he(e){return Boolean(e&&"distance"in e)}function fe(e){return Boolean(e&&"delay"in e)}ue.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=le,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const t=o.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==i||i({event:e.nativeEvent}),0))}return!1}}];class de{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,o.Jj)(e);return e instanceof t?e:(0,o.r3)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:s}=i;this.props=e,this.events=t,this.document=(0,o.r3)(s),this.documentListeners=new ne(this.document),this.listeners=new ne(n),this.windowListeners=new ne((0,o.Jj)(s)),this.initialCoordinates=null!=(r=(0,o.DC)(i))?r:b,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(ie.Resize,this.handleCancel),this.windowListeners.add(ie.DragStart,se),this.windowListeners.add(ie.VisibilityChange,this.handleCancel),this.windowListeners.add(ie.ContextMenu,se),this.documentListeners.add(ie.Keydown,this.handleKeydown),t){if(he(t))return;if(fe(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ie.Click,ae,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ie.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!r)return;const l=null!=(t=(0,o.DC)(e))?t:b,c=(0,o.$X)(r,l);if(!n&&a){if(fe(a))return re(c,a.tolerance)?this.handleCancel():void 0;if(he(a))return null!=a.tolerance&&re(c,a.tolerance)?this.handleCancel():re(c,a.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),s(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===oe.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const pe={move:{name:"pointermove"},end:{name:"pointerup"}};class me extends de{constructor(e){const{event:t}=e,n=(0,o.r3)(t.target);super(e,pe,n)}}me.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const ge={move:{name:"mousemove"},end:{name:"mouseup"}};var ye;!function(e){e[e.RightClick=2]="RightClick"}(ye||(ye={}));class ve extends de{constructor(e){super(e,ge,(0,o.r3)(e.event.target))}}ve.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ye.RightClick&&(null==r||r({event:n}),!0)}}];const be={move:{name:"touchmove"},end:{name:"touchend"}};var we,xe;(class extends de{constructor(e){super(e,be)}static setup(){return window.addEventListener(be.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(be.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(we||(we={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(xe||(xe={}));const Se={x:{[q.Backward]:!1,[q.Forward]:!1},y:{[q.Backward]:!1,[q.Forward]:!1}};var ke,Ce;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(ke||(ke={})),function(e){e.Optimized="optimized"}(Ce||(Ce={}));const Oe=new Map;function Me(e,t){return(0,o.Gj)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ee(e){let{callback:t,disabled:n}=e;const i=(0,o.zX)(t),s=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)}),[n]);return(0,r.useEffect)((()=>()=>null==s?void 0:s.disconnect()),[s]),s}function Ae(e){return new te(F(e),e)}function Te(e,t,n){void 0===t&&(t=Ae);const[i,s]=(0,r.useReducer)((function(r){if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const o=t(e);return JSON.stringify(r)===JSON.stringify(o)?r:o}),null),a=function(e){let{callback:t,disabled:n}=e;const i=(0,o.zX)(t),s=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)}),[i,n]);return(0,r.useEffect)((()=>()=>null==s?void 0:s.disconnect()),[s]),s}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){s();break}}}}),l=Ee({callback:s});return(0,o.LI)((()=>{s(),e?(null==l||l.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==a||a.disconnect())}),[e]),i}const _e=[];function Re(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==b;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,o.$X)(e,n.current):b}function De(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Pe=[];function Ne(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,o.Re)(t)?t:e}const Ie=[{sensor:me,options:{}},{sensor:ue,options:{}}],Le={current:{}},je={draggable:{measure:B},droppable:{measure:B,strategy:ke.WhileDragging,frequency:Ce.Optimized},dragOverlay:{measure:F}};class Fe extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Be={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Fe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:g},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:je,measureDroppableContainers:g,windowRect:null,measuringScheduled:!1},ze={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:g,draggableNodes:new Map,over:null,measureDroppableContainers:g},$e=(0,r.createContext)(ze),He=(0,r.createContext)(Be);function Ve(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Fe}}}function Ue(e,t){switch(t.type){case m.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case m.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case m.DragEnd:case m.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case m.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Fe(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case m.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new Fe(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case m.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Fe(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function We(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:s}=(0,r.useContext)($e),a=(0,o.D9)(i),l=(0,o.D9)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!i&&a&&null!=l){if(!(0,o.vd)(a))return;if(document.activeElement===a.target)return;const e=s.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,o.so)(e);if(t){t.focus();break}}}))}}),[i,t,s,l,a]),null}function qe(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Ke=(0,r.createContext)({...b,scaleX:1,scaleY:1});var Ge;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ge||(Ge={}));const Je=(0,r.memo)((function(e){var t,n,s,a;let{id:l,accessibility:c,autoScroll:h=!0,children:f,sensors:d=Ie,collisionDetection:g=_,measuring:y,modifiers:v,...w}=e;const x=(0,r.useReducer)(Ue,void 0,Ve),[S,k]=x,[C,M]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[E,A]=(0,r.useState)(Ge.Uninitialized),T=E===Ge.Initialized,{draggable:{active:R,nodes:D,translate:N},droppable:{containers:L}}=S,j=R?D.get(R):null,B=(0,r.useRef)({initial:null,translated:null}),V=(0,r.useMemo)((()=>{var e;return null!=R?{id:R,data:null!=(e=null==j?void 0:j.data)?e:Le,rect:B}:null}),[R,j]),U=(0,r.useRef)(null),[G,J]=(0,r.useState)(null),[Y,Z]=(0,r.useState)(null),ee=(0,o.Ey)(w,Object.values(w)),ne=(0,o.Ld)("DndDescribedBy",l),re=(0,r.useMemo)((()=>L.getEnabled()),[L]),ie=(oe=y,(0,r.useMemo)((()=>({draggable:{...je.draggable,...null==oe?void 0:oe.draggable},droppable:{...je.droppable,...null==oe?void 0:oe.droppable},dragOverlay:{...je.dragOverlay,...null==oe?void 0:oe.dragOverlay}})),[null==oe?void 0:oe.draggable,null==oe?void 0:oe.droppable,null==oe?void 0:oe.dragOverlay]));var oe;const{droppableRects:se,measureDroppableContainers:ae,measuringScheduled:le}=function(e,t){let{dragging:n,dependencies:i,config:s}=t;const[a,l]=(0,r.useState)(null),{frequency:c,measure:u,strategy:h}=s,f=(0,r.useRef)(e),d=function(){switch(h){case ke.Always:return!1;case ke.BeforeDragging:return n;default:return!n}}(),p=(0,o.Ey)(d),m=(0,r.useCallback)((function(e){void 0===e&&(e=[]),p.current||l((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[p]),g=(0,r.useRef)(null),y=(0,o.Gj)((t=>{if(d&&!n)return Oe;if(!t||t===Oe||f.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new te(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,a,n,d,u]);return(0,r.useEffect)((()=>{f.current=e}),[e]),(0,r.useEffect)((()=>{d||m()}),[n,d]),(0,r.useEffect)((()=>{a&&a.length>0&&l(null)}),[JSON.stringify(a)]),(0,r.useEffect)((()=>{d||"number"!=typeof c||null!==g.current||(g.current=setTimeout((()=>{m(),g.current=null}),c))}),[c,d,m,...i]),{droppableRects:y,measureDroppableContainers:m,measuringScheduled:null!=a}}(re,{dragging:T,dependencies:[N.x,N.y],config:ie.droppable}),ce=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,o.Gj)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(D,R),ue=(0,r.useMemo)((()=>Y?(0,o.DC)(Y):null),[Y]),he=function(){const e=!1===(null==G?void 0:G.autoScrollEnabled),t="object"==typeof h?!1===h.enabled:!1===h,n=T&&!e&&!t;return"object"==typeof h?{...h,enabled:n}:{enabled:n}}(),fe=function(e,t){return Me(e,t)}(ce,ie.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:i,config:s=!0}=e;const a=(0,r.useRef)(!1),{x:l,y:c}="boolean"==typeof s?{x:s,y:s}:s;(0,o.LI)((()=>{if(!l&&!c||!t)return void(a.current=!1);if(a.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=P(n(e),i);if(l||(r.x=0),c||(r.y=0),a.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=$(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,l,c,i,n])}({activeNode:R?D.get(R):null,config:he.layoutShiftCompensation,initialRect:fe,measure:ie.draggable.measure});const de=Te(ce,ie.draggable.measure,fe),pe=Te(ce?ce.parentElement:null),me=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ge=L.getNodeFor(null==(t=me.current.over)?void 0:t.id),ye=function(e){let{measure:t}=e;const[n,i]=(0,r.useState)(null),s=Ee({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,o.Re)(n)){i((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),a=(0,r.useCallback)((e=>{const n=Ne(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),i(n?t(n):null)}),[t,s]),[l,c]=(0,o.wm)(a);return(0,r.useMemo)((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}({measure:ie.dragOverlay.measure}),ve=null!=(n=ye.nodeRef.current)?n:ce,be=T?null!=(s=ye.rect)?s:de:null,Ce=Boolean(ye.nodeRef.current&&ye.rect),Ae=P(Fe=Ce?null:de,Me(Fe));var Fe;const Be=De(ve?(0,o.Jj)(ve):null),ze=function(e){const t=(0,r.useRef)(e),n=(0,o.Gj)((n=>e?n&&n!==_e&&e&&t.current&&e.parentNode===t.current.parentNode?n:z(e):_e),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(T?null!=ge?ge:ce:null),Je=function(e,t){void 0===t&&(t=F);const[n]=e,i=De(n?(0,o.Jj)(n):null),[s,a]=(0,r.useReducer)((function(){return e.length?e.map((e=>K(e)?i:new te(t(e),e))):Pe}),Pe),l=Ee({callback:a});return e.length>0&&s===Pe&&a(),(0,o.LI)((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),a())}),[e]),s}(ze),Qe=qe(v,{transform:{x:N.x-Ae.x,y:N.y-Ae.y,scaleX:1,scaleY:1},activatorEvent:Y,active:V,activeNodeRect:de,containerNodeRect:pe,draggingNodeRect:be,over:me.current.over,overlayNodeRect:ye.rect,scrollableAncestors:ze,scrollableAncestorRects:Je,windowRect:Be}),Ye=ue?(0,o.IH)(ue,N):null,Xe=function(e){const[t,n]=(0,r.useState)(null),i=(0,r.useRef)(e),s=(0,r.useCallback)((e=>{const t=H(e.target);t&&n((e=>e?(e.set(t,W(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=i.current;if(e!==t){r(t);const o=e.map((e=>{const t=H(e);return t?(t.addEventListener("scroll",s,{passive:!0}),[t,W(t)]):null})).filter((e=>null!=e));n(o.length?new Map(o):null),i.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=H(e);null==t||t.removeEventListener("scroll",s)}))}}),[s,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,o.IH)(e,t)),b):X(e):b),[e,t])}(ze),Ze=Re(Xe),et=Re(Xe,[de]),tt=(0,o.IH)(Qe,Ze),nt=be?I(be,Qe):null,rt=V&&nt?g({active:V,collisionRect:nt,droppableRects:se,droppableContainers:re,pointerCoordinates:Ye}):null,it=O(rt,"id"),[ot,st]=(0,r.useState)(null),at=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Ce?Qe:(0,o.IH)(Qe,et),null!=(a=null==ot?void 0:ot.rect)?a:null,de),lt=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==U.current)return;const o=D.get(U.current);if(!o)return;const s=e.nativeEvent,a=new n({active:U.current,activeNode:o,event:s,options:r,context:me,onStart(e){const t=U.current;if(null==t)return;const n=D.get(t);if(!n)return;const{onDragStart:r}=ee.current,o={active:{id:t,data:n.data,rect:B}};(0,i.unstable_batchedUpdates)((()=>{null==r||r(o),A(Ge.Initializing),k({type:m.DragStart,initialCoordinates:e,active:t}),C({type:"onDragStart",event:o})}))},onMove(e){k({type:m.DragMove,coordinates:e})},onEnd:l(m.DragEnd),onCancel:l(m.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=me.current;let a=null;if(t&&o){const{cancelDrop:i}=ee.current;a={activatorEvent:s,active:t,collisions:n,delta:o,over:r},e===m.DragEnd&&"function"==typeof i&&await Promise.resolve(i(a))&&(e=m.DragCancel)}U.current=null,(0,i.unstable_batchedUpdates)((()=>{k({type:e}),A(Ge.Uninitialized),st(null),J(null),Z(null);const t=e===m.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=ee.current[t];null==e||e(a),C({type:t,event:a})}}))}}(0,i.unstable_batchedUpdates)((()=>{J(a),Z(e.nativeEvent)}))}),[D]),ct=(0,r.useCallback)(((e,t)=>(n,r)=>{const i=n.nativeEvent,o=D.get(r);if(null!==U.current||!o||i.dndKit||i.defaultPrevented)return;const s={active:o};!0===e(n,t.options,s)&&(i.dndKit={capturedBy:t.sensor},U.current=r,lt(n,t))}),[D,lt]),ut=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(d,ct);!function(e){(0,r.useEffect)((()=>{if(!o.Nq)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(d),(0,o.LI)((()=>{de&&E===Ge.Initializing&&A(Ge.Initialized)}),[de,E]),(0,r.useEffect)((()=>{const{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:o}=me.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:r,delta:{x:tt.x,y:tt.y},over:o};(0,i.unstable_batchedUpdates)((()=>{null==e||e(s),C({type:"onDragMove",event:s})}))}),[tt.x,tt.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=me.current;if(!e||null==U.current||!t||!o)return;const{onDragOver:s}=ee.current,a=r.get(it),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:l};(0,i.unstable_batchedUpdates)((()=>{st(l),null==s||s(c),C({type:"onDragOver",event:c})}))}),[it]),(0,o.LI)((()=>{me.current={activatorEvent:Y,active:V,activeNode:ce,collisionRect:nt,collisions:rt,droppableRects:se,draggableNodes:D,draggingNode:ve,draggingNodeRect:be,droppableContainers:L,over:ot,scrollableAncestors:ze,scrollAdjustedTranslate:tt},B.current={initial:be,translated:nt}}),[V,ce,rt,nt,D,ve,be,se,L,ot,ze,tt]),function(e){let{acceleration:t,activator:n=we.Pointer,canScroll:i,draggingRect:s,enabled:a,interval:l=5,order:c=xe.TreeOrder,pointerCoordinates:u,scrollableAncestors:h,scrollableAncestorRects:f,delta:d,threshold:p}=e;const m=function(e){let{delta:t,disabled:n}=e;const r=(0,o.D9)(t);return(0,o.Gj)((e=>{if(n||!r||!e)return Se;const i=Math.sign(t.x-r.x),o=Math.sign(t.y-r.y);return{x:{[q.Backward]:e.x[q.Backward]||-1===i,[q.Forward]:e.x[q.Forward]||1===i},y:{[q.Backward]:e.y[q.Backward]||-1===o,[q.Forward]:e.y[q.Forward]||1===o}}}),[n,t,r])}({delta:d,disabled:!a}),[g,y]=(0,o.Yz)(),v=(0,r.useRef)({x:0,y:0}),b=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case we.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case we.DraggableRect:return s}}),[n,s,u]),x=(0,r.useRef)(null),S=(0,r.useCallback)((()=>{const e=x.current;if(!e)return;const t=v.current.x*b.current.x,n=v.current.y*b.current.y;e.scrollBy(t,n)}),[]),k=(0,r.useMemo)((()=>c===xe.TreeOrder?[...h].reverse():h),[c,h]);(0,r.useEffect)((()=>{if(a&&h.length&&w){for(const e of k){if(!1===(null==i?void 0:i(e)))continue;const n=h.indexOf(e),r=f[n];if(!r)continue;const{direction:o,speed:s}=Q(e,r,w,t,p);for(const e of["x","y"])m[e][o[e]]||(s[e]=0,o[e]=0);if(s.x>0||s.y>0)return y(),x.current=e,g(S,l),v.current=s,void(b.current=o)}v.current={x:0,y:0},b.current={x:0,y:0},y()}else y()}),[t,S,i,y,a,l,JSON.stringify(w),JSON.stringify(m),g,h,k,f,JSON.stringify(p)])}({...he,delta:N,draggingRect:nt,pointerCoordinates:Ye,scrollableAncestors:ze,scrollableAncestorRects:Je});const ht=(0,r.useMemo)((()=>({active:V,activeNode:ce,activeNodeRect:de,activatorEvent:Y,collisions:rt,containerNodeRect:pe,dragOverlay:ye,draggableNodes:D,droppableContainers:L,droppableRects:se,over:ot,measureDroppableContainers:ae,scrollableAncestors:ze,scrollableAncestorRects:Je,measuringConfiguration:ie,measuringScheduled:le,windowRect:Be})),[V,ce,de,Y,rt,pe,ye,D,L,se,ot,ae,ze,Je,ie,le,Be]),ft=(0,r.useMemo)((()=>({activatorEvent:Y,activators:ut,active:V,activeNodeRect:de,ariaDescribedById:{draggable:ne},dispatch:k,draggableNodes:D,over:ot,measureDroppableContainers:ae})),[Y,ut,V,de,k,ne,D,ot,ae]);return r.createElement(u.Provider,{value:M},r.createElement($e.Provider,{value:ft},r.createElement(He.Provider,{value:ht},r.createElement(Ke.Provider,{value:at},f)),r.createElement(We,{disabled:!1===(null==c?void 0:c.restoreFocus)})),r.createElement(p,{...c,hiddenTextDescribedById:ne}))})),Qe=(0,r.createContext)(null),Ye="button",Xe="Droppable";function Ze(e){let{id:t,data:n,disabled:i=!1,attributes:s}=e;const a=(0,o.Ld)(Xe),{activators:l,activatorEvent:c,active:u,activeNodeRect:h,ariaDescribedById:f,draggableNodes:d,over:p}=(0,r.useContext)($e),{role:m=Ye,roleDescription:g="draggable",tabIndex:y=0}=null!=s?s:{},v=(null==u?void 0:u.id)===t,b=(0,r.useContext)(v?Ke:Qe),[w,x]=(0,o.wm)(),[S,k]=(0,o.wm)(),C=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e}),{})),[e,t])}(l,t),O=(0,o.Ey)(n);return(0,o.LI)((()=>(d.set(t,{id:t,key:a,node:w,activatorNode:S,data:O}),()=>{const e=d.get(t);e&&e.key===a&&d.delete(t)})),[d,t]),{active:u,activatorEvent:c,activeNodeRect:h,attributes:(0,r.useMemo)((()=>({role:m,tabIndex:y,"aria-disabled":i,"aria-pressed":!(!v||m!==Ye)||void 0,"aria-roledescription":g,"aria-describedby":f.draggable})),[i,m,y,v,g,f.draggable]),isDragging:v,listeners:i?void 0:C,node:w,over:p,setNodeRef:x,setActivatorNodeRef:k,transform:b}}function et(){return(0,r.useContext)(He)}const tt="Droppable",nt={timeout:25};function rt(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:s}=e;const a=(0,o.Ld)(tt),{active:l,dispatch:c,over:u,measureDroppableContainers:h}=(0,r.useContext)($e),f=(0,r.useRef)({disabled:n}),d=(0,r.useRef)(!1),p=(0,r.useRef)(null),g=(0,r.useRef)(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...nt,...s},w=(0,o.Ey)(null!=v?v:i),x=Ee({callback:(0,r.useCallback)((()=>{d.current?(null!=g.current&&clearTimeout(g.current),g.current=setTimeout((()=>{h(Array.isArray(w.current)?w.current:[w.current]),g.current=null}),b)):d.current=!0}),[b]),disabled:y||!l}),S=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),d.current=!1),e&&x.observe(e))}),[x]),[k,C]=(0,o.wm)(S),O=(0,o.Ey)(t);return(0,r.useEffect)((()=>{x&&k.current&&(x.disconnect(),d.current=!1,x.observe(k.current))}),[k,x]),(0,o.LI)((()=>(c({type:m.RegisterDroppable,element:{id:i,key:a,disabled:n,node:k,rect:p,data:O}}),()=>c({type:m.UnregisterDroppable,key:a,id:i}))),[i]),(0,r.useEffect)((()=>{n!==f.current.disabled&&(c({type:m.SetDroppableDisabled,id:i,key:a,disabled:n}),f.current.disabled=n)}),[i,a,n,c]),{active:l,rect:p,isOver:(null==u?void 0:u.id)===i,node:k,over:u,setNodeRef:C}}function it(e){let{animation:t,children:n}=e;const[i,s]=(0,r.useState)(null),[a,l]=(0,r.useState)(null),c=(0,o.D9)(n);return n||i||!c||s(c),(0,o.LI)((()=>{if(!a)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,a)).then((()=>{s(null)})):s(null)}),[t,i,a]),r.createElement(r.Fragment,null,n,i?(0,r.cloneElement)(i,{ref:l}):null)}const ot={x:0,y:0,scaleX:1,scaleY:1};function st(e){let{children:t}=e;return r.createElement($e.Provider,{value:ze},r.createElement(Ke.Provider,{value:ot},t))}const at={position:"fixed",touchAction:"none"},lt=e=>(0,o.vd)(e)?"transform 250ms ease":void 0,ct=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:i,adjustScale:s,children:a,className:l,rect:c,style:u,transform:h,transition:f=lt}=e;if(!c)return null;const d=s?h:{...h,scaleX:1,scaleY:1},p={...at,width:c.width,height:c.height,top:c.top,left:c.left,transform:o.ux.Transform.toString(d),transformOrigin:s&&i?x(i,c):void 0,transition:"function"==typeof f?f(i):f,...u};return r.createElement(n,{className:l,style:p,ref:t},a)})),ut=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:s}=e;if(null!=o&&o.active)for(const[e,t]of Object.entries(o.active))void 0!==t&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=o&&o.dragOverlay)for(const[e,t]of Object.entries(o.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=s&&s.active&&n.node.classList.add(s.active),null!=s&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[e,t]of Object.entries(i))n.node.style.setProperty(e,t);null!=s&&s.active&&n.node.classList.remove(s.active)}},ht={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:o.ux.Transform.toString(t)},{transform:o.ux.Transform.toString(n)}]},sideEffects:ut({styles:{active:{opacity:"0"}}})};let ft=0;function dt(e){return(0,r.useMemo)((()=>{if(null!=e)return ft++,ft}),[e])}const pt=r.memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:s,transition:a,modifiers:l,wrapperElement:c="div",className:u,zIndex:h=999}=e;const{activatorEvent:f,active:d,activeNodeRect:p,containerNodeRect:m,draggableNodes:g,droppableContainers:y,dragOverlay:v,over:b,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:S,windowRect:k}=et(),C=(0,r.useContext)(Ke),O=dt(null==d?void 0:d.id),M=qe(l,{activatorEvent:f,active:d,activeNodeRect:p,containerNodeRect:m,draggingNodeRect:v.rect,over:b,overlayNodeRect:v.rect,scrollableAncestors:x,scrollableAncestorRects:S,transform:C,windowRect:k}),E=Me(p),A=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return(0,o.zX)(((e,s)=>{if(null===t)return;const a=n.get(e);if(!a)return;const l=a.node.current;if(!l)return;const c=Ne(s);if(!c)return;const{transform:u}=(0,o.Jj)(s).getComputedStyle(s),h=L(u);if(!h)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...ht,...e};return e=>{let{active:o,dragOverlay:s,transform:a,...l}=e;if(!t)return;const c=s.rect.left-o.rect.left,u=s.rect.top-o.rect.top,h={scaleX:1!==a.scaleX?o.rect.width*a.scaleX/s.rect.width:1,scaleY:1!==a.scaleY?o.rect.height*a.scaleY/s.rect.height:1},f={x:a.x-c,y:a.y-u,...h},d=i({...l,active:o,dragOverlay:s,transform:{initial:a,final:f}}),[p]=d,m=d[d.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;const g=null==r?void 0:r({active:o,dragOverlay:s,...l}),y=s.node.animate(d,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{y.onfinish=()=>{null==g||g(),e()}}))}}(t);return Z(l,i.draggable.measure),f({active:{id:e,data:a.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:s,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:h})}))}({config:i,draggableNodes:g,droppableContainers:y,measuringConfiguration:w}),T=E?v.setRef:void 0;return r.createElement(st,null,r.createElement(it,{animation:A},d&&O?r.createElement(ct,{key:O,id:d.id,ref:T,as:c,activatorEvent:f,adjustScale:t,className:u,transition:a,rect:E,style:{zIndex:h,...s},transform:M},n):null))}))},5587:(e,t,n)=>{"use strict";n.d(t,{Fo:()=>g,PG:()=>u,Rp:()=>s,is:()=>M,nB:()=>k,qw:()=>d});var r=n(7294),i=n(9752),o=n(4285);function s(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function a(e,t){return e.reduce(((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e}),Array(e.length))}function l(e){return null!==e&&e>=0}const c={scaleX:1,scaleY:1},u=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:i,overIndex:o,index:s}=e;const a=null!=(t=n[i])?t:r;if(!a)return null;const l=function(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r&&(i||o)?n<t?i?r.left-(i.left+i.width):o.left-(r.left+r.width):o?o.left-(r.left+r.width):r.left-(i.left+i.width):0}(n,s,i);if(s===i){const e=n[o];return e?{x:i<o?e.left+e.width-(a.left+a.width):e.left-a.left,y:0,...c}:null}return s>i&&s<=o?{x:-a.width-l,y:0,...c}:s<i&&s>=o?{x:a.width+l,y:0,...c}:{x:0,y:0,...c}},h=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=s(t,r,n),a=t[i],l=o[i];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},f={scaleX:1,scaleY:1},d=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=null!=(t=o[n])?t:r;if(!a)return null;if(i===n){const e=o[s];return e?{x:0,y:n<s?e.top+e.height-(a.top+a.height):e.top-a.top,...f}:null}const l=function(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...f}:i<n&&i>=s?{x:0,y:a.height+l,...f}:{x:0,y:0,...f}},p="Sortable",m=r.createContext({activeIndex:-1,containerId:p,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:h,disabled:{draggable:!1,droppable:!1}});function g(e){let{children:t,id:n,items:s,strategy:l=h,disabled:c=!1}=e;const{active:u,dragOverlay:f,droppableRects:d,over:g,measureDroppableContainers:y}=(0,i.Cj)(),v=(0,o.Ld)(p,n),b=Boolean(null!==f.rect),w=(0,r.useMemo)((()=>s.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[s]),x=null!=u,S=u?w.indexOf(u.id):-1,k=g?w.indexOf(g.id):-1,C=(0,r.useRef)(w),O=!function(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]!==t[n])return!1;return!0}(w,C.current),M=-1!==k&&-1===S||O,E=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);(0,o.LI)((()=>{O&&x&&y(w)}),[O,w,x,y]),(0,r.useEffect)((()=>{C.current=w}),[w]);const A=(0,r.useMemo)((()=>({activeIndex:S,containerId:v,disabled:E,disableTransforms:M,items:w,overIndex:k,useDragOverlay:b,sortedRects:a(w,d),strategy:l})),[S,v,E.draggable,E.droppable,M,w,k,d,b,l]);return r.createElement(m.Provider,{value:A},t)}const y=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return s(n,r,i).indexOf(t)},v=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!(!c||!r||a!==o&&i===s||!n&&(s===i||t!==l))},b={duration:200,easing:"ease"},w="transform",x=o.ux.Transition.toString({property:w,duration:0,easing:"linear"}),S={roleDescription:"sortable"};function k(e){let{animateLayoutChanges:t=v,attributes:n,disabled:s,data:a,getNewIndex:c=y,id:u,strategy:h,resizeObserverConfig:f,transition:d=b}=e;const{items:p,containerId:g,activeIndex:k,disabled:C,disableTransforms:O,sortedRects:M,overIndex:E,useDragOverlay:A,strategy:T}=(0,r.useContext)(m),_=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(s,C),R=p.indexOf(u),D=(0,r.useMemo)((()=>({sortable:{containerId:g,index:R,items:p},...a})),[g,a,R,p]),P=(0,r.useMemo)((()=>p.slice(p.indexOf(u))),[p,u]),{rect:N,node:I,isOver:L,setNodeRef:j}=(0,i.Zj)({id:u,data:D,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...f}}),{active:F,activatorEvent:B,activeNodeRect:z,attributes:$,setNodeRef:H,listeners:V,isDragging:U,over:W,setActivatorNodeRef:q,transform:K}=(0,i.O1)({id:u,data:D,attributes:{...S,...n},disabled:_.draggable}),G=(0,o.HB)(j,H),J=Boolean(F),Q=J&&!O&&l(k)&&l(E),Y=!A&&U,X=Y&&Q?K:null,Z=Q?null!=X?X:(null!=h?h:T)({rects:M,activeNodeRect:z,activeIndex:k,overIndex:E,index:R}):null,ee=l(k)&&l(E)?c({id:u,items:p,activeIndex:k,overIndex:E}):R,te=null==F?void 0:F.id,ne=(0,r.useRef)({activeId:te,items:p,newIndex:ee,containerId:g}),re=p!==ne.current.items,ie=t({active:F,containerId:g,isDragging:U,isSorting:J,id:u,index:R,items:p,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:d,wasDragging:null!=ne.current.activeId}),oe=function(e){let{disabled:t,index:n,node:s,rect:a}=e;const[l,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,o.LI)((()=>{if(!t&&n!==u.current&&s.current){const e=a.current;if(e){const t=(0,i.VK)(s.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)}),[t,n,s,a]),(0,r.useEffect)((()=>{l&&c(null)}),[l]),l}({disabled:!ie,index:R,node:I,rect:N});return(0,r.useEffect)((()=>{J&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),g!==ne.current.containerId&&(ne.current.containerId=g),p!==ne.current.items&&(ne.current.items=p)}),[J,ee,g,p]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:F,activeIndex:k,attributes:$,data:D,rect:N,index:R,newIndex:ee,items:p,isOver:L,isSorting:J,isDragging:U,listeners:V,node:I,overIndex:E,over:W,setNodeRef:G,setActivatorNodeRef:q,setDroppableNodeRef:j,setDraggableNodeRef:H,transform:null!=oe?oe:Z,transition:oe||re&&ne.current.newIndex===R?x:Y&&!(0,o.vd)(B)||!d?void 0:J||ie?o.ux.Transition.toString({...d,property:w}):void 0}}function C(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const O=[i.g4.Down,i.g4.Right,i.g4.Up,i.g4.Left],M=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:a,over:l,scrollableAncestors:c}}=t;if(O.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];a.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const o=s.get(n.id);if(o)switch(e.code){case i.g4.Down:r.top<o.top&&t.push(n);break;case i.g4.Up:r.top>o.top&&t.push(n);break;case i.g4.Left:r.left>o.left&&t.push(n);break;case i.g4.Right:r.left<o.left&&t.push(n)}}));const f=(0,i.ey)({active:n,collisionRect:r,droppableRects:s,droppableContainers:t,pointerCoordinates:null});let d=(0,i._8)(f,"id");if(d===(null==l?void 0:l.id)&&f.length>1&&(d=f[1].id),null!=d){const e=a.get(n.id),t=a.get(d),l=t?s.get(t.id):null,f=null==t?void 0:t.node.current;if(f&&l&&e&&t){const n=(0,i.hI)(f).some(((e,t)=>c[t]!==e)),s=E(e,t),a=(h=t,!(!C(u=e)||!C(h))&&!!E(u,h)&&u.data.current.sortable.index<h.data.current.sortable.index),d=n||!s?{x:0,y:0}:{x:a?r.width-l.width:0,y:a?r.height-l.height:0},p={x:l.left,y:l.top};return d.x&&d.y?p:(0,o.$X)(p,d)}}}var u,h};function E(e,t){return!(!C(e)||!C(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}},4285:(e,t,n)=>{"use strict";n.d(t,{$X:()=>C,D9:()=>b,DC:()=>M,Ey:()=>g,FJ:()=>s,Gj:()=>y,HB:()=>i,IH:()=>k,Jj:()=>l,LI:()=>d,Ld:()=>x,Nq:()=>o,Re:()=>u,UG:()=>a,Yz:()=>m,qk:()=>c,r3:()=>f,so:()=>T,ux:()=>E,vZ:()=>h,vd:()=>O,wm:()=>v,zX:()=>p});var r=n(7294);function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}const o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function s(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function a(e){return"nodeType"in e}function l(e){var t,n;return e?s(e)?e:a(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=l(e);return e instanceof t}function u(e){return!s(e)&&e instanceof l(e).HTMLElement}function h(e){return e instanceof l(e).SVGElement}function f(e){return e?s(e)?e.document:a(e)?c(e)?e:u(e)?e.ownerDocument:document:document:document}const d=o?r.useLayoutEffect:r.useEffect;function p(e){const t=(0,r.useRef)(e);return d((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function m(){const e=(0,r.useRef)(null);return[(0,r.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function g(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return d((()=>{n.current!==e&&(n.current=e)}),t),n}function y(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function v(e){const t=p(e),n=(0,r.useRef)(null),i=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,i]}function b(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function x(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t}),{...t})}}const k=S(1),C=S(-1);function O(e){if(!e)return!1;const{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function M(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=l(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const E=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[E.Translate.toString(e),E.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),A="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function T(e){return e.matches(A)?e:e.querySelector(A)}},6194:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),i=n(6411),o=n(6686),s=n(7563),a=n(211),l=n(2190),c=function(e,t,n){for(var r=0,o=0;r=o,o=(0,i.fj)(),38===r&&12===o&&(t[n]=1),!(0,i.r)(o);)(0,i.lp)();return(0,i.tP)(e,i.FK)},u=new WeakMap,h=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||u.get(n))&&!r){u.set(e,!0);for(var s=[],a=function(e,t){return(0,i.cE)(function(e,t){var n=-1,r=44;do{switch((0,i.r)(r)){case 0:38===r&&12===(0,i.fj)()&&(t[n]=1),e[n]+=c(i.FK-1,t,n);break;case 2:e[n]+=(0,i.iF)(r);break;case 4:if(44===r){e[++n]=58===(0,i.fj)()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=(0,o.Dp)(r)}}while(r=(0,i.lp)());return e}((0,i.un)(e),t))}(t,s),l=n.props,h=0,f=0;h<a.length;h++)for(var d=0;d<l.length;d++,f++)e.props[f]=s[h]?a[h].replace(/&\f/g,l[d]):l[d]+" "+a[h]}}},f=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function d(e,t){switch((0,o.vp)(e,t)){case 5103:return s.G$+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return s.G$+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return s.G$+e+s.uj+e+s.MS+e+e;case 6828:case 4268:return s.G$+e+s.MS+e+e;case 6165:return s.G$+e+s.MS+"flex-"+e+e;case 5187:return s.G$+e+(0,o.gx)(e,/(\w+).+(:[^]+)/,s.G$+"box-$1$2"+s.MS+"flex-$1$2")+e;case 5443:return s.G$+e+s.MS+"flex-item-"+(0,o.gx)(e,/flex-|-self/,"")+e;case 4675:return s.G$+e+s.MS+"flex-line-pack"+(0,o.gx)(e,/align-content|flex-|-self/,"")+e;case 5548:return s.G$+e+s.MS+(0,o.gx)(e,"shrink","negative")+e;case 5292:return s.G$+e+s.MS+(0,o.gx)(e,"basis","preferred-size")+e;case 6060:return s.G$+"box-"+(0,o.gx)(e,"-grow","")+s.G$+e+s.MS+(0,o.gx)(e,"grow","positive")+e;case 4554:return s.G$+(0,o.gx)(e,/([^-])(transform)/g,"$1"+s.G$+"$2")+e;case 6187:return(0,o.gx)((0,o.gx)((0,o.gx)(e,/(zoom-|grab)/,s.G$+"$1"),/(image-set)/,s.G$+"$1"),e,"")+e;case 5495:case 3959:return(0,o.gx)(e,/(image-set\([^]*)/,s.G$+"$1$`$1");case 4968:return(0,o.gx)((0,o.gx)(e,/(.+:)(flex-)?(.*)/,s.G$+"box-pack:$3"+s.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+s.G$+e+e;case 4095:case 3583:case 4068:case 2532:return(0,o.gx)(e,/(.+)-inline(.+)/,s.G$+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if((0,o.to)(e)-1-t>6)switch((0,o.uO)(e,t+1)){case 109:if(45!==(0,o.uO)(e,t+4))break;case 102:return(0,o.gx)(e,/(.+:)(.+)-([^]+)/,"$1"+s.G$+"$2-$3$1"+s.uj+(108==(0,o.uO)(e,t+3)?"$3":"$2-$3"))+e;case 115:return~(0,o.Cw)(e,"stretch")?d((0,o.gx)(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==(0,o.uO)(e,t+1))break;case 6444:switch((0,o.uO)(e,(0,o.to)(e)-3-(~(0,o.Cw)(e,"!important")&&10))){case 107:return(0,o.gx)(e,":",":"+s.G$)+e;case 101:return(0,o.gx)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+s.G$+(45===(0,o.uO)(e,14)?"inline-":"")+"box$3$1"+s.G$+"$2$3$1"+s.MS+"$2box$3")+e}break;case 5936:switch((0,o.uO)(e,t+11)){case 114:return s.G$+e+s.MS+(0,o.gx)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return s.G$+e+s.MS+(0,o.gx)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return s.G$+e+s.MS+(0,o.gx)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return s.G$+e+s.MS+e+e}return e}var p=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case s.h5:e.return=d(e.value,e.length);break;case s.lK:return(0,a.q)([(0,i.JG)(e,{value:(0,o.gx)(e.value,"@","@"+s.G$)})],r);case s.Fr:if(e.length)return(0,o.$e)(e.props,(function(t){switch((0,o.EQ)(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,a.q)([(0,i.JG)(e,{props:[(0,o.gx)(t,/:(read-\w+)/,":"+s.uj+"$1")]})],r);case"::placeholder":return(0,a.q)([(0,i.JG)(e,{props:[(0,o.gx)(t,/:(plac\w+)/,":"+s.G$+"input-$1")]}),(0,i.JG)(e,{props:[(0,o.gx)(t,/:(plac\w+)/,":"+s.uj+"$1")]}),(0,i.JG)(e,{props:[(0,o.gx)(t,/:(plac\w+)/,s.MS+"input-$1")]})],r)}return""}))}}];const m=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i,s,c=e.stylisPlugins||p,u={},d=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)u[t[n]]=!0;d.push(e)}));var m,g,y,v,b=[h,f],w=[a.P,(v=function(e){m.insert(e)},function(e){e.root||(e=e.return)&&v(e)})],x=(g=b.concat(c,w),y=(0,o.Ei)(g),function(e,t,n,r){for(var i="",o=0;o<y;o++)i+=g[o](e,t,n,r)||"";return i});s=function(e,t,n,r){var i;m=n,i=e?e+"{"+t.styles+"}":t.styles,(0,a.q)((0,l.MY)(i),x),r&&(S.inserted[t.name]=!0)};var S={key:t,sheet:new r({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:u,registered:{},insert:s};return S.sheet.hydrate(d),S}},2443:(e,t,n)=>{"use strict";n.d(t,{C:()=>u,E:()=>g,T:()=>f,c:()=>p,h:()=>l,w:()=>h});var r=n(7294),i=n(6194),o=n(444),s=n(8947),a=n(7278),l={}.hasOwnProperty,c=(0,r.createContext)("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null),u=c.Provider,h=function(e){return(0,r.forwardRef)((function(t,n){var i=(0,r.useContext)(c);return e(t,i,n)}))},f=(0,r.createContext)({}),d="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",p=function(e,t){var n={};for(var r in t)l.call(t,r)&&(n[r]=t[r]);return n[d]=e,n},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,o.hC)(t,n,r),(0,a.L)((function(){return(0,o.My)(t,n,r)})),null},g=h((function(e,t,n){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var a=e[d],c=[i],u="";"string"==typeof e.className?u=(0,o.fp)(t.registered,c,e.className):null!=e.className&&(u=e.className+" ");var h=(0,s.O)(c,void 0,(0,r.useContext)(f));u+=t.key+"-"+h.name;var p={};for(var g in e)l.call(e,g)&&"css"!==g&&g!==d&&(p[g]=e[g]);return p.ref=n,p.className=u,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m,{cache:t,serialized:h,isStringTag:"string"==typeof a}),(0,r.createElement)(a,p))}))},917:(e,t,n)=>{"use strict";n.d(t,{F4:()=>h,az:()=>l,iv:()=>u,xB:()=>c});var r=n(7294),i=(n(6194),n(2443)),o=(n(8679),n(444)),s=n(8947),a=n(7278),l=function(e,t){var n=arguments;if(null==t||!i.h.call(t,"css"))return r.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=i.E,s[1]=(0,i.c)(e,t);for(var a=2;a<o;a++)s[a]=n[a];return r.createElement.apply(null,s)},c=(0,i.w)((function(e,t){var n=e.styles,l=(0,s.O)([n],void 0,(0,r.useContext)(i.T)),c=(0,r.useRef)();return(0,a.j)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),c.current=[n,r],function(){n.flush()}}),[t]),(0,a.j)((function(){var e=c.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,o.My)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}}),[t,l.name]),null}));function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.O)(t)}var h=function(){var e=u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},5944:(e,t,n)=>{"use strict";n.d(t,{BX:()=>a,HY:()=>o,tZ:()=>s}),n(7294),n(6194);var r=n(2443),i=(n(8679),n(8947),n(7278),n(5893)),o=i.Fragment;function s(e,t,n){return r.h.call(t,"css")?(0,i.jsx)(r.E,(0,r.c)(e,t),n):(0,i.jsx)(e,t,n)}function a(e,t,n){return r.h.call(t,"css")?(0,i.jsxs)(r.E,(0,r.c)(e,t),n):(0,i.jsxs)(e,t,n)}},8947:(e,t,n)=>{"use strict";n.d(t,{O:()=>p});const r=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=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(i){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)},i={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 o=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,a=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},c=function(e){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=a(n=e)?n:n.replace(o,"-$&").toLowerCase()),t[e];var n}}(),u=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===i[e]||a(e)||"number"!=typeof t||0===t?t:t+"px"};function h(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return f={name:n.name,styles:n.styles,next:f},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)f={name:r.name,styles:r.styles,next:f},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=h(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":l(s)&&(r+=c(o)+":"+u(o,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=h(e,t,s);switch(o){case"animation":case"animationName":r+=c(o)+":"+a+";";break;default:r+=o+"{"+a+"}"}}else for(var f=0;f<s.length;f++)l(s[f])&&(r+=c(o)+":"+u(o,s[f])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=f,o=n(e);return f=i,h(e,t,o)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var f,d=/label:\s*([^\s;\n{]+)\s*(;|$)/g,p=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i=!0,o="";f=void 0;var s=e[0];null==s||void 0===s.raw?(i=!1,o+=h(n,t,s)):o+=s[0];for(var a=1;a<e.length;a++)o+=h(n,t,e[a]),i&&(o+=s[a]);d.lastIndex=0;for(var l,c="";null!==(l=d.exec(o));)c+="-"+l[1];return{name:r(o)+c,styles:o,next:f}}},7278:(e,t,n)=>{"use strict";var r;n.d(t,{L:()=>s,j:()=>a});var i=n(7294),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,s=o||function(e){return e()},a=o||i.useLayoutEffect},444:(e,t,n)=>{"use strict";function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}n.d(t,{My:()=>o,fp:()=>r,hC:()=>i});var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},8144:(e,t,n)=>{"use strict";n.d(t,{q:()=>zn,Z5:()=>be,q_:()=>bn,Yz:()=>wn});var r=b(),i=e=>m(e,r),o=b();i.write=e=>m(e,o);var s=b();i.onStart=e=>m(e,s);var a=b();i.onFrame=e=>m(e,a);var l=b();i.onFinish=e=>m(e,l);var c=[];i.setTimeout=(e,t)=>{let n=i.now()+t,r=()=>{let e=c.findIndex((e=>e.cancel==r));~e&&c.splice(e,1),d-=~e?1:0},o={time:n,handler:e,cancel:r};return c.splice(u(n),0,o),d+=1,g(),o};var u=e=>~(~c.findIndex((t=>t.time>e))||~c.length);i.cancel=e=>{s.delete(e),a.delete(e),l.delete(e),r.delete(e),o.delete(e)},i.sync=e=>{p=!0,i.batchedUpdates(e),p=!1},i.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,i.onStart(n)}return r.handler=e,r.cancel=()=>{s.delete(n),t=null},r};var h=typeof window<"u"?window.requestAnimationFrame:()=>{};i.use=e=>h=e,i.now=typeof performance<"u"?()=>performance.now():Date.now,i.batchedUpdates=e=>e(),i.catch=console.error,i.frameLoop="always",i.advance=()=>{"demand"!==i.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):v()};var f=-1,d=0,p=!1;function m(e,t){p?(t.delete(e),e(0)):(t.add(e),g())}function g(){f<0&&(f=0,"demand"!==i.frameLoop&&h(y))}function y(){~f&&(h(y),i.batchedUpdates(v))}function v(){let e=f;f=i.now();let t=u(f);t&&(w(c.splice(0,t),(e=>e.handler())),d-=t),d?(s.flush(),r.flush(e?Math.min(64,f-e):16.667),a.flush(),o.flush(),l.flush()):f=-1}function b(){let e=new Set,t=e;return{add(n){d+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(d-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,d-=t.size,w(t,(t=>t(n)&&e.add(t))),d+=e.size,t=e)}}}function w(e,t){e.forEach((e=>{try{t(e)}catch(e){i.catch(e)}}))}var x=n(7294),S=Object.defineProperty,k={};function C(){}((e,t)=>{for(var n in t)S(e,n,{get:t[n],enumerable:!0})})(k,{assign:()=>F,colors:()=>I,createStringInterpolator:()=>R,skipAnimation:()=>L,to:()=>D,willAdvance:()=>j});var O={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function M(e,t){if(O.arr(e)){if(!O.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var E=(e,t)=>e.forEach(t);function A(e,t,n){if(O.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var T=e=>O.und(e)?[]:O.arr(e)?e:[e];function _(e,t){if(e.size){let n=Array.from(e);e.clear(),E(n,t)}}var R,D,P=(e,...t)=>_(e,(e=>e(...t))),N=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),I=null,L=!1,j=C,F=e=>{e.to&&(D=e.to),e.now&&(i.now=e.now),void 0!==e.colors&&(I=e.colors),null!=e.skipAnimation&&(L=e.skipAnimation),e.createStringInterpolator&&(R=e.createStringInterpolator),e.requestAnimationFrame&&i.use(e.requestAnimationFrame),e.batchedUpdates&&(i.batchedUpdates=e.batchedUpdates),e.willAdvance&&(j=e.willAdvance),e.frameLoop&&(i.frameLoop=e.frameLoop)},B=new Set,z=[],$=[],H=0,V={get idle(){return!B.size&&!z.length},start(e){H>e.priority?(B.add(e),i.onStart(U)):(W(e),i(K))},advance:K,sort(e){if(H)i.onFrame((()=>V.sort(e)));else{let t=z.indexOf(e);~t&&(z.splice(t,1),q(e))}},clear(){z=[],B.clear()}};function U(){B.forEach(W),B.clear(),i(K)}function W(e){z.includes(e)||q(e)}function q(e){z.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(z,(t=>t.priority>e.priority)),0,e)}function K(e){let t=$;for(let n=0;n<z.length;n++){let r=z[n];H=r.priority,r.idle||(j(r),r.advance(e),r.idle||t.push(r))}return H=0,($=z).length=0,(z=t).length>0}var G="[-+]?\\d*\\.?\\d+",J=G+"%";function Q(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Y=new RegExp("rgb"+Q(G,G,G)),X=new RegExp("rgba"+Q(G,G,G,G)),Z=new RegExp("hsl"+Q(G,J,J)),ee=new RegExp("hsla"+Q(G,J,J,G)),te=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ne=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,re=/^#([0-9a-fA-F]{6})$/,ie=/^#([0-9a-fA-F]{8})$/;function oe(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=oe(i,r,e+1/3),s=oe(i,r,e),a=oe(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function ae(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function le(e){return(parseFloat(e)%360+360)%360/360}function ce(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ue(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function he(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=re.exec(e))?parseInt(t[1]+"ff",16)>>>0:I&&void 0!==I[e]?I[e]:(t=Y.exec(e))?(ae(t[1])<<24|ae(t[2])<<16|ae(t[3])<<8|255)>>>0:(t=X.exec(e))?(ae(t[1])<<24|ae(t[2])<<16|ae(t[3])<<8|ce(t[4]))>>>0:(t=te.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ie.exec(e))?parseInt(t[1],16)>>>0:(t=ne.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Z.exec(e))?(255|se(le(t[1]),ue(t[2]),ue(t[3])))>>>0:(t=ee.exec(e))?(se(le(t[1]),ue(t[2]),ue(t[3]))|ce(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var fe=(e,t,n)=>{if(O.fun(e))return e;if(O.arr(e))return fe({range:e,output:t,extrapolate:n});if(O.str(e.output[0]))return R(e);let r=e,i=r.output,o=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,o);return function(e,t,n,r,i,o,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r,c)}(e,o[t],o[t+1],i[t],i[t+1],l,s,a,r.map)}},de=1.70158,pe=1.525*de,me=de+1,ge=2*Math.PI/3,ye=2*Math.PI/4.5,ve=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,be={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>me*e*e*e-de*e*e,easeOutBack:e=>1+me*Math.pow(e-1,3)+de*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(pe+1)*e-pe)/2:(Math.pow(2*e-2,2)*((pe+1)*(2*e-2)+pe)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ge),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ge)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ye)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ye)/2+1,easeInBounce:e=>1-ve(1-e),easeOutBounce:ve,easeInOutBounce:e=>e<.5?(1-ve(1-2*e))/2:(1+ve(2*e-1))/2,steps:(e,t="end")=>n=>{let r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,0),1))(0,0,("end"===t?Math.floor(r):Math.ceil(r))/e)}},we=Symbol.for("FluidValue.get"),xe=Symbol.for("FluidValue.observers"),Se=e=>!(!e||!e[we]),ke=e=>e&&e[we]?e[we]():e,Ce=e=>e[xe]||null;function Oe(e,t){let n=e[xe];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Me=class{[we];[xe];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Ee(this,e)}},Ee=(e,t)=>Re(e,we,t);function Ae(e,t){if(e[we]){let n=e[xe];n||Re(e,xe,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Te(e,t){let n=e[xe];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[xe]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var _e,Re=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),De=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Pe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ne=new RegExp(`(${De.source})(%|[a-z]+)`,"i"),Ie=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Le=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,je=e=>{let[t,n]=Fe(e);if(!t||N())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith("--")?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&Le.test(n)?je(n):n||e},Fe=e=>{let t=Le.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},Be=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,ze=e=>{_e||(_e=I?new RegExp(`(${Object.keys(I).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>ke(e).replace(Le,je).replace(Pe,he).replace(_e,he))),n=t.map((e=>e.match(De).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>fe({...e,output:t})));return e=>{let n=!Ne.test(t[0])&&t.find((e=>Ne.test(e)))?.replace(De,""),i=0;return t[0].replace(De,(()=>`${r[i++](e)}${n||""}`)).replace(Ie,Be)}},$e="react-spring: ",He=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${$e}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Ve=He(console.warn),Ue=He(console.warn);function We(e){return O.str(e)&&("#"==e[0]||/\d/.test(e)||!N()&&Le.test(e)||e in(I||{}))}new WeakMap,new Set,new WeakMap,new WeakMap,new WeakMap;var qe=N()?x.useEffect:x.useLayoutEffect,Ke=()=>{let e=(0,x.useRef)(!1);return qe((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function Ge(){let e=(0,x.useState)()[1],t=Ke();return()=>{t.current&&e(Math.random())}}var Je=e=>(0,x.useEffect)(e,Qe),Qe=[];function Ye(e){let t=(0,x.useRef)();return(0,x.useEffect)((()=>{t.current=e})),t.current}var Xe=Symbol.for("Animated:node"),Ze=e=>e&&e[Xe],et=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,Xe,t),tt=e=>e&&e[Xe]&&e[Xe].getPayload(),nt=class{payload;constructor(){et(this,this)}getPayload(){return this.payload||[]}},rt=class extends nt{constructor(e){super(),this._value=e,O.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new rt(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return O.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,O.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},it=class extends rt{_string=null;_toString;constructor(e){super(0),this._toString=fe({output:[e,e]})}static create(e){return new it(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(O.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=fe({output:[this.getValue(),e]})),this._value=0,super.reset()}},ot={dependencies:null},st=class extends nt{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return A(this.source,((n,r)=>{var i;(i=n)&&i[Xe]===i?t[r]=n.getValue(e):Se(n)?t[r]=ke(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&E(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return A(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){ot.dependencies&&Se(e)&&ot.dependencies.add(e);let t=tt(e);t&&E(t,(e=>this.add(e)))}},at=class extends st{constructor(e){super(e)}static create(e){return new at(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(lt)),!0)}};function lt(e){return(We(e)?it:rt).create(e)}function ct(e){let t=Ze(e);return t?t.constructor:O.arr(e)?at:We(e)?it:rt}var ut=(e,t)=>{let n=!O.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,x.forwardRef)(((r,o)=>{let s=(0,x.useRef)(null),a=n&&(0,x.useCallback)((e=>{s.current=function(e,t){return e&&(O.fun(e)?e(t):e.current=t),t}(o,e)}),[o]),[l,c]=function(e,t){let n=new Set;return ot.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new st(e),ot.dependencies=null,[e,n]}(r,t),u=Ge(),h=()=>{let e=s.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&u()},f=new ht(h,c),d=(0,x.useRef)();qe((()=>(d.current=f,E(c,(e=>Ae(e,f))),()=>{d.current&&(E(d.current.deps,(e=>Te(e,d.current))),i.cancel(d.current.update))}))),(0,x.useEffect)(h,[]),Je((()=>()=>{let e=d.current;E(e.deps,(t=>Te(t,e)))}));let p=t.getComponentProps(l.getValue());return x.createElement(e,{...p,ref:a})}))},ht=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&i.write(this.update)}},ft=Symbol.for("AnimatedComponent"),dt=e=>O.str(e)?e:e&&O.str(e.displayName)?e.displayName:O.fun(e)&&e.name||null;function pt(e,...t){return O.fun(e)?e(...t):e}var mt=(e,t)=>!0===e||!!(t&&e&&(O.fun(e)?e(t):T(e).includes(t))),gt=(e,t)=>O.obj(e)?t&&e[t]:e,yt=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,vt=e=>e,bt=(e,t=vt)=>{let n=wt;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);O.und(n)||(r[i]=n)}return r},wt=["config","onProps","onStart","onChange","onPause","onResume","onRest"],xt={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function St(e){let t=function(e){let t={},n=0;if(A(e,((e,r)=>{xt[r]||(t[r]=e,n++)})),n)return t}(e);if(t){let n={to:t};return A(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function kt(e){return e=ke(e),O.arr(e)?e.map(kt):We(e)?k.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ct(e){for(let t in e)return!0;return!1}function Ot(e){return O.fun(e)||O.arr(e)&&O.obj(e[0])}function Mt(e,t){e.ref?.delete(e),t?.delete(e)}function Et(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var At={tension:170,friction:26,mass:1,damping:1,easing:be.linear,clamp:!1};function Tt(e,t){if(O.und(t.decay)){let n=!O.und(t.tension)||!O.und(t.friction);(n||!O.und(t.frequency)||!O.und(t.damping)||!O.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var _t=[];function Rt(e,{key:t,props:n,defaultProps:r,state:o,actions:s}){return new Promise(((a,l)=>{let c,u,h=mt(n.cancel??r?.cancel,t);if(h)p();else{O.und(n.pause)||(o.paused=mt(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||mt(e,t)),c=pt(n.delay||0,t),e?(o.resumeQueue.add(d),s.pause()):(s.resume(),d())}function f(){o.resumeQueue.add(d),o.timeouts.delete(u),u.cancel(),c=u.time-i.now()}function d(){c>0&&!k.skipAnimation?(o.delayed=!0,u=i.setTimeout(p,c),o.pauseQueue.add(f),o.timeouts.add(u)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(f),o.timeouts.delete(u),e<=(o.cancelId||0)&&(h=!0);try{s.start({...n,callId:e,cancel:h},a)}catch(e){l(e)}}}))}var Dt=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?It(e.get()):t.every((e=>e.noop))?Pt(e.get()):Nt(e.get(),t.every((e=>e.finished))),Pt=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Nt=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),It=e=>({value:e,cancelled:!0,finished:!1});function Lt(e,t,n,r){let{callId:o,parentId:s,onRest:a}=t,{asyncTo:l,promise:c}=n;return s||e!==l||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;let u,h,f,d=bt(t,((e,t)=>"onRest"===t?void 0:e)),p=new Promise(((e,t)=>(u=e,h=t))),m=e=>{let t=o<=(n.cancelId||0)&&It(r)||o!==n.asyncId&&Nt(r,!1);if(t)throw e.result=t,h(e),e},g=(e,t)=>{let i=new Ft,s=new Bt;return(async()=>{if(k.skipAnimation)throw jt(n),s.result=Nt(r,!1),h(s),s;m(i);let a=O.obj(e)?{...e}:{...t,to:e};a.parentId=o,A(d,((e,t)=>{O.und(a[t])&&(a[t]=e)}));let l=await r.start(a);return m(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};if(k.skipAnimation)return jt(n),Nt(r,!1);try{let t;t=O.arr(e)?(async e=>{for(let t of e)await g(t)})(e):Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([t.then(u),p]),f=Nt(r.get(),!0,!1)}catch(e){if(e instanceof Ft)f=e.result;else{if(!(e instanceof Bt))throw e;f=e.result}}finally{o==n.asyncId&&(n.asyncId=s,n.asyncTo=s?l:void 0,n.promise=s?c:void 0)}return O.fun(a)&&i.batchedUpdates((()=>{a(f,r,r.item)})),f})():c}function jt(e,t){_(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Ft=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Bt=class extends Error{result;constructor(){super("SkipAnimationSignal")}},zt=e=>e instanceof Ht,$t=1,Ht=class extends Me{id=$t++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Ze(this);return e&&e.getValue()}to(...e){return k.to(this,e)}interpolate(...e){return Ve(`${$e}The "interpolate" function is deprecated in v9 (use "to" instead)`),k.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Oe(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||V.sort(this),Oe(this,{type:"priority",parent:this,priority:e})}},Vt=Symbol.for("SpringPhase"),Ut=e=>(1&e[Vt])>0,Wt=e=>(2&e[Vt])>0,qt=e=>(4&e[Vt])>0,Kt=(e,t)=>t?e[Vt]|=3:e[Vt]&=-3,Gt=(e,t)=>t?e[Vt]|=4:e[Vt]&=-5,Jt=class extends Ht{key;animation=new class{changed=!1;values=_t;toValues=null;fromValues=_t;to;from;config=new class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,At)}};immediate=!1};queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!O.und(e)||!O.und(t)){let n=O.obj(e)?{...e}:{...t,from:e};O.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Wt(this)||this._state.asyncTo)||qt(this)}get goal(){return ke(this.animation.to)}get velocity(){let e=Ze(this);return e instanceof rt?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Ut(this)}get isAnimating(){return Wt(this)}get isPaused(){return qt(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:o}=r,s=tt(r.to);!s&&Se(r.to)&&(i=T(ke(r.to))),r.values.forEach(((a,l)=>{if(a.done)return;let c=a.constructor==it?1:s?s[l].lastPosition:i[l],u=r.immediate,h=c;if(!u){if(h=a.lastPosition,o.tension<=0)return void(a.done=!0);let t,n=a.elapsedTime+=e,i=r.fromValues[l],s=null!=a.v0?a.v0:a.v0=O.arr(o.velocity)?o.velocity[l]:o.velocity,f=o.precision||(i==c?.005:Math.min(1,.001*Math.abs(c-i)));if(O.und(o.duration))if(o.decay){let e=!0===o.decay?.998:o.decay,r=Math.exp(-(1-e)*n);h=i+s/(1-e)*(1-r),u=Math.abs(a.lastPosition-h)<=f,t=s*r}else{t=null==a.lastVelocity?s:a.lastVelocity;let n,r=o.restVelocity||f/10,l=o.clamp?0:o.bounce,d=!O.und(l),p=i==c?a.v0>0:i<c,m=!1,g=1,y=Math.ceil(e/g);for(let e=0;e<y&&(n=Math.abs(t)>r,n||(u=Math.abs(c-h)<=f,!u));++e)d&&(m=h==c||h>c==p,m&&(t=-t*l,h=c)),t+=(1e-6*-o.tension*(h-c)+.001*-o.friction*t)/o.mass*g,h+=t*g}else{let r=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,a.durationProgress>0&&(a.elapsedTime=o.duration*a.durationProgress,n=a.elapsedTime+=e)),r=(o.progress||0)+n/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),h=i+o.easing(r)*(c-i),t=(h-a.lastPosition)/e,u=1==r}a.lastVelocity=t,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[l].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(h,o.round)&&(n=!0)}));let a=Ze(this),l=a.getValue();if(t){let e=ke(r.to);l===e&&!n||o.decay?n&&o.decay&&this._onChange(l):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return i.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Wt(this)){let{to:e,config:t}=this.animation;i.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return O.und(e)?(n=this.queue||[],this.queue=[]):n=[O.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Dt(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),jt(this._state,e&&this._lastCallId),i.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:r}=e;n=O.obj(n)?n[t]:n,(null==n||Ot(n))&&(n=void 0),r=O.obj(r)?r[t]:r,null==r&&(r=void 0);let i={to:n,from:r};return Ut(this)||(e.reverse&&([n,r]=[r,n]),r=ke(r),O.und(r)?Ze(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,bt(e,((e,t)=>/^on/.test(t)?gt(e,n):e))),nn(this,e,"onProps"),rn(this,"onProps",e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let o=this._state;return Rt(++this._lastCallId,{key:n,props:e,defaultProps:r,state:o,actions:{pause:()=>{qt(this)||(Gt(this,!0),P(o.pauseQueue),rn(this,"onPause",Nt(this,Qt(this,this.animation.to)),this))},resume:()=>{qt(this)&&(Gt(this,!1),Wt(this)&&this._resume(),P(o.resumeQueue),rn(this,"onResume",Nt(this,Qt(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=Yt(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(It(this));let r=!O.und(e.to),o=!O.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(It(this));this._lastToId=t.callId}let{key:s,defaultProps:a,animation:l}=this,{to:c,from:u}=l,{to:h=c,from:f=u}=e;o&&!r&&(!t.default||O.und(h))&&(h=f),t.reverse&&([h,f]=[f,h]);let d=!M(f,u);d&&(l.from=f),f=ke(f);let p=!M(h,c);p&&this._focus(h);let m=Ot(t.to),{config:g}=l,{decay:y,velocity:v}=g;(r||o)&&(g.velocity=0),t.config&&!m&&function(e,t,n){n&&(Tt(n={...n},t),t={...n,...t}),Tt(e,t),Object.assign(e,t);for(let t in At)null==e[t]&&(e[t]=At[t]);let{frequency:r,damping:i}=e,{mass:o}=e;O.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(g,pt(t.config,s),t.config!==a.config?pt(a.config,s):void 0);let b=Ze(this);if(!b||O.und(h))return n(Nt(this,!0));let w=O.und(t.reset)?o&&!t.default:!O.und(f)&&mt(t.reset,s),x=w?f:this.get(),S=kt(h),k=O.num(S)||O.arr(S)||We(S),C=!m&&(!k||mt(a.immediate||t.immediate,s));if(p){let e=ct(h);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(S)}}let A=b.constructor,_=Se(h),R=!1;if(!_){let e=w||!Ut(this)&&d;(p||e)&&(R=M(kt(x),S),_=!R),(!M(l.immediate,C)&&!C||!M(g.decay,y)||!M(g.velocity,v))&&(_=!0)}if(R&&Wt(this)&&(l.changed&&!w?_=!0:_||this._stop(c)),!m&&((_||Se(c))&&(l.values=b.getPayload(),l.toValues=Se(h)?null:A==it?[1]:T(S)),l.immediate!=C&&(l.immediate=C,!C&&!w&&this._set(c)),_)){let{onRest:e}=l;E(tn,(e=>nn(this,t,e)));let r=Nt(this,Qt(this,c));P(this._pendingCalls,r),this._pendingCalls.add(n),l.changed&&i.batchedUpdates((()=>{l.changed=!w,e?.(r,this),w?pt(a.onRest,r):l.onStart?.(r,this)}))}w&&this._set(x),m?n(Lt(t.to,t,this._state,this)):_?this._start():Wt(this)&&!p?this._pendingCalls.add(n):n(Pt(x))}_focus(e){let t=this.animation;e!==t.to&&(Ce(this)&&this._detach(),t.to=e,Ce(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Se(t)&&(Ae(t,this),zt(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Se(e)&&Te(e,this)}_set(e,t=!0){let n=ke(e);if(!O.und(n)){let e=Ze(this);if(!e||!M(n,e.getValue())){let r=ct(n);e&&e.constructor==r?e.setValue(n):et(this,r.create(n)),e&&i.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ze(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,rn(this,"onStart",Nt(this,Qt(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),pt(this.animation.onChange,e,this)),pt(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;Ze(this).reset(ke(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Wt(this)||(Kt(this,!0),qt(this)||this._resume())}_resume(){k.skipAnimation?this.finish():V.start(this)}_stop(e,t){if(Wt(this)){Kt(this,!1);let n=this.animation;E(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Oe(this,{type:"idle",parent:this});let r=t?It(this.get()):Nt(this.get(),Qt(this,e??n.to));P(this._pendingCalls,r),n.changed&&(n.changed=!1,rn(this,"onRest",r,this))}}};function Qt(e,t){let n=kt(t);return M(kt(e.get()),n)}function Yt(e,t=e.loop,n=e.to){let r=pt(t);if(r){let i=!0!==r&&St(r),o=(i||e).reverse,s=!i||i.reset;return Xt({...e,loop:t,default:!1,pause:void 0,to:!o||Ot(n)?n:void 0,from:s?e.from:void 0,reset:s,...i})}}function Xt(e){let{to:t,from:n}=e=St(e),r=new Set;return O.obj(t)&&en(t,r),O.obj(n)&&en(n,r),e.keys=r.size?Array.from(r):null,e}function Zt(e){let t=Xt(e);return O.und(t.default)&&(t.default=bt(t)),t}function en(e,t){A(e,((e,n)=>null!=e&&t.add(n)))}var tn=["onStart","onRest","onChange","onPause","onResume"];function nn(e,t,n){e.animation[n]=t[n]!==yt(t,n)?gt(t[n],e.key):void 0}function rn(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var on=["onStart","onChange","onRest"],sn=1,an=class{id=sn++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];O.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Xt(e)),this}start(e){let{queue:t}=this;return e?t=T(e).map(Xt):this.queue=[],this._flush?this._flush(this,t):(pn(this,t),ln(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;E(T(t),(t=>n[t].stop(!!e)))}else jt(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(O.und(e))this.start({pause:!0});else{let t=this.springs;E(T(e),(e=>t[e].pause()))}return this}resume(e){if(O.und(e))this.start({pause:!1});else{let t=this.springs;E(T(e),(e=>t[e].resume()))}return this}each(e){A(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,_(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let o=!r&&this._started,s=i||o&&n.size?this.get():null;i&&t.size&&_(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),o&&(this._started=!1,_(n,(([e,t])=>{t.value=s,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}i.onFrame(this._onFrame)}};function ln(e,t){return Promise.all(t.map((t=>cn(e,t)))).then((t=>Dt(e,t)))}async function cn(e,t,n){let{keys:r,to:o,from:s,loop:a,onRest:l,onResolve:c}=t,u=O.obj(t.default)&&t.default;a&&(t.loop=!1),!1===o&&(t.to=null),!1===s&&(t.from=null);let h=O.arr(o)||O.fun(o)?o:void 0;h?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):E(on,(n=>{let r=t[n];if(O.fun(r)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},u&&(u[n]=t[n])}}));let f=e._state;t.pause===!f.paused?(f.paused=t.pause,P(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let d=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===yt(t,"cancel");(h||p&&f.asyncId)&&d.push(Rt(++e._lastAsyncId,{props:t,state:f,actions:{pause:C,resume:C,start(t,n){p?(jt(f,e._lastAsyncId),n(It(e))):(t.onRest=l,n(Lt(h,t,f,e)))}}})),f.paused&&await new Promise((e=>{f.resumeQueue.add(e)}));let m=Dt(e,await Promise.all(d));if(a&&m.finished&&(!n||!m.noop)){let n=Yt(t,a,o);if(n)return pn(e,[n]),cn(e,n,!0)}return c&&i.batchedUpdates((()=>c(m,e,e.item))),m}function un(e,t){let n={...e.springs};return t&&E(T(t),(e=>{O.und(e.keys)&&(e=Xt(e)),O.obj(e.to)||(e={...e,to:void 0}),dn(n,e,(e=>fn(e)))})),hn(e,n),n}function hn(e,t){A(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Ae(t,e))}))}function fn(e,t){let n=new Jt;return n.key=e,t&&Ae(n,t),n}function dn(e,t,n){t.keys&&E(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function pn(e,t){E(t,(t=>{dn(e.springs,t,(t=>fn(t,e)))}))}var mn,gn=({children:e,...t})=>{let n=(0,x.useContext)(yn),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,x.useState)((()=>({inputs:t,result:e()}))),r=(0,x.useRef)(),i=r.current,o=i;return o?t&&o.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,o.inputs)||(o={inputs:t,result:e()}):o=n,(0,x.useEffect)((()=>{r.current=o,i==n&&(n.inputs=n.result=void 0)}),[o]),o.result}((()=>({pause:r,immediate:i})),[r,i]);let{Provider:o}=yn;return x.createElement(o,{value:t},e)},yn=(mn=gn,Object.assign(mn,x.createContext({})),mn.Provider._context=mn,mn.Consumer._context=mn,mn);gn.Provider=yn.Provider,gn.Consumer=yn.Consumer;var vn=()=>{let e=[],t=function(t){Ue(`${$e}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);let r=[];return E(e,((e,i)=>{if(O.und(t))r.push(e.start());else{let o=n(t,e,i);o&&r.push(e.start(o))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return E(e,(e=>e.pause(...arguments))),this},t.resume=function(){return E(e,(e=>e.resume(...arguments))),this},t.set=function(t){E(e,((e,n)=>{let r=O.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){let n=[];return E(e,((e,r)=>{if(O.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}})),n},t.stop=function(){return E(e,(e=>e.stop(...arguments))),this},t.update=function(t){return E(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};let n=function(e,t,n){return O.fun(e)?e(n,t):e};return t._getProps=n,t};function bn(e,t){let n=O.fun(e),[[r],i]=function(e,t,n){let r=O.fun(t)&&t;r&&!n&&(n=[]);let i=(0,x.useMemo)((()=>r||3==arguments.length?vn():void 0),[]),o=(0,x.useRef)(0),s=Ge(),a=(0,x.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){let n=un(e,t);return o.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ln(e,t):new Promise((r=>{hn(e,n),a.queue.push((()=>{r(ln(e,t))})),s()}))}})),[]),l=(0,x.useRef)([...a.ctrls]),c=[],u=Ye(e)||0;function h(e,n){for(let i=e;i<n;i++){let e=l.current[i]||(l.current[i]=new an(null,a.flush)),n=r?r(i,e):t[i];n&&(c[i]=Zt(n))}}(0,x.useMemo)((()=>{E(l.current.slice(e,u),(e=>{Mt(e,i),e.stop(!0)})),l.current.length=e,h(u,e)}),[e]),(0,x.useMemo)((()=>{h(0,Math.min(u,e))}),n);let f=l.current.map(((e,t)=>un(e,c[t]))),d=(0,x.useContext)(gn),p=Ye(d),m=d!==p&&Ct(d);qe((()=>{o.current++,a.ctrls=l.current;let{queue:e}=a;e.length&&(a.queue=[],E(e,(e=>e()))),E(l.current,((e,t)=>{i?.add(e),m&&e.start({default:d});let n=c[t];n&&(Et(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Je((()=>()=>{E(a.ctrls,(e=>e.stop(!0)))}));let g=f.map((e=>({...e})));return i?[g,i]:g}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}function wn(e,t,n){let r=O.fun(t)&&t,{reset:i,sort:o,trail:s=0,expires:a=!0,exitBeforeEnter:l=!1,onDestroyed:c,ref:u,config:h}=r?r():t,f=(0,x.useMemo)((()=>r||3==arguments.length?vn():void 0),[]),d=T(e),p=[],m=(0,x.useRef)(null),g=i?null:m.current;qe((()=>{m.current=p})),Je((()=>(E(p,(e=>{f?.add(e.ctrl),e.ctrl.ref=f})),()=>{E(m.current,(e=>{e.expired&&clearTimeout(e.expirationId),Mt(e.ctrl,f),e.ctrl.stop(!0)}))})));let y=function(e,{key:t,keys:n=t},r){if(null===n){let t=new Set;return e.map((e=>{let n=r&&r.find((n=>n.item===e&&"leave"!==n.phase&&!t.has(n)));return n?(t.add(n),n.key):xn++}))}return O.und(n)?e:O.fun(n)?e.map(n):T(n)}(d,r?r():t,g),v=i&&m.current||[];qe((()=>E(v,(({ctrl:e,item:t,key:n})=>{Mt(e,f),pt(c,t,n)}))));let b=[];if(g&&E(g,((e,t)=>{e.expired?(clearTimeout(e.expirationId),v.push(e)):~(t=b[t]=y.indexOf(e.key))&&(p[t]=e)})),E(d,((e,t)=>{p[t]||(p[t]={key:y[t],item:e,phase:"mount",ctrl:new an},p[t].ctrl.item=e)})),b.length){let e=-1,{leave:n}=r?r():t;E(b,((t,r)=>{let i=g[r];~t?(e=p.indexOf(i),p[e]={...i,item:d[t]}):n&&p.splice(++e,0,i)}))}O.fun(o)&&p.sort(((e,t)=>o(e.item,t.item)));let w=-s,S=Ge(),k=bt(t),C=new Map,M=(0,x.useRef)(new Map),A=(0,x.useRef)(!1);E(p,((e,n)=>{let i,o,c=e.key,f=e.phase,d=r?r():t,p=pt(d.delay||0,c);if("mount"==f)i=d.enter,o="enter";else{let e=y.indexOf(c)<0;if("leave"!=f)if(e)i=d.leave,o="leave";else{if(!(i=d.update))return;o="update"}else{if(e)return;i=d.enter,o="enter"}}if(i=pt(i,e.item,n),i=O.obj(i)?St(i):{to:i},!i.config){let t=h||k.config;i.config=pt(t,e.item,n,o)}w+=s;let v={...k,delay:p+w,ref:u,immediate:d.immediate,reset:!1,...i};if("enter"==o&&O.und(v.from)){let i=r?r():t,o=O.und(i.initial)||g?i.from:i.initial;v.from=pt(o,e.item,n)}let{onResolve:b}=v;v.onResolve=e=>{pt(b,e);let t=m.current,n=t.find((e=>e.key===c));if(n&&(!e.cancelled||"update"==n.phase)&&n.ctrl.idle){let e=t.every((e=>e.ctrl.idle));if("leave"==n.phase){let t=pt(a,n.item);if(!1!==t){let r=!0===t?0:t;if(n.expired=!0,!e&&r>0)return void(r<=2147483647&&(n.expirationId=setTimeout(S,r)))}}e&&t.some((e=>e.expired))&&(M.current.delete(n),l&&(A.current=!0),S())}};let x=un(e.ctrl,v);"leave"===o&&l?M.current.set(e,{phase:o,springs:x,payload:v}):C.set(e,{phase:o,springs:x,payload:v})}));let _=(0,x.useContext)(gn),R=Ye(_),D=_!==R&&Ct(_);qe((()=>{D&&E(p,(e=>{e.ctrl.start({default:_})}))}),[_]),E(C,((e,t)=>{if(M.current.size){let e=p.findIndex((e=>e.key===t.key));p.splice(e,1)}})),qe((()=>{E(M.current.size?M.current:C,(({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,f?.add(r),D&&"enter"==e&&r.start({default:_}),t&&(Et(r,t.ref),!r.ref&&!f||A.current?(r.start(t),A.current&&(A.current=!1)):r.update(t))}))}),i?void 0:n);let P=e=>x.createElement(x.Fragment,null,p.map(((t,n)=>{let{springs:r}=C.get(t)||t.ctrl,i=e({...r},t.item,t,n);return i&&i.type?x.createElement(i.type,{...i.props,key:O.str(t.key)||O.num(t.key)?t.key:t.ctrl.id,ref:i.ref}):i})));return f?[P,f]:P}var xn=1,Sn=class extends Ht{constructor(e,t){super(),this.source=e,this.calc=fe(...t);let n=this._get(),r=ct(n);et(this,r.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();M(t,this.get())||(Ze(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Cn(this._active)&&On(this)}_get(){let e=O.arr(this.source)?this.source.map(ke):T(ke(this.source));return this.calc(...e)}_start(){this.idle&&!Cn(this._active)&&(this.idle=!1,E(tt(this),(e=>{e.done=!1})),k.skipAnimation?(i.batchedUpdates((()=>this.advance())),On(this)):V.start(this))}_attach(){let e=1;E(T(this.source),(t=>{Se(t)&&Ae(t,this),zt(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){E(T(this.source),(e=>{Se(e)&&Te(e,this)})),this._active.clear(),On(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=T(this.source).reduce(((e,t)=>Math.max(e,(zt(t)?t.priority:0)+1)),0))}};function kn(e){return!1!==e.idle}function Cn(e){return!e.size||Array.from(e).every(kn)}function On(e){e.idle||(e.idle=!0,E(tt(e),(e=>{e.done=!0})),Oe(e,{type:"idle",parent:e}))}k.assign({createStringInterpolator:ze,to:(e,t)=>new Sn(e,t)}),V.advance;var Mn=n(3935),En=/^--/;function An(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||En.test(e)||_n.hasOwnProperty(e)&&_n[e]?(""+t).trim():t+"px"}var Tn={},_n={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Rn=["Webkit","Ms","Moz","O"];_n=Object.keys(_n).reduce(((e,t)=>(Rn.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),_n);var Dn=/^(matrix|translate|scale|rotate|skew)/,Pn=/^(translate)/,Nn=/^(rotate|skew)/,In=(e,t)=>O.num(e)&&0!==e?e+t:e,Ln=(e,t)=>O.arr(e)?e.every((e=>Ln(e,t))):O.num(e)?e===t:parseFloat(e)===t,jn=class extends st{constructor({x:e,y:t,z:n,...r}){let i=[],o=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),o.push((e=>[`translate3d(${e.map((e=>In(e,"px"))).join(",")})`,Ln(e,0)]))),A(r,((e,t)=>{if("transform"===t)i.push([e||""]),o.push((e=>[e,""===e]));else if(Dn.test(t)){if(delete r[t],O.und(e))return;let n=Pn.test(t)?"px":Nn.test(t)?"deg":"";i.push(T(e)),o.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${In(i,n)})`,Ln(i,0)]:e=>[`${t}(${e.map((e=>In(e,n))).join(",")})`,Ln(e,t.startsWith("scale")?1:0)])}})),i.length&&(r.transform=new Fn(i,o)),super(r)}},Fn=class extends Me{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return E(this.inputs,((n,r)=>{let i=ke(n[0]),[o,s]=this.transforms[r](O.arr(i)?i:n.map(ke));e+=" "+o,t=t&&s})),t?"none":e}observerAdded(e){1==e&&E(this.inputs,(e=>E(e,(e=>Se(e)&&Ae(e,this)))))}observerRemoved(e){0==e&&E(this.inputs,(e=>E(e,(e=>Se(e)&&Te(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Oe(this,e)}};k.assign({batchedUpdates:Mn.unstable_batchedUpdates,createStringInterpolator:ze,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Bn=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new st(e)),getComponentProps:r=(e=>e)}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=e=>{let t=dt(e)||"Anonymous";return(e=O.str(e)?o[e]||(o[e]=ut(e,i)):e[ft]||(e[ft]=ut(e,i))).displayName=`Animated(${t})`,e};return A(e,((t,n)=>{O.arr(e)&&(n=dt(t)),o[n]=o(t)})),{animated:o}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:i,scrollTop:o,scrollLeft:s,viewBox:a,...l}=t,c=Object.values(l),u=Object.keys(l).map((t=>n||e.hasAttribute(t)?t:Tn[t]||(Tn[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==i&&(e.textContent=i);for(let t in r)if(r.hasOwnProperty(t)){let n=An(t,r[t]);En.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==o&&(e.scrollTop=o),void 0!==s&&(e.scrollLeft=s),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new jn(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),zn=Bn.animated},2599:(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)}var i;n.d(t,{Ep:()=>h,J0:()=>a,RQ:()=>D,WK:()=>j,Zn:()=>A,Zq:()=>_,aU:()=>i,cP:()=>f,fp:()=>p,pC:()=>R,q_:()=>s}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(i||(i={}));const o="popstate";function s(e){return void 0===e&&(e={}),function(e,t,n,s){void 0===s&&(s={});let{window:l=document.defaultView,v5Compat:f=!1}=s,d=l.history,p=i.Pop,m=null,g=y();function y(){return(d.state||{idx:null}).idx}function v(){p=i.Pop;let e=y(),t=null==e?null:e-g;g=e,m&&m({action:p,location:w.location,delta:t})}function b(e){let t="null"!==l.location.origin?l.location.origin:l.location.href,n="string"==typeof e?e:h(e);return a(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,d.replaceState(r({},d.state,{idx:g}),""));let w={get action(){return p},get location(){return e(l,d)},listen(e){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(o,v),m=e,()=>{l.removeEventListener(o,v),m=null}},createHref:e=>t(l,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=i.Push;let r=u(w.location,e,t);n&&n(r,e),g=y()+1;let o=c(r,g),s=w.createHref(r);try{d.pushState(o,"",s)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;l.location.assign(s)}f&&m&&m({action:p,location:w.location,delta:1})},replace:function(e,t){p=i.Replace;let r=u(w.location,e,t);n&&n(r,e),g=y();let o=c(r,g),s=w.createHref(r);d.replaceState(o,"",s),f&&m&&m({action:p,location:w.location,delta:0})},go:e=>d.go(e)};return w}((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=f(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),u("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:h(t))}),(function(e,t){l("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function a(e,t){if(!1===e||null==e)throw new Error(t)}function l(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,n,i){return void 0===n&&(n=null),r({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?f(t):t,{state:n,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function h(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var d;function p(e,t,n){void 0===n&&(n="/");let r=A(("string"==typeof t?f(t):t).pathname||"/",n);if(null==r)return null;let i=m(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let o=null;for(let e=0;null==o&&e<i.length;++e)o=O(i[e],E(r));return o}function m(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};s.relativePath.startsWith("/")&&(a(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(r.length));let l=D([r,s.relativePath]),c=n.concat(s);e.children&&e.children.length>0&&(a(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),m(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:C(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of g(e.path))i(e,t,n);else i(e,t)})),t}function g(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=g(r.join("/")),a=[];return a.push(...s.map((e=>""===e?o:[o,e].join("/")))),i&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(d||(d={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const y=/^:\w+$/,v=3,b=2,w=1,x=10,S=-2,k=e=>"*"===e;function C(e,t){let n=e.split("/"),r=n.length;return n.some(k)&&(r+=S),t&&(r+=b),n.filter((e=>!k(e))).reduce(((e,t)=>e+(y.test(t)?v:""===t?w:x)),r)}function O(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let e=0;e<n.length;++e){let s=n[e],a=e===n.length-1,l="/"===i?t:t.slice(i.length)||"/",c=M({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},l);if(!c)return null;Object.assign(r,c.params);let u=s.route;o.push({params:r,pathname:D([i,c.pathname]),pathnameBase:P(D([i,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(i=D([i,c.pathnameBase]))}return o}function M(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),l("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(r.push(t),"/([^\\/]+)")));return e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=a[n]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return l(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(a[n]||"",t),e}),{}),pathname:o,pathnameBase:s,pattern:e}}function E(e){try{return decodeURI(e)}catch(t){return l(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function A(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function T(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function _(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function R(e,t,n,i){let o;void 0===i&&(i=!1),"string"==typeof e?o=f(e):(o=r({},e),a(!o.pathname||!o.pathname.includes("?"),T("?","pathname","search",o)),a(!o.pathname||!o.pathname.includes("#"),T("#","pathname","hash",o)),a(!o.search||!o.search.includes("#"),T("#","search","hash",o)));let s,l=""===e||""===o.pathname,c=l?"/":o.pathname;if(i||null==c)s=n;else{let e=t.length-1;if(c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}s=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?f(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:N(r),hash:I(i)}}(o,s),h=c&&"/"!==c&&c.endsWith("/"),d=(l||"."===c)&&n.endsWith("/");return u.pathname.endsWith("/")||!h&&!d||(u.pathname+="/"),u}const D=e=>e.join("/").replace(/\/\/+/g,"/"),P=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),N=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",I=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class L extends Error{}function j(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const F=["post","put","patch","delete"],B=(new Set(F),["get",...F]);new Set(B),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred")},3126:(e,t,n)=>{"use strict";function r(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){return e instanceof r(e).Element||e instanceof Element}function o(e){return e instanceof r(e).HTMLElement||e instanceof HTMLElement}function s(e){return"undefined"!=typeof ShadowRoot&&(e instanceof r(e).ShadowRoot||e instanceof ShadowRoot)}n.d(t,{ZP:()=>at});var a=Math.max,l=Math.min,c=Math.round;function u(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function h(){return!/^((?!chrome|android).)*safari/i.test(u())}function f(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var s=e.getBoundingClientRect(),a=1,l=1;t&&o(e)&&(a=e.offsetWidth>0&&c(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&c(s.height)/e.offsetHeight||1);var u=(i(e)?r(e):window).visualViewport,f=!h()&&n,d=(s.left+(f&&u?u.offsetLeft:0))/a,p=(s.top+(f&&u?u.offsetTop:0))/l,m=s.width/a,g=s.height/l;return{width:m,height:g,top:p,right:d+m,bottom:p+g,left:d,x:d,y:p}}function d(e){var t=r(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function p(e){return e?(e.nodeName||"").toLowerCase():null}function m(e){return((i(e)?e.ownerDocument:e.document)||window.document).documentElement}function g(e){return f(m(e)).left+d(e).scrollLeft}function y(e){return r(e).getComputedStyle(e)}function v(e){var t=y(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function b(e,t,n){void 0===n&&(n=!1);var i,s,a=o(t),l=o(t)&&function(e){var t=e.getBoundingClientRect(),n=c(t.width)/e.offsetWidth||1,r=c(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),u=m(t),h=f(e,l,n),y={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(a||!a&&!n)&&(("body"!==p(t)||v(u))&&(y=(i=t)!==r(i)&&o(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:d(i)),o(t)?((b=f(t,!0)).x+=t.clientLeft,b.y+=t.clientTop):u&&(b.x=g(u))),{x:h.left+y.scrollLeft-b.x,y:h.top+y.scrollTop-b.y,width:h.width,height:h.height}}function w(e){var t=f(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function x(e){return"html"===p(e)?e:e.assignedSlot||e.parentNode||(s(e)?e.host:null)||m(e)}function S(e){return["html","body","#document"].indexOf(p(e))>=0?e.ownerDocument.body:o(e)&&v(e)?e:S(x(e))}function k(e,t){var n;void 0===t&&(t=[]);var i=S(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),s=r(i),a=o?[s].concat(s.visualViewport||[],v(i)?i:[]):i,l=t.concat(a);return o?l:l.concat(k(x(a)))}function C(e){return["table","td","th"].indexOf(p(e))>=0}function O(e){return o(e)&&"fixed"!==y(e).position?e.offsetParent:null}function M(e){for(var t=r(e),n=O(e);n&&C(n)&&"static"===y(n).position;)n=O(n);return n&&("html"===p(n)||"body"===p(n)&&"static"===y(n).position)?t:n||function(e){var t=/firefox/i.test(u());if(/Trident/i.test(u())&&o(e)&&"fixed"===y(e).position)return null;var n=x(e);for(s(n)&&(n=n.host);o(n)&&["html","body"].indexOf(p(n))<0;){var r=y(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var E="top",A="bottom",T="right",_="left",R="auto",D=[E,A,T,_],P="start",N="end",I="viewport",L="popper",j=D.reduce((function(e,t){return e.concat([t+"-"+P,t+"-"+N])}),[]),F=[].concat(D,[R]).reduce((function(e,t){return e.concat([t,t+"-"+P,t+"-"+N])}),[]),B=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function z(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var $={placement:"bottom",modifiers:[],strategy:"absolute"};function H(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function V(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,s=void 0===o?$:o;return function(e,t,n){void 0===n&&(n=s);var o,a,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},$,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,h={state:l,setOptions:function(n){var o="function"==typeof n?n(l.options):n;f(),l.options=Object.assign({},s,l.options,o),l.scrollParents={reference:i(e)?k(e):e.contextElement?k(e.contextElement):[],popper:k(t)};var a,u,d=function(e){var t=z(e);return B.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((a=[].concat(r,l.options.modifiers),u=a.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(u).map((function(e){return u[e]}))));return l.orderedModifiers=d.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:l,name:t,instance:h,options:r});c.push(o||function(){})}})),h.update()},forceUpdate:function(){if(!u){var e=l.elements,t=e.reference,n=e.popper;if(H(t,n)){l.rects={reference:b(t,M(n),"fixed"===l.options.strategy),popper:w(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<l.orderedModifiers.length;r++)if(!0!==l.reset){var i=l.orderedModifiers[r],o=i.fn,s=i.options,a=void 0===s?{}:s,c=i.name;"function"==typeof o&&(l=o({state:l,options:a,name:c,instance:h})||l)}else l.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){h.forceUpdate(),e(l)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){f(),u=!0}};if(!H(e,t))return h;function f(){c.forEach((function(e){return e()})),c=[]}return h.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),h}}var U={passive:!0};function W(e){return e.split("-")[0]}function q(e){return e.split("-")[1]}function K(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function G(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?W(i):null,s=i?q(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case E:t={x:a,y:n.y-r.height};break;case A:t={x:a,y:n.y+n.height};break;case T:t={x:n.x+n.width,y:l};break;case _:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?K(o):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case P:t[c]=t[c]-(n[u]/2-r[u]/2);break;case N:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var J={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Q(e){var t,n=e.popper,i=e.popperRect,o=e.placement,s=e.variation,a=e.offsets,l=e.position,u=e.gpuAcceleration,h=e.adaptive,f=e.roundOffsets,d=e.isFixed,p=a.x,g=void 0===p?0:p,v=a.y,b=void 0===v?0:v,w="function"==typeof f?f({x:g,y:b}):{x:g,y:b};g=w.x,b=w.y;var x=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),k=_,C=E,O=window;if(h){var R=M(n),D="clientHeight",P="clientWidth";R===r(n)&&"static"!==y(R=m(n)).position&&"absolute"===l&&(D="scrollHeight",P="scrollWidth"),(o===E||(o===_||o===T)&&s===N)&&(C=A,b-=(d&&R===O&&O.visualViewport?O.visualViewport.height:R[D])-i.height,b*=u?1:-1),o!==_&&(o!==E&&o!==A||s!==N)||(k=T,g-=(d&&R===O&&O.visualViewport?O.visualViewport.width:R[P])-i.width,g*=u?1:-1)}var I,L=Object.assign({position:l},h&&J),j=!0===f?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:c(n*i)/i||0,y:c(r*i)/i||0}}({x:g,y:b},r(n)):{x:g,y:b};return g=j.x,b=j.y,u?Object.assign({},L,((I={})[C]=S?"0":"",I[k]=x?"0":"",I.transform=(O.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",I)):Object.assign({},L,((t={})[C]=S?b+"px":"",t[k]=x?g+"px":"",t.transform="",t))}const Y={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];o(i)&&p(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});o(r)&&p(r)&&(Object.assign(r.style,s),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var X={left:"right",right:"left",bottom:"top",top:"bottom"};function Z(e){return e.replace(/left|right|bottom|top/g,(function(e){return X[e]}))}var ee={start:"end",end:"start"};function te(e){return e.replace(/start|end/g,(function(e){return ee[e]}))}function ne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&s(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function re(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ie(e,t,n){return t===I?re(function(e,t){var n=r(e),i=m(e),o=n.visualViewport,s=i.clientWidth,a=i.clientHeight,l=0,c=0;if(o){s=o.width,a=o.height;var u=h();(u||!u&&"fixed"===t)&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:l+g(e),y:c}}(e,n)):i(t)?function(e,t){var n=f(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):re(function(e){var t,n=m(e),r=d(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=a(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=a(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+g(e),c=-r.scrollTop;return"rtl"===y(i||n).direction&&(l+=a(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}(m(e)))}function oe(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function se(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ae(e,t){void 0===t&&(t={});var n=t,r=n.placement,s=void 0===r?e.placement:r,c=n.strategy,u=void 0===c?e.strategy:c,h=n.boundary,d=void 0===h?"clippingParents":h,g=n.rootBoundary,v=void 0===g?I:g,b=n.elementContext,w=void 0===b?L:b,S=n.altBoundary,C=void 0!==S&&S,O=n.padding,_=void 0===O?0:O,R=oe("number"!=typeof _?_:se(_,D)),P=w===L?"reference":L,N=e.rects.popper,j=e.elements[C?P:w],F=function(e,t,n,r){var s="clippingParents"===t?function(e){var t=k(x(e)),n=["absolute","fixed"].indexOf(y(e).position)>=0&&o(e)?M(e):e;return i(n)?t.filter((function(e){return i(e)&&ne(e,n)&&"body"!==p(e)})):[]}(e):[].concat(t),c=[].concat(s,[n]),u=c[0],h=c.reduce((function(t,n){var i=ie(e,n,r);return t.top=a(i.top,t.top),t.right=l(i.right,t.right),t.bottom=l(i.bottom,t.bottom),t.left=a(i.left,t.left),t}),ie(e,u,r));return h.width=h.right-h.left,h.height=h.bottom-h.top,h.x=h.left,h.y=h.top,h}(i(j)?j:j.contextElement||m(e.elements.popper),d,v,u),B=f(e.elements.reference),z=G({reference:B,element:N,strategy:"absolute",placement:s}),$=re(Object.assign({},N,z)),H=w===L?$:B,V={top:F.top-H.top+R.top,bottom:H.bottom-F.bottom+R.bottom,left:F.left-H.left+R.left,right:H.right-F.right+R.right},U=e.modifiersData.offset;if(w===L&&U){var W=U[s];Object.keys(V).forEach((function(e){var t=[T,A].indexOf(e)>=0?1:-1,n=[E,A].indexOf(e)>=0?"y":"x";V[e]+=W[n]*t}))}return V}function le(e,t,n){return a(e,l(t,n))}function ce(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ue(e){return[E,T,A,_].some((function(t){return e[t]>=0}))}var he=V({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,o=i.scroll,s=void 0===o||o,a=i.resize,l=void 0===a||a,c=r(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach((function(e){e.addEventListener("scroll",n.update,U)})),l&&c.addEventListener("resize",n.update,U),function(){s&&u.forEach((function(e){e.removeEventListener("scroll",n.update,U)})),l&&c.removeEventListener("resize",n.update,U)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=G({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:W(t.placement),variation:q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Q(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Q(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Y,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,s=F.reduce((function(e,n){return e[n]=function(e,t,n){var r=W(e),i=[_,E].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[_,T].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,p=void 0===d||d,m=n.allowedAutoPlacements,g=t.options.placement,y=W(g),v=l||(y!==g&&p?function(e){if(W(e)===R)return[];var t=Z(e);return[te(e),t,te(t)]}(g):[Z(g)]),b=[g].concat(v).reduce((function(e,n){return e.concat(W(n)===R?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?F:l,u=q(r),h=u?a?j:j.filter((function(e){return q(e)===u})):D,f=h.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=h);var d=f.reduce((function(t,n){return t[n]=ae(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[W(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:u,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,x=t.rects.popper,S=new Map,k=!0,C=b[0],O=0;O<b.length;O++){var M=b[O],N=W(M),I=q(M)===P,L=[E,A].indexOf(N)>=0,B=L?"width":"height",z=ae(t,{placement:M,boundary:u,rootBoundary:h,altBoundary:f,padding:c}),$=L?I?T:_:I?A:E;w[B]>x[B]&&($=Z($));var H=Z($),V=[];if(o&&V.push(z[N]<=0),a&&V.push(z[$]<=0,z[H]<=0),V.every((function(e){return e}))){C=M,k=!1;break}S.set(M,V)}if(k)for(var U=function(e){var t=b.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},K=p?3:1;K>0&&"break"!==U(K);K--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,c=void 0!==s&&s,u=n.boundary,h=n.rootBoundary,f=n.altBoundary,d=n.padding,p=n.tether,m=void 0===p||p,g=n.tetherOffset,y=void 0===g?0:g,v=ae(t,{boundary:u,rootBoundary:h,padding:d,altBoundary:f}),b=W(t.placement),x=q(t.placement),S=!x,k=K(b),C="x"===k?"y":"x",O=t.modifiersData.popperOffsets,R=t.rects.reference,D=t.rects.popper,N="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,I="number"==typeof N?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(O){if(o){var F,B="y"===k?E:_,z="y"===k?A:T,$="y"===k?"height":"width",H=O[k],V=H+v[B],U=H-v[z],G=m?-D[$]/2:0,J=x===P?R[$]:D[$],Q=x===P?-D[$]:-R[$],Y=t.elements.arrow,X=m&&Y?w(Y):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=Z[B],te=Z[z],ne=le(0,R[$],X[$]),re=S?R[$]/2-G-ne-ee-I.mainAxis:J-ne-ee-I.mainAxis,ie=S?-R[$]/2+G+ne+te+I.mainAxis:Q+ne+te+I.mainAxis,oe=t.elements.arrow&&M(t.elements.arrow),se=oe?"y"===k?oe.clientTop||0:oe.clientLeft||0:0,ce=null!=(F=null==L?void 0:L[k])?F:0,ue=H+ie-ce,he=le(m?l(V,H+re-ce-se):V,H,m?a(U,ue):U);O[k]=he,j[k]=he-H}if(c){var fe,de="x"===k?E:_,pe="x"===k?A:T,me=O[C],ge="y"===C?"height":"width",ye=me+v[de],ve=me-v[pe],be=-1!==[E,_].indexOf(b),we=null!=(fe=null==L?void 0:L[C])?fe:0,xe=be?ye:me-R[ge]-D[ge]-we+I.altAxis,Se=be?me+R[ge]+D[ge]-we-I.altAxis:ve,ke=m&&be?function(e,t,n){var r=le(e,t,n);return r>n?n:r}(xe,me,Se):le(m?xe:ye,me,m?Se:ve);O[C]=ke,j[C]=ke-me}t.modifiersData[r]=j}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=W(n.placement),l=K(a),c=[_,T].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return oe("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:se(e,D))}(i.padding,n),h=w(o),f="y"===l?E:_,d="y"===l?A:T,p=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],m=s[l]-n.rects.reference[l],g=M(o),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=p/2-m/2,b=u[f],x=y-h[c]-u[d],S=y/2-h[c]/2+v,k=le(b,S,x),C=l;n.modifiersData[r]=((t={})[C]=k,t.centerOffset=k-S,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ne(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=ae(t,{elementContext:"reference"}),a=ae(t,{altBoundary:!0}),l=ce(s,r),c=ce(a,i,o),u=ue(l),h=ue(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}}]}),fe="tippy-content",de="tippy-backdrop",pe="tippy-arrow",me="tippy-svg-arrow",ge={passive:!0,capture:!0},ye=function(){return document.body};function ve(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function be(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function we(e,t){return"function"==typeof e?e.apply(void 0,t):e}function xe(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Se(e){return[].concat(e)}function ke(e,t){-1===e.indexOf(t)&&e.push(t)}function Ce(e){return[].slice.call(e)}function Oe(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Me(e){return["Element","Fragment"].some((function(t){return be(e,t)}))}function Ee(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Ae(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Te(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function _e(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Re={isTouch:!1},De=0;function Pe(){Re.isTouch||(Re.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ne))}function Ne(){var e=performance.now();e-De<20&&(Re.isTouch=!1,document.removeEventListener("mousemove",Ne)),De=e}function Ie(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Le=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),je=Object.assign({appendTo:ye,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Fe=Object.keys(je);function Be(e){var t=(e.plugins||[]).reduce((function(t,n){var r,i=n.name,o=n.defaultValue;return i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=je[i])?r:o),t}),{});return Object.assign({},e,t)}function ze(e,t){var n=Object.assign({},t,{content:we(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Be(Object.assign({},je,{plugins:t}))):Fe).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},je.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function $e(e){var t=e.firstElementChild,n=Ce(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(fe)})),arrow:n.find((function(e){return e.classList.contains(pe)||e.classList.contains(me)})),backdrop:n.find((function(e){return e.classList.contains(de)}))}}var He=1,Ve=[],Ue=[];function We(e,t){var n,r,i,o,s,a,l,c,u=ze(e,Object.assign({},je,Be(Oe(t)))),h=!1,f=!1,d=!1,p=!1,m=[],g=xe(K,u.interactiveDebounce),y=He++,v=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:y,reference:e,popper:document.createElement("div"),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){if(!b.state.isDestroyed){P("onBeforeUpdate",[b,t]),W();var n=b.props,r=ze(e,Object.assign({},n,Oe(t),{ignoreAttributes:!0}));b.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(L(),g=xe(K,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?Se(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded"),I(),D(),S&&S(n,r),b.popperInstance&&(Y(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}))),P("onAfterUpdate",[b,t])}},setContent:function(e){b.setProps({content:e})},show:function(){var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Re.isTouch&&!b.props.touch,i=ve(b.props.duration,0,je.duration);if(!(e||t||n||r||A().hasAttribute("disabled")||(P("onShow",[b],!1),!1===b.props.onShow(b)))){if(b.state.isVisible=!0,E()&&(x.style.visibility="visible"),D(),z(),b.state.isMounted||(x.style.transition="none"),E()){var o=_();Ee([o.box,o.content],0)}var s,l,c;a=function(){var e;if(b.state.isVisible&&!p){if(p=!0,x.offsetHeight,x.style.transition=b.props.moveTransition,E()&&b.props.animation){var t=_(),n=t.box,r=t.content;Ee([n,r],i),Ae([n,r],"visible")}N(),I(),ke(Ue,b),null==(e=b.popperInstance)||e.forceUpdate(),P("onMount",[b]),b.props.animation&&E()&&function(e,t){H(e,(function(){b.state.isShown=!0,P("onShown",[b])}))}(i)}},l=b.props.appendTo,c=A(),(s=b.props.interactive&&l===ye||"parent"===l?c.parentNode:we(l,[c])).contains(x)||s.appendChild(x),b.state.isMounted=!0,Y()}},hide:function(){var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=ve(b.props.duration,1,je.duration);if(!(e||t||n)&&(P("onHide",[b],!1),!1!==b.props.onHide(b))){if(b.state.isVisible=!1,b.state.isShown=!1,p=!1,h=!1,E()&&(x.style.visibility="hidden"),L(),$(),D(!0),E()){var i=_(),o=i.box,s=i.content;b.props.animation&&(Ee([o,s],r),Ae([o,s],"hidden"))}N(),I(),b.props.animation?E()&&function(e,t){H(e,(function(){!b.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()}))}(r,b.unmount):b.unmount()}},hideWithInteractivity:function(e){T().addEventListener("mousemove",g),ke(Ve,g),g(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){b.state.isVisible&&b.hide(),b.state.isMounted&&(X(),Z().forEach((function(e){e._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x),Ue=Ue.filter((function(e){return e!==b})),b.state.isMounted=!1,P("onHidden",[b]))},destroy:function(){b.state.isDestroyed||(b.clearDelayTimeouts(),b.unmount(),W(),delete e._tippy,b.state.isDestroyed=!0,P("onDestroy",[b]))}};if(!u.render)return b;var w=u.render(b),x=w.popper,S=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+b.id,b.popper=x,e._tippy=b,x._tippy=b;var k=v.map((function(e){return e.fn(b)})),C=e.hasAttribute("aria-expanded");return U(),I(),D(),P("onCreate",[b]),u.showOnCreate&&ee(),x.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",g)})),b;function O(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function M(){return"hold"===O()[0]}function E(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function A(){return l||e}function T(){var e,t,n=A().parentNode;return n?null!=(t=Se(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function _(){return $e(x)}function R(e){return b.state.isMounted&&!b.state.isVisible||Re.isTouch||o&&"focus"===o.type?0:ve(b.props.delay,e?0:1,je.delay)}function D(e){void 0===e&&(e=!1),x.style.pointerEvents=b.props.interactive&&!e?"":"none",x.style.zIndex=""+b.props.zIndex}function P(e,t,n){var r;void 0===n&&(n=!0),k.forEach((function(n){n[e]&&n[e].apply(n,t)})),n&&(r=b.props)[e].apply(r,t)}function N(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=x.id;Se(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function I(){!C&&b.props.aria.expanded&&Se(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===A()?"true":"false"):e.removeAttribute("aria-expanded")}))}function L(){T().removeEventListener("mousemove",g),Ve=Ve.filter((function(e){return e!==g}))}function j(t){if(!Re.isTouch||!d&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!_e(x,n)){if(Se(b.props.triggerTarget||e).some((function(e){return _e(e,n)}))){if(Re.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else P("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),f=!0,setTimeout((function(){f=!1})),b.state.isMounted||$())}}}function F(){d=!0}function B(){d=!1}function z(){var e=T();e.addEventListener("mousedown",j,!0),e.addEventListener("touchend",j,ge),e.addEventListener("touchstart",B,ge),e.addEventListener("touchmove",F,ge)}function $(){var e=T();e.removeEventListener("mousedown",j,!0),e.removeEventListener("touchend",j,ge),e.removeEventListener("touchstart",B,ge),e.removeEventListener("touchmove",F,ge)}function H(e,t){var n=_().box;function r(e){e.target===n&&(Te(n,"remove",r),t())}if(0===e)return t();Te(n,"remove",s),Te(n,"add",r),s=r}function V(t,n,r){void 0===r&&(r=!1),Se(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function U(){var e;M()&&(V("touchstart",q,{passive:!0}),V("touchend",G,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(V(e,q),e){case"mouseenter":V("mouseleave",G);break;case"focus":V(Le?"focusout":"blur",J);break;case"focusin":V("focusout",J)}}))}function W(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),m=[]}function q(e){var t,n=!1;if(b.state.isEnabled&&!Q(e)&&!f){var r="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,I(),!b.state.isVisible&&be(e,"MouseEvent")&&Ve.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||h)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(h=!n),n&&!r&&te(e)}}function K(e){var t=e.target,n=A().contains(t)||x.contains(t);if("mousemove"!==e.type||!n){var r=Z().concat(x).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,s=i.placement.split("-")[0],a=i.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,u="right"===s?a.left.x:0,h="left"===s?a.right.x:0,f=t.top-r+l>o,d=r-t.bottom-c>o,p=t.left-n+u>o,m=n-t.right-h>o;return f||d||p||m}))})(r,e)&&(L(),te(e))}}function G(e){Q(e)||b.props.trigger.indexOf("click")>=0&&h||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function J(e){b.props.trigger.indexOf("focusin")<0&&e.target!==A()||b.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||te(e)}function Q(e){return!!Re.isTouch&&M()!==e.type.indexOf("touch")>=0}function Y(){X();var t=b.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,s=t.moveTransition,l=E()?$e(x).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||A()}:e,u=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(E()){var n=_().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];E()&&l&&u.push({name:"arrow",options:{element:l,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),b.popperInstance=he(c,x,Object.assign({},n,{placement:r,onFirstUpdate:a,modifiers:u}))}function X(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Z(){return Ce(x.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&P("onTrigger",[b,e]),z();var t=R(!0),r=O(),i=r[0],o=r[1];Re.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),P("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&h)){var t=R(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):i=requestAnimationFrame((function(){b.hide()}))}}else $()}}function qe(e,t){void 0===t&&(t={});var n=je.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Pe,ge),window.addEventListener("blur",Ie);var r,i=Object.assign({},t,{plugins:n}),o=(r=e,Me(r)?[r]:function(e){return be(e,"NodeList")}(r)?Ce(r):Array.isArray(r)?r:Ce(document.querySelectorAll(r))).reduce((function(e,t){var n=t&&We(t,i);return n&&e.push(n),e}),[]);return Me(e)?o[0]:o}qe.defaultProps=je,qe.setDefaultProps=function(e){Object.keys(e).forEach((function(t){je[t]=e[t]}))},qe.currentInput=Re,Object.assign({},Y,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),qe.setDefaultProps({animation:!1});const Ke=qe;var Ge=n(7294),Je=n(3935);function Qe(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Ye="undefined"!=typeof window&&"undefined"!=typeof document;function Xe(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function Ze(){return Ye&&document.createElement("div")}function et(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!et(e[n],t[n]))return!1}return!0}return!1}function tt(e){var t=[];return e.forEach((function(e){t.find((function(t){return et(e,t)}))||t.push(e)})),t}var nt=Ye?Ge.useLayoutEffect:Ge.useEffect;function rt(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var it={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||rt(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&rt(t,"remove",e.props.className)},onAfterUpdate:r}}};function ot(e){return function(t){var n,r,i=t.children,o=t.content,s=t.visible,a=t.singleton,l=t.render,c=t.reference,u=t.disabled,h=void 0!==u&&u,f=t.ignoreAttributes,d=void 0===f||f,p=(t.__source,t.__self,Qe(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),m=void 0!==s,g=void 0!==a,y=(0,Ge.useState)(!1),v=y[0],b=y[1],w=(0,Ge.useState)({}),x=w[0],S=w[1],k=(0,Ge.useState)(),C=k[0],O=k[1],M=(n=function(){return{container:Ze(),renders:1}},(r=(0,Ge.useRef)()).current||(r.current="function"==typeof n?n():n),r.current),E=Object.assign({ignoreAttributes:d},p,{content:M.container});m&&(E.trigger="manual",E.hideOnClick=!1),g&&(h=!0);var A=E,T=E.plugins||[];l&&(A=Object.assign({},E,{plugins:g&&null!=a.data?[].concat(T,[{fn:function(){return{onTrigger:function(e,t){var n=a.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,O(n.content)}}}}]):T,render:function(){return{popper:M.container}}}));var _=[c].concat(i?[i.type]:[]);return nt((function(){var t=c;c&&c.hasOwnProperty("current")&&(t=c.current);var n=e(t||M.ref||Ze(),Object.assign({},A,{plugins:[it].concat(E.plugins||[])}));return M.instance=n,h&&n.disable(),s&&n.show(),g&&a.hook({instance:n,content:o,props:A,setSingletonContent:O}),b(!0),function(){n.destroy(),null==a||a.cleanup(n)}}),_),nt((function(){var e,t,n,r,i;if(1!==M.renders){var l=M.instance;l.setProps((t=l.props,n=A,Object.assign({},n,{popperOptions:Object.assign({},t.popperOptions,n.popperOptions,{modifiers:tt([].concat((null==(r=t.popperOptions)?void 0:r.modifiers)||[],(null==(i=n.popperOptions)?void 0:i.modifiers)||[]))})}))),null==(e=l.popperInstance)||e.forceUpdate(),h?l.disable():l.enable(),m&&(s?l.show():l.hide()),g&&a.hook({instance:l,content:o,props:A,setSingletonContent:O})}else M.renders++})),nt((function(){var e;if(l){var t=M.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;x.placement===n.placement&&x.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&x.escaped===(null==r?void 0:r.hasPopperEscaped)||S({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[x.placement,x.referenceHidden,x.escaped].concat(_)),Ge.createElement(Ge.Fragment,null,i?(0,Ge.cloneElement)(i,{ref:function(e){M.ref=e,Xe(i.ref,e)}}):null,v&&(0,Je.createPortal)(l?l(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(x),C,M.instance):o,M.container))}}var st=function(e,t){return(0,Ge.forwardRef)((function(n,r){var i=n.children,o=Qe(n,["children"]);return Ge.createElement(e,Object.assign({},t,o),i?(0,Ge.cloneElement)(i,{ref:function(e){Xe(r,e),Xe(i.ref,e)}}):null)}))};const at=st(ot(Ke),{render:function(){return""}})},8307:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>qo});var r=n(7462),i=n(3366),o=n(7294),s=n(8120),a=n(2393);const l=1024;let c=0;class u{constructor(e,t){this.from=e,this.to=t}}class h{constructor(e={}){this.id=c++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=d.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}h.closedBy=new h({deserialize:e=>e.split(" ")}),h.openedBy=new h({deserialize:e=>e.split(" ")}),h.group=new h({deserialize:e=>e.split(" ")}),h.contextHash=new h({perNode:!0}),h.lookAhead=new h({perNode:!0}),h.mounted=new h({perNode:!0});const f=Object.create(null);class d{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):f,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new d(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(h.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(h.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}d.none=new d("",Object.create(null),0,8);const p=new WeakMap,m=new WeakMap;var g;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(g||(g={}));class y{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=this.prop(h.mounted);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new A(this.topNode,e)}cursorAt(e,t=0,n=0){let r=p.get(this)||this.topNode,i=new A(r);return i.moveTo(e,t),p.set(this,i._tree),i}get topNode(){return new k(this,0,0,null)}resolve(e,t=0){let n=S(p.get(this)||this.topNode,e,t,!1);return p.set(this,n),n}resolveInner(e,t=0){let n=S(m.get(this)||this.topNode,e,t,!0);return m.set(this,n),n}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e;for(let o=this.cursor((e.mode||0)|g.IncludeAnonymous);;){let e=!1;if(o.from<=i&&o.to>=r&&(o.type.isAnonymous||!1!==t(o))){if(o.firstChild())continue;e=!0}for(;e&&n&&!o.type.isAnonymous&&n(o),!o.nextSibling();){if(!o.parent())return;e=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:D(d.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new y(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new y(d.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=l,reused:o=[],minRepeatType:s=r.types.length}=e,a=Array.isArray(n)?new v(n,n.length):n,c=r.types,u=0,f=0;function d(e,t,n,l,v){let{id:w,start:x,end:S,size:k}=a,C=f;for(;k<0;){if(a.next(),-1==k){let t=o[w];return n.push(t),void l.push(x-e)}if(-3==k)return void(u=w);if(-4==k)return void(f=w);throw new RangeError(`Unrecognized record size: ${k}`)}let O,M,E=c[w],A=x-e;if(S-x<=i&&(M=function(e,t){let n=a.fork(),r=0,o=0,l=0,c=n.end-i,u={size:0,start:0,skip:0};e:for(let i=n.pos-e;n.pos>i;){let e=n.size;if(n.id==t&&e>=0){u.size=r,u.start=o,u.skip=l,l+=4,r+=4,n.next();continue}let a=n.pos-e;if(e<0||a<i||n.start<c)break;let h=n.id>=s?4:0,f=n.start;for(n.next();n.pos>a;){if(n.size<0){if(-3!=n.size)break e;h+=4}else n.id>=s&&(h+=4);n.next()}o=f,r+=e,l+=h}return(t<0||r==e)&&(u.size=r,u.start=o,u.skip=l),u.size>4?u:void 0}(a.pos-t,v))){let t=new Uint16Array(M.size-M.skip),n=a.pos-M.size,i=t.length;for(;a.pos>n;)i=g(M.start,t,i);O=new b(t,S-M.start,r),A=M.start-e}else{let e=a.pos-k;a.next();let t=[],n=[],r=w>=s?w:-1,o=0,l=S;for(;a.pos>e;)r>=0&&a.id==r&&a.size>=0?(a.end<=l-i&&(p(t,n,x,o,a.end,l,r,C),o=t.length,l=a.end),a.next()):d(x,e,t,n,r);if(r>=0&&o>0&&o<t.length&&p(t,n,x,o,x,l,r,C),t.reverse(),n.reverse(),r>-1&&o>0){let e=function(e){return(t,n,r)=>{let i,o,s=0,a=t.length-1;if(a>=0&&(i=t[a])instanceof y){if(!a&&i.type==e&&i.length==r)return i;(o=i.prop(h.lookAhead))&&(s=n[a]+i.length+o)}return m(e,t,n,r,s)}}(E);O=D(E,t,n,0,t.length,0,S-x,e,e)}else O=m(E,t,n,S-x,C-S)}n.push(O),l.push(A)}function p(e,t,n,i,o,s,a,l){let c=[],u=[];for(;e.length>i;)c.push(e.pop()),u.push(t.pop()+n-o);e.push(m(r.types[a],c,u,s-o,l-s)),t.push(o-n)}function m(e,t,n,r,i=0,o){if(u){let e=[h.contextHash,u];o=o?[e].concat(o):[e]}if(i>25){let e=[h.lookAhead,i];o=o?[e].concat(o):[e]}return new y(e,t,n,r,o)}function g(e,t,n){let{id:r,start:i,end:o,size:l}=a;if(a.next(),l>=0&&r<s){let s=n;if(l>4){let r=a.pos-(l-4);for(;a.pos>r;)n=g(e,t,n)}t[--n]=s,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else-3==l?u=r:-4==l&&(f=r);return n}let w=[],x=[];for(;a.pos>0;)d(e.start||0,e.bufferStart||0,w,x,-1);let S=null!==(t=e.length)&&void 0!==t?t:w.length?x[0]+w[0].length:0;return new y(c[e.topID],w.reverse(),x.reverse(),S)}(e)}}y.empty=new y(d.none,[],[],0);class v{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new v(this.buffer,this.index)}}class b{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return d.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),n==(e+=4))return i;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return i+"("+o.join(",")+")"}findChild(e,t,n,r,i){let{buffer:o}=this,s=-1;for(let a=e;a!=t&&!(w(i,r,o[a+1],o[a+2])&&(s=a,n>0));a=o[a+3]);return s}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),o=0;for(let s=e,a=0;s<t;){i[a++]=r[s++],i[a++]=r[s++]-n;let t=i[a++]=r[s++]-n;i[a++]=r[s++]-e,o=Math.max(o,t)}return new b(i,o,this.set)}}function w(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function x(e,t){let n=e.childBefore(t);for(;n;){let t=n.lastChild;if(!t||t.to!=n.to)break;t.type.isError&&t.from==t.to?(e=n,n=t.prevSibling):n=t}return e}function S(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof k&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=r?0:g.IgnoreOverlays;if(r)for(let r=e,s=r.parent;s;r=s,s=r.parent)r instanceof k&&r.index<0&&(null===(i=s.enter(t,n,o))||void 0===i?void 0:i.from)!=r.from&&(e=s);for(;;){let r=e.enter(t,n,o);if(!r)return e;e=r}}class k{constructor(e,t,n,r){this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,r,i=0){for(let o=this;;){for(let{children:s,positions:a}=o._tree,l=t>0?s.length:-1;e!=l;e+=t){let l=s[e],c=a[e]+o.from;if(w(r,n,c,c+l.length))if(l instanceof b){if(i&g.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,t,n-c,r);if(s>-1)return new E(new M(o,l,e,c),null,s)}else if(i&g.IncludeAnonymous||!l.type.isAnonymous||T(l)){let s;if(!(i&g.IgnoreMounts)&&l.props&&(s=l.prop(h.mounted))&&!s.overlay)return new k(s.tree,c,e,o);let a=new k(l,c,e,o);return i&g.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,n,r)}}if(i&g.IncludeAnonymous||!o.type.isAnonymous)return null;if(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let r;if(!(n&g.IgnoreOverlays)&&(r=this._tree.prop(h.mounted))&&r.overlay){let n=e-this.from;for(let{from:e,to:i}of r.overlay)if((t>0?e<=n:e<n)&&(t<0?i>=n:i>n))return new k(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new A(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return S(this,e,t,!1)}resolveInner(e,t=0){return S(this,e,t,!0)}enterUnfinishedNodesBefore(e){return x(this,e)}getChild(e,t=null,n=null){let r=C(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return C(this,e,t,n)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return O(this,e)}}function C(e,t,n,r){let i=e.cursor(),o=[];if(!i.firstChild())return o;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}function O(e,t,n=t.length-1){for(let r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class M{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class E{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new E(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&g.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new E(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new E(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new E(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new A(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let o=n.buffer[this.index+1];e.push(n.slice(r,i,o)),t.push(0)}return new y(this.type,e,t,this.to-this.from)}resolve(e,t=0){return S(this,e,t,!1)}resolveInner(e,t=0){return S(this,e,t,!0)}enterUnfinishedNodesBefore(e){return x(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,n=null){let r=C(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return C(this,e,t,n)}get node(){return this}matchContext(e){return O(this,e)}}class A{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof k)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof k?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&g.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&g.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&g.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;({index:t,_parent:n}=n))if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&g.IncludeAnonymous||e instanceof b||!e.type.isAnonymous||T(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let r=this.index,i=this.stack.length;i>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break e}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new E(this.buffer,t,this.stack[e]);return this.bufferNode=new E(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;r&&t&&t(this),r=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return O(this.node,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return O(this.node,e,r);let o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function T(e){return e.children.some((e=>e instanceof b||!e.type.isAnonymous||T(e)))}const _=new WeakMap;function R(e,t){if(!e.isAnonymous||t instanceof b||t.type!=e)return 1;let n=_.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof y)){n=1;break}n+=R(e,r)}_.set(t,n)}return n}function D(e,t,n,r,i,o,s,a,l){let c=0;for(let n=r;n<i;n++)c+=R(e,t[n]);let u=Math.ceil(1.5*c/8),h=[],f=[];return function t(n,r,i,s,a){for(let c=i;c<s;){let i=c,d=r[c],p=R(e,n[c]);for(c++;c<s;c++){let t=R(e,n[c]);if(p+t>=u)break;p+=t}if(c==i+1){if(p>u){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+a);continue}h.push(n[i])}else{let t=r[c-1]+n[c-1].length-d;h.push(D(e,n,r,i,c,d,t,null,l))}f.push(d+a-o)}}(t,n,r,i,0),(a||l)(h,f,s)}class P{constructor(e,t,n,r,i=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(i?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new P(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,o=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s<t.length?t[s]:null,u=c?c.fromA:1e9;if(u-a>=n)for(;o&&o.from<u;){let t=o;if(a>=t.from||u<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,u)-l;t=e>=n?null:new P(e,n,t.tree,t.offset+l,s>0,!!c)}if(t&&r.push(t),o.to>u)break;o=i<e.length?e[i++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return r}}class N{startParse(e,t,n){return"string"==typeof e&&(e=new I(e)),n=n?n.length?n.map((e=>new u(e.from,e.to))):[new u(0,0)]:[new u(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class I{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new h({perNode:!0});let L=0;class j{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=L++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new j([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new B;return t=>t.modified.indexOf(e)>-1?t:B.get(t.base||t,t.modified.concat(e).sort(((e,t)=>e.id-t.id)))}}let F=0;class B{constructor(){this.instances=[],this.id=F++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find((n=>{return n.base==e&&(r=t,i=n.modified,r.length==i.length&&r.every(((e,t)=>e==i[t])));var r,i}));if(n)return n;let r=[],i=new j(r,e,t);for(let e of t)e.instances.push(i);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort(((e,t)=>t.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)r.push(B.get(t,e));return i}}function z(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],i=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let s=e[t++];if(t==e.length&&"!"==s){i=0;break}if("/"!=s)throw new RangeError("Invalid path: "+e);o=e.slice(t)}let s=n.length-1,a=n[s];if(!a)throw new RangeError("Invalid path: "+e);let l=new H(r,i,s>0?n.slice(0,s):null);t[a]=l.sort(t[a])}}return $.add(t)}const $=new h;class H{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function V(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function U(e,t,n,r=0,i=e.length){let o=new W(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}H.empty=new H([],2,null);class W{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:o,from:s,to:a}=e;if(s>=n||a<=t)return;o.isTop&&(i=this.highlighters.filter((e=>!e.scope||e.scope(o))));let l=r,c=function(e){let t=e.type.prop($);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||H.empty,u=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(i,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(r+=(r?" ":"")+u)),this.startSpan(e.from,l),c.opaque)return;let f=e.tree&&e.tree.prop(h.mounted);if(f&&f.overlay){let o=e.node.enter(f.overlay[0].from+s,1),c=this.highlighters.filter((e=>!e.scope||e.scope(f.tree.type))),u=e.firstChild();for(let h=0,d=s;;h++){let p=h<f.overlay.length?f.overlay[h]:null,m=p?p.from+s:a,g=Math.max(t,d),y=Math.min(n,m);if(g<y&&u)for(;e.from<y&&(this.highlightRange(e,g,y,r,i),this.startSpan(Math.min(y,e.to),l),!(e.to>=m)&&e.nextSibling()););if(!p||m>n)break;d=p.to+s,d>t&&(this.highlightRange(o.cursor(),Math.max(t,p.from+s),Math.min(n,d),r,c),this.startSpan(d,l))}u&&e.parent()}else if(e.firstChild()){do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const q=j.define,K=q(),G=q(),J=q(G),Q=q(G),Y=q(),X=q(Y),Z=q(Y),ee=q(),te=q(ee),ne=q(),re=q(),ie=q(),oe=q(ie),se=q(),ae={comment:K,lineComment:q(K),blockComment:q(K),docComment:q(K),name:G,variableName:q(G),typeName:J,tagName:q(J),propertyName:Q,attributeName:q(Q),className:q(G),labelName:q(G),namespace:q(G),macroName:q(G),literal:Y,string:X,docString:q(X),character:q(X),attributeValue:q(X),number:Z,integer:q(Z),float:q(Z),bool:q(Y),regexp:q(Y),escape:q(Y),color:q(Y),url:q(Y),keyword:ne,self:q(ne),null:q(ne),atom:q(ne),unit:q(ne),modifier:q(ne),operatorKeyword:q(ne),controlKeyword:q(ne),definitionKeyword:q(ne),moduleKeyword:q(ne),operator:re,derefOperator:q(re),arithmeticOperator:q(re),logicOperator:q(re),bitwiseOperator:q(re),compareOperator:q(re),updateOperator:q(re),definitionOperator:q(re),typeOperator:q(re),controlOperator:q(re),punctuation:ie,separator:q(ie),bracket:oe,angleBracket:q(oe),squareBracket:q(oe),paren:q(oe),brace:q(oe),content:ee,heading:te,heading1:q(te),heading2:q(te),heading3:q(te),heading4:q(te),heading5:q(te),heading6:q(te),contentSeparator:q(ee),list:q(ee),quote:q(ee),emphasis:q(ee),strong:q(ee),link:q(ee),monospace:q(ee),strikethrough:q(ee),inserted:q(),deleted:q(),changed:q(),invalid:q(),meta:se,documentMeta:q(se),annotation:q(se),processingInstruction:q(se),definition:j.defineModifier(),constant:j.defineModifier(),function:j.defineModifier(),standard:j.defineModifier(),local:j.defineModifier(),special:j.defineModifier()};V([{tag:ae.link,class:"tok-link"},{tag:ae.heading,class:"tok-heading"},{tag:ae.emphasis,class:"tok-emphasis"},{tag:ae.strong,class:"tok-strong"},{tag:ae.keyword,class:"tok-keyword"},{tag:ae.atom,class:"tok-atom"},{tag:ae.bool,class:"tok-bool"},{tag:ae.url,class:"tok-url"},{tag:ae.labelName,class:"tok-labelName"},{tag:ae.inserted,class:"tok-inserted"},{tag:ae.deleted,class:"tok-deleted"},{tag:ae.literal,class:"tok-literal"},{tag:ae.string,class:"tok-string"},{tag:ae.number,class:"tok-number"},{tag:[ae.regexp,ae.escape,ae.special(ae.string)],class:"tok-string2"},{tag:ae.variableName,class:"tok-variableName"},{tag:ae.local(ae.variableName),class:"tok-variableName tok-local"},{tag:ae.definition(ae.variableName),class:"tok-variableName tok-definition"},{tag:ae.special(ae.variableName),class:"tok-variableName2"},{tag:ae.definition(ae.propertyName),class:"tok-propertyName tok-definition"},{tag:ae.typeName,class:"tok-typeName"},{tag:ae.namespace,class:"tok-namespace"},{tag:ae.className,class:"tok-className"},{tag:ae.macroName,class:"tok-macroName"},{tag:ae.propertyName,class:"tok-propertyName"},{tag:ae.operator,class:"tok-operator"},{tag:ae.comment,class:"tok-comment"},{tag:ae.meta,class:"tok-meta"},{tag:ae.invalid,class:"tok-invalid"},{tag:ae.punctuation,class:"tok-punctuation"}]);var le,ce=n(8699);const ue=new h,he=new h;class fe{constructor(e,t,n=[],r=""){this.data=e,this.name=r,s.yy.prototype.hasOwnProperty("tree")||Object.defineProperty(s.yy.prototype,"tree",{get(){return pe(this)}}),this.parser=t,this.extension=[ke.of(this),s.yy.languageData.of(((e,t,n)=>{let r=de(e,t,n),i=r.type.prop(ue);if(!i)return[];let o=e.facet(i),s=r.type.prop(he);if(s){let i=r.resolve(t-r.from,n);for(let t of s)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(o)}}return o}))].concat(n)}isActiveAt(e,t,n=-1){return de(e,t,n).type.prop(ue)==this.data}findRegions(e){let t=e.facet(ke);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(ue)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(h.mounted);if(i){if(i.tree.prop(ue)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof y&&r(i,e.positions[n]+t)}};return r(pe(e),0),n}get allowsNesting(){return!0}}function de(e,t,n){let r=e.facet(ke),i=pe(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,g.ExcludeBuffers))e.type.isTop&&(i=e);return i}function pe(e){let t=e.field(fe.state,!1);return t?t.tree:y.empty}fe.setState=s.Py.define();class me{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let ge=null;class ye{constructor(e,t,n=[],r,i,o,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new ye(e,t,[],y.empty,0,n,[],null)}startParse(){return this.parser.startParse(new me(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=y.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(P.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}}))}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(P.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ge;ge=this;try{return e()}finally{ge=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=ve(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:i,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i}))),n=P.applyChanges(n,t),r=y.empty,i=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);n<r&&s.push({from:n,to:r})}}}return new ye(this.parser,t,n,r,i,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=ve(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends N{createParse(t,n,r){let i=r[0].from,o=r[r.length-1].to;return{parsedPos:i,advance(){let t=ge;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new y(d.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return ge}}function ve(e,t,n){return P.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class be{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new be(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=ye.create(e.facet(ke).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new be(n)}}fe.state=s.QQ.define({create:be.init,update(e,t){for(let e of t.effects)if(e.is(fe.setState))return e.value;return t.startState.facet(ke)!=t.state.facet(ke)?be.init(t.state):e.apply(t)}});let we=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(we=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const xe="undefined"!=typeof navigator&&(null===(le=navigator.scheduling)||void 0===le?void 0:le.isInputPending)?()=>navigator.scheduling.isInputPending():null,Se=a.lg.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(fe.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(fe.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=we(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(fe.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!xe?Math.max(25,e.timeRemaining()-5):1e9),s=i.context.treeLen<r&&n.doc.length>r+1e3,a=i.context.work((()=>xe&&xe()||Date.now()>o),r+(s?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:fe.setState.of(new be(i.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>(0,a.OO)(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ke=s.r$.define({combine:e=>e.length?e[0]:null,enables:e=>[fe.state,Se,a.tk.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]}),Ce=s.r$.define(),Oe=s.r$.define({combine:e=>{if(!e.length)return"  ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Me(e){let t=e.facet(Oe);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function Ee(e,t){let n="",r=e.tabSize,i=e.facet(Oe)[0];if("\t"==i){for(;t>=r;)n+="\t",t-=r;i=" "}for(let e=0;e<t;e++)n+=i;return n}function Ae(e,t){e instanceof s.yy&&(e=new Te(e));for(let n of e.state.facet(Ce)){let r=n(e,t);if(void 0!==r)return r}let n=pe(e.state);return n?function(e,t,n){return De(t.resolveInner(n).enterUnfinishedNodesBefore(n),n,e)}(e,n,t):null}class Te{constructor(e,t={}){this.state=e,this.options=t,this.unit=Me(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=n.from&&r<=n.to?i&&r==e?{text:"",from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),o=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return o>-1&&(i+=o-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return(0,s.IS)(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const _e=new h;function Re(e){let t=e.type.prop(_e);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop(h.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>function(e,t,n,r,i){let o=e.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==e.pos+s,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),s=null==i||i<=o.from?o.to:Math.min(o.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped)return i.from<s?n:null;e=i.to}}(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*n)}(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?Pe:null}function De(e,t,n){for(;e;e=e.parent){let r=Re(e);if(r)return r(Ne.create(n,t,e))}return null}function Pe(){return 0}class Ne extends Te{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.node=n}static create(e,t,n){return new Ne(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(Ie(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?De(e,this.pos,this.base):0}}function Ie(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}const Le=s.r$.define(),je=new h;function Fe(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function Be(e,t,n){for(let r of e.facet(Le)){let i=r(e,t,n);if(i)return i}return function(e,t,n){let r=pe(e);if(r.length<n)return null;let i=null;for(let o=r.resolveInner(n,1);o;o=o.parent){if(o.to<=n||o.from>n)continue;if(i&&o.from<t)break;let s=o.type.prop(je);if(s&&(o.to<r.length-50||r.length==e.doc.length||!Fe(o))){let r=s(o,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(i=r)}}return i}(e,t,n)}function ze(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const $e=s.Py.define({map:ze}),He=s.Py.define({map:ze});function Ve(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some((e=>e.from<=n&&e.to>=n))||t.push(e.lineBlockAt(n));return t}const Ue=s.QQ.define({create:()=>a.p.none,update(e,t){e=e.map(t.changes);for(let n of t.effects)n.is($e)&&!qe(e,n.value.from,n.value.to)?e=e.update({add:[Ze.range(n.value.from,n.value.to)]}):n.is(He)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:r}=t.selection.main;e.between(r,r,((e,t)=>{e<r&&t>r&&(n=!0)})),n&&(e=e.update({filterFrom:r,filterTo:r,filter:(e,t)=>t<=r||e>=r}))}return e},provide:e=>a.tk.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,((e,t)=>{n.push(e,t)})),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");t.push(Ze.range(r,i))}return a.p.set(t,!0)}});function We(e,t,n){var r;let i=null;return null===(r=e.field(Ue,!1))||void 0===r||r.between(t,n,((e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})})),i}function qe(e,t,n){let r=!1;return e.between(t,t,((e,i)=>{e==t&&i==n&&(r=!0)})),r}function Ke(e,t){return e.field(Ue,!1)?t:t.concat(s.Py.appendConfig.of(Xe()))}function Ge(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return a.tk.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}const Je=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of Ve(e)){let n=Be(e.state,t.from,t.to);if(n)return e.dispatch({effects:Ke(e.state,[$e.of(n),Ge(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(Ue,!1))return!1;let t=[];for(let n of Ve(e)){let r=We(e.state,n.from,n.to);r&&t.push(He.of(r),Ge(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),o=Be(t,i.from,i.to);o&&n.push($e.of(o)),r=(o?e.lineBlockAt(o.to):i).to+1}return n.length&&e.dispatch({effects:Ke(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(Ue,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,((e,t)=>{n.push(He.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],Qe={placeholderDOM:null,placeholderText:"…"},Ye=s.r$.define({combine:e=>(0,s.BO)(e,Qe)});function Xe(e){let t=[Ue,nt];return e&&t.push(Ye.of(e)),t}const Ze=a.p.replace({widget:new class extends a.l9{toDOM(e){let{state:t}=e,n=t.facet(Ye),r=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=We(e.state,n.from,n.to);r&&e.dispatch({effects:He.of(r)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,r);let i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",t.phrase("folded code")),i.title=t.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=r,i}}}),et={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class tt extends a.SJ{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}const nt=a.tk.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class rt{constructor(e,t){let n;function r(e){let t=ce.V.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,o=t.scope;this.scope=o instanceof fe?e=>e.prop(ue)==o.data:o?e=>e==o:void 0,this.style=V(e.map((e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))}))),{all:i}).style,this.module=n?new ce.V(n):null,this.themeType=t.themeType}static define(e,t){return new rt(e,t||{})}}const it=s.r$.define(),ot=s.r$.define({combine:e=>e.length?[e[0]]:null});function st(e){let t=e.facet(it);return t.length?t:e.facet(ot)}function at(e,t){let n,r=[ct];return e instanceof rt&&(e.module&&r.push(a.tk.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(ot.of(e)):n?r.push(it.computeN([a.tk.darkTheme],(t=>t.facet(a.tk.darkTheme)==("dark"==n)?[e]:[]))):r.push(it.of(e)),r}class lt{constructor(e){this.markCache=Object.create(null),this.tree=pe(e.state),this.decorations=this.buildDeco(e,st(e.state))}update(e){let t=pe(e.state),n=st(e.state),r=n!=st(e.startState);t.length<e.view.viewport.to&&!r&&t.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n))}buildDeco(e,t){if(!t||!this.tree.length)return a.p.none;let n=new s.f_;for(let{from:r,to:i}of e.visibleRanges)U(this.tree,t,((e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=a.p.mark({class:r})))}),r,i);return n.finish()}}const ct=s.Wl.high(a.lg.fromClass(lt,{decorations:e=>e.decorations})),ut=rt.define([{tag:ae.meta,color:"#404740"},{tag:ae.link,textDecoration:"underline"},{tag:ae.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ae.emphasis,fontStyle:"italic"},{tag:ae.strong,fontWeight:"bold"},{tag:ae.strikethrough,textDecoration:"line-through"},{tag:ae.keyword,color:"#708"},{tag:[ae.atom,ae.bool,ae.url,ae.contentSeparator,ae.labelName],color:"#219"},{tag:[ae.literal,ae.inserted],color:"#164"},{tag:[ae.string,ae.deleted],color:"#a11"},{tag:[ae.regexp,ae.escape,ae.special(ae.string)],color:"#e40"},{tag:ae.definition(ae.variableName),color:"#00f"},{tag:ae.local(ae.variableName),color:"#30a"},{tag:[ae.typeName,ae.namespace],color:"#085"},{tag:ae.className,color:"#167"},{tag:[ae.special(ae.variableName),ae.macroName],color:"#256"},{tag:ae.definition(ae.propertyName),color:"#00c"},{tag:ae.comment,color:"#940"},{tag:ae.invalid,color:"#f00"}]),ht=a.tk.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),ft=1e4,dt="()[]{}",pt=s.r$.define({combine:e=>(0,s.BO)(e,{afterCursor:!0,brackets:dt,maxScanDistance:ft,renderMatch:yt})}),mt=a.p.mark({class:"cm-matchingBracket"}),gt=a.p.mark({class:"cm-nonmatchingBracket"});function yt(e){let t=[],n=e.matched?mt:gt;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const vt=s.QQ.define({create:()=>a.p.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(pt);for(let e of t.state.selection.ranges){if(!e.empty)continue;let i=kt(t.state,e.head,-1,r)||e.head>0&&kt(t.state,e.head-1,1,r)||r.afterCursor&&(kt(t.state,e.head,1,r)||e.head<t.state.doc.length&&kt(t.state,e.head+1,-1,r));i&&(n=n.concat(r.renderMatch(i,t.state)))}return a.p.set(n,!0)},provide:e=>a.tk.decorations.from(e)}),bt=[vt,ht],wt=new h;function xt(e,t,n){let r=e.prop(t<0?h.openedBy:h.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function St(e){let t=e.type.prop(wt);return t?t(e.node):e}function kt(e,t,n,r={}){let i=r.maxScanDistance||ft,o=r.brackets||dt,s=pe(e),a=s.resolveInner(t,n);for(let e=a;e;e=e.parent){let r=xt(e.type,n,o);if(r&&e.from<e.to){let i=St(e);if(i&&(n>0?t>=i.from&&t<i.to:t>i.from&&t<=i.to))return Ct(0,0,n,e,i,r,o)}}return function(e,t,n,r,i,o,s){let a=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),h=0;for(let e=0;!u.next().done&&e<=o;){let o=u.value;n<0&&(e+=o.length);let a=t+e*n;for(let e=n>0?0:o.length-1,t=n>0?o.length:-1;e!=t;e+=n){let t=s.indexOf(o[e]);if(!(t<0||r.resolveInner(a+e,1).type!=i))if(t%2==0==n>0)h++;else{if(1==h)return{start:c,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};h--}}n>0&&(e+=o.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,s,a.type,i,o)}function Ct(e,t,n,r,i,o,s){let a=r.parent,l={from:i.from,to:i.to},c=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from<u.to){let e=St(u);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(xt(u.type,n,s))c++;else if(xt(u.type,-n,s)){if(0==c){let e=St(u);return{start:l,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}const Ot=Object.create(null),Mt=[d.none],Et=[],At=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])At[e]=_t(Ot,t);function Tt(e,t){Et.indexOf(e)>-1||(Et.push(e),console.warn(t))}function _t(e,t){let n=null;for(let r of t.split(".")){let t=e[r]||ae[r];t?"function"==typeof t?n?n=t(n):Tt(r,`Modifier ${r} used at start of tag`):n?Tt(r,`Tag ${r} used as modifier`):n=t:Tt(r,`Unknown highlighting tag ${r}`)}if(!n)return 0;let r=t.replace(/ /g,"_"),i=d.define({id:Mt.length,name:r,props:[z({[r]:n})]});return Mt.push(i),i.id}function Rt(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}const Dt=Rt(Ft,0),Pt=Rt(jt,0),Nt=Rt(((e,t)=>jt(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to),o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from,to:i.to})}return t}(t))),0);function It(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const Lt=50;function jt(e,t,n=t.selection.ranges){let r=n.map((e=>It(t,e.from).block));if(!r.every((e=>e)))return null;let i=n.map(((e,n)=>function(e,{open:t,close:n},r,i){let o,s,a=e.sliceDoc(r-Lt,r),l=e.sliceDoc(i,i+Lt),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(l)[0].length,h=a.length-c;if(a.slice(h-t.length,h)==t&&l.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};i-r<=2*Lt?o=s=e.sliceDoc(r,i):(o=e.sliceDoc(r,r+Lt),s=e.sliceDoc(i-Lt,i));let f=/^\s*/.exec(o)[0].length,d=/\s*$/.exec(s)[0].length,p=s.length-d-n.length;return o.slice(f,f+t.length)==t&&s.slice(p,p+n.length)==n?{open:{pos:r+f+t.length,margin:/\s/.test(o.charAt(f+t.length))?1:0},close:{pos:i-d-n.length,margin:/\s/.test(s.charAt(p-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!i.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&i.some((e=>e))){let e=[];for(let t,n=0;n<i.length;n++)if(t=i[n]){let i=r[n],{open:o,close:s}=t;e.push({from:o.pos-i.open.length,to:o.pos+o.margin},{from:s.pos-s.margin,to:s.pos+i.close.length})}return{changes:e}}return null}function Ft(e,t,n=t.selection.ranges){let r=[],i=-1;for(let{from:e,to:o}of n){let n=r.length,s=1e9,a=It(t,e).line;if(a){for(let n=e;n<=o;){let l=t.doc.lineAt(n);if(l.from>i&&(e==o||o>l.from)){i=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+a.length)==a?e:-1;e<l.text.length&&e<s&&(s=e),r.push({line:l,comment:n,token:a,indent:e,empty:t,single:!1})}n=l.to+1}if(s<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=s);r.length==n+1&&(r[n].single=!0)}}if(2!=e&&r.some((e=>e.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:i,empty:o,single:s}of r)!s&&o||e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,o=r+i.length;" "==t.text[o-t.from]&&o++,e.push({from:r,to:o})}return{changes:e}}return null}const Bt=s.q6.define(),zt=s.q6.define(),$t=s.r$.define(),Ht=s.r$.define({combine:e=>(0,s.BO)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),Vt=s.QQ.define({create:()=>sn.empty,update(e,t){let n=t.state.facet(Ht),r=t.annotation(Bt);if(r){let i=t.docChanged?s.jT.single(function(e){let t=0;return e.iterChangedRanges(((e,n)=>t=n)),t}(t.changes)):void 0,o=Jt.fromTransaction(t,i),a=r.side,l=0==a?e.undone:e.done;return l=o?Qt(l,l.length,n.minDepth,o):en(l,t.startState.selection),new sn(0==a?r.rest:l,0==a?l:r.rest)}let i=t.annotation(zt);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(s.YW.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=Jt.fromTransaction(t),a=t.annotation(s.YW.time),l=t.annotation(s.YW.userEvent);return o?e=e.addChanges(o,a,l,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,l,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new sn(e.done.map(Jt.fromJSON),e.undone.map(Jt.fromJSON))});function Ut(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(Vt,!1);if(!i)return!1;let o=i.pop(e,n,t);return!!o&&(r(o),!0)}}const Wt=Ut(0,!1),qt=Ut(1,!1),Kt=Ut(0,!0),Gt=Ut(1,!0);class Jt{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new Jt(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new Jt(e.changes&&s.as.fromJSON(e.changes),[],e.mapped&&s.n0.fromJSON(e.mapped),e.startSelection&&s.jT.fromJSON(e.startSelection),e.selectionsAfter.map(s.jT.fromJSON))}static fromTransaction(e,t){let n=Xt;for(let t of e.startState.facet($t)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new Jt(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Xt)}static selection(e){return new Jt(void 0,Xt,void 0,void 0,e)}}function Qt(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}function Yt(e,t){return e.length?t.length?e.concat(t):e:t}const Xt=[],Zt=200;function en(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Zt));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Qt(e,e.length-1,1e9,n.setSelAfter(r)))}return[Jt.selection([t])]}function tn(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function nn(e,t){if(!e.length)return e;let n=e.length,r=Xt;for(;n;){let i=rn(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Jt.selection(r)]:Xt}function rn(e,t,n){let r=Yt(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):Xt,n);if(!e.changes)return Jt.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(o):o;return new Jt(i,s.Py.mapEffects(e.effects,t),a,e.startSelection.map(o),r)}const on=/^(input\.type|delete)($|\.)/;class sn{constructor(e,t,n=0,r=undefined){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new sn(this.done,this.undone):this}addChanges(e,t,n,r,i){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||on.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,function(e,t){let n=[],r=!1;return e.iterChangedRanges(((e,t)=>n.push(e,t))),t.iterChangedRanges(((e,t,i,o)=>{for(let e=0;e<n.length;){let t=n[e++],s=n[e++];o>=t&&i<=s&&(r=!0)}})),r}(s.changes,e.changes))||"input.type.compose"==n)?Qt(o,o.length-1,r.minDepth,new Jt(e.changes.compose(s.changes),Yt(e.effects,s.effects),s.mapped,s.startSelection,Xt)):Qt(o,o.length,r.minDepth,e),new sn(o,Xt,t,n)}addSelection(e,t,n,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:Xt;return i.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(o=i[i.length-1],s=e,o.ranges.length==s.ranges.length&&0===o.ranges.filter(((e,t)=>e.empty!=s.ranges[t].empty)).length)?this:new sn(en(this.done,e),this.undone,t,n);var o,s}addMapping(e){return new sn(nn(this.done,e),nn(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1];if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:Bt.of({side:e,rest:tn(r)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let n=1==r.length?Xt:r.slice(0,r.length-1);return i.mapped&&(n=nn(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:Bt.of({side:e,rest:n}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}sn.empty=new sn(Xt,Xt);const an=[{key:"Mod-z",run:Wt,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:qt,preventDefault:!0},{linux:"Ctrl-Shift-z",run:qt,preventDefault:!0},{key:"Mod-u",run:Kt,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Gt,preventDefault:!0}];function ln(e,t){return s.jT.create(e.ranges.map(t),e.mainIndex)}function cn(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function un({state:e,dispatch:t},n){let r=ln(e.selection,n);return!r.eq(e.selection)&&(t(cn(e,r)),!0)}function hn(e,t){return s.jT.cursor(t?e.to:e.from)}function fn(e,t){return un(e,(n=>n.empty?e.moveByChar(n,t):hn(n,t)))}function dn(e){return e.textDirectionAt(e.state.selection.main.head)==a.Nm.LTR}const pn=e=>fn(e,!dn(e)),mn=e=>fn(e,dn(e));function gn(e,t){return un(e,(n=>n.empty?e.moveByGroup(n,t):hn(n,t)))}function yn(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function vn(e,t,n){let r,i,o=pe(e).resolveInner(t.head),a=n?h.closedBy:h.openedBy;for(let r=t.head;;){let t=n?o.childAfter(r):o.childBefore(r);if(!t)break;yn(e,t,a)?o=t:r=n?t.to:t.from}return i=o.type.prop(a)&&(r=n?kt(e,o.from,1):kt(e,o.to,-1))&&r.matched?n?r.end.to:r.end.from:n?o.to:o.from,s.jT.cursor(i,n?-1:1)}function bn(e,t){return un(e,(n=>{if(!n.empty)return hn(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}const wn=e=>bn(e,!1),xn=e=>bn(e,!0);function Sn(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){for(let t of e.state.facet(a.tk.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(i=Math.max(null==n?void 0:n.bottom,i))}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function kn(e,t){let n,r=Sn(e),{state:i}=e,o=ln(i.selection,(n=>n.empty?e.moveVertically(n,t,r.height):hn(n,t)));if(o.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),l=s.top+r.marginTop,c=s.bottom-r.marginBottom;t&&t.top>l&&t.bottom<c&&(n=a.tk.scrollIntoView(o.main.head,{y:"start",yMargin:t.top-l}))}return e.dispatch(cn(i,o),{effects:n}),!0}const Cn=e=>kn(e,!1),On=e=>kn(e,!0);function Mn(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=s.jT.cursor(r.from+n))}return i}function En(e,t){let n=ln(e.state.selection,(e=>{let n=t(e);return s.jT.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(cn(e.state,n)),!0)}function An(e,t){return En(e,(n=>e.moveByChar(n,t)))}const Tn=e=>An(e,!dn(e)),_n=e=>An(e,dn(e));function Rn(e,t){return En(e,(n=>e.moveByGroup(n,t)))}function Dn(e,t){return En(e,(n=>e.moveVertically(n,t)))}const Pn=e=>Dn(e,!1),Nn=e=>Dn(e,!0);function In(e,t){return En(e,(n=>e.moveVertically(n,t,Sn(e).height)))}const Ln=e=>In(e,!1),jn=e=>In(e,!0),Fn=({state:e,dispatch:t})=>(t(cn(e,{anchor:0})),!0),Bn=({state:e,dispatch:t})=>(t(cn(e,{anchor:e.doc.length})),!0),zn=({state:e,dispatch:t})=>(t(cn(e,{anchor:e.selection.main.anchor,head:0})),!0),$n=({state:e,dispatch:t})=>(t(cn(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function Hn(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange((r=>{let{from:i,to:o}=r;if(i==o){let r=t(i);r<i?(n="delete.backward",r=Vn(e,r,!1)):r>i&&(n="delete.forward",r=Vn(e,r,!0)),i=Math.min(i,r),o=Math.max(o,r)}else i=Vn(e,i,!1),o=Vn(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:s.jT.cursor(i)}}));return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?a.tk.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Vn(e,t,n){if(e instanceof a.tk)for(let r of e.state.facet(a.tk.atomicRanges).map((t=>t(e))))r.between(t,t,((e,r)=>{e<t&&r>t&&(t=n?r:e)}));return t}const Un=(e,t)=>Hn(e,(n=>{let r,i,{state:o}=e,a=o.doc.lineAt(n);if(!t&&n>a.from&&n<a.from+200&&!/[^ \t]/.test(r=a.text.slice(0,n-a.from))){if("\t"==r[r.length-1])return n-1;let e=(0,s.IS)(r,o.tabSize)%Me(o)||Me(o);for(let t=0;t<e&&" "==r[r.length-1-t];t++)n--;i=n}else i=(0,s.cp)(a.text,n-a.from,t,t)+a.from,i==n&&a.number!=(t?o.doc.lines:1)&&(i+=t?1:-1);return i})),Wn=e=>Un(e,!1),qn=e=>Un(e,!0),Kn=(e,t)=>Hn(e,(n=>{let r=n,{state:i}=e,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let l=(0,s.cp)(o.text,r-o.from,t)+o.from,c=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),u=a(c);if(null!=e&&u!=e)break;" "==c&&r==n||(e=u),r=l}return r})),Gn=e=>Kn(e,!1),Jn=e=>Hn(e,(t=>{let n=e.lineBlockAt(t).to;return t<n?n:Math.min(e.state.doc.length,t+1)}));function Qn(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),o=e.doc.lineAt(r.to);if(r.empty||r.to!=o.from||(o=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}function Yn(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of Qn(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),a=o.length+1;if(n){r.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak});for(let n of t.ranges)i.push(s.jT.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)))}else{r.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text});for(let e of t.ranges)i.push(s.jT.range(e.anchor-a,e.head-a))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:s.jT.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function Xn(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of Qn(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Zn=er(!1);function er(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange((n=>{let{from:r,to:i}=n,o=t.doc.lineAt(r),a=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=pe(e).resolveInner(t),i=r.childBefore(t),o=r.childAfter(t);return i&&o&&i.to<=t&&o.from>=t&&(n=i.type.prop(h.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(o.from).from?{from:i.to,to:o.from}:null}(t,r);e&&(r=i=(i<=o.to?o:t.doc.lineAt(i)).to);let l=new Te(t,{simulateBreak:r,simulateDoubleBreak:!!a}),c=Ae(l,r);for(null==c&&(c=/^\s*/.exec(t.doc.lineAt(r).text)[0].length);i<o.to&&/\s/.test(o.text[i-o.from]);)i++;a?({from:r,to:i}=a):r>o.from&&r<o.from+100&&!/\S/.test(o.text.slice(0,r))&&(r=o.from);let u=["",Ee(t,c)];return a&&u.push(Ee(t,l.lineIndent(o.from,-1))),{changes:{from:r,to:i,insert:s.xv.of(u)},range:s.jT.cursor(r+1+u[1].length)}}));return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function tr(e,t){let n=-1;return e.changeByRange((r=>{let i=[];for(let o=r.from;o<=r.to;){let s=e.doc.lineAt(o);s.number>n&&(r.empty||r.to>s.from)&&(t(s,i,r),n=s.number),o=s.to+1}let o=e.changes(i);return{changes:i,range:s.jT.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}}))}const nr=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(tr(e,((t,n)=>{n.push({from:t.from,insert:e.facet(Oe)})})),{userEvent:"input.indent"})),!0),rr=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(tr(e,((t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=(0,s.IS)(r,e.tabSize),o=0,a=Ee(e,Math.max(0,i-Me(e)));for(;o<r.length&&o<a.length&&r.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+r.length,insert:a.slice(o)})})),{userEvent:"delete.dedent"})),!0),ir=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>un(e,(t=>vn(e.state,t,!dn(e)))),shift:e=>En(e,(t=>vn(e.state,t,!dn(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>un(e,(t=>vn(e.state,t,dn(e)))),shift:e=>En(e,(t=>vn(e.state,t,dn(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Yn(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>Xn(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Yn(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>Xn(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=s.jT.create([n.main]):n.main.empty||(r=s.jT.create([s.jT.cursor(n.main.head)])),!!r&&(t(cn(e,r)),!0)}},{key:"Mod-Enter",run:er(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=Qn(e).map((({from:t,to:n})=>s.jT.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:s.jT.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=ln(e.selection,(t=>{var n;let r=pe(e).resolveInner(t.head,1);for(;!(r.from<t.from&&r.to>=t.to||r.to>t.to&&r.from<=t.from)&&(null===(n=r.parent)||void 0===n?void 0:n.parent);)r=r.parent;return s.jT.range(r.to,r.from)}));return t(cn(e,n)),!0},preventDefault:!0},{key:"Mod-[",run:rr},{key:"Mod-]",run:nr},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Te(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=tr(e,((t,i,o)=>{let s=Ae(r,t.from);if(null==s)return;/\S/.test(t.text)||(s=0);let a=/^\s*/.exec(t.text)[0],l=Ee(e,s);(a!=l||o.from<t.from+a.length)&&(n[t.from]=s,i.push({from:t.from,to:t.from+a.length,insert:l}))}));return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Qn(t).map((({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n})))),r=ln(t.selection,(t=>e.moveVertically(t,!0))).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,n){let r=!1,i=ln(e.selection,(t=>{let i=kt(e,t.head,-1)||kt(e,t.head,1)||t.head>0&&kt(e,t.head-1,1)||t.head<e.doc.length&&kt(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let o=i.start.from==t.head?i.end.to:i.end.from;return n?s.jT.range(t.anchor,o):s.jT.cursor(o)}));return!!r&&(t(cn(e,i)),!0)}(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=It(e.state,n.from);return r.line?Dt(e):!!r.block&&Nt(e)}},{key:"Alt-A",run:Pt}].concat([{key:"ArrowLeft",run:pn,shift:Tn,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>gn(e,!dn(e)),shift:e=>Rn(e,!dn(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>un(e,(t=>Mn(e,t,!dn(e)))),shift:e=>En(e,(t=>Mn(e,t,!dn(e)))),preventDefault:!0},{key:"ArrowRight",run:mn,shift:_n,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>gn(e,dn(e)),shift:e=>Rn(e,dn(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>un(e,(t=>Mn(e,t,dn(e)))),shift:e=>En(e,(t=>Mn(e,t,dn(e)))),preventDefault:!0},{key:"ArrowUp",run:wn,shift:Pn,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Fn,shift:zn},{mac:"Ctrl-ArrowUp",run:Cn,shift:Ln},{key:"ArrowDown",run:xn,shift:Nn,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Bn,shift:$n},{mac:"Ctrl-ArrowDown",run:On,shift:jn},{key:"PageUp",run:Cn,shift:Ln},{key:"PageDown",run:On,shift:jn},{key:"Home",run:e=>un(e,(t=>Mn(e,t,!1))),shift:e=>En(e,(t=>Mn(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:Fn,shift:zn},{key:"End",run:e=>un(e,(t=>Mn(e,t,!0))),shift:e=>En(e,(t=>Mn(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:Bn,shift:$n},{key:"Enter",run:Zn},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Wn,shift:Wn},{key:"Delete",run:qn},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Gn},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>Kn(e,!0)},{mac:"Mod-Backspace",run:e=>Hn(e,(t=>{let n=e.lineBlockAt(t).from;return t>n?n:Math.max(0,t-1)}))},{mac:"Mod-Delete",run:Jn}].concat([{key:"Ctrl-b",run:pn,shift:Tn,preventDefault:!0},{key:"Ctrl-f",run:mn,shift:_n},{key:"Ctrl-p",run:wn,shift:Pn},{key:"Ctrl-n",run:xn,shift:Nn},{key:"Ctrl-a",run:e=>un(e,(t=>s.jT.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>En(e,(t=>s.jT.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>un(e,(t=>s.jT.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>En(e,(t=>s.jT.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:qn},{key:"Ctrl-h",run:Wn},{key:"Ctrl-k",run:Jn},{key:"Ctrl-Alt-h",run:Gn},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:s.xv.of(["",""])},range:s.jT.cursor(e.from)})));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:(0,s.cp)(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:(0,s.cp)(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(i,n))},range:s.jT.cursor(o)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:On}].map((e=>({mac:e.key,run:e.run,shift:e.shift}))))),or={key:"Tab",run:nr,shift:rr};function sr(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;t<arguments.length;t++)ar(e,arguments[t]);return e}function ar(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var n=0;n<t.length;n++)ar(e,t[n])}}const lr="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class cr{constructor(e,t,n=0,r=e.length,i,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(lr(e)):lr,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return(0,s.gm)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=(0,s.bg)(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,s.nZ)(e);let r=this.normalize(t);for(let e=0,i=n;;e++){let o=r.charCodeAt(e),s=this.match(o,i);if(s)return this.value=s,this;if(e==r.length-1)break;i==n&&e<t.length&&t.charCodeAt(e)==o&&i++}}}match(e,t){let n=null;for(let r=0;r<this.matches.length;r+=2){let i=this.matches[r],o=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?n={from:this.matches[r+1],to:t+1}:(this.matches[r]++,o=!0)),o||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?n={from:t,to:t+1}:this.matches.push(1,t)),n&&this.test&&!this.test(n.from,n.to,this.buffer,this.bufferPos)&&(n=null),n}}"undefined"!=typeof Symbol&&(cr.prototype[Symbol.iterator]=function(){return this});const ur={from:-1,to:-1,match:/.*/.exec("")},hr="gm"+(null==/x/.unicode?"":"u");class fr{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=ur,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new mr(e,t,n,r,i);this.re=new RegExp(t,hr+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=gr(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=gr(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}const dr=new WeakMap;class pr{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let r=dr.get(e);if(!r||r.from>=n||r.to<=t){let r=new pr(t,e.sliceString(t,n));return dr.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:o}=r;return o>t&&(i=e.sliceString(t,o)+i,o=t),r.to<n&&(i+=e.sliceString(r.to,n)),dr.set(e,new pr(o,i)),new pr(t,i.slice(t-o,n-o))}}class mr{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=ur,this.matchPos=gr(e,r),this.re=new RegExp(t,hr+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=pr.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=gr(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=pr.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function gr(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t<r.to&&(n=r.text.charCodeAt(t-r.from))>=56320&&n<57344;)t++;return t}function yr(e){let t=sr("input",{class:"cm-textfield",name:"line"});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,o,a,l,c]=n,u=l?+l.slice(1):0,h=a?+a:i.number;if(a&&c){let e=h/100;o&&(e=e*("-"==o?-1:1)+i.number/r.doc.lines),h=Math.round(r.doc.lines*e)}else a&&o&&(h=h*("-"==o?-1:1)+i.number);let f=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));e.dispatch({effects:vr.of(!1),selection:s.jT.cursor(f.from+Math.max(0,Math.min(u,f.length))),scrollIntoView:!0}),e.focus()}return{dom:sr("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:vr.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},sr("label",e.state.phrase("Go to line"),": ",t)," ",sr("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(fr.prototype[Symbol.iterator]=mr.prototype[Symbol.iterator]=function(){return this});const vr=s.Py.define(),br=s.QQ.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(vr)&&(e=n.value);return e},provide:e=>a.mH.from(e,(e=>e?yr:null))}),wr=a.tk.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),xr={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Sr=s.r$.define({combine:e=>(0,s.BO)(e,xr,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),kr=a.p.mark({class:"cm-selectionMatch"}),Cr=a.p.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Or(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==s.D0.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==s.D0.Word)}const Mr=a.lg.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Sr),{state:n}=e,r=n.selection;if(r.ranges.length>1)return a.p.none;let i,o=r.main,l=null;if(o.empty){if(!t.highlightWordAroundCursor)return a.p.none;let e=n.wordAt(o.head);if(!e)return a.p.none;l=n.charCategorizer(o.head),i=n.sliceDoc(e.from,e.to)}else{let e=o.to-o.from;if(e<t.minSelectionLength||e>200)return a.p.none;if(t.wholeWords){if(i=n.sliceDoc(o.from,o.to),l=n.charCategorizer(o.head),!Or(l,n,o.from,o.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==s.D0.Word&&e(t.sliceDoc(r-1,r))==s.D0.Word}(l,n,o.from,o.to))return a.p.none}else if(i=n.sliceDoc(o.from,o.to).trim(),!i)return a.p.none}let c=[];for(let r of e.visibleRanges){let e=new cr(n.doc,i,r.from,r.to);for(;!e.next().done;){let{from:r,to:i}=e.value;if((!l||Or(l,n,r,i))&&(o.empty&&r<=o.from&&i>=o.to?c.push(Cr.range(r,i)):(r>=o.to||i<=o.from)&&c.push(kr.range(r,i)),c.length>t.maxMatches))return a.p.none}}return a.p.set(c)}},{decorations:e=>e.decorations}),Er=a.tk.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Ar=s.r$.define({combine:e=>(0,s.BO)(e,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new ti(e),scrollToMatch:e=>a.tk.scrollIntoView(e)})});class Tr{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,hr),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Lr(this):new Dr(this)}getCursor(e,t=0,n){let r=e.doc?e:s.yy.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?Pr(this,r,t,n):Rr(this,r,t,n)}}class _r{constructor(e){this.spec=e}}function Rr(e,t,n,r){return new cr(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(i=t.doc,o=t.charCategorizer(t.selection.main.head),(e,t,n,r)=>((r>e||r+n.length<t)&&(r=Math.max(0,e-2),n=i.sliceString(r,Math.min(i.length,t+2))),!(o(Nr(n,e-r))==s.D0.Word&&o(Ir(n,e-r))==s.D0.Word||o(Ir(n,t-r))==s.D0.Word&&o(Nr(n,t-r))==s.D0.Word))):void 0);var i,o}class Dr extends _r{constructor(e){super(e)}nextMatch(e,t,n){let r=Rr(this.spec,e,n,e.doc.length).nextOverlapping();return r.done&&(r=Rr(this.spec,e,0,t).nextOverlapping()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=Rr(this.spec,e,n,r),o=null;for(;!i.nextOverlapping().done;)o=i.value;if(o)return o;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Rr(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Rr(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function Pr(e,t,n,r){return new fr(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(i(Nr(n.input,n.index))!=s.D0.Word||i(Ir(n.input,n.index))!=s.D0.Word)&&(i(Ir(n.input,n.index+n[0].length))!=s.D0.Word||i(Nr(n.input,n.index+n[0].length))!=s.D0.Word)):void 0},n,r);var i}function Nr(e,t){return e.slice((0,s.cp)(e,t,!1),t)}function Ir(e,t){return e.slice(t,(0,s.cp)(e,t))}class Lr extends _r{nextMatch(e,t,n){let r=Pr(this.spec,e,n,e.doc.length).next();return r.done&&(r=Pr(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),o=Pr(this.spec,e,i,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(i==t||s.from>i+10))return s;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,((t,n)=>"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n<e.match.length?e.match[n]:t)))}matchAll(e,t){let n=Pr(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Pr(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const jr=s.Py.define(),Fr=s.Py.define(),Br=s.QQ.define({create:e=>new zr(Yr(e).create(),null),update(e,t){for(let n of t.effects)n.is(jr)?e=new zr(n.value.create(),e.panel):n.is(Fr)&&(e=new zr(e.query,n.value?Qr:null));return e},provide:e=>a.mH.from(e,(e=>e.panel))});class zr{constructor(e,t){this.query=e,this.panel=t}}const $r=a.p.mark({class:"cm-searchMatch"}),Hr=a.p.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Vr=a.lg.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Br))}update(e){let t=e.state.field(Br);(t!=e.startState.field(Br)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return a.p.none;let{view:n}=this,r=new s.f_;for(let t=0,i=n.visibleRanges,o=i.length;t<o;t++){let{from:s,to:a}=i[t];for(;t<o-1&&a>i[t+1].from-500;)a=i[++t].to;e.highlight(n.state,s,a,((e,t)=>{let i=n.state.selection.ranges.some((n=>n.from==e&&n.to==t));r.add(e,t,i?Hr:$r)}))}return r.finish()}},{decorations:e=>e.decorations});function Ur(e){return t=>{let n=t.state.field(Br,!1);return n&&n.query.spec.valid?e(t,n):Xr(t)}}const Wr=Ur(((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=s.jT.single(r.from,r.to),o=e.state.facet(Ar);return e.dispatch({selection:i,effects:[oi(e,r),o.scrollToMatch(i.main)],userEvent:"select.search"}),!0})),qr=Ur(((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=s.jT.single(i.from,i.to),a=e.state.facet(Ar);return e.dispatch({selection:o,effects:[oi(e,i),a.scrollToMatch(o.main)],userEvent:"select.search"}),!0})),Kr=Ur(((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!(!n||!n.length||(e.dispatch({selection:s.jT.create(n.map((e=>s.jT.range(e.from,e.to)))),userEvent:"select.search.matches"}),0))})),Gr=Ur(((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,r,r);if(!o)return!1;let l,c,u=[],h=[];if(o.from==r&&o.to==i&&(c=n.toText(t.getReplacement(o)),u.push({from:o.from,to:o.to,insert:c}),o=t.nextMatch(n,o.from,o.to),h.push(a.tk.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let t=0==u.length||u[0].from>=o.to?0:o.to-o.from-c.length;l=s.jT.single(o.from-t,o.to-t),h.push(oi(e,o)),h.push(n.facet(Ar).scrollToMatch(l.main))}return e.dispatch({changes:u,selection:l,effects:h,userEvent:"input.replace"}),!0})),Jr=Ur(((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map((e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}}));if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:a.tk.announce.of(r),userEvent:"input.replace.all"}),!0}));function Qr(e){return e.state.facet(Ar).createPanel(e)}function Yr(e,t){var n,r,i,o;let s=e.selection.main,a=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!a)return t;let l=e.facet(Ar);return new Tr({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:l.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:l.literal,wholeWord:null!==(o=null==t?void 0:t.wholeWord)&&void 0!==o?o:l.wholeWord})}const Xr=e=>{let t=e.state.field(Br,!1);if(t&&t.panel){let n=(0,a.Sd)(e,Qr);if(!n)return!1;let r=n.dom.querySelector("[main-field]");if(r&&r!=e.root.activeElement){let n=Yr(e.state,t.query.spec);n.valid&&e.dispatch({effects:jr.of(n)}),r.focus(),r.select()}}else e.dispatch({effects:[Fr.of(!0),t?jr.of(Yr(e.state,t.query.spec)):s.Py.appendConfig.of(ai)]});return!0},Zr=e=>{let t=e.state.field(Br,!1);if(!t||!t.panel)return!1;let n=(0,a.Sd)(e,Qr);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Fr.of(!1)}),!0},ei=[{key:"Mod-f",run:Xr,scope:"editor search-panel"},{key:"F3",run:Wr,shift:qr,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Wr,shift:qr,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Zr,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let t=new cr(e.doc,e.sliceDoc(r,i));!t.next().done;){if(o.length>1e3)return!1;t.value.from==r&&(a=o.length),o.push(s.jT.range(t.value.from,t.value.to))}return t(e.update({selection:s.jT.create(o,a),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:e=>{let t=(0,a.Sd)(e,yr);if(!t){let n=[vr.of(!0)];null==e.state.field(br,!1)&&n.push(s.Py.appendConfig.of([br,wr])),e.dispatch({effects:n}),t=(0,a.Sd)(e,yr)}return t&&t.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:n}=e,r=s.jT.create(n.ranges.map((t=>e.wordAt(t.head)||s.jT.cursor(t.head))),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=r)))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new cr(e.doc,t,r[r.length-1].to);;){if(i.next(),!i.done){if(n&&r.some((e=>e.from==i.value.from)))continue;if(o){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}if(n)return null;i=new cr(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(s.jT.range(i.from,i.to),!1),effects:a.tk.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class ti{constructor(e){this.view=e;let t=this.query=e.state.field(Br).query.spec;function n(e,t,n){return sr("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=sr("input",{value:t.search,placeholder:ni(e,"Find"),"aria-label":ni(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=sr("input",{value:t.replace,placeholder:ni(e,"Replace"),"aria-label":ni(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=sr("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=sr("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=sr("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=sr("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",(()=>Wr(e)),[ni(e,"next")]),n("prev",(()=>qr(e)),[ni(e,"previous")]),n("select",(()=>Kr(e)),[ni(e,"all")]),sr("label",null,[this.caseField,ni(e,"match case")]),sr("label",null,[this.reField,ni(e,"regexp")]),sr("label",null,[this.wordField,ni(e,"by word")]),...e.state.readOnly?[]:[sr("br"),this.replaceField,n("replace",(()=>Gr(e)),[ni(e,"replace")]),n("replaceAll",(()=>Jr(e)),[ni(e,"replace all")])],sr("button",{name:"close",onclick:()=>Zr(e),"aria-label":ni(e,"close"),type:"button"},["×"])])}commit(){let e=new Tr({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:jr.of(e)}))}keydown(e){(0,a.$1)(this.view,e,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?qr:Wr)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),Gr(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(jr)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ar).top}}function ni(e,t){return e.state.phrase(t)}const ri=30,ii=/[\s\.,:;?!]/;function oi(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,o=Math.max(r.from,t-ri),s=Math.min(i,n+ri),l=e.state.sliceDoc(o,s);if(o!=r.from)for(let e=0;e<ri;e++)if(!ii.test(l[e+1])&&ii.test(l[e])){l=l.slice(e);break}if(s!=i)for(let e=l.length-1;e>l.length-ri;e--)if(!ii.test(l[e-1])&&ii.test(l[e])){l=l.slice(0,e);break}return a.tk.announce.of(`${e.state.phrase("current match")}. ${l} ${e.state.phrase("on line")} ${r.number}.`)}const si=a.tk.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),ai=[Br,s.Wl.lowest(Vr),si];class li{constructor(e,t,n){this.state=e,this.pos=t,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let t=pe(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(fi(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function ci(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}class ui{constructor(e,t,n){this.completion=e,this.source=t,this.match=n}}function hi(e){return e.selection.main.head}function fi(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const di=s.q6.define();function pi(e,t){const n=t.completion.apply||t.completion.label;let r=t.source;var i,o,a,l;"string"==typeof n?e.dispatch(Object.assign(Object.assign({},(i=e.state,o=n,a=r.from,l=r.to,Object.assign(Object.assign({},i.changeByRange((e=>{if(e==i.selection.main)return{changes:{from:a,to:l,insert:o},range:s.jT.cursor(a+o.length)};let t=l-a;return!e.empty||t&&i.sliceDoc(e.from-t,e.from)!=i.sliceDoc(a,l)?{range:e}:{changes:{from:e.from-t,to:e.from,insert:o},range:s.jT.cursor(e.from-t+o.length)}}))),{userEvent:"input.complete"}))),{annotations:di.of(t.completion)})):n(e,t.completion,r.from,r.to)}const mi=new WeakMap;function gi(e){if(!Array.isArray(e))return e;let t=mi.get(e);return t||mi.set(e,t=function(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[n,r]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=ci(t)+ci(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}(e)),t}class yi{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t<e.length;){let n=(0,s.gm)(e,t),r=(0,s.nZ)(n);this.chars.push(n);let i=e.slice(t,t+r),o=i.toUpperCase();this.folded.push((0,s.gm)(o==i?i.toLowerCase():o,0)),t+=r}this.astral=e.length!=this.chars.length}match(e){if(0==this.pattern.length)return[0];if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:o}=this;if(1==t.length){let r=(0,s.gm)(e,0),i=(0,s.nZ)(r),o=i==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;o+=-200}return[o,0,i]}let a=e.indexOf(this.pattern);if(0==a)return[e.length==this.pattern.length?0:-100,0,this.pattern.length];let l=t.length,c=0;if(a<0){for(let i=0,o=Math.min(e.length,200);i<o&&c<l;){let o=(0,s.gm)(e,i);o!=t[c]&&o!=n[c]||(r[c++]=i),i+=(0,s.nZ)(o)}if(c<l)return null}let u=0,h=0,f=!1,d=0,p=-1,m=-1,g=/[a-z]/.test(e),y=!0;for(let r=0,c=Math.min(e.length,200),v=0;r<c&&h<l;){let c=(0,s.gm)(e,r);a<0&&(u<l&&c==t[u]&&(i[u++]=r),d<l&&(c==t[d]||c==n[d]?(0==d&&(p=r),m=r+1,d++):d=0));let b,w=c<255?c>=48&&c<=57||c>=97&&c<=122?2:c>=65&&c<=90?1:0:(b=(0,s.bg)(c))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!r||1==w&&g||0==v&&0!=w)&&(t[h]==c||n[h]==c&&(f=!0)?o[h++]=r:o.length&&(y=!1)),v=w,r+=(0,s.nZ)(c)}return h==l&&0==o[0]&&y?this.result((f?-200:0)-100,o,e):d==l&&0==p?[-200-e.length+(m==e.length?0:-100),0,m]:a>-1?[-700-e.length,a,a+this.pattern.length]:d==l?[-900-e.length,p,m]:h==l?this.result((f?-200:0)-100-700+(y?0:-1100),o,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[e-n.length],i=1;for(let e of t){let t=e+(this.astral?(0,s.nZ)((0,s.gm)(n,e)):1);i>1&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return r}}const vi=s.r$.define({combine:e=>(0,s.BO)(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>bi(e(n),t(n)),optionClass:(e,t)=>n=>bi(e(n),t(n)),addToOptions:(e,t)=>e.concat(t)})});function bi(e,t){return e?t?e+" "+t:e:t}function wi(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class xi{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:e=>this.positionInfo(e),key:this},this.space=null,this.currentClass="";let n=e.state.field(t),{options:r,selected:i}=n.open,o=e.state.facet(vi);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n){let r=document.createElement("span");r.className="cm-completionLabel";let{label:i}=e,o=0;for(let e=1;e<n.length;){let t=n[e++],s=n[e++];t>o&&r.appendChild(document.createTextNode(i.slice(o,t)));let a=r.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(i.slice(t,s))),a.className="cm-completionMatchedText",o=s}return o<i.length&&r.appendChild(document.createTextNode(i.slice(o))),r},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort(((e,t)=>e.position-t.position)).map((e=>e.render))}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=wi(r.length,i,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(t=>{for(let n,i=t.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(n=/-(\d+)$/.exec(i.id))&&+n[1]<r.length)return pi(e,r[+n[1]]),void t.preventDefault()})),this.list=this.dom.appendChild(this.createListBox(r,n.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))}mount(){this.updateSel()}update(e){var t,n,r;let i=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),i!=o&&(this.updateSel(),(null===(t=i.open)||void 0===t?void 0:t.disabled)!=(null===(n=o.open)||void 0===n?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(r=i.open)||void 0===r?void 0:r.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=wi(t.options.length,t.selected,this.view.state.facet(vi).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(n);if(!i)return;"then"in i?i.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t)})).catch((e=>(0,a.OO)(this.view.state,e,"completion info"))):this.addInfoPane(i)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.top<n.top?e.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(e.scrollTop+=r.bottom-n.bottom)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}if(r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10)return null;let o,s=this.view.textDirection==a.Nm.RTL,l=s,c=!1,u="",h="",f=t.left-i.left,d=i.right-t.right;if(l&&f<Math.min(n.width,d)?l=!1:!l&&d<Math.min(n.width,f)&&(l=!0),n.width<=(l?f:d))u=Math.max(i.top,Math.min(r.top,i.bottom-n.height))-t.top+"px",o=Math.min(400,l?f:d)+"px";else{c=!0,o=Math.min(400,(s?t.right:i.right-t.left)-30)+"px";let e=i.bottom-t.bottom;e>=n.height||e>t.top?u=r.bottom-t.top+"px":h=t.bottom-r.top+"px"}return{top:u,bottom:h,maxWidth:o,class:c?s?"left-narrow":"right-narrow":l?"left":"right"}}positionInfo(e){this.info&&(e?(this.info.style.top=e.top,this.info.style.bottom=e.bottom,this.info.style.maxWidth=e.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+e.class):this.info.style.top="-1e6px")}createListBox(e,t,n){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let i=n.from;i<n.to;i++){let{completion:n,match:o}=e[i];const s=r.appendChild(document.createElement("li"));s.id=t+"-"+i,s.setAttribute("role","option");let a=this.optionClass(n);a&&(s.className=a);for(let e of this.optionContent){let t=e(n,this.view.state,o);t&&s.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}}function Si(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class ki{constructor(e,t,n,r,i,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new ki(this.options,Mi(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i){let o=function(e,t){let n=[],r=0;for(let i of e)if(i.hasResult())if(!1===i.result.filter){let e=i.result.getMatch;for(let t of i.result.options){let o=[1e9-r++];if(e)for(let n of e(t))o.push(n);n.push(new ui(t,i,o))}}else{let e,r=new yi(t.sliceDoc(i.from,i.to));for(let t of i.result.options)(e=r.match(t.label))&&(null!=t.boost&&(e[0]+=t.boost),n.push(new ui(t,i,e)))}let i=[],o=null,s=t.facet(vi).compareCompletions;for(let e of n.sort(((e,t)=>t.match[0]-e.match[0]||s(e.completion,t.completion))))!o||o.label!=e.completion.label||o.detail!=e.completion.detail||null!=o.type&&null!=e.completion.type&&o.type!=e.completion.type||o.apply!=e.completion.apply?i.push(e):Si(e.completion)>Si(o)&&(i[i.length-1]=e),o=e.completion;return i}(e,t);if(!o.length)return r&&e.some((e=>1==e.state))?new ki(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=t.facet(vi).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;t<o.length;t++)if(o[t].completion==e){s=t;break}}return new ki(o,Mi(n,s),{pos:e.reduce(((e,t)=>t.hasResult()?Math.min(e,t.from):e),1e8),create:(a=Ii,e=>new xi(e,a)),above:i.aboveCursor},r?r.timestamp:Date.now(),s,!1);var a}map(e){return new ki(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Ci{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Ci(Ei,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(vi),r=(n.override||t.languageDataAt("autocomplete",hi(t)).map(gi)).map((t=>(this.active.find((e=>e.source==t))||new Ti(t,this.active.some((e=>0!=e.state))?1:0)).update(e,n)));r.length==this.active.length&&r.every(((e,t)=>e==this.active[t]))&&(r=this.active);let i=this.open;i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult;)n++;for(;r<t.length&&!t[r].hasResult;)r++;let i=n==e.length,o=r==t.length;if(i||o)return i==o;if(e[n++].result!=t[r++].result)return!1}}(r,this.active)?i=ki.build(r,t,this.id,i,n):i&&i.disabled&&!r.some((e=>1==e.state))&&(i=null),!i&&r.every((e=>1!=e.state))&&r.some((e=>e.hasResult()))&&(r=r.map((e=>e.hasResult()?new Ti(e.source,0):e)));for(let t of e.effects)t.is(Ni)&&(i=i&&i.setSelected(t.value,this.id));return r==this.active&&i==this.open?this:new Ci(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Oi}}const Oi={"aria-autocomplete":"list"};function Mi(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const Ei=[];function Ai(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class Ti{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=Ai(e),r=this;n?r=r.handleUserEvent(e,n,t):e.docChanged?r=r.handleChange(e):e.selection&&0!=r.state&&(r=new Ti(r.source,0));for(let t of e.effects)if(t.is(Ri))r=new Ti(r.source,1,t.value?hi(e.state):-1);else if(t.is(Di))r=new Ti(r.source,0);else if(t.is(Pi))for(let e of t.value)e.source==r.source&&(r=e);return r}handleUserEvent(e,t,n){return"delete"!=t&&n.activateOnTyping?new Ti(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(hi(e.startState))?new Ti(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Ti(this.source,this.state,e.mapPos(this.explicitPos))}}class _i extends Ti{constructor(e,t,n,r,i){super(e,2,t),this.result=n,this.from=r,this.to=i}hasResult(){return!0}handleUserEvent(e,t,n){var r;let i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=hi(e.state);if((this.explicitPos<0?s<=i:s<this.from)||s>o||"delete"==t&&hi(e.startState)==this.from)return new Ti(this.source,"input"==t&&n.activateOnTyping?1:0);let a,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):fi(e,!0).test(i)}(this.result.validFor,e.state,i,o)?new _i(this.source,l,this.result,i,o):this.result.update&&(a=this.result.update(this.result,i,o,new li(e.state,s,l>=0)))?new _i(this.source,l,a,a.from,null!==(r=a.to)&&void 0!==r?r:hi(e.state)):new Ti(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Ti(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new _i(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const Ri=s.Py.define(),Di=s.Py.define(),Pi=s.Py.define({map:(e,t)=>e.map((e=>e.map(t)))}),Ni=s.Py.define(),Ii=s.QQ.define({create:()=>Ci.start(),update:(e,t)=>e.update(t),provide:e=>[a.hJ.from(e,(e=>e.tooltip)),a.tk.contentAttributes.from(e,(e=>e.attrs))]});function Li(e,t="option"){return n=>{let r=n.state.field(Ii,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(vi).interactionDelay)return!1;let i,o=1;"page"==t&&(i=(0,a.gB)(n,r.open.tooltip))&&(o=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,l=r.open.selected>-1?r.open.selected+o*(e?1:-1):e?0:s-1;return l<0?l="page"==t?0:s-1:l>=s&&(l="page"==t?s-1:0),n.dispatch({effects:Ni.of(l)}),!0}}class ji{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const Fi=a.lg.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of e.state.field(Ii).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(Ii);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Ii)==t)return;let n=e.transactions.some((e=>(e.selection||e.docChanged)&&!Ai(e)));for(let t=0;t<this.running.length;t++){let r=this.running[t];if(n||r.updates.length+e.transactions.length>50&&Date.now()-r.time>1e3){for(let e of r.context.abortListeners)try{e()}catch(e){(0,a.OO)(this.view.state,e)}r.context.abortListeners=null,this.running.splice(t--,1)}else r.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let t of e.transactions)"input"==Ai(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(Ii);for(let e of t.active)1!=e.state||this.running.some((t=>t.active.source==e.source))||this.startQuery(e)}startQuery(e){let{state:t}=this.view,n=hi(t),r=new li(t,n,e.explicitPos==n),i=new ji(e,r);this.running.push(i),Promise.resolve(e.source(r)).then((e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:Di.of(null)}),(0,a.OO)(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),50))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(vi);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(void 0===i.done)continue;if(this.running.splice(r--,1),i.done){let r=new _i(i.active.source,i.active.explicitPos,i.done,i.done.from,null!==(e=i.done.to)&&void 0!==e?e:hi(i.updates.length?i.updates[0].startState:this.view.state));for(let e of i.updates)r=r.update(e,n);if(r.hasResult()){t.push(r);continue}}let o=this.view.state.field(Ii).active.find((e=>e.source==i.active.source));if(o&&1==o.state)if(null==i.done){let e=new Ti(i.active.source,0);for(let t of i.updates)e=e.update(t,n);1!=e.state&&t.push(e)}else this.startQuery(o)}t.length&&this.view.dispatch({effects:Pi.of(t)})}},{eventHandlers:{blur(){let e=this.view.state.field(Ii,!1);e&&e.tooltip&&this.view.state.facet(vi).closeOnBlur&&this.view.dispatch({effects:Di.of(null)})},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Ri.of(!1)})),20),this.composing=0}}}),Bi=a.tk.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),zi={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},$i=s.Py.define({map(e,t){let n=t.mapPos(e,-1,s.gc.TrackAfter);return null==n?void 0:n}}),Hi=s.Py.define({map:(e,t)=>t.mapPos(e)}),Vi=new class extends s.uU{};Vi.startSide=1,Vi.endSide=-1;const Ui=s.QQ.define({create:()=>s.Xs.empty,update(e,t){if(t.selection){let n=t.state.doc.lineAt(t.selection.main.head).from,r=t.startState.doc.lineAt(t.startState.selection.main.head).from;n!=t.changes.mapPos(r,-1)&&(e=s.Xs.empty)}e=e.map(t.changes);for(let n of t.effects)n.is($i)?e=e.update({add:[Vi.range(n.value,n.value+1)]}):n.is(Hi)&&(e=e.update({filter:e=>e!=n.value}));return e}}),Wi="()[]{}<>";function qi(e){for(let t=0;t<Wi.length;t+=2)if(Wi.charCodeAt(t)==e)return Wi.charAt(t+1);return(0,s.bg)(e<128?e:e+1)}function Ki(e,t){return e.languageDataAt("closeBrackets",t)[0]||zi}const Gi="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Ji=a.tk.inputHandler.of(((e,t,n,r)=>{if((Gi?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==(0,s.nZ)((0,s.gm)(r,0))||t!=i.from||n!=i.to)return!1;let o=function(e,t){let n=Ki(e,e.selection.main.head),r=n.brackets||zi.brackets;for(let i of r){let o=qi((0,s.gm)(i,0));if(t==i)return o==i?to(e,i,r.indexOf(i+i+i)>-1,n):Zi(e,i,o,n.before||zi.before);if(t==o&&Yi(e,e.selection.main.from))return eo(e,0,o)}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)})),Qi=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Ki(e,e.selection.main.head).brackets||zi.brackets,r=null,i=e.changeByRange((t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return(0,s.nZ)((0,s.gm)(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let i of n)if(i==r&&Xi(e.doc,t.head)==qi((0,s.gm)(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:s.jT.cursor(t.head-i.length)}}return{range:r=t}}));return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function Yi(e,t){let n=!1;return e.field(Ui).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function Xi(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,s.nZ)((0,s.gm)(n,0)))}function Zi(e,t,n,r){let i=null,o=e.changeByRange((o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:$i.of(o.to+t.length),range:s.jT.range(o.anchor+t.length,o.head+t.length)};let a=Xi(e.doc,o.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:o.head},effects:$i.of(o.head+t.length),range:s.jT.cursor(o.head+t.length)}:{range:i=o}}));return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function eo(e,t,n){let r=null,i=e.selection.ranges.map((t=>t.empty&&Xi(e.doc,t.head)==n?s.jT.cursor(t.head+n.length):r=t));return r?null:e.update({selection:s.jT.create(i,e.selection.mainIndex),scrollIntoView:!0,effects:e.selection.ranges.map((({from:e})=>Hi.of(e)))})}function to(e,t,n,r){let i=r.stringPrefixes||zi.stringPrefixes,o=null,a=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:$i.of(r.to+t.length),range:s.jT.range(r.anchor+t.length,r.head+t.length)};let a,l=r.head,c=Xi(e.doc,l);if(c==t){if(no(e,l))return{changes:{insert:t+t,from:l},effects:$i.of(l+t.length),range:s.jT.cursor(l+t.length)};if(Yi(e,l)){let r=n&&e.sliceDoc(l,l+3*t.length)==t+t+t;return{range:s.jT.cursor(l+t.length*(r?3:1)),effects:Hi.of(l)}}}else{if(n&&e.sliceDoc(l-2*t.length,l)==t+t&&(a=ro(e,l-2*t.length,i))>-1&&no(e,a))return{changes:{insert:t+t+t+t,from:l},effects:$i.of(l+t.length),range:s.jT.cursor(l+t.length)};if(e.charCategorizer(l)(c)!=s.D0.Word&&ro(e,l,i)>-1&&!function(e,t,n,r){let i=pe(e).resolveInner(t,-1),o=r.reduce(((e,t)=>Math.max(e,t.length)),0);for(let s=0;s<5;s++){let s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),a=s.indexOf(n);if(!a||a>-1&&r.indexOf(s.slice(0,a))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=i.to==t&&i.parent;if(!l)break;i=l}return!1}(e,l,t,i))return{changes:{insert:t+t,from:l},effects:$i.of(l+t.length),range:s.jT.cursor(l+t.length)}}return{range:o=r}}));return o?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function no(e,t){let n=pe(e).resolveInner(t+1);return n.parent&&n.from==t}function ro(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=s.D0.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=s.D0.Word)return n}return-1}const io=[{key:"Ctrl-Space",run:e=>!!e.state.field(Ii,!1)&&(e.dispatch({effects:Ri.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(Ii,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:Di.of(null)}),0))}},{key:"ArrowDown",run:Li(!0)},{key:"ArrowUp",run:Li(!1)},{key:"PageDown",run:Li(!0,"page")},{key:"PageUp",run:Li(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(Ii,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||Date.now()-t.open.timestamp<e.state.facet(vi).interactionDelay||(t.open.disabled||pi(e,t.open.options[t.open.selected]),0))}}],oo=s.Wl.highest(a.$f.computeN([vi],(e=>e.facet(vi).defaultKeymap?[io]:[])));class so{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class ao{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(So).markerFilter;i&&(r=i(r));let o=a.p.set(r.map((e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?a.p.widget({widget:new Oo(e),diagnostic:e}).range(e.from):a.p.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity},diagnostic:e}).range(e.from,e.to))),!0);return new ao(o,t,lo(o))}}function lo(e,t=null,n=0){let r=null;return e.between(n,1e9,((e,n,{spec:i})=>{if(!t||i.diagnostic==t)return r=new so(e,n,i.diagnostic),!1})),r}function co(e,t){return!(!e.effects.some((e=>e.is(ho)))&&!e.changes.touchesRange(t.pos))}function uo(e,t){return e.field(mo,!1)?t:t.concat(s.Py.appendConfig.of([mo,a.tk.decorations.compute([mo],(e=>{let{selected:t,panel:n}=e.field(mo);return t&&n&&t.from!=t.to?a.p.set([go.range(t.from,t.to)]):a.p.none})),(0,a.bF)(yo,{hideOn:co}),To]))}const ho=s.Py.define(),fo=s.Py.define(),po=s.Py.define(),mo=s.QQ.define({create:()=>new ao(a.p.none,null,null),update(e,t){if(t.docChanged){let n=e.diagnostics.map(t.changes),r=null;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=lo(n,e.selected.diagnostic,i)||lo(n,null,i)}e=new ao(n,e.panel,r)}for(let n of t.effects)n.is(ho)?e=ao.init(n.value,e.panel,t.state):n.is(fo)?e=new ao(e.diagnostics,n.value?Eo.open:null,e.selected):n.is(po)&&(e=new ao(e.diagnostics,e.panel,n.value));return e},provide:e=>[a.mH.from(e,(e=>e.panel)),a.tk.decorations.from(e,(e=>e.diagnostics))]}),go=a.p.mark({class:"cm-lintRange cm-lintRange-active"});function yo(e,t,n){let{diagnostics:r}=e.state.field(mo),i=[],o=2e8,s=0;r.between(t-(n<0?1:0),t+(n>0?1:0),((e,r,{spec:a})=>{t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0))&&(i.push(a.diagnostic),o=Math.min(e,o),s=Math.max(r,s))}));let a=e.state.facet(So).tooltipFilter;return a&&(i=a(i)),i.length?{pos:o,end:s,above:e.state.doc.lineAt(o).to<s,create:()=>({dom:vo(e,i)})}:null}function vo(e,t){return sr("ul",{class:"cm-tooltip-lint"},t.map((t=>Co(e,t,!1))))}const bo=e=>{let t=e.state.field(mo,!1);return!(!t||!t.panel||(e.dispatch({effects:fo.of(!1)}),0))},wo=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(mo,!1);t&&t.panel||e.dispatch({effects:uo(e.state,[fo.of(!0)])});let n=(0,a.Sd)(e,Eo.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(mo,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)||(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),0))}}],xo=a.lg.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(So);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){let e=Date.now();if(e<this.lintTime-10)setTimeout(this.run,this.lintTime-e);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(So);Promise.all(t.map((e=>Promise.resolve(e(this.view))))).then((t=>{let n=t.reduce(((e,t)=>e.concat(t)));this.view.state.doc==e.doc&&this.view.dispatch(function(e,t){return{effects:uo(e,[ho.of(t)])}}(this.view.state,n))}),(e=>{(0,a.OO)(this.view.state,e)}))}}update(e){let t=e.state.facet(So);(e.docChanged||t!=e.startState.facet(So)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),So=s.r$.define({combine:e=>Object.assign({sources:e.map((e=>e.source))},(0,s.BO)(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t})),enables:xo});function ko(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some((e=>e.toLowerCase()==r.toLowerCase()))){t.push(r);continue e}}t.push("")}return t}function Co(e,t,n){var r;let i=n?ko(t.actions):[];return sr("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},sr("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(r=t.actions)||void 0===r?void 0:r.map(((n,r)=>{let o=!1,s=r=>{if(r.preventDefault(),o)return;o=!0;let i=lo(e.state.field(mo).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:a}=n,l=i[r]?a.indexOf(i[r]):-1,c=l<0?a:[a.slice(0,l),sr("u",a.slice(l,l+1)),a.slice(l+1)];return sr("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${i[r]})"`}.`},c)})),t.source&&sr("div",{class:"cm-diagnosticSource"},t.source))}class Oo extends a.l9{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return sr("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Mo{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Co(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Eo{constructor(e){this.view=e,this.items=[],this.list=sr("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)bo(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],r=ko(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=lo(this.view.state.field(mo).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=sr("div",{class:"cm-panel-lint"},this.list,sr("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>bo(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(mo).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(mo),n=0,r=!1,i=null;for(e.between(0,this.view.state.doc.length,((e,o,{spec:s})=>{let a,l=-1;for(let e=n;e<this.items.length;e++)if(this.items[e].diagnostic==s.diagnostic){l=e;break}l<0?(a=new Mo(this.view,s.diagnostic),this.items.splice(n,0,a),r=!0):(a=this.items[l],l>n&&(this.items.splice(n,l-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}));n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new Mo(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{e.top<t.top?this.list.scrollTop-=t.top-e.top:e.bottom>t.bottom&&(this.list.scrollTop+=e.bottom-t.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=lo(this.view.state.field(mo).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:po.of(t)})}static open(e){return new Eo(e)}}function Ao(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const To=a.tk.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ao("#d11")},".cm-lintRange-warning":{backgroundImage:Ao("orange")},".cm-lintRange-info":{backgroundImage:Ao("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});class _o extends a.SJ{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce(((e,t)=>{let n=t.severity;return"error"==n||"warning"==n&&"info"==e?n:e}),"info")}toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,r=e.state.facet(lintGutterConfig).tooltipFilter;return r&&r(n),n.length&&(t.onmouseover=()=>function(e,t,n){function r(){let r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:setLintGutterTooltip.of({pos:r.from,above:!1,create:()=>({dom:vo(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,function(e,t){let n=r=>{let i=t.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientX<i.right+10&&r.clientY>i.top-10&&r.clientY<i.bottom+10)){for(let e=r.target;e;e.parentNode)if(1==e.nodeType&&e.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",n),e.state.field(lintGutterTooltip)&&e.dispatch({effects:setLintGutterTooltip.of(null)})}};window.addEventListener("mousemove",n)}(e,t)}let{hoverTime:i}=e.state.facet(lintGutterConfig),o=setTimeout(r,i);t.onmouseout=()=>{clearTimeout(o),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(o),setTimeout(r,i)}}(e,t,n)),t}}var Ro=function(e){void 0===e&&(e={});var t=[];!1!==e.closeBracketsKeymap&&(t=t.concat(Qi)),!1!==e.defaultKeymap&&(t=t.concat(ir)),!1!==e.searchKeymap&&(t=t.concat(ei)),!1!==e.historyKeymap&&(t=t.concat(an)),!1!==e.foldKeymap&&(t=t.concat(Je)),!1!==e.completionKeymap&&(t=t.concat(io)),!1!==e.lintKeymap&&(t=t.concat(wo));var n=[];return!1!==e.lineNumbers&&n.push((0,a.Eu)()),!1!==e.highlightActiveLineGutter&&n.push((0,a.HQ)()),!1!==e.highlightSpecialChars&&n.push((0,a.AE)()),!1!==e.history&&n.push(function(e={}){return[Vt,Ht.of(e),a.tk.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?Wt:"historyRedo"==e.inputType?qt:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&n.push(function(e={}){let t=Object.assign(Object.assign({},et),e),n=new tt(t,!0),r=new tt(t,!1),i=a.lg.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(ke)!=e.state.facet(ke)||e.startState.field(Ue,!1)!=e.state.field(Ue,!1)||pe(e.startState)!=pe(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new s.f_;for(let i of e.viewportLineBlocks){let o=We(e.state,i.from,i.to)?r:Be(e.state,i.from,i.to)?n:null;o&&t.add(i.from,i.from,o)}return t.finish()}}),{domEventHandlers:o}=t;return[i,(0,a.v5)({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||s.Xs.empty},initialSpacer:()=>new tt(t,!1),domEventHandlers:Object.assign(Object.assign({},o),{click:(e,t,n)=>{if(o.click&&o.click(e,t,n))return!0;let r=We(e.state,t.from,t.to);if(r)return e.dispatch({effects:He.of(r)}),!0;let i=Be(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:$e.of(i)}),!0)}})}),Xe()]}()),!1!==e.drawSelection&&n.push((0,a.Uw)()),!1!==e.dropCursor&&n.push((0,a.qr)()),!1!==e.allowMultipleSelections&&n.push(s.yy.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&n.push(s.yy.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let o=n.sliceString(i.from,r);if(!t.some((e=>e.test(o))))return e;let{state:s}=e,a=-1,l=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==a)continue;a=t.from;let n=Ae(s,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=Ee(s,n);r!=i&&l.push({from:t.from,to:t.from+r.length,insert:i})}return l.length?[e,{changes:l,sequential:!0}]:e}))),!1!==e.syntaxHighlighting&&n.push(at(ut,{fallback:!0})),!1!==e.bracketMatching&&n.push(function(e={}){return[pt.of(e),bt]}()),!1!==e.closeBrackets&&n.push([Ji,Ui]),!1!==e.autocompletion&&n.push(function(e={}){return[Ii,vi.of(e),Fi,oo,Bi]}()),!1!==e.rectangularSelection&&n.push((0,a.Zs)()),!1!==e.crosshairCursor&&n.push((0,a.S2)()),!1!==e.highlightActiveLine&&n.push((0,a.ZO)()),!1!==e.highlightSelectionMatches&&n.push(function(e){let t=[Er,Mr];return t}()),e.tabSize&&"number"==typeof e.tabSize&&n.push(Oe.of(" ".repeat(e.tabSize))),n.concat([a.$f.of(t.flat())]).filter(Boolean)};const Do="#e06c75",Po="#abb2bf",No="#7d8799",Io="#d19a66",Lo="#2c313a",jo="#282c34",Fo="#353a42",Bo="#528bff",zo=[a.tk.theme({"&":{color:Po,backgroundColor:jo},".cm-content":{caretColor:Bo},".cm-cursor, .cm-dropCursor":{borderLeftColor:Bo},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:Po},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:jo,color:No,border:"none"},".cm-activeLineGutter":{backgroundColor:Lo},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Fo},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Fo,borderBottomColor:Fo},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Lo,color:Po}}},{dark:!0}),at(rt.define([{tag:ae.keyword,color:"#c678dd"},{tag:[ae.name,ae.deleted,ae.character,ae.propertyName,ae.macroName],color:Do},{tag:[ae.function(ae.variableName),ae.labelName],color:"#61afef"},{tag:[ae.color,ae.constant(ae.name),ae.standard(ae.name)],color:Io},{tag:[ae.definition(ae.name),ae.separator],color:Po},{tag:[ae.typeName,ae.className,ae.number,ae.changed,ae.annotation,ae.modifier,ae.self,ae.namespace],color:"#e5c07b"},{tag:[ae.operator,ae.operatorKeyword,ae.url,ae.escape,ae.regexp,ae.link,ae.special(ae.string)],color:"#56b6c2"},{tag:[ae.meta,ae.comment],color:No},{tag:ae.strong,fontWeight:"bold"},{tag:ae.emphasis,fontStyle:"italic"},{tag:ae.strikethrough,textDecoration:"line-through"},{tag:ae.link,color:No,textDecoration:"underline"},{tag:ae.heading,fontWeight:"bold",color:Do},{tag:[ae.atom,ae.bool,ae.special(ae.variableName)],color:Io},{tag:[ae.processingInstruction,ae.string,ae.inserted],color:"#98c379"},{tag:ae.invalid,color:"#ffffff"}]))];var $o=s.q6.define();function Ho(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:l,onUpdate:c,extensions:u=[],autoFocus:h,theme:f="light",height:d="",minHeight:p="",maxHeight:m="",placeholder:g="",width:y="",minWidth:v="",maxWidth:b="",editable:w=!0,readOnly:x=!1,indentWithTab:S=!0,basicSetup:k=!0,root:C,initialState:O}=e,[M,E]=(0,o.useState)(),[A,T]=(0,o.useState)(),[_,R]=(0,o.useState)(),D=a.tk.theme({"&":{height:d,minHeight:p,maxHeight:m,width:y,minWidth:v,maxWidth:b}}),P=a.tk.updateListener.of((e=>{if(e.docChanged&&"function"==typeof r&&!e.transactions.some((e=>e.annotation($o)))){var t=e.state.doc.toString();r(t,e)}i&&i((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map((t=>e.state.sliceDoc(t.from,t.to))),selectedText:e.state.selection.ranges.some((e=>!e.empty))}))(e))})),N=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i="light",placeholder:o="",basicSetup:l=!0}=e,c=[],u=a.tk.theme({"&":{backgroundColor:"#fff"}},{dark:!1});switch(t&&c.unshift(a.$f.of([or])),l&&("boolean"==typeof l?c.unshift(Ro()):c.unshift(Ro(l))),o&&c.unshift((0,a.W$)(o)),i){case"light":c.push(u);break;case"dark":c.push(zo);break;case"none":break;default:c.push(i)}return!1===n&&c.push(a.tk.editable.of(!1)),r&&c.push(s.yy.readOnly.of(!0)),[...c]}({theme:f,editable:w,readOnly:x,placeholder:g,indentWithTab:S,basicSetup:k}),I=[P,D,...N];return c&&"function"==typeof c&&I.push(a.tk.updateListener.of(c)),I=I.concat(u),(0,o.useEffect)((()=>{if(M&&!_){var e={doc:t,selection:n,extensions:I},r=O?s.yy.fromJSON(O.json,e,O.fields):s.yy.create(e);if(R(r),!A){var i=new a.tk({state:r,parent:M,root:C});T(i),l&&l(i,r)}}return()=>{A&&(R(void 0),T(void 0))}}),[M,_]),(0,o.useEffect)((()=>E(e.container)),[e.container]),(0,o.useEffect)((()=>()=>{A&&(A.destroy(),T(void 0))}),[A]),(0,o.useEffect)((()=>{h&&A&&A.focus()}),[h,A]),(0,o.useEffect)((()=>{A&&A.dispatch({effects:s.Py.reconfigure.of(I)})}),[f,u,d,p,m,y,v,b,g,w,x,S,k,r,c]),(0,o.useEffect)((()=>{if(void 0!==t){var e=A?A.state.doc.toString():"";A&&t!==e&&A.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[$o.of(!0)]})}}),[t,A]),{state:_,setState:R,view:A,setView:T,container:M,setContainer:E}}var Vo=n(5893),Uo=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Wo=(0,o.forwardRef)(((e,t)=>{var{className:n,value:s="",selection:a,extensions:l=[],onChange:c,onStatistics:u,onCreateEditor:h,onUpdate:f,autoFocus:d,theme:p="light",height:m,minHeight:g,maxHeight:y,width:v,minWidth:b,maxWidth:w,basicSetup:x,placeholder:S,indentWithTab:k,editable:C,readOnly:O,root:M,initialState:E}=e,A=(0,i.Z)(e,Uo),T=(0,o.useRef)(null),{state:_,view:R,container:D}=Ho({container:T.current,root:M,value:s,autoFocus:d,theme:p,height:m,minHeight:g,maxHeight:y,width:v,minWidth:b,maxWidth:w,basicSetup:x,placeholder:S,indentWithTab:k,editable:C,readOnly:O,selection:a,onChange:c,onStatistics:u,onCreateEditor:h,onUpdate:f,extensions:l,initialState:E});if((0,o.useImperativeHandle)(t,(()=>({editor:T.current,state:_,view:R})),[T,D,_,R]),"string"!=typeof s)throw new Error("value must be typeof string but got "+typeof s);var P="string"==typeof p?"cm-theme-"+p:"cm-theme";return(0,Vo.jsx)("div",(0,r.Z)({ref:T,className:P+(n?" "+n:"")},A))}));Wo.displayName="CodeMirror";const qo=Wo},8363:(e,t)=>{"use strict";t.Z=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):i===t}))}return!0}},1924:(e,t,n)=>{"use strict";var r=n(210),i=n(5559),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},5559:(e,t,n)=>{"use strict";var r=n(8612),i=n(210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||r.call(s,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),u=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(r,s,arguments);return l&&c&&l(t,"length").configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))}),t};var h=function(){return a(r,o,arguments)};c?c(e.exports,"apply",{value:h}):e.exports.apply=h},4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var s=i.apply(null,n);s&&e.push(s)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},8687:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(8081),i=n.n(r),o=n(3645),s=n.n(o)()(i());s.push([e.id,".rc-slider {\n  position: relative;\n  width: 100%;\n  height: 14px;\n  padding: 5px 0;\n  border-radius: 6px;\n  touch-action: none;\n  box-sizing: border-box;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider * {\n  box-sizing: border-box;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-rail {\n  position: absolute;\n  width: 100%;\n  height: 4px;\n  background-color: #e9e9e9;\n  border-radius: 6px;\n}\n.rc-slider-track {\n  position: absolute;\n  height: 4px;\n  background-color: #abe2fb;\n  border-radius: 6px;\n}\n.rc-slider-handle {\n  position: absolute;\n  width: 14px;\n  height: 14px;\n  margin-top: -5px;\n  background-color: #fff;\n  border: solid 2px #96dbfa;\n  border-radius: 50%;\n  cursor: pointer;\n  cursor: -webkit-grab;\n  cursor: grab;\n  opacity: 0.8;\n  touch-action: pan-x;\n}\n.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging {\n  border-color: #57c5f7;\n  box-shadow: 0 0 0 5px #96dbfa;\n}\n.rc-slider-handle:focus {\n  outline: none;\n  box-shadow: none;\n}\n.rc-slider-handle:focus-visible {\n  border-color: #2db7f5;\n  box-shadow: 0 0 0 3px #96dbfa;\n}\n.rc-slider-handle-click-focused:focus {\n  border-color: #96dbfa;\n  box-shadow: unset;\n}\n.rc-slider-handle:hover {\n  border-color: #57c5f7;\n}\n.rc-slider-handle:active {\n  border-color: #57c5f7;\n  box-shadow: 0 0 5px #57c5f7;\n  cursor: -webkit-grabbing;\n  cursor: grabbing;\n}\n.rc-slider-mark {\n  position: absolute;\n  top: 18px;\n  left: 0;\n  width: 100%;\n  font-size: 12px;\n}\n.rc-slider-mark-text {\n  position: absolute;\n  display: inline-block;\n  color: #999;\n  text-align: center;\n  vertical-align: middle;\n  cursor: pointer;\n}\n.rc-slider-mark-text-active {\n  color: #666;\n}\n.rc-slider-step {\n  position: absolute;\n  width: 100%;\n  height: 4px;\n  background: transparent;\n  pointer-events: none;\n}\n.rc-slider-dot {\n  position: absolute;\n  bottom: -2px;\n  width: 8px;\n  height: 8px;\n  vertical-align: middle;\n  background-color: #fff;\n  border: 2px solid #e9e9e9;\n  border-radius: 50%;\n  cursor: pointer;\n}\n.rc-slider-dot-active {\n  border-color: #96dbfa;\n}\n.rc-slider-dot-reverse {\n  margin-right: -4px;\n}\n.rc-slider-disabled {\n  background-color: #e9e9e9;\n}\n.rc-slider-disabled .rc-slider-track {\n  background-color: #ccc;\n}\n.rc-slider-disabled .rc-slider-handle,\n.rc-slider-disabled .rc-slider-dot {\n  background-color: #fff;\n  border-color: #ccc;\n  box-shadow: none;\n  cursor: not-allowed;\n}\n.rc-slider-disabled .rc-slider-mark-text,\n.rc-slider-disabled .rc-slider-dot {\n  cursor: not-allowed !important;\n}\n.rc-slider-vertical {\n  width: 14px;\n  height: 100%;\n  padding: 0 5px;\n}\n.rc-slider-vertical .rc-slider-rail {\n  width: 4px;\n  height: 100%;\n}\n.rc-slider-vertical .rc-slider-track {\n  bottom: 0;\n  left: 5px;\n  width: 4px;\n}\n.rc-slider-vertical .rc-slider-handle {\n  margin-top: 0;\n  margin-left: -5px;\n  touch-action: pan-y;\n}\n.rc-slider-vertical .rc-slider-mark {\n  top: 0;\n  left: 18px;\n  height: 100%;\n}\n.rc-slider-vertical .rc-slider-step {\n  width: 4px;\n  height: 100%;\n}\n.rc-slider-vertical .rc-slider-dot {\n  margin-left: -2px;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n  display: block !important;\n  animation-duration: 0.3s;\n  animation-fill-mode: both;\n  animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-leave {\n  display: block !important;\n  animation-duration: 0.3s;\n  animation-fill-mode: both;\n  animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,\n.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {\n  animation-name: rcSliderTooltipZoomDownIn;\n  animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {\n  animation-name: rcSliderTooltipZoomDownOut;\n  animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n  transform: scale(0, 0);\n  animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);\n}\n.rc-slider-tooltip-zoom-down-leave {\n  animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n}\n@keyframes rcSliderTooltipZoomDownIn {\n  0% {\n    transform: scale(0, 0);\n    transform-origin: 50% 100%;\n    opacity: 0;\n  }\n  100% {\n    transform: scale(1, 1);\n    transform-origin: 50% 100%;\n  }\n}\n@keyframes rcSliderTooltipZoomDownOut {\n  0% {\n    transform: scale(1, 1);\n    transform-origin: 50% 100%;\n  }\n  100% {\n    transform: scale(0, 0);\n    transform-origin: 50% 100%;\n    opacity: 0;\n  }\n}\n.rc-slider-tooltip {\n  position: absolute;\n  top: -9999px;\n  left: -9999px;\n  visibility: visible;\n  box-sizing: border-box;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-tooltip * {\n  box-sizing: border-box;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-tooltip-hidden {\n  display: none;\n}\n.rc-slider-tooltip-placement-top {\n  padding: 4px 0 8px 0;\n}\n.rc-slider-tooltip-inner {\n  min-width: 24px;\n  height: 24px;\n  padding: 6px 2px;\n  color: #fff;\n  font-size: 12px;\n  line-height: 1;\n  text-align: center;\n  text-decoration: none;\n  background-color: #6c6c6c;\n  border-radius: 6px;\n  box-shadow: 0 0 4px #d9d9d9;\n}\n.rc-slider-tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {\n  bottom: 4px;\n  left: 50%;\n  margin-left: -4px;\n  border-width: 4px 4px 0;\n  border-top-color: #6c6c6c;\n}\n",""]);const a=s},3645: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,i,o){"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!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},3832:(e,t)=>{var n;function r(e,t){var n=[],r=0;function i(e){return n.push(e),t}function o(){return n[r++]}return{tokenize:function(t){return t.replace(e,i)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),o)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",i="(?:[0-9]*\\.[0-9]+|[0-9]+)",o="direction\\s*:\\s*",s="['\"]?\\s*",a="(^|[^a-zA-Z])",l="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",c="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",u="(?:[_a-z0-9-]|"+n+"|"+c+")",h=i+"(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|-?(?:[_a-z]|"+n+"|"+c+")"+u+"*)?",f="((?:-?"+h+")|(?:inherit|auto))",d="(#?"+u+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",p="(?:[!#$%&*-~]|"+n+"|"+c+")*?",m="(?![a-zA-Z])",g="(?!("+u+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+p+s+"\\))",v="(?="+p+s+"\\))",b="(\\s*(?:!important\\s*)?[;}])",w=/`TMP`/g,x=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),S=new RegExp("("+l+g+"[^;}]+;?)","gi"),k=new RegExp("("+l+"[^\\}]*?})","gi"),C=new RegExp("("+o+")ltr","gi"),O=new RegExp("("+o+")rtl","gi"),M=new RegExp(a+"(left)"+m+y+g,"gi"),E=new RegExp(a+"(right)"+m+y+g,"gi"),A=new RegExp(a+"(left)"+v,"gi"),T=new RegExp(a+"(right)"+v,"gi"),_=new RegExp(a+"(ltr)"+v,"gi"),R=new RegExp(a+"(rtl)"+v,"gi"),D=new RegExp(a+"([ns]?)e-resize","gi"),P=new RegExp(a+"([ns]?)w-resize","gi"),N=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+f+"(\\s+)"+f+"(\\s+)"+f+"(\\s+)"+f+b,"gi"),I=new RegExp("((?:-color|border-style)\\s*:\\s*)"+d+"(\\s+)"+d+"(\\s+)"+d+"(\\s+)"+d+b,"gi"),L=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+h+")","gi"),j=new RegExp("(background-position-x\\s*:\\s*)(-?"+i+"%)","gi"),F=new RegExp("(border-radius\\s*:\\s*)"+f+"(?:(?:\\s+"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?)?(?:(?:(?:\\s*\\/\\s*)"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?(?:\\s+"+f+")?)?"+b,"gi"),B=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+f,"gi"),z=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+d,"gi"),$=new RegExp("(text-shadow\\s*:\\s*)"+d+"(\\s*)"+f,"gi"),H=new RegExp("(text-shadow\\s*:\\s*)"+f,"gi"),V=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+f+"(\\s*\\))","gi"),U=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+f+"((?:\\s*,\\s*"+f+"){0,2}\\s*\\))","gi");function W(e,t,n){var r,i;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(i=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(i)+"%"):n=100-parseFloat(n)+"%"),t+n}function q(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function K(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter((function(e){return e})),i=n.slice(6,10).filter((function(e){return e})),o=n[10]||"";return t+(i.length?q(r)+" / "+q(i):q(r))+o}function G(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function J(e,t,n){return t+G(n)}function Q(e,t,n,r,i){return t+n+G(r)+i}function Y(e,t,n,r,i){return t+n+r+G(i)}return{transform:function(n,i){var o=new r(S,"`NOFLIP_SINGLE`"),s=new r(k,"`NOFLIP_CLASS`"),a=new r(x,t);return n=a.tokenize(s.tokenize(o.tokenize(n.replace("`","%60")))),i.transformDirInUrl&&(n=n.replace(_,"$1"+e).replace(R,"$1ltr").replace(w,"rtl")),i.transformEdgeInUrl&&(n=n.replace(A,"$1"+e).replace(T,"$1left").replace(w,"right")),n=n.replace(C,"$1"+e).replace(O,"$1ltr").replace(w,"rtl").replace(M,"$1"+e).replace(E,"$1left").replace(w,"right").replace(D,"$1$2"+e).replace(P,"$1$2e-resize").replace(w,"w-resize").replace(F,K).replace(B,J).replace(z,Y).replace($,Y).replace(H,J).replace(V,Q).replace(U,Q).replace(N,"$1$2$3$8$5$6$7$4$9").replace(I,"$1$2$3$8$5$6$7$4$9").replace(L,W).replace(j,W),o.detokenize(s.detokenize(a.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var i;return"object"==typeof t?i=t:(i={},"boolean"==typeof t&&(i.transformDirInUrl=t),"boolean"==typeof r&&(i.transformEdgeInUrl=r)),n.transform(e,i)}:"undefined"!=typeof window&&(window.cssjanus=n)},296:e=>{function t(e,t,n){var r,i,o,s,a;function l(){var c=Date.now()-s;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(a=e.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,s=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(a=e.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}t.debounce=t,e.exports=t},251:(e,t,n)=>{"use strict";var r=n(3533),i=n(1924),o=n(2847),s=n(210),a=n(3216),l=n(7478),c=n(609),u=n(2584),h=n(5826),f=n(635),d=n(8923),p=n(8420),m=n(2579),g=n(2215),y=n(3679),v=n(3483),b=n(6430),w=i("ArrayBuffer.prototype.byteLength",!0)||function(e){return e.byteLength},x=i("SharedArrayBuffer.prototype.byteLength",!0),S=i("Date.prototype.getTime"),k=Object.getPrototypeOf,C=i("Object.prototype.toString"),O=s("%Set%",!0),M=i("Map.prototype.has",!0),E=i("Map.prototype.get",!0),A=i("Map.prototype.size",!0),T=i("Set.prototype.add",!0),_=i("Set.prototype.delete",!0),R=i("Set.prototype.has",!0),D=i("Set.prototype.size",!0);function P(e,t,n,r){for(var i,o=a(e);(i=o.next())&&!i.done;)if(F(t,i.value,n,r))return _(e,i.value),!0;return!1}function N(e){return void 0===e?null:"object"!=typeof e?"symbol"!=typeof e&&("string"!=typeof e&&"number"!=typeof e||+e==+e):void 0}function I(e,t,n,i,o,s){var a=N(n);if(null!=a)return a;var l=E(t,a),c=r({},o,{strict:!1});return!(void 0===l&&!M(t,a)||!F(i,l,c,s))&&!M(e,a)&&F(i,l,c,s)}function L(e,t,n){var r=N(n);return null!=r?r:R(t,r)&&!R(e,r)}function j(e,t,n,r,i,o){for(var s,l,c=a(e);(s=c.next())&&!s.done;)if(F(n,l=s.value,i,o)&&F(r,E(t,l),i,o))return _(e,l),!0;return!1}function F(e,t,n,i){var s=n||{};if(s.strict?c(e,t):e===t)return!0;if(y(e)!==y(t))return!1;if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return s.strict?c(e,t):e==t;var l,_=i.has(e),N=i.has(t);if(_&&N){if(i.get(e)===i.get(t))return!0}else l={};return _||i.set(e,l),N||i.set(t,l),function(e,t,n,i){var s,l;if(typeof e!=typeof t)return!1;if(null==e||null==t)return!1;if(C(e)!==C(t))return!1;if(u(e)!==u(t))return!1;if(h(e)!==h(t))return!1;var c=e instanceof Error,y=t instanceof Error;if(c!==y)return!1;if((c||y)&&(e.name!==t.name||e.message!==t.message))return!1;var _=p(e),N=p(t);if(_!==N)return!1;if((_||N)&&(e.source!==t.source||o(e)!==o(t)))return!1;var z=d(e),$=d(t);if(z!==$)return!1;if((z||$)&&S(e)!==S(t))return!1;if(n.strict&&k&&k(e)!==k(t))return!1;var H=b(e),V=b(t);if((H||V)&&H!==V)return!1;var U=B(e),W=B(t);if(U!==W)return!1;if(U||W){if(e.length!==t.length)return!1;for(s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}var q=f(e),K=f(t);if(q!==K)return!1;if(q||K)return w(e)===w(t)&&"function"==typeof Uint8Array&&F(new Uint8Array(e),new Uint8Array(t),n,i);var G=m(e),J=m(t);if(G!==J)return!1;if(G||J)return x(e)===x(t)&&"function"==typeof Uint8Array&&F(new Uint8Array(e),new Uint8Array(t),n,i);if(typeof e!=typeof t)return!1;var Q=g(e),Y=g(t);if(Q.length!==Y.length)return!1;for(Q.sort(),Y.sort(),s=Q.length-1;s>=0;s--)if(Q[s]!=Y[s])return!1;for(s=Q.length-1;s>=0;s--)if(!F(e[l=Q[s]],t[l],n,i))return!1;var X=v(e),Z=v(t);return X===Z&&("Set"===X||"Set"===Z?function(e,t,n,r){if(D(e)!==D(t))return!1;for(var i,o,s,l=a(e),c=a(t);(i=l.next())&&!i.done;)if(i.value&&"object"==typeof i.value)s||(s=new O),T(s,i.value);else if(!R(t,i.value)){if(n.strict)return!1;if(!L(e,t,i.value))return!1;s||(s=new O),T(s,i.value)}if(s){for(;(o=c.next())&&!o.done;)if(o.value&&"object"==typeof o.value){if(!P(s,o.value,n.strict,r))return!1}else if(!n.strict&&!R(e,o.value)&&!P(s,o.value,n.strict,r))return!1;return 0===D(s)}return!0}(e,t,n,i):"Map"!==X||function(e,t,n,i){if(A(e)!==A(t))return!1;for(var o,s,l,c,u,h,f=a(e),d=a(t);(o=f.next())&&!o.done;)if(c=o.value[0],u=o.value[1],c&&"object"==typeof c)l||(l=new O),T(l,c);else if(void 0===(h=E(t,c))&&!M(t,c)||!F(u,h,n,i)){if(n.strict)return!1;if(!I(e,t,c,u,n,i))return!1;l||(l=new O),T(l,c)}if(l){for(;(s=d.next())&&!s.done;)if(c=s.value[0],h=s.value[1],c&&"object"==typeof c){if(!j(l,e,c,h,n,i))return!1}else if(!(n.strict||e.has(c)&&F(E(e,c),h,n,i)||j(l,e,c,h,r({},n,{strict:!1}),i)))return!1;return 0===D(l)}return!0}(e,t,n,i))}(e,t,s,i)}function B(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0]||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))}e.exports=function(e,t,n){return F(e,t,n,l())}},1245:function(e,t,n){e.exports=function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};var t=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(t,n){t.exports=function(){var t="function"==typeof Promise,n="object"==typeof self?self:e,r="undefined"!=typeof Symbol,i="undefined"!=typeof Map,o="undefined"!=typeof Set,s="undefined"!=typeof WeakMap,a="undefined"!=typeof WeakSet,l="undefined"!=typeof DataView,c=r&&void 0!==Symbol.iterator,u=r&&void 0!==Symbol.toStringTag,h=o&&"function"==typeof Set.prototype.entries,f=i&&"function"==typeof Map.prototype.entries,d=h&&Object.getPrototypeOf((new Set).entries()),p=f&&Object.getPrototypeOf((new Map).entries()),m=c&&"function"==typeof Array.prototype[Symbol.iterator],g=m&&Object.getPrototypeOf([][Symbol.iterator]()),y=c&&"function"==typeof String.prototype[Symbol.iterator],v=y&&Object.getPrototypeOf(""[Symbol.iterator]()),b=8,w=-1;function x(e){var r=typeof e;if("object"!==r)return r;if(null===e)return"null";if(e===n)return"global";if(Array.isArray(e)&&(!1===u||!(Symbol.toStringTag in e)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&e===window.location)return"Location";if("object"==typeof window.document&&e===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&e===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&e===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&e instanceof window.HTMLElement){if("BLOCKQUOTE"===e.tagName)return"HTMLQuoteElement";if("TD"===e.tagName)return"HTMLTableDataCellElement";if("TH"===e.tagName)return"HTMLTableHeaderCellElement"}}var c=u&&e[Symbol.toStringTag];if("string"==typeof c)return c;var h=Object.getPrototypeOf(e);return h===RegExp.prototype?"RegExp":h===Date.prototype?"Date":t&&h===Promise.prototype?"Promise":o&&h===Set.prototype?"Set":i&&h===Map.prototype?"Map":a&&h===WeakSet.prototype?"WeakSet":s&&h===WeakMap.prototype?"WeakMap":l&&h===DataView.prototype?"DataView":i&&h===p?"Map Iterator":o&&h===d?"Set Iterator":m&&h===g?"Array Iterator":y&&h===v?"String Iterator":null===h?"Object":Object.prototype.toString.call(e).slice(b,w)}return x}()}));const r="undefined"!=typeof Buffer,i=r&&void 0!==Buffer.from,o=r?function(e){return Buffer.isBuffer(e)}:function(){return!1},s=i?function(e){return Buffer.from(e)}:r?function(e){return new Buffer(e)}:function(e){return e};function a(e){return o(e)?"Buffer":t(e)}const l=new Set(["Arguments","Array","Map","Object","Set"]);function c(e,t,n=null){switch(n||a(e)){case"Arguments":case"Array":case"Object":return e[t];case"Map":return e.get(t);case"Set":return t}}function u(e){return l.has(e)}function h(e,t,n,r=null){switch(r||a(e)){case"Arguments":case"Array":case"Object":e[t]=n;break;case"Map":e.set(t,n);break;case"Set":e.add(n)}return e}const f="undefined"!=typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis,d=void 0!==n.g&&null!==n.g&&n.g.Object===Object&&n.g,p="undefined"!=typeof self&&null!==self&&self.Object===Object&&self,m=f||d||p||Function("return this")();function g(e,t){return m[t].from?m[t].from(e):new m[t](e)}function y(e){return e}function v(){return[]}var b=new Map([["ArrayBuffer",function(e){return e.slice(0)}],["Boolean",function(e){return new Boolean(e.valueOf())}],["Buffer",function(e){return s(e)}],["DataView",function(e){return new DataView(e.buffer)}],["Date",function(e){return new Date(e.getTime())}],["Number",function(e){return new Number(e)}],["RegExp",function(e){return new RegExp(e.source,e.flags)}],["String",function(e){return new String(e)}],["Float32Array",g],["Float64Array",g],["Int16Array",g],["Int32Array",g],["Int8Array",g],["Uint16Array",g],["Uint32Array",g],["Uint8Array",g],["Uint8ClampedArray",g],["Array Iterator",y],["Map Iterator",y],["Promise",y],["Set Iterator",y],["String Iterator",y],["function",y],["global",y],["WeakMap",y],["WeakSet",y],["boolean",y],["null",y],["number",y],["string",y],["symbol",y],["undefined",y],["Arguments",v],["Array",v],["Map",function(){return new Map}],["Object",function(){return{}}],["Set",function(){return new Set}]]);function w(){}function x(e,t=null,n=w){2===arguments.length&&"function"==typeof t&&(n=t,t=null);const r=t||a(e),i=b.get(r);if("Object"===r){const t=n(e,r);if(void 0!==t)return t}return i?i(e,r):e}function S(e,t,n,r,i){const o=a(e),s=x(e,o);if(!u(o))return s;let l;switch(o){case"Arguments":case"Array":l=Object.keys(e);break;case"Object":l=Object.keys(e),l.push(...Object.getOwnPropertySymbols(e));break;case"Map":case"Set":l=e.keys()}for(let i of l){const s=c(e,i,o);if(r.has(s))h(t,i,n.get(s),o);else{const e=a(s),l=x(s,e);u(e)&&(n.set(s,l),r.add(s)),h(t,i,S(s,l,n,r),o)}}return t}return function(e,t={}){"function"==typeof t&&(t={customizer:t});const{customizer:n}=t,r=a(e);if(!u(r))return S(e,null,null,null);const i=x(e,r,n);return S(e,i,new WeakMap([[e,i]]),new WeakSet([e]))}}()},4289:(e,t,n)=>{"use strict";var r=n(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,l=n(1044)(),c=a&&l,u=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(i=r)||"[object Function]"!==o.call(i)||!r())return;var i;c?a(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},h=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=s.call(o,Object.getOwnPropertySymbols(t)));for(var a=0;a<o.length;a+=1)u(e,o[a],t[o[a]],n[o[a]])};h.supportsDescriptors=!!c,e.exports=h},9180:function(e,t,n){var r,i,o;!function(s,a){"use strict";i=[n(9829)],void 0===(o="function"==typeof(r=function(e){var t=/(^|@)\S+:\d+/,n=/^\s*at .*(\S+:\d+|\(native\))/m,r=/^(eval@)?(\[native code])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(n))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter((function(e){return!!e.match(n)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;var i=this.extractLocation(r?r[1]:n),o=r&&n||void 0,s=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new e({functionName:o,fileName:s,lineNumber:i[1],columnNumber:i[2],source:t})}),this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter((function(e){return!e.match(r)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(n),i=r&&r[1]?r[1]:void 0,o=this.extractLocation(t.replace(n,""));return new e({functionName:i,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),i=[],o=2,s=r.length;o<s;o+=2){var a=n.exec(r[o]);a&&i.push(new e({fileName:a[2],lineNumber:a[1],source:r[o]}))}return i},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),i=[],o=0,s=r.length;o<s;o+=2){var a=n.exec(r[o]);a&&i.push(new e({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:r[o]}))}return i},parseOpera11:function(n){return n.stack.split("\n").filter((function(e){return!!e.match(t)&&!e.match(/^Error created at/)}),this).map((function(t){var n,r=t.split("@"),i=this.extractLocation(r.pop()),o=r.shift()||"",s=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;o.match(/\(([^)]*)\)/)&&(n=o.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new e({functionName:s,args:a,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})}),this)}}})?r.apply(t,i):r)||(e.exports=o)}()},4029:(e,t,n)=>{"use strict";var r=n(5320),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=n),"[object Array]"===i.call(e)?function(e,t,n){for(var r=0,i=e.length;r<i;r++)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s):"string"==typeof e?function(e,t,n){for(var r=0,i=e.length;r<i;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)}(e,t,s):function(e,t,n){for(var r in e)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s)}},7648:e=>{"use strict";var t=Array.prototype.slice,n=Object.prototype.toString;e.exports=function(e){var r=this;if("function"!=typeof r||"[object Function]"!==n.call(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var i,o=t.call(arguments,1),s=Math.max(0,r.length-o.length),a=[],l=0;l<s;l++)a.push("$"+l);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var n=r.apply(this,o.concat(t.call(arguments)));return Object(n)===n?n:this}return r.apply(e,o.concat(t.call(arguments)))})),r.prototype){var c=function(){};c.prototype=r.prototype,i.prototype=new c,c.prototype=null}return i}},8612:(e,t,n)=>{"use strict";var r=n(7648);e.exports=Function.prototype.bind||r},5972:e=>{"use strict";var t=function(){return"string"==typeof function(){}.name},n=Object.getOwnPropertyDescriptor;if(n)try{n([],"length")}catch(e){n=null}t.functionsHaveConfigurableNames=function(){if(!t()||!n)return!1;var e=n((function(){}),"name");return!!e&&!!e.configurable};var r=Function.prototype.bind;t.boundFunctionsHaveNames=function(){return t()&&"function"==typeof r&&""!==function(){}.bind().name},e.exports=t},210:(e,t,n)=>{"use strict";var r,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new s},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,h=n(1405)(),f=Object.getPrototypeOf||function(e){return e.__proto__},d={},p="undefined"==typeof Uint8Array?r:f(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":h?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?f(""[Symbol.iterator]()):r,"%Symbol%":h?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":p,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};try{null.error}catch(e){var g=f(f(e));m["%Error.prototype%"]=g}var y=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=f(i.prototype))}return m[t]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=n(8612),w=n(7642),x=b.call(Function.call,Array.prototype.concat),S=b.call(Function.apply,Array.prototype.splice),k=b.call(Function.call,String.prototype.replace),C=b.call(Function.call,String.prototype.slice),O=b.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E=/\\(\\)?/g,A=function(e,t){var n,r=e;if(w(v,r)&&(r="%"+(n=v[r])[0]+"%"),w(m,r)){var o=m[r];if(o===d&&(o=y(r)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=C(e,0,1),n=C(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return k(e,M,(function(e,t,n,i){r[r.length]=n?k(i,E,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=A("%"+r+"%",t),a=o.name,c=o.value,u=!1,h=o.alias;h&&(r=h[0],S(n,x([0,1],h)));for(var f=1,d=!0;f<n.length;f+=1){var p=n[f],g=C(p,0,1),y=C(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(u=!0),w(m,a="%"+(r+="."+p)+"%"))c=m[a];else if(null!=c){if(!(p in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&f+1>=n.length){var v=l(c,p);c=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[p]}else d=w(c,p),c=c[p];d&&!u&&(m[a]=c)}}return c}},7296:(e,t,n)=>{"use strict";var r=n(210)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},932:e=>{"use strict";var t="undefined"!=typeof BigInt&&BigInt;e.exports=function(){return"function"==typeof t&&"function"==typeof BigInt&&"bigint"==typeof t(42)&&"bigint"==typeof BigInt(42)}},1044:(e,t,n)=>{"use strict";var r=n(210)("%Object.defineProperty%",!0),i=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(5419);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},6410:(e,t,n)=>{"use strict";var r=n(5419);e.exports=function(){return r()&&!!Symbol.toStringTag}},7642:(e,t,n)=>{"use strict";var r=n(8612);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},8679:(e,t,n)=>{"use strict";var r=n(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=d(n);i&&i!==p&&e(t,i,r)}var s=u(n);h&&(s=s.concat(h(n)));for(var a=l(t),m=l(n),g=0;g<s.length;++g){var y=s[g];if(!(o[y]||r&&r[y]||m&&m[y]||a&&a[y])){var v=f(n,y);try{c(t,y,v)}catch(e){}}}}return t}},9496:(e,t,n)=>{"use strict";var r=n(210),i=n(7642),o=n(7478)(),s=r("%TypeError%"),a={assert:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`O` is not an object");if("string"!=typeof t)throw new s("`slot` must be a string");if(o.assert(e),!a.has(e,t))throw new s("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`O` is not an object");if("string"!=typeof t)throw new s("`slot` must be a string");var n=o.get(e);return n&&n["$"+t]},has:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`O` is not an object");if("string"!=typeof t)throw new s("`slot` must be a string");var n=o.get(e);return!!n&&i(n,"$"+t)},set:function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`O` is not an object");if("string"!=typeof t)throw new s("`slot` must be a string");var r=o.get(e);r||(r={},o.set(e,r)),r["$"+t]=n}};Object.freeze&&Object.freeze(a),e.exports=a},2584:(e,t,n)=>{"use strict";var r=n(6410)(),i=n(1924)("Object.prototype.toString"),o=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},s=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,e.exports=a?o:s},635:(e,t,n)=>{"use strict";var r=n(5559),i=n(1924),o=n(210),s=n(5692),a=o("ArrayBuffer",!0),l=o("Float32Array",!0),c=i("ArrayBuffer.prototype.byteLength",!0),u=a&&!c&&(new a).slice,h=u&&r(u);e.exports=c||h?function(e){if(!e||"object"!=typeof e)return!1;try{return c?c(e):h(e,0),!0}catch(e){return!1}}:l?function(e){try{return new l(e).buffer===e&&!s(e)}catch(t){return"object"==typeof e&&"RangeError"===t.name}}:function(e){return!1}},3376:(e,t,n)=>{"use strict";if(n(932)()){var r=BigInt.prototype.valueOf;e.exports=function(e){return null!=e&&"boolean"!=typeof e&&"string"!=typeof e&&"number"!=typeof e&&"symbol"!=typeof e&&"function"!=typeof e&&("bigint"==typeof e||function(e){try{return r.call(e),!0}catch(e){}return!1}(e))}}else e.exports=function(e){return!1}},6814:(e,t,n)=>{"use strict";var r=n(1924),i=r("Boolean.prototype.toString"),o=r("Object.prototype.toString"),s=n(6410)();e.exports=function(e){return"boolean"==typeof e||null!==e&&"object"==typeof e&&(s&&Symbol.toStringTag in e?function(e){try{return i(e),!0}catch(e){return!1}}(e):"[object Boolean]"===o(e))}},5320:e=>{"use strict";var t,n,r=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},i((function(){throw 42}),null,t)}catch(e){e!==n&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(e){try{var t=r.call(e);return o.test(t)}catch(e){return!1}},a=function(e){try{return!s(e)&&(r.call(e),!0)}catch(e){return!1}},l=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),h=function(){return!1};if("object"==typeof document){var f=document.all;l.call(f)===l.call(document.all)&&(h=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(h(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==n)return!1}return!s(e)&&a(e)}:function(e){if(h(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(s(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},8923:(e,t,n)=>{"use strict";var r=Date.prototype.getDay,i=Object.prototype.toString,o=n(6410)();e.exports=function(e){return"object"==typeof e&&null!==e&&(o?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Date]"===i.call(e))}},8379:e=>{"use strict";var t,n="function"==typeof Map&&Map.prototype?Map:null,r="function"==typeof Set&&Set.prototype?Set:null;n||(t=function(e){return!1});var i=n?Map.prototype.has:null,o=r?Set.prototype.has:null;t||i||(t=function(e){return!1}),e.exports=t||function(e){if(!e||"object"!=typeof e)return!1;try{if(i.call(e),o)try{o.call(e)}catch(e){return!0}return e instanceof n}catch(e){}return!1}},4578:(e,t,n)=>{"use strict";var r=Number.prototype.toString,i=Object.prototype.toString,o=n(6410)();e.exports=function(e){return"number"==typeof e||"object"==typeof e&&(o?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Number]"===i.call(e))}},8420:(e,t,n)=>{"use strict";var r,i,o,s,a=n(1924),l=n(6410)();if(l){r=a("Object.prototype.hasOwnProperty"),i=a("RegExp.prototype.exec"),o={};var c=function(){throw o};s={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),h=Object.getOwnPropertyDescriptor;e.exports=l?function(e){if(!e||"object"!=typeof e)return!1;var t=h(e,"lastIndex");if(!t||!r(t,"value"))return!1;try{i(e,s)}catch(e){return e===o}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},9572:e=>{"use strict";var t,n="function"==typeof Map&&Map.prototype?Map:null,r="function"==typeof Set&&Set.prototype?Set:null;r||(t=function(e){return!1});var i=n?Map.prototype.has:null,o=r?Set.prototype.has:null;t||o||(t=function(e){return!1}),e.exports=t||function(e){if(!e||"object"!=typeof e)return!1;try{if(o.call(e),i)try{i.call(e)}catch(e){return!0}return e instanceof r}catch(e){}return!1}},2579:(e,t,n)=>{"use strict";var r=n(1924)("SharedArrayBuffer.prototype.byteLength",!0);e.exports=r?function(e){if(!e||"object"!=typeof e)return!1;try{return r(e),!0}catch(e){return!1}}:function(e){return!1}},9981:(e,t,n)=>{"use strict";var r=String.prototype.valueOf,i=Object.prototype.toString,o=n(6410)();e.exports=function(e){return"string"==typeof e||"object"==typeof e&&(o?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object String]"===i.call(e))}},2636:(e,t,n)=>{"use strict";var r=Object.prototype.toString;if(n(1405)()){var i=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&o.test(i.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},5692:(e,t,n)=>{"use strict";var r=n(4029),i=n(3083),o=n(1924),s=o("Object.prototype.toString"),a=n(6410)(),l=n(7296),c="undefined"==typeof globalThis?n.g:globalThis,u=i(),h=o("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},f=o("String.prototype.slice"),d={},p=Object.getPrototypeOf;a&&l&&p&&r(u,(function(e){var t=new c[e];if(Symbol.toStringTag in t){var n=p(t),r=l(n,Symbol.toStringTag);if(!r){var i=p(n);r=l(i,Symbol.toStringTag)}d[e]=r.get}})),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a||!(Symbol.toStringTag in e)){var t=f(s(e),8,-1);return h(u,t)>-1}return!!l&&function(e){var t=!1;return r(d,(function(n,r){if(!t)try{t=n.call(e)===r}catch(e){}})),t}(e)}},1718:e=>{"use strict";var t,n="function"==typeof WeakMap&&WeakMap.prototype?WeakMap:null,r="function"==typeof WeakSet&&WeakSet.prototype?WeakSet:null;n||(t=function(e){return!1});var i=n?n.prototype.has:null,o=r?r.prototype.has:null;t||i||(t=function(e){return!1}),e.exports=t||function(e){if(!e||"object"!=typeof e)return!1;try{if(i.call(e,i),o)try{o.call(e,o)}catch(e){return!0}return e instanceof n}catch(e){}return!1}},5899:(e,t,n)=>{"use strict";var r=n(210),i=n(1924),o=r("%WeakSet%",!0),s=i("WeakSet.prototype.has",!0);if(s){var a=i("WeakMap.prototype.has",!0);e.exports=function(e){if(!e||"object"!=typeof e)return!1;try{if(s(e,s),a)try{a(e,a)}catch(e){return!0}return e instanceof o}catch(e){}return!1}}else e.exports=function(e){return!1}},5826:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},6486:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=32,c=128,u=1/0,h=9007199254740991,f=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",w="[object Function]",x="[object GeneratorFunction]",S="[object Map]",k="[object Number]",C="[object Object]",O="[object Promise]",M="[object RegExp]",E="[object Set]",A="[object String]",T="[object Symbol]",_="[object WeakMap]",R="[object ArrayBuffer]",D="[object DataView]",P="[object Float32Array]",N="[object Float64Array]",I="[object Int8Array]",L="[object Int16Array]",j="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",z="[object Uint16Array]",$="[object Uint32Array]",H=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,K=RegExp(W.source),G=RegExp(q.source),J=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Me="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="["+xe+"]",Te="["+Ee+"]",_e="["+Se+"]",Re="\\d+",De="["+ke+"]",Pe="["+Ce+"]",Ne="[^"+xe+Ee+Re+ke+Ce+Oe+"]",Ie="\\ud83c[\\udffb-\\udfff]",Le="[^"+xe+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Oe+"]",ze="\\u200d",$e="(?:"+Pe+"|"+Ne+")",He="(?:"+Be+"|"+Ne+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",Ue="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+_e+"|"+Ie+")?",qe="["+Me+"]?",Ke=qe+We+"(?:"+ze+"(?:"+[Le,je,Fe].join("|")+")"+qe+We+")*",Ge="(?:"+[De,je,Fe].join("|")+")"+Ke,Je="(?:"+[Le+_e+"?",_e,je,Fe,Ae].join("|")+")",Qe=RegExp("['’]","g"),Ye=RegExp(_e,"g"),Xe=RegExp(Ie+"(?="+Ie+")|"+Je+Ke,"g"),Ze=RegExp([Be+"?"+Pe+"+"+Ve+"(?="+[Te,Be,"$"].join("|")+")",He+"+"+Ue+"(?="+[Te,Be+$e,"$"].join("|")+")",Be+"?"+$e+"+"+Ve,Be+"+"+Ue,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Ge].join("|"),"g"),et=RegExp("["+ze+xe+Se+Me+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[P]=it[N]=it[I]=it[L]=it[j]=it[F]=it[B]=it[z]=it[$]=!0,it[m]=it[g]=it[R]=it[y]=it[D]=it[v]=it[b]=it[w]=it[S]=it[k]=it[C]=it[M]=it[E]=it[A]=it[_]=!1;var ot={};ot[m]=ot[g]=ot[R]=ot[D]=ot[y]=ot[v]=ot[P]=ot[N]=ot[I]=ot[L]=ot[j]=ot[S]=ot[k]=ot[C]=ot[M]=ot[E]=ot[A]=ot[T]=ot[F]=ot[B]=ot[z]=ot[$]=!0,ot[b]=ot[w]=ot[_]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,lt=parseInt,ct="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ut="object"==typeof self&&self&&self.Object===Object&&self,ht=ct||ut||Function("return this")(),ft=t&&!t.nodeType&&t,dt=ft&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ft,mt=pt&&ct.process,gt=function(){try{return dt&&dt.require&&dt.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&&gt.isArrayBuffer,vt=gt&&gt.isDate,bt=gt&&gt.isMap,wt=gt&&gt.isRegExp,xt=gt&&gt.isSet,St=gt&&gt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Mt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function At(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function Tt(e,t){return!(null==e||!e.length)&&Bt(e,t,0)>-1}function _t(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Dt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Pt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Nt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function It(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Lt=Vt("length");function jt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ft(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Bt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ft(e,$t,n)}function zt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function $t(e){return e!=e}function Ht(e,t){var n=null==e?0:e.length;return n?qt(e,t)/n:f}function Vt(e){return function(t){return null==t?i:t[e]}}function Ut(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function qt(e,t){for(var n,r=-1,o=e.length;++r<o;){var s=t(e[r]);s!==i&&(n=n===i?s:n+s)}return n}function Kt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,fn(e)+1).replace(re,""):e}function Jt(e){return function(t){return e(t)}}function Qt(e,t){return Rt(t,(function(t){return e[t]}))}function Yt(e,t){return e.has(t)}function Xt(e,t){for(var n=-1,r=e.length;++n<r&&Bt(t,e[n],0)>-1;);return n}function Zt(e,t){for(var n=e.length;n--&&Bt(t,e[n],0)>-1;);return n}var en=Ut({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Ut({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+st[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function an(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function un(e){return rn(e)?function(e){for(var t=Xe.lastIndex=0;Xe.test(e);)++t;return t}(e):Lt(e)}function hn(e){return rn(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var dn=Ut({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pn=function e(t){var n,r=(t=null==t?ht:pn.defaults(ht.Object(),t,pn.pick(ht,nt))).Array,ie=t.Date,xe=t.Error,Se=t.Function,ke=t.Math,Ce=t.Object,Oe=t.RegExp,Me=t.String,Ee=t.TypeError,Ae=r.prototype,Te=Se.prototype,_e=Ce.prototype,Re=t["__core-js_shared__"],De=Te.toString,Pe=_e.hasOwnProperty,Ne=0,Ie=(n=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Le=_e.toString,je=De.call(Ce),Fe=ht._,Be=Oe("^"+De.call(Pe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=pt?t.Buffer:i,$e=t.Symbol,He=t.Uint8Array,Ve=ze?ze.allocUnsafe:i,Ue=sn(Ce.getPrototypeOf,Ce),We=Ce.create,qe=_e.propertyIsEnumerable,Ke=Ae.splice,Ge=$e?$e.isConcatSpreadable:i,Je=$e?$e.iterator:i,Xe=$e?$e.toStringTag:i,et=function(){try{var e=lo(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ht.Date.now&&ie.now,ut=t.setTimeout!==ht.setTimeout&&t.setTimeout,ft=ke.ceil,dt=ke.floor,mt=Ce.getOwnPropertySymbols,gt=ze?ze.isBuffer:i,Lt=t.isFinite,Ut=Ae.join,mn=sn(Ce.keys,Ce),gn=ke.max,yn=ke.min,vn=ie.now,bn=t.parseInt,wn=ke.random,xn=Ae.reverse,Sn=lo(t,"DataView"),kn=lo(t,"Map"),Cn=lo(t,"Promise"),On=lo(t,"Set"),Mn=lo(t,"WeakMap"),En=lo(Ce,"create"),An=Mn&&new Mn,Tn={},_n=jo(Sn),Rn=jo(kn),Dn=jo(Cn),Pn=jo(On),Nn=jo(Mn),In=$e?$e.prototype:i,Ln=In?In.valueOf:i,jn=In?In.toString:i;function Fn(e){if(ea(e)&&!Vs(e)&&!(e instanceof Hn)){if(e instanceof $n)return e;if(Pe.call(e,"__wrapped__"))return Fo(e)}return new $n(e)}var Bn=function(){function e(){}return function(t){if(!Zs(t))return{};if(We)return We(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function zn(){}function $n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Wn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Un(e);this.size=t.size}function Gn(e,t){var n=Vs(e),r=!n&&Hs(e),i=!n&&!r&&Ks(e),o=!n&&!r&&!i&&la(e),s=n||r||i||o,a=s?Kt(e.length,Me):[],l=a.length;for(var c in e)!t&&!Pe.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||go(c,l))||a.push(c);return a}function Jn(e){var t=e.length;return t?e[Wr(0,t-1)]:i}function Qn(e,t){return Do(Mi(e),or(t,0,e.length))}function Yn(e){return Do(Mi(e))}function Xn(e,t,n){(n!==i&&!Bs(e[t],n)||n===i&&!(t in e))&&rr(e,t,n)}function Zn(e,t,n){var r=e[t];Pe.call(e,t)&&Bs(r,n)&&(n!==i||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(Bs(e[n][0],t))return n;return-1}function tr(e,t,n,r){return ur(e,(function(e,i,o){t(r,e,n(e),o)})),r}function nr(e,t){return e&&Ei(t,_a(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,o=t.length,s=r(o),a=null==e;++n<o;)s[n]=a?i:Oa(e,t[n]);return s}function or(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function sr(e,t,n,r,o,s){var a,l=1&t,c=2&t,u=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!Zs(e))return e;var h=Vs(e);if(h){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Mi(e,a)}else{var f=ho(e),d=f==w||f==x;if(Ks(e))return wi(e,l);if(f==C||f==m||d&&!o){if(a=c||d?{}:po(e),!l)return c?function(e,t){return Ei(e,uo(e),t)}(e,function(e,t){return e&&Ei(t,Ra(t),e)}(a,e)):function(e,t){return Ei(e,co(e),t)}(e,nr(a,e))}else{if(!ot[f])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case R:return xi(e);case y:case v:return new i(+e);case D:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case N:case I:case L:case j:case F:case B:case z:case $:return Si(e,n);case S:return new i;case k:case A:return new i(e);case M:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new i;case T:return r=e,Ln?Ce(Ln.call(r)):{}}}(e,f,l)}}s||(s=new Kn);var p=s.get(e);if(p)return p;s.set(e,a),oa(e)?e.forEach((function(r){a.add(sr(r,t,n,r,e,s))})):ta(e)&&e.forEach((function(r,i){a.set(i,sr(r,t,n,i,e,s))}));var g=h?i:(u?c?to:eo:c?Ra:_a)(e);return Ot(g||e,(function(r,i){g&&(r=e[i=r]),Zn(a,i,sr(r,t,n,i,e,s))})),a}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Ee(o);return Ao((function(){e.apply(i,n)}),t)}function cr(e,t,n,r){var i=-1,o=Tt,s=!0,a=e.length,l=[],c=t.length;if(!a)return l;n&&(t=Rt(t,Jt(n))),r?(o=_t,s=!1):t.length>=200&&(o=Yt,s=!1,t=new qn(t));e:for(;++i<a;){var u=e[i],h=null==n?u:n(u);if(u=r||0!==u?u:0,s&&h==h){for(var f=c;f--;)if(t[f]===h)continue e;l.push(u)}else o(t,h,r)||l.push(u)}return l}Fn.templateSettings={escape:J,evaluate:Q,interpolate:Y,variable:"",imports:{_:Fn}},Fn.prototype=zn.prototype,Fn.prototype.constructor=Fn,$n.prototype=Bn(zn.prototype),$n.prototype.constructor=$n,Hn.prototype=Bn(zn.prototype),Hn.prototype.constructor=Hn,Vn.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(En){var n=t[e];return n===s?i:n}return Pe.call(t,e)?t[e]:i},Vn.prototype.has=function(e){var t=this.__data__;return En?t[e]!==i:Pe.call(t,e)},Vn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=En&&t===i?s:t,this},Un.prototype.clear=function(){this.__data__=[],this.size=0},Un.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,0))},Un.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?i:t[n][1]},Un.prototype.has=function(e){return er(this.__data__,e)>-1},Un.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(kn||Un),string:new Vn}},Wn.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return so(this,e).get(e)},Wn.prototype.has=function(e){return so(this,e).has(e)},Wn.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,s),this},qn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Un,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Un){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var ur=_i(vr),hr=_i(br,!0);function fr(e,t){var n=!0;return ur(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function dr(e,t,n){for(var r=-1,o=e.length;++r<o;){var s=e[r],a=t(s);if(null!=a&&(l===i?a==a&&!aa(a):n(a,l)))var l=a,c=s}return c}function pr(e,t){var n=[];return ur(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function mr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=mo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?mr(a,t-1,n,r,i):Dt(i,a):r||(i[i.length]=a)}return i}var gr=Ri(),yr=Ri(!0);function vr(e,t){return e&&gr(e,t,_a)}function br(e,t){return e&&yr(e,t,_a)}function wr(e,t){return At(t,(function(t){return Qs(e[t])}))}function xr(e,t){for(var n=0,r=(t=gi(t,e)).length;null!=e&&n<r;)e=e[Lo(t[n++])];return n&&n==r?e:i}function Sr(e,t,n){var r=t(e);return Vs(e)?r:Dt(r,n(e))}function kr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Xe&&Xe in Ce(e)?function(e){var t=Pe.call(e,Xe),n=e[Xe];try{e[Xe]=i;var r=!0}catch(e){}var o=Le.call(e);return r&&(t?e[Xe]=n:delete e[Xe]),o}(e):function(e){return Le.call(e)}(e)}function Cr(e,t){return e>t}function Or(e,t){return null!=e&&Pe.call(e,t)}function Mr(e,t){return null!=e&&t in Ce(e)}function Er(e,t,n){for(var o=n?_t:Tt,s=e[0].length,a=e.length,l=a,c=r(a),u=1/0,h=[];l--;){var f=e[l];l&&t&&(f=Rt(f,Jt(t))),u=yn(f.length,u),c[l]=!n&&(t||s>=120&&f.length>=120)?new qn(l&&f):i}f=e[0];var d=-1,p=c[0];e:for(;++d<s&&h.length<u;){var m=f[d],g=t?t(m):m;if(m=n||0!==m?m:0,!(p?Yt(p,g):o(h,g,n))){for(l=a;--l;){var y=c[l];if(!(y?Yt(y,g):o(e[l],g,n)))continue e}p&&p.push(g),h.push(m)}}return h}function Ar(e,t,n){var r=null==(e=Oo(e,t=gi(t,e)))?e:e[Lo(Jo(t))];return null==r?i:kt(r,e,n)}function Tr(e){return ea(e)&&kr(e)==m}function _r(e,t,n,r,o){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,n,r,o,s){var a=Vs(e),l=Vs(t),c=a?g:ho(e),u=l?g:ho(t),h=(c=c==m?C:c)==C,f=(u=u==m?C:u)==C,d=c==u;if(d&&Ks(e)){if(!Ks(t))return!1;a=!0,h=!1}if(d&&!h)return s||(s=new Kn),a||la(e)?Xi(e,t,n,r,o,s):function(e,t,n,r,i,o,s){switch(n){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!o(new He(e),new He(t)));case y:case v:case k:return Bs(+e,+t);case b:return e.name==t.name&&e.message==t.message;case M:case A:return e==t+"";case S:var a=on;case E:var l=1&r;if(a||(a=ln),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var u=Xi(a(e),a(t),r,i,o,s);return s.delete(e),u;case T:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,n,r,o,s);if(!(1&n)){var p=h&&Pe.call(e,"__wrapped__"),w=f&&Pe.call(t,"__wrapped__");if(p||w){var x=p?e.value():e,O=w?t.value():t;return s||(s=new Kn),o(x,O,n,r,s)}}return!!d&&(s||(s=new Kn),function(e,t,n,r,o,s){var a=1&n,l=eo(e),c=l.length;if(c!=eo(t).length&&!a)return!1;for(var u=c;u--;){var h=l[u];if(!(a?h in t:Pe.call(t,h)))return!1}var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var p=!0;s.set(e,t),s.set(t,e);for(var m=a;++u<c;){var g=e[h=l[u]],y=t[h];if(r)var v=a?r(y,g,h,t,e,s):r(g,y,h,e,t,s);if(!(v===i?g===y||o(g,y,n,r,s):v)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,r,o,s))}(e,t,n,r,_r,o))}function Rr(e,t,n,r){var o=n.length,s=o,a=!r;if(null==e)return!s;for(e=Ce(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var c=(l=n[o])[0],u=e[c],h=l[1];if(a&&l[2]){if(u===i&&!(c in e))return!1}else{var f=new Kn;if(r)var d=r(u,h,c,e,t,f);if(!(d===i?_r(h,u,3,r,f):d))return!1}}return!0}function Dr(e){return!(!Zs(e)||(t=e,Ie&&Ie in t))&&(Qs(e)?Be:me).test(jo(e));var t}function Pr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?Vs(e)?Fr(e[0],e[1]):jr(e):hl(e)}function Nr(e){if(!xo(e))return mn(e);var t=[];for(var n in Ce(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ir(e,t){return e<t}function Lr(e,t){var n=-1,i=Ws(e)?r(e.length):[];return ur(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function jr(e){var t=ao(e);return 1==t.length&&t[0][2]?ko(t[0][0],t[0][1]):function(n){return n===e||Rr(n,e,t)}}function Fr(e,t){return vo(e)&&So(t)?ko(Lo(e),t):function(n){var r=Oa(n,e);return r===i&&r===t?Ma(n,e):_r(t,r,3)}}function Br(e,t,n,r,o){e!==t&&gr(t,(function(s,a){if(o||(o=new Kn),Zs(s))!function(e,t,n,r,o,s,a){var l=Mo(e,n),c=Mo(t,n),u=a.get(c);if(u)Xn(e,n,u);else{var h=s?s(l,c,n+"",e,t,a):i,f=h===i;if(f){var d=Vs(c),p=!d&&Ks(c),m=!d&&!p&&la(c);h=c,d||p||m?Vs(l)?h=l:qs(l)?h=Mi(l):p?(f=!1,h=wi(c,!0)):m?(f=!1,h=Si(c,!0)):h=[]:ra(c)||Hs(c)?(h=l,Hs(l)?h=ga(l):Zs(l)&&!Qs(l)||(h=po(c))):f=!1}f&&(a.set(c,h),o(h,c,r,s,a),a.delete(c)),Xn(e,n,h)}}(e,t,a,n,Br,r,o);else{var l=r?r(Mo(e,a),s,a+"",e,t,o):i;l===i&&(l=s),Xn(e,a,l)}}),Ra)}function zr(e,t){var n=e.length;if(n)return go(t+=t<0?n:0,n)?e[t]:i}function $r(e,t,n){t=t.length?Rt(t,(function(e){return Vs(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[nl];var r=-1;t=Rt(t,Jt(oo()));var i=Lr(e,(function(e,n,i){var o=Rt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var l=ki(i[r],o[r]);if(l)return r>=a?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(i)}function Hr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=xr(e,s);n(a,s)&&Qr(o,gi(s,e),a)}return o}function Vr(e,t,n,r){var i=r?zt:Bt,o=-1,s=t.length,a=e;for(e===t&&(t=Mi(t)),n&&(a=Rt(e,Jt(n)));++o<s;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(a,u,l,r))>-1;)a!==e&&Ke.call(a,l,1),Ke.call(e,l,1);return e}function Ur(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;go(i)?Ke.call(e,i,1):li(e,i)}}return e}function Wr(e,t){return e+dt(wn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return To(Co(e,t,nl),e+"")}function Gr(e){return Jn(Ba(e))}function Jr(e,t){var n=Ba(e);return Do(n,or(t,0,n.length))}function Qr(e,t,n,r){if(!Zs(e))return e;for(var o=-1,s=(t=gi(t,e)).length,a=s-1,l=e;null!=l&&++o<s;){var c=Lo(t[o]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var h=l[c];(u=r?r(h,c,l):i)===i&&(u=Zs(h)?h:go(t[o+1])?[]:{})}Zn(l,c,u),l=l[c]}return e}var Yr=An?function(e,t){return An.set(e,t),e}:nl,Xr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Za(t),writable:!0})}:nl;function Zr(e){return Do(Ba(e))}function ei(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i<o;)s[i]=e[i+t];return s}function ti(e,t){var n;return ur(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ni(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!aa(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return ri(e,t,nl,n)}function ri(e,t,n,r){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,l=null===t,c=aa(t),u=t===i;o<s;){var h=dt((o+s)/2),f=n(e[h]),d=f!==i,p=null===f,m=f==f,g=aa(f);if(a)var y=r||m;else y=u?m&&(r||d):l?m&&d&&(r||!p):c?m&&d&&!p&&(r||!g):!p&&!g&&(r?f<=t:f<t);y?o=h+1:s=h}return yn(s,4294967294)}function ii(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Bs(a,l)){var l=a;o[i++]=0===s?0:s}}return o}function oi(e){return"number"==typeof e?e:aa(e)?f:+e}function si(e){if("string"==typeof e)return e;if(Vs(e))return Rt(e,si)+"";if(aa(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ai(e,t,n){var r=-1,i=Tt,o=e.length,s=!0,a=[],l=a;if(n)s=!1,i=_t;else if(o>=200){var c=t?null:qi(e);if(c)return ln(c);s=!1,i=Yt,l=new qn}else l=t?[]:a;e:for(;++r<o;){var u=e[r],h=t?t(u):u;if(u=n||0!==u?u:0,s&&h==h){for(var f=l.length;f--;)if(l[f]===h)continue e;t&&l.push(h),a.push(u)}else i(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}function li(e,t){return null==(e=Oo(e,t=gi(t,e)))||delete e[Lo(Jo(t))]}function ci(e,t,n,r){return Qr(e,t,n(xr(e,t)),r)}function ui(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ei(e,r?0:o,r?o+1:i):ei(e,r?o+1:0,r?i:o)}function hi(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Pt(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function fi(e,t,n){var i=e.length;if(i<2)return i?ai(e[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=e[o],l=-1;++l<i;)l!=o&&(s[o]=cr(s[o]||a,e[l],t,n));return ai(mr(s,1),t,n)}function di(e,t,n){for(var r=-1,o=e.length,s=t.length,a={};++r<o;){var l=r<s?t[r]:i;n(a,e[r],l)}return a}function pi(e){return qs(e)?e:[]}function mi(e){return"function"==typeof e?e:nl}function gi(e,t){return Vs(e)?e:vo(e,t)?[e]:Io(ya(e))}var yi=Kr;function vi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ei(e,t,n)}var bi=st||function(e){return ht.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Si(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ki(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=aa(e),a=t!==i,l=null===t,c=t==t,u=aa(t);if(!l&&!u&&!s&&e>t||s&&a&&c&&!l&&!u||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!u&&e<t||u&&n&&o&&!r&&!s||l&&n&&o||!a&&o||!c)return-1}return 0}function Ci(e,t,n,i){for(var o=-1,s=e.length,a=n.length,l=-1,c=t.length,u=gn(s-a,0),h=r(c+u),f=!i;++l<c;)h[l]=t[l];for(;++o<a;)(f||o<s)&&(h[n[o]]=e[o]);for(;u--;)h[l++]=e[o++];return h}function Oi(e,t,n,i){for(var o=-1,s=e.length,a=-1,l=n.length,c=-1,u=t.length,h=gn(s-l,0),f=r(h+u),d=!i;++o<h;)f[o]=e[o];for(var p=o;++c<u;)f[p+c]=t[c];for(;++a<l;)(d||o<s)&&(f[p+n[a]]=e[o++]);return f}function Mi(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ei(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var l=t[s],c=r?r(n[l],e[l],l,n,e):i;c===i&&(c=e[l]),o?rr(n,l,c):Zn(n,l,c)}return n}function Ai(e,t){return function(n,r){var i=Vs(n)?Ct:tr,o=t?t():{};return i(n,e,oo(r,2),o)}}function Ti(e){return Kr((function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&yo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Ce(t);++r<o;){var l=n[r];l&&e(t,l,r,s)}return t}))}function _i(e,t){return function(n,r){if(null==n)return n;if(!Ws(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Ce(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Ri(e){return function(t,n,r){for(var i=-1,o=Ce(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function Di(e){return function(t){var n=rn(t=ya(t))?hn(t):i,r=n?n[0]:t.charAt(0),o=n?vi(n,1).join(""):t.slice(1);return r[e]()+o}}function Pi(e){return function(t){return Pt(Qa(Ha(t).replace(Qe,"")),e,"")}}function Ni(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return Zs(r)?r:n}}function Ii(e){return function(t,n,r){var o=Ce(t);if(!Ws(t)){var s=oo(n,3);t=_a(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[s?t[a]:a]:i}}function Li(e){return Zi((function(t){var n=t.length,r=n,s=$n.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ee(o);if(s&&!l&&"wrapper"==ro(a))var l=new $n([],!0)}for(r=l?r:n;++r<n;){var c=ro(a=t[r]),u="wrapper"==c?no(a):i;l=u&&bo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[ro(u[0])].apply(l,u[3]):1==a.length&&bo(a)?l[c]():l.thru(a)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&Vs(r))return l.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function ji(e,t,n,o,s,a,l,u,h,f){var d=t&c,p=1&t,m=2&t,g=24&t,y=512&t,v=m?i:Ni(e);return function c(){for(var b=arguments.length,w=r(b),x=b;x--;)w[x]=arguments[x];if(g)var S=io(c),k=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,S);if(o&&(w=Ci(w,o,s,g)),a&&(w=Oi(w,a,l,g)),b-=k,g&&b<f){var C=an(w,S);return Ui(e,t,ji,c.placeholder,n,w,C,u,h,f-b)}var O=p?n:this,M=m?O[e]:e;return b=w.length,u?w=function(e,t){for(var n=e.length,r=yn(t.length,n),o=Mi(e);r--;){var s=t[r];e[r]=go(s,n)?o[s]:i}return e}(w,u):y&&b>1&&w.reverse(),d&&h<b&&(w.length=h),this&&this!==ht&&this instanceof c&&(M=v||Ni(M)),M.apply(O,w)}}function Fi(e,t){return function(n,r){return function(e,t,n,r){return vr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Bi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=oi(n),r=oi(r)),o=e(n,r)}return o}}function zi(e){return Zi((function(t){return t=Rt(t,Jt(oo())),Kr((function(n){var r=this;return e(t,(function(e){return kt(e,r,n)}))}))}))}function $i(e,t){var n=(t=t===i?" ":si(t)).length;if(n<2)return n?qr(t,e):t;var r=qr(t,ft(e/un(t)));return rn(t)?vi(hn(r),0,e).join(""):r.slice(0,e)}function Hi(e){return function(t,n,o){return o&&"number"!=typeof o&&yo(t,n,o)&&(n=o=i),t=fa(t),n===i?(n=t,t=0):n=fa(n),function(e,t,n,i){for(var o=-1,s=gn(ft((t-e)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=e,e+=n;return a}(t,n,o=o===i?t<n?1:-1:fa(o),e)}}function Vi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ma(t),n=ma(n)),e(t,n)}}function Ui(e,t,n,r,o,s,a,c,u,h){var f=8&t;t|=f?l:64,4&(t&=~(f?64:l))||(t&=-4);var d=[e,t,o,f?s:i,f?a:i,f?i:s,f?i:a,c,u,h],p=n.apply(i,d);return bo(e)&&Eo(p,d),p.placeholder=r,_o(p,e,t)}function Wi(e){var t=ke[e];return function(e,n){if(e=ma(e),(n=null==n?0:yn(da(n),292))&&Lt(e)){var r=(ya(e)+"e").split("e");return+((r=(ya(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var qi=On&&1/ln(new On([,-0]))[1]==u?function(e){return new On(e)}:al;function Ki(e){return function(t){var n=ho(t);return n==S?on(t):n==E?cn(t):function(e,t){return Rt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Gi(e,t,n,s,u,h,f,d){var p=2&t;if(!p&&"function"!=typeof e)throw new Ee(o);var m=s?s.length:0;if(m||(t&=-97,s=u=i),f=f===i?f:gn(da(f),0),d=d===i?d:da(d),m-=u?u.length:0,64&t){var g=s,y=u;s=u=i}var v=p?i:no(e),b=[e,t,n,s,u,g,y,h,f,d];if(v&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?Ci(u,l,t[4]):l,e[4]=u?an(e[3],a):t[4]}(l=t[5])&&(u=e[5],e[5]=u?Oi(u,l,t[6]):l,e[6]=u?an(e[5],a):t[6]),(l=t[7])&&(e[7]=l),r&c&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,v),e=b[0],t=b[1],n=b[2],s=b[3],u=b[4],!(d=b[9]=b[9]===i?p?0:e.length:gn(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var o=Ni(e);return function s(){for(var a=arguments.length,l=r(a),c=a,u=io(s);c--;)l[c]=arguments[c];var h=a<3&&l[0]!==u&&l[a-1]!==u?[]:an(l,u);return(a-=h.length)<n?Ui(e,t,ji,s.placeholder,i,l,h,i,i,n-a):kt(this&&this!==ht&&this instanceof s?o:e,this,l)}}(e,t,d):t!=l&&33!=t||u.length?ji.apply(i,b):function(e,t,n,i){var o=1&t,s=Ni(e);return function t(){for(var a=-1,l=arguments.length,c=-1,u=i.length,h=r(u+l),f=this&&this!==ht&&this instanceof t?s:e;++c<u;)h[c]=i[c];for(;l--;)h[c++]=arguments[++a];return kt(f,o?n:this,h)}}(e,t,n,s);else var w=function(e,t,n){var r=1&t,i=Ni(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return _o((v?Yr:Eo)(w,b),e,t)}function Ji(e,t,n,r){return e===i||Bs(e,_e[n])&&!Pe.call(r,n)?t:e}function Qi(e,t,n,r,o,s){return Zs(e)&&Zs(t)&&(s.set(t,e),Br(e,t,i,Qi,s),s.delete(t)),e}function Yi(e){return ra(e)?i:e}function Xi(e,t,n,r,o,s){var a=1&n,l=e.length,c=t.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),h=s.get(t);if(u&&h)return u==t&&h==e;var f=-1,d=!0,p=2&n?new qn:i;for(s.set(e,t),s.set(t,e);++f<l;){var m=e[f],g=t[f];if(r)var y=a?r(g,m,f,t,e,s):r(m,g,f,e,t,s);if(y!==i){if(y)continue;d=!1;break}if(p){if(!It(t,(function(e,t){if(!Yt(p,t)&&(m===e||o(m,e,n,r,s)))return p.push(t)}))){d=!1;break}}else if(m!==g&&!o(m,g,n,r,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Zi(e){return To(Co(e,i,Uo),e+"")}function eo(e){return Sr(e,_a,co)}function to(e){return Sr(e,Ra,uo)}var no=An?function(e){return An.get(e)}:al;function ro(e){for(var t=e.name+"",n=Tn[t],r=Pe.call(Tn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function io(e){return(Pe.call(Fn,"placeholder")?Fn:e).placeholder}function oo(){var e=Fn.iteratee||rl;return e=e===rl?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ao(e){for(var t=_a(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,So(i)]}return t}function lo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Dr(n)?n:i}var co=mt?function(e){return null==e?[]:(e=Ce(e),At(mt(e),(function(t){return qe.call(e,t)})))}:pl,uo=mt?function(e){for(var t=[];e;)Dt(t,co(e)),e=Ue(e);return t}:pl,ho=kr;function fo(e,t,n){for(var r=-1,i=(t=gi(t,e)).length,o=!1;++r<i;){var s=Lo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Xs(i)&&go(s,i)&&(Vs(e)||Hs(e))}function po(e){return"function"!=typeof e.constructor||xo(e)?{}:Bn(Ue(e))}function mo(e){return Vs(e)||Hs(e)||!!(Ge&&e&&e[Ge])}function go(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!Zs(n))return!1;var r=typeof t;return!!("number"==r?Ws(n)&&go(t,n.length):"string"==r&&t in n)&&Bs(n[t],e)}function vo(e,t){if(Vs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!aa(e))||Z.test(e)||!X.test(e)||null!=t&&e in Ce(t)}function bo(e){var t=ro(e),n=Fn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=no(n);return!!r&&e===r[0]}(Sn&&ho(new Sn(new ArrayBuffer(1)))!=D||kn&&ho(new kn)!=S||Cn&&ho(Cn.resolve())!=O||On&&ho(new On)!=E||Mn&&ho(new Mn)!=_)&&(ho=function(e){var t=kr(e),n=t==C?e.constructor:i,r=n?jo(n):"";if(r)switch(r){case _n:return D;case Rn:return S;case Dn:return O;case Pn:return E;case Nn:return _}return t});var wo=Re?Qs:ml;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}function So(e){return e==e&&!Zs(e)}function ko(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Ce(n))}}function Co(e,t,n){return t=gn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=gn(i.length-t,0),a=r(s);++o<s;)a[o]=i[t+o];o=-1;for(var l=r(t+1);++o<t;)l[o]=i[o];return l[t]=n(a),kt(e,this,l)}}function Oo(e,t){return t.length<2?e:xr(e,ei(t,0,-1))}function Mo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Eo=Ro(Yr),Ao=ut||function(e,t){return ht.setTimeout(e,t)},To=Ro(Xr);function _o(e,t,n){var r=t+"";return To(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ot(p,(function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Ro(e){var t=0,n=0;return function(){var r=vn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Do(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var s=Wr(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Po,No,Io=(Po=Ps((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(ue,"$1"):n||e)})),t}),(function(e){return 500===No.size&&No.clear(),e})),No=Po.cache,Po);function Lo(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function jo(e){if(null!=e){try{return De.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fo(e){if(e instanceof Hn)return e.clone();var t=new $n(e.__wrapped__,e.__chain__);return t.__actions__=Mi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bo=Kr((function(e,t){return qs(e)?cr(e,mr(t,1,qs,!0)):[]})),zo=Kr((function(e,t){var n=Jo(t);return qs(n)&&(n=i),qs(e)?cr(e,mr(t,1,qs,!0),oo(n,2)):[]})),$o=Kr((function(e,t){var n=Jo(t);return qs(n)&&(n=i),qs(e)?cr(e,mr(t,1,qs,!0),i,n):[]}));function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:da(n);return i<0&&(i=gn(r+i,0)),Ft(e,oo(t,3),i)}function Vo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=da(n),o=n<0?gn(r+o,0):yn(o,r-1)),Ft(e,oo(t,3),o,!0)}function Uo(e){return null!=e&&e.length?mr(e,1):[]}function Wo(e){return e&&e.length?e[0]:i}var qo=Kr((function(e){var t=Rt(e,pi);return t.length&&t[0]===e[0]?Er(t):[]})),Ko=Kr((function(e){var t=Jo(e),n=Rt(e,pi);return t===Jo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Er(n,oo(t,2)):[]})),Go=Kr((function(e){var t=Jo(e),n=Rt(e,pi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Er(n,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Qo=Kr(Yo);function Yo(e,t){return e&&e.length&&t&&t.length?Vr(e,t):e}var Xo=Zi((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Ur(e,Rt(t,(function(e){return go(e,n)?+e:e})).sort(ki)),r}));function Zo(e){return null==e?e:xn.call(e)}var es=Kr((function(e){return ai(mr(e,1,qs,!0))})),ts=Kr((function(e){var t=Jo(e);return qs(t)&&(t=i),ai(mr(e,1,qs,!0),oo(t,2))})),ns=Kr((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ai(mr(e,1,qs,!0),i,t)}));function rs(e){if(!e||!e.length)return[];var t=0;return e=At(e,(function(e){if(qs(e))return t=gn(e.length,t),!0})),Kt(t,(function(t){return Rt(e,Vt(t))}))}function is(e,t){if(!e||!e.length)return[];var n=rs(e);return null==t?n:Rt(n,(function(e){return kt(t,i,e)}))}var os=Kr((function(e,t){return qs(e)?cr(e,t):[]})),ss=Kr((function(e){return fi(At(e,qs))})),as=Kr((function(e){var t=Jo(e);return qs(t)&&(t=i),fi(At(e,qs),oo(t,2))})),ls=Kr((function(e){var t=Jo(e);return t="function"==typeof t?t:i,fi(At(e,qs),i,t)})),cs=Kr(rs),us=Kr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,is(e,n)}));function hs(e){var t=Fn(e);return t.__chain__=!0,t}function fs(e,t){return t(e)}var ds=Zi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Hn&&go(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:fs,args:[o],thisArg:i}),new $n(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ps=Ai((function(e,t,n){Pe.call(e,n)?++e[n]:rr(e,n,1)})),ms=Ii(Ho),gs=Ii(Vo);function ys(e,t){return(Vs(e)?Ot:ur)(e,oo(t,3))}function vs(e,t){return(Vs(e)?Mt:hr)(e,oo(t,3))}var bs=Ai((function(e,t,n){Pe.call(e,n)?e[n].push(t):rr(e,n,[t])})),ws=Kr((function(e,t,n){var i=-1,o="function"==typeof t,s=Ws(e)?r(e.length):[];return ur(e,(function(e){s[++i]=o?kt(t,e,n):Ar(e,t,n)})),s})),xs=Ai((function(e,t,n){rr(e,n,t)}));function Ss(e,t){return(Vs(e)?Rt:Lr)(e,oo(t,3))}var ks=Ai((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Cs=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),$r(e,mr(t,1),[])})),Os=ct||function(){return ht.Date.now()};function Ms(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Gi(e,c,i,i,i,i,t)}function Es(e,t){var n;if("function"!=typeof t)throw new Ee(o);return e=da(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var As=Kr((function(e,t,n){var r=1;if(n.length){var i=an(n,io(As));r|=l}return Gi(e,r,t,n,i)})),Ts=Kr((function(e,t,n){var r=3;if(n.length){var i=an(n,io(Ts));r|=l}return Gi(t,r,e,n,i)}));function _s(e,t,n){var r,s,a,l,c,u,h=0,f=!1,d=!1,p=!0;if("function"!=typeof e)throw new Ee(o);function m(t){var n=r,o=s;return r=s=i,h=t,l=e.apply(o,n)}function g(e){var n=e-u;return u===i||n>=t||n<0||d&&e-h>=a}function y(){var e=Os();if(g(e))return v(e);c=Ao(y,function(e){var n=t-(e-u);return d?yn(n,a-(e-h)):n}(e))}function v(e){return c=i,p&&r?m(e):(r=s=i,l)}function b(){var e=Os(),n=g(e);if(r=arguments,s=this,u=e,n){if(c===i)return function(e){return h=e,c=Ao(y,t),f?m(e):l}(u);if(d)return bi(c),c=Ao(y,t),m(u)}return c===i&&(c=Ao(y,t)),l}return t=ma(t)||0,Zs(n)&&(f=!!n.leading,a=(d="maxWait"in n)?gn(ma(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==i&&bi(c),h=0,r=u=s=c=i},b.flush=function(){return c===i?l:v(Os())},b}var Rs=Kr((function(e,t){return lr(e,1,t)})),Ds=Kr((function(e,t,n){return lr(e,ma(t)||0,n)}));function Ps(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Ps.Cache||Wn),n}function Ns(e){if("function"!=typeof e)throw new Ee(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ps.Cache=Wn;var Is=yi((function(e,t){var n=(t=1==t.length&&Vs(t[0])?Rt(t[0],Jt(oo())):Rt(mr(t,1),Jt(oo()))).length;return Kr((function(r){for(var i=-1,o=yn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return kt(e,this,r)}))})),Ls=Kr((function(e,t){var n=an(t,io(Ls));return Gi(e,l,i,t,n)})),js=Kr((function(e,t){var n=an(t,io(js));return Gi(e,64,i,t,n)})),Fs=Zi((function(e,t){return Gi(e,256,i,i,i,t)}));function Bs(e,t){return e===t||e!=e&&t!=t}var zs=Vi(Cr),$s=Vi((function(e,t){return e>=t})),Hs=Tr(function(){return arguments}())?Tr:function(e){return ea(e)&&Pe.call(e,"callee")&&!qe.call(e,"callee")},Vs=r.isArray,Us=yt?Jt(yt):function(e){return ea(e)&&kr(e)==R};function Ws(e){return null!=e&&Xs(e.length)&&!Qs(e)}function qs(e){return ea(e)&&Ws(e)}var Ks=gt||ml,Gs=vt?Jt(vt):function(e){return ea(e)&&kr(e)==v};function Js(e){if(!ea(e))return!1;var t=kr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ra(e)}function Qs(e){if(!Zs(e))return!1;var t=kr(e);return t==w||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ys(e){return"number"==typeof e&&e==da(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Zs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=bt?Jt(bt):function(e){return ea(e)&&ho(e)==S};function na(e){return"number"==typeof e||ea(e)&&kr(e)==k}function ra(e){if(!ea(e)||kr(e)!=C)return!1;var t=Ue(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==je}var ia=wt?Jt(wt):function(e){return ea(e)&&kr(e)==M},oa=xt?Jt(xt):function(e){return ea(e)&&ho(e)==E};function sa(e){return"string"==typeof e||!Vs(e)&&ea(e)&&kr(e)==A}function aa(e){return"symbol"==typeof e||ea(e)&&kr(e)==T}var la=St?Jt(St):function(e){return ea(e)&&Xs(e.length)&&!!it[kr(e)]},ca=Vi(Ir),ua=Vi((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(Ws(e))return sa(e)?hn(e):Mi(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=ho(e);return(t==S?on:t==E?ln:Ba)(e)}function fa(e){return e?(e=ma(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function da(e){var t=fa(e),n=t%1;return t==t?n?t-n:t:0}function pa(e){return e?or(da(e),0,d):0}function ma(e){if("number"==typeof e)return e;if(aa(e))return f;if(Zs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Zs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=pe.test(e);return n||ge.test(e)?lt(e.slice(2),n?2:8):de.test(e)?f:+e}function ga(e){return Ei(e,Ra(e))}function ya(e){return null==e?"":si(e)}var va=Ti((function(e,t){if(xo(t)||Ws(t))Ei(t,_a(t),e);else for(var n in t)Pe.call(t,n)&&Zn(e,n,t[n])})),ba=Ti((function(e,t){Ei(t,Ra(t),e)})),wa=Ti((function(e,t,n,r){Ei(t,Ra(t),e,r)})),xa=Ti((function(e,t,n,r){Ei(t,_a(t),e,r)})),Sa=Zi(ir),ka=Kr((function(e,t){e=Ce(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&yo(t[0],t[1],o)&&(r=1);++n<r;)for(var s=t[n],a=Ra(s),l=-1,c=a.length;++l<c;){var u=a[l],h=e[u];(h===i||Bs(h,_e[u])&&!Pe.call(e,u))&&(e[u]=s[u])}return e})),Ca=Kr((function(e){return e.push(i,Qi),kt(Pa,i,e)}));function Oa(e,t,n){var r=null==e?i:xr(e,t);return r===i?n:r}function Ma(e,t){return null!=e&&fo(e,t,Mr)}var Ea=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n}),Za(nl)),Aa=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),oo),Ta=Kr(Ar);function _a(e){return Ws(e)?Gn(e):Nr(e)}function Ra(e){return Ws(e)?Gn(e,!0):function(e){if(!Zs(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)("constructor"!=r||!t&&Pe.call(e,r))&&n.push(r);return n}(e)}var Da=Ti((function(e,t,n){Br(e,t,n)})),Pa=Ti((function(e,t,n,r){Br(e,t,n,r)})),Na=Zi((function(e,t){var n={};if(null==e)return n;var r=!1;t=Rt(t,(function(t){return t=gi(t,e),r||(r=t.length>1),t})),Ei(e,to(e),n),r&&(n=sr(n,7,Yi));for(var i=t.length;i--;)li(n,t[i]);return n})),Ia=Zi((function(e,t){return null==e?{}:function(e,t){return Hr(e,t,(function(t,n){return Ma(e,n)}))}(e,t)}));function La(e,t){if(null==e)return{};var n=Rt(to(e),(function(e){return[e]}));return t=oo(t),Hr(e,n,(function(e,n){return t(e,n[0])}))}var ja=Ki(_a),Fa=Ki(Ra);function Ba(e){return null==e?[]:Qt(e,_a(e))}var za=Pi((function(e,t,n){return t=t.toLowerCase(),e+(n?$a(t):t)}));function $a(e){return Ja(ya(e).toLowerCase())}function Ha(e){return(e=ya(e))&&e.replace(ve,en).replace(Ye,"")}var Va=Pi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ua=Pi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Wa=Di("toLowerCase"),qa=Pi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ka=Pi((function(e,t,n){return e+(n?" ":"")+Ja(t)})),Ga=Pi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ja=Di("toUpperCase");function Qa(e,t,n){return e=ya(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Ya=Kr((function(e,t){try{return kt(e,i,t)}catch(e){return Js(e)?e:new xe(e)}})),Xa=Zi((function(e,t){return Ot(t,(function(t){t=Lo(t),rr(e,t,As(e[t],e))})),e}));function Za(e){return function(){return e}}var el=Li(),tl=Li(!0);function nl(e){return e}function rl(e){return Pr("function"==typeof e?e:sr(e,1))}var il=Kr((function(e,t){return function(n){return Ar(n,e,t)}})),ol=Kr((function(e,t){return function(n){return Ar(e,n,t)}}));function sl(e,t,n){var r=_a(t),i=wr(t,r);null!=n||Zs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,_a(t)));var o=!(Zs(n)&&"chain"in n&&!n.chain),s=Qs(e);return Ot(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Mi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Dt([this.value()],arguments))})})),e}function al(){}var ll=zi(Rt),cl=zi(Et),ul=zi(It);function hl(e){return vo(e)?Vt(Lo(e)):function(e){return function(t){return xr(t,e)}}(e)}var fl=Hi(),dl=Hi(!0);function pl(){return[]}function ml(){return!1}var gl,yl=Bi((function(e,t){return e+t}),0),vl=Wi("ceil"),bl=Bi((function(e,t){return e/t}),1),wl=Wi("floor"),xl=Bi((function(e,t){return e*t}),1),Sl=Wi("round"),kl=Bi((function(e,t){return e-t}),0);return Fn.after=function(e,t){if("function"!=typeof t)throw new Ee(o);return e=da(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=Ms,Fn.assign=va,Fn.assignIn=ba,Fn.assignInWith=wa,Fn.assignWith=xa,Fn.at=Sa,Fn.before=Es,Fn.bind=As,Fn.bindAll=Xa,Fn.bindKey=Ts,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},Fn.chain=hs,Fn.chunk=function(e,t,n){t=(n?yo(e,t,n):t===i)?1:gn(da(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,l=r(ft(o/t));s<o;)l[a++]=ei(e,s,s+=t);return l},Fn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Fn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Dt(Vs(n)?Mi(n):[n],mr(t,1))},Fn.cond=function(e){var t=null==e?0:e.length,n=oo();return e=t?Rt(e,(function(e){if("function"!=typeof e[1])throw new Ee(o);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(kt(i[0],this,n))return kt(i[1],this,n)}}))},Fn.conforms=function(e){return function(e){var t=_a(e);return function(n){return ar(n,e,t)}}(sr(e,1))},Fn.constant=Za,Fn.countBy=ps,Fn.create=function(e,t){var n=Bn(e);return null==t?n:nr(n,t)},Fn.curry=function e(t,n,r){var o=Gi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.curryRight=function e(t,n,r){var o=Gi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.debounce=_s,Fn.defaults=ka,Fn.defaultsDeep=Ca,Fn.defer=Rs,Fn.delay=Ds,Fn.difference=Bo,Fn.differenceBy=zo,Fn.differenceWith=$o,Fn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=n||t===i?1:da(t))<0?0:t,r):[]},Fn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,0,(t=r-(t=n||t===i?1:da(t)))<0?0:t):[]},Fn.dropRightWhile=function(e,t){return e&&e.length?ui(e,oo(t,3),!0,!0):[]},Fn.dropWhile=function(e,t){return e&&e.length?ui(e,oo(t,3),!0):[]},Fn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&yo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=da(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:da(r))<0&&(r+=o),r=n>r?0:pa(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Fn.filter=function(e,t){return(Vs(e)?At:pr)(e,oo(t,3))},Fn.flatMap=function(e,t){return mr(Ss(e,t),1)},Fn.flatMapDeep=function(e,t){return mr(Ss(e,t),u)},Fn.flatMapDepth=function(e,t,n){return n=n===i?1:da(n),mr(Ss(e,t),n)},Fn.flatten=Uo,Fn.flattenDeep=function(e){return null!=e&&e.length?mr(e,u):[]},Fn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===i?1:da(t)):[]},Fn.flip=function(e){return Gi(e,512)},Fn.flow=el,Fn.flowRight=tl,Fn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Fn.functions=function(e){return null==e?[]:wr(e,_a(e))},Fn.functionsIn=function(e){return null==e?[]:wr(e,Ra(e))},Fn.groupBy=bs,Fn.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},Fn.intersection=qo,Fn.intersectionBy=Ko,Fn.intersectionWith=Go,Fn.invert=Ea,Fn.invertBy=Aa,Fn.invokeMap=ws,Fn.iteratee=rl,Fn.keyBy=xs,Fn.keys=_a,Fn.keysIn=Ra,Fn.map=Ss,Fn.mapKeys=function(e,t){var n={};return t=oo(t,3),vr(e,(function(e,r,i){rr(n,t(e,r,i),e)})),n},Fn.mapValues=function(e,t){var n={};return t=oo(t,3),vr(e,(function(e,r,i){rr(n,r,t(e,r,i))})),n},Fn.matches=function(e){return jr(sr(e,1))},Fn.matchesProperty=function(e,t){return Fr(e,sr(t,1))},Fn.memoize=Ps,Fn.merge=Da,Fn.mergeWith=Pa,Fn.method=il,Fn.methodOf=ol,Fn.mixin=sl,Fn.negate=Ns,Fn.nthArg=function(e){return e=da(e),Kr((function(t){return zr(t,e)}))},Fn.omit=Na,Fn.omitBy=function(e,t){return La(e,Ns(oo(t)))},Fn.once=function(e){return Es(2,e)},Fn.orderBy=function(e,t,n,r){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(n=r?i:n)||(n=null==n?[]:[n]),$r(e,t,n))},Fn.over=ll,Fn.overArgs=Is,Fn.overEvery=cl,Fn.overSome=ul,Fn.partial=Ls,Fn.partialRight=js,Fn.partition=ks,Fn.pick=Ia,Fn.pickBy=La,Fn.property=hl,Fn.propertyOf=function(e){return function(t){return null==e?i:xr(e,t)}},Fn.pull=Qo,Fn.pullAll=Yo,Fn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,oo(n,2)):e},Fn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,i,n):e},Fn.pullAt=Xo,Fn.range=fl,Fn.rangeRight=dl,Fn.rearg=Fs,Fn.reject=function(e,t){return(Vs(e)?At:pr)(e,Ns(oo(t,3)))},Fn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=oo(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Ur(e,i),n},Fn.rest=function(e,t){if("function"!=typeof e)throw new Ee(o);return Kr(e,t=t===i?t:da(t))},Fn.reverse=Zo,Fn.sampleSize=function(e,t,n){return t=(n?yo(e,t,n):t===i)?1:da(t),(Vs(e)?Qn:Jr)(e,t)},Fn.set=function(e,t,n){return null==e?e:Qr(e,t,n)},Fn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Qr(e,t,n,r)},Fn.shuffle=function(e){return(Vs(e)?Yn:Zr)(e)},Fn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&yo(e,t,n)?(t=0,n=r):(t=null==t?0:da(t),n=n===i?r:da(n)),ei(e,t,n)):[]},Fn.sortBy=Cs,Fn.sortedUniq=function(e){return e&&e.length?ii(e):[]},Fn.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},Fn.split=function(e,t,n){return n&&"number"!=typeof n&&yo(e,t,n)&&(t=n=i),(n=n===i?d:n>>>0)?(e=ya(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&rn(e)?vi(hn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Ee(o);return t=null==t?0:gn(da(t),0),Kr((function(n){var r=n[t],i=vi(n,0,t);return r&&Dt(i,r),kt(e,this,i)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:da(t))<0?0:t):[]},Fn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:da(t)))<0?0:t,r):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?ui(e,oo(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?ui(e,oo(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ee(o);return Zs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_s(e,t,{leading:r,maxWait:t,trailing:i})},Fn.thru=fs,Fn.toArray=ha,Fn.toPairs=ja,Fn.toPairsIn=Fa,Fn.toPath=function(e){return Vs(e)?Rt(e,Lo):aa(e)?[e]:Mi(Io(ya(e)))},Fn.toPlainObject=ga,Fn.transform=function(e,t,n){var r=Vs(e),i=r||Ks(e)||la(e);if(t=oo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Zs(e)&&Qs(o)?Bn(Ue(e)):{}}return(i?Ot:vr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Fn.unary=function(e){return Ms(e,1)},Fn.union=es,Fn.unionBy=ts,Fn.unionWith=ns,Fn.uniq=function(e){return e&&e.length?ai(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},Fn.unset=function(e,t){return null==e||li(e,t)},Fn.unzip=rs,Fn.unzipWith=is,Fn.update=function(e,t,n){return null==e?e:ci(e,t,mi(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ci(e,t,mi(n),r)},Fn.values=Ba,Fn.valuesIn=function(e){return null==e?[]:Qt(e,Ra(e))},Fn.without=os,Fn.words=Qa,Fn.wrap=function(e,t){return Ls(mi(t),e)},Fn.xor=ss,Fn.xorBy=as,Fn.xorWith=ls,Fn.zip=cs,Fn.zipObject=function(e,t){return di(e||[],t||[],Zn)},Fn.zipObjectDeep=function(e,t){return di(e||[],t||[],Qr)},Fn.zipWith=us,Fn.entries=ja,Fn.entriesIn=Fa,Fn.extend=ba,Fn.extendWith=wa,sl(Fn,Fn),Fn.add=yl,Fn.attempt=Ya,Fn.camelCase=za,Fn.capitalize=$a,Fn.ceil=vl,Fn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ma(n))==n?n:0),t!==i&&(t=(t=ma(t))==t?t:0),or(ma(e),t,n)},Fn.clone=function(e){return sr(e,4)},Fn.cloneDeep=function(e){return sr(e,5)},Fn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Fn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Fn.conformsTo=function(e,t){return null==t||ar(e,t,_a(t))},Fn.deburr=Ha,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=bl,Fn.endsWith=function(e,t,n){e=ya(e),t=si(t);var r=e.length,o=n=n===i?r:or(da(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Fn.eq=Bs,Fn.escape=function(e){return(e=ya(e))&&G.test(e)?e.replace(q,tn):e},Fn.escapeRegExp=function(e){return(e=ya(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Fn.every=function(e,t,n){var r=Vs(e)?Et:fr;return n&&yo(e,t,n)&&(t=i),r(e,oo(t,3))},Fn.find=ms,Fn.findIndex=Ho,Fn.findKey=function(e,t){return jt(e,oo(t,3),vr)},Fn.findLast=gs,Fn.findLastIndex=Vo,Fn.findLastKey=function(e,t){return jt(e,oo(t,3),br)},Fn.floor=wl,Fn.forEach=ys,Fn.forEachRight=vs,Fn.forIn=function(e,t){return null==e?e:gr(e,oo(t,3),Ra)},Fn.forInRight=function(e,t){return null==e?e:yr(e,oo(t,3),Ra)},Fn.forOwn=function(e,t){return e&&vr(e,oo(t,3))},Fn.forOwnRight=function(e,t){return e&&br(e,oo(t,3))},Fn.get=Oa,Fn.gt=zs,Fn.gte=$s,Fn.has=function(e,t){return null!=e&&fo(e,t,Or)},Fn.hasIn=Ma,Fn.head=Wo,Fn.identity=nl,Fn.includes=function(e,t,n,r){e=Ws(e)?e:Ba(e),n=n&&!r?da(n):0;var i=e.length;return n<0&&(n=gn(i+n,0)),sa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Bt(e,t,n)>-1},Fn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:da(n);return i<0&&(i=gn(r+i,0)),Bt(e,t,i)},Fn.inRange=function(e,t,n){return t=fa(t),n===i?(n=t,t=0):n=fa(n),function(e,t,n){return e>=yn(t,n)&&e<gn(t,n)}(e=ma(e),t,n)},Fn.invoke=Ta,Fn.isArguments=Hs,Fn.isArray=Vs,Fn.isArrayBuffer=Us,Fn.isArrayLike=Ws,Fn.isArrayLikeObject=qs,Fn.isBoolean=function(e){return!0===e||!1===e||ea(e)&&kr(e)==y},Fn.isBuffer=Ks,Fn.isDate=Gs,Fn.isElement=function(e){return ea(e)&&1===e.nodeType&&!ra(e)},Fn.isEmpty=function(e){if(null==e)return!0;if(Ws(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||la(e)||Hs(e)))return!e.length;var t=ho(e);if(t==S||t==E)return!e.size;if(xo(e))return!Nr(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},Fn.isEqual=function(e,t){return _r(e,t)},Fn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?_r(e,t,i,n):!!r},Fn.isError=Js,Fn.isFinite=function(e){return"number"==typeof e&&Lt(e)},Fn.isFunction=Qs,Fn.isInteger=Ys,Fn.isLength=Xs,Fn.isMap=ta,Fn.isMatch=function(e,t){return e===t||Rr(e,t,ao(t))},Fn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Rr(e,t,ao(t),n)},Fn.isNaN=function(e){return na(e)&&e!=+e},Fn.isNative=function(e){if(wo(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},Fn.isNil=function(e){return null==e},Fn.isNull=function(e){return null===e},Fn.isNumber=na,Fn.isObject=Zs,Fn.isObjectLike=ea,Fn.isPlainObject=ra,Fn.isRegExp=ia,Fn.isSafeInteger=function(e){return Ys(e)&&e>=-9007199254740991&&e<=h},Fn.isSet=oa,Fn.isString=sa,Fn.isSymbol=aa,Fn.isTypedArray=la,Fn.isUndefined=function(e){return e===i},Fn.isWeakMap=function(e){return ea(e)&&ho(e)==_},Fn.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==kr(e)},Fn.join=function(e,t){return null==e?"":Ut.call(e,t)},Fn.kebabCase=Va,Fn.last=Jo,Fn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=da(n))<0?gn(r+o,0):yn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ft(e,$t,o,!0)},Fn.lowerCase=Ua,Fn.lowerFirst=Wa,Fn.lt=ca,Fn.lte=ua,Fn.max=function(e){return e&&e.length?dr(e,nl,Cr):i},Fn.maxBy=function(e,t){return e&&e.length?dr(e,oo(t,2),Cr):i},Fn.mean=function(e){return Ht(e,nl)},Fn.meanBy=function(e,t){return Ht(e,oo(t,2))},Fn.min=function(e){return e&&e.length?dr(e,nl,Ir):i},Fn.minBy=function(e,t){return e&&e.length?dr(e,oo(t,2),Ir):i},Fn.stubArray=pl,Fn.stubFalse=ml,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=xl,Fn.nth=function(e,t){return e&&e.length?zr(e,da(t)):i},Fn.noConflict=function(){return ht._===this&&(ht._=Fe),this},Fn.noop=al,Fn.now=Os,Fn.pad=function(e,t,n){e=ya(e);var r=(t=da(t))?un(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return $i(dt(i),n)+e+$i(ft(i),n)},Fn.padEnd=function(e,t,n){e=ya(e);var r=(t=da(t))?un(e):0;return t&&r<t?e+$i(t-r,n):e},Fn.padStart=function(e,t,n){e=ya(e);var r=(t=da(t))?un(e):0;return t&&r<t?$i(t-r,n)+e:e},Fn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(ya(e).replace(re,""),t||0)},Fn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=fa(e),t===i?(t=e,e=0):t=fa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=wn();return yn(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Wr(e,t)},Fn.reduce=function(e,t,n){var r=Vs(e)?Pt:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,ur)},Fn.reduceRight=function(e,t,n){var r=Vs(e)?Nt:Wt,i=arguments.length<3;return r(e,oo(t,4),n,i,hr)},Fn.repeat=function(e,t,n){return t=(n?yo(e,t,n):t===i)?1:da(t),qr(ya(e),t)},Fn.replace=function(){var e=arguments,t=ya(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.result=function(e,t,n){var r=-1,o=(t=gi(t,e)).length;for(o||(o=1,e=i);++r<o;){var s=null==e?i:e[Lo(t[r])];s===i&&(r=o,s=n),e=Qs(s)?s.call(e):s}return e},Fn.round=Sl,Fn.runInContext=e,Fn.sample=function(e){return(Vs(e)?Jn:Gr)(e)},Fn.size=function(e){if(null==e)return 0;if(Ws(e))return sa(e)?un(e):e.length;var t=ho(e);return t==S||t==E?e.size:Nr(e).length},Fn.snakeCase=qa,Fn.some=function(e,t,n){var r=Vs(e)?It:ti;return n&&yo(e,t,n)&&(t=i),r(e,oo(t,3))},Fn.sortedIndex=function(e,t){return ni(e,t)},Fn.sortedIndexBy=function(e,t,n){return ri(e,t,oo(n,2))},Fn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ni(e,t);if(r<n&&Bs(e[r],t))return r}return-1},Fn.sortedLastIndex=function(e,t){return ni(e,t,!0)},Fn.sortedLastIndexBy=function(e,t,n){return ri(e,t,oo(n,2),!0)},Fn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ni(e,t,!0)-1;if(Bs(e[n],t))return n}return-1},Fn.startCase=Ka,Fn.startsWith=function(e,t,n){return e=ya(e),n=null==n?0:or(da(n),0,e.length),t=si(t),e.slice(n,n+t.length)==t},Fn.subtract=kl,Fn.sum=function(e){return e&&e.length?qt(e,nl):0},Fn.sumBy=function(e,t){return e&&e.length?qt(e,oo(t,2)):0},Fn.template=function(e,t,n){var r=Fn.templateSettings;n&&yo(e,t,n)&&(t=i),e=ya(e),t=wa({},t,r,Ji);var o,s,a=wa({},t.imports,r.imports,Ji),l=_a(a),c=Qt(a,l),u=0,h=t.interpolate||be,f="__p += '",d=Oe((t.escape||be).source+"|"+h.source+"|"+(h===Y?he:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,(function(t,n,r,i,a,l){return r||(r=i),f+=e.slice(u,l).replace(we,nn),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),f+="';\n";var m=Pe.call(t,"variable")&&t.variable;if(m){if(ce.test(m))throw new xe("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(H,""):f).replace(V,"$1").replace(U,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=Ya((function(){return Se(l,p+"return "+f).apply(i,c)}));if(g.source=f,Js(g))throw g;return g},Fn.times=function(e,t){if((e=da(e))<1||e>h)return[];var n=d,r=yn(e,d);t=oo(t),e-=d;for(var i=Kt(r,t);++n<e;)t(n);return i},Fn.toFinite=fa,Fn.toInteger=da,Fn.toLength=pa,Fn.toLower=function(e){return ya(e).toLowerCase()},Fn.toNumber=ma,Fn.toSafeInteger=function(e){return e?or(da(e),-9007199254740991,h):0===e?e:0},Fn.toString=ya,Fn.toUpper=function(e){return ya(e).toUpperCase()},Fn.trim=function(e,t,n){if((e=ya(e))&&(n||t===i))return Gt(e);if(!e||!(t=si(t)))return e;var r=hn(e),o=hn(t);return vi(r,Xt(r,o),Zt(r,o)+1).join("")},Fn.trimEnd=function(e,t,n){if((e=ya(e))&&(n||t===i))return e.slice(0,fn(e)+1);if(!e||!(t=si(t)))return e;var r=hn(e);return vi(r,0,Zt(r,hn(t))+1).join("")},Fn.trimStart=function(e,t,n){if((e=ya(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=si(t)))return e;var r=hn(e);return vi(r,Xt(r,hn(t))).join("")},Fn.truncate=function(e,t){var n=30,r="...";if(Zs(t)){var o="separator"in t?t.separator:o;n="length"in t?da(t.length):n,r="omission"in t?si(t.omission):r}var s=(e=ya(e)).length;if(rn(e)){var a=hn(e);s=a.length}if(n>=s)return e;var l=n-un(r);if(l<1)return r;var c=a?vi(a,0,l).join(""):e.slice(0,l);if(o===i)return c+r;if(a&&(l+=c.length-l),ia(o)){if(e.slice(l).search(o)){var u,h=c;for(o.global||(o=Oe(o.source,ya(fe.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var f=u.index;c=c.slice(0,f===i?l:f)}}else if(e.indexOf(si(o),l)!=l){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Fn.unescape=function(e){return(e=ya(e))&&K.test(e)?e.replace(W,dn):e},Fn.uniqueId=function(e){var t=++Ne;return ya(e)+t},Fn.upperCase=Ga,Fn.upperFirst=Ja,Fn.each=ys,Fn.eachRight=vs,Fn.first=Wo,sl(Fn,(gl={},vr(Fn,(function(e,t){Pe.call(Fn.prototype,t)||(gl[t]=e)})),gl),{chain:!1}),Fn.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),Ot(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===i?1:gn(da(n),0);var r=this.__filtered__&&!t?new Hn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ot(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ot(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),Ot(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(nl)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Ar(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(Ns(oo(e)))},Hn.prototype.slice=function(e,t){e=da(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=da(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(d)},vr(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Fn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Fn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,l=t instanceof Hn,c=a[0],u=l||Vs(t),h=function(e){var t=o.apply(Fn,Dt([e],a));return r&&f?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,d=!!this.__actions__.length,p=s&&!f,m=l&&!d;if(!s&&u){t=m?t:new Hn(this);var g=e.apply(t,a);return g.__actions__.push({func:fs,args:[h],thisArg:i}),new $n(g,f)}return p&&m?e.apply(this,a):(g=this.thru(h),p?r?g.value()[0]:g.value():g)})})),Ot(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ae[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Vs(i)?i:[],e)}return this[n]((function(n){return t.apply(Vs(n)?n:[],e)}))}})),vr(Hn.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";Pe.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:t,func:n})}})),Tn[ji(i,2).name]=[{name:"wrapper",func:i}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Mi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mi(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Vs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=yn(t,e+s);break;case"takeRight":e=gn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,l=a-s,c=r?a:s-1,u=this.__iteratees__,h=u.length,f=0,d=yn(l,this.__takeCount__);if(!n||!r&&i==l&&d==l)return hi(e,this.__actions__);var p=[];e:for(;l--&&f<d;){for(var m=-1,g=e[c+=t];++m<h;){var y=u[m],v=y.iteratee,b=y.type,w=v(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}p[f++]=g}return p},Fn.prototype.at=ds,Fn.prototype.chain=function(){return hs(this)},Fn.prototype.commit=function(){return new $n(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===i&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Fo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Fn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:fs,args:[Zo],thisArg:i}),new $n(t,this.__chain__)}return this.thru(Zo)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return hi(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Je&&(Fn.prototype[Je]=function(){return this}),Fn}();ht._=pn,(r=function(){return pn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},631:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,s=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&l&&"function"==typeof l.get?l.get:null,u=a&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,k=Array.prototype.concat,C=Array.prototype.join,O=Array.prototype.slice,M=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,_="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,P=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-M(-e):M(e);if(r!==e){var i=String(r),o=v.call(t,i.length+1);return b.call(i,n,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var I=n(4654),L=I.custom,j=H(L)?L:null;function F(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function B(e){return b.call(String(e),/"/g,"&quot;")}function z(e){return!("[object Array]"!==W(e)||R&&"object"==typeof e&&R in e)}function $(e){return!("[object RegExp]"!==W(e)||R&&"object"==typeof e&&R in e)}function H(e){if(_)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!T)return!1;try{return T.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,i){var a=n||{};if(U(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(U(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!U(a,"customInspect")||a.customInspect;if("boolean"!=typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(U(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(U(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return m?N(t,w):w}if("bigint"==typeof t){var S=String(t)+"n";return m?N(t,S):S}var M=void 0===a.depth?5:a.depth;if(void 0===r&&(r=0),r>=M&&M>0&&"object"==typeof t)return z(t)?"[Array]":"[Object]";var A,L=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=C.call(Array(e.indent+1)," ")}return{base:n,prev:C.call(Array(t+1),n)}}(a,r);if(void 0===i)i=[];else if(q(i,t)>=0)return"[Circular]";function V(t,n,o){if(n&&(i=O.call(i)).push(n),o){var s={depth:a.depth};return U(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,r+1,i)}return e(t,a,r+1,i)}if("function"==typeof t&&!$(t)){var G=function(e){if(e.name)return e.name;var t=y.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=Z(t,V);return"[Function"+(G?": "+G:" (anonymous)")+"]"+(ee.length>0?" { "+C.call(ee,", ")+" }":"")}if(H(t)){var te=_?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(t);return"object"!=typeof t||_?te:J(te)}if((A=t)&&"object"==typeof A&&("undefined"!=typeof HTMLElement&&A instanceof HTMLElement||"string"==typeof A.nodeName&&"function"==typeof A.getAttribute)){for(var ne="<"+x.call(String(t.nodeName)),re=t.attributes||[],ie=0;ie<re.length;ie++)ne+=" "+re[ie].name+"="+F(B(re[ie].value),"double",a);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+x.call(String(t.nodeName))+">"}if(z(t)){if(0===t.length)return"[]";var oe=Z(t,V);return L&&!function(e){for(var t=0;t<e.length;t++)if(q(e[t],"\n")>=0)return!1;return!0}(oe)?"["+X(oe,L)+"]":"[ "+C.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||R&&"object"==typeof e&&R in e)}(t)){var se=Z(t,V);return"cause"in Error.prototype||!("cause"in t)||D.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+C.call(se,", ")+" }":"{ ["+String(t)+"] "+C.call(k.call("[cause]: "+V(t.cause),se),", ")+" }"}if("object"==typeof t&&l){if(j&&"function"==typeof t[j]&&I)return I(t,{depth:M-r});if("symbol"!==l&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return s&&s.call(t,(function(e,n){ae.push(V(n,t,!0)+" => "+V(e,t))})),Y("Map",o.call(t),ae,L)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return u&&u.call(t,(function(e){le.push(V(e,t))})),Y("Set",c.call(t),le,L)}if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Q("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Q("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return Q("WeakRef");if(function(e){return!("[object Number]"!==W(e)||R&&"object"==typeof e&&R in e)}(t))return J(V(Number(t)));if(function(e){if(!e||"object"!=typeof e||!E)return!1;try{return E.call(e),!0}catch(e){}return!1}(t))return J(V(E.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||R&&"object"==typeof e&&R in e)}(t))return J(p.call(t));if(function(e){return!("[object String]"!==W(e)||R&&"object"==typeof e&&R in e)}(t))return J(V(String(t)));if(!function(e){return!("[object Date]"!==W(e)||R&&"object"==typeof e&&R in e)}(t)&&!$(t)){var ce=Z(t,V),ue=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",fe=!ue&&R&&Object(t)===t&&R in t?v.call(W(t),8,-1):he?"Object":"",de=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||he?"["+C.call(k.call([],fe||[],he||[]),": ")+"] ":"");return 0===ce.length?de+"{}":L?de+"{"+X(ce,L)+"}":de+"{ "+C.call(ce,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return V.call(e,t)}function W(e){return m.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function K(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(v.call(e,0,t.maxStringLength),t)+r}return F(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,G),"single",t)}function G(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function J(e){return"Object("+e+")"}function Q(e){return e+" { ? }"}function Y(e,t,n,r){return e+" ("+t+") {"+(r?X(n,r):C.call(n,", "))+"}"}function X(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+C.call(e,","+n)+"\n"+t.prev}function Z(e,t){var n=z(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=U(e,i)?t(e[i],e):""}var o,s="function"==typeof A?A(e):[];if(_){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var l in e)U(e,l)&&(n&&String(Number(l))===l&&l<e.length||_&&o["$"+l]instanceof Symbol||(S.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof A)for(var c=0;c<s.length;c++)D.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}},4244:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,n){return 0===e&&0===n?1/e==1/n:e===n||!(!t(e)||!t(n))}},609:(e,t,n)=>{"use strict";var r=n(4289),i=n(5559),o=n(4244),s=n(5624),a=n(2281),l=i(s(),Object);r(l,{getPolyfill:s,implementation:o,shim:a}),e.exports=l},5624:(e,t,n)=>{"use strict";var r=n(4244);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},2281:(e,t,n)=>{"use strict";var r=n(5624),i=n(4289);e.exports=function(){var e=r();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},8987:(e,t,n)=>{"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=n(1414),a=Object.prototype.propertyIsEnumerable,l=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{h(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===o.call(e),r=s(e),a=t&&"[object String]"===o.call(e),f=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var p=c&&n;if(a&&e.length>0&&!i.call(e,0))for(var m=0;m<e.length;++m)f.push(String(m));if(r&&e.length>0)for(var g=0;g<e.length;++g)f.push(String(g));else for(var y in e)p&&"prototype"===y||!i.call(e,y)||f.push(String(y));if(l)for(var v=function(e){if("undefined"==typeof window||!d)return h(e);try{return h(e)}catch(e){return!1}}(e),b=0;b<u.length;++b)v&&"constructor"===u[b]||!i.call(e,u[b])||f.push(u[b]);return f}}e.exports=r},2215:(e,t,n)=>{"use strict";var r=Array.prototype.slice,i=n(1414),o=Object.keys,s=o?function(e){return o(e)}:n(8987),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?a(r.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},2837:(e,t,n)=>{"use strict";var r=n(2215),i=n(5419)(),o=n(1924),s=Object,a=o("Array.prototype.push"),l=o("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var n=s(e);if(1===arguments.length)return n;for(var o=1;o<arguments.length;++o){var u=s(arguments[o]),h=r(u),f=i&&(Object.getOwnPropertySymbols||c);if(f)for(var d=f(u),p=0;p<d.length;++p){var m=d[p];l(u,m)&&a(h,m)}for(var g=0;g<h.length;++g){var y=h[g];if(l(u,y)){var v=u[y];n[y]=v}}}return n}},3533:(e,t,n)=>{"use strict";var r=n(4289),i=n(5559),o=n(2837),s=n(8162),a=n(4489),l=i.apply(s()),c=function(e,t){return l(Object,arguments)};r(c,{getPolyfill:s,implementation:o,shim:a}),e.exports=c},8162:(e,t,n)=>{"use strict";var r=n(2837);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),n={},r=0;r<t.length;++r)n[t[r]]=t[r];var i=Object.assign({},n),o="";for(var s in i)o+=s;return e!==o}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return"y"===e[1]}return!1}()?r:Object.assign:r}},4489:(e,t,n)=>{"use strict";var r=n(4289),i=n(8162);e.exports=function(){var e=i();return r(Object,{assign:e},{assign:function(){return Object.assign!==e}}),e}},4101:(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)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function o(e,t,n){return o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},o.apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;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,s)}function s(){return o(e,arguments,i(this).constructor)}return s.prototype=Object.create(e.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),r(s,e)},s(e)}n.d(t,{m4:()=>k});var a=function(e){var t,n;function i(t){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this)}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),i}(s(Error));function l(e){return Math.round(255*e)}function c(e,t,n){return l(e)+","+l(t)+","+l(n)}function u(e,t,n,r){if(void 0===r&&(r=c),0===t)return r(n,n,n);var i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*t,s=o*(1-Math.abs(i%2-1)),a=0,l=0,u=0;i>=0&&i<1?(a=o,l=s):i>=1&&i<2?(a=s,l=o):i>=2&&i<3?(l=o,u=s):i>=3&&i<4?(l=s,u=o):i>=4&&i<5?(a=s,u=o):i>=5&&i<6&&(a=o,u=s);var h=n-o/2;return r(a+h,l+h,u+h)}var h={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},f=/^#[a-fA-F0-9]{6}$/,d=/^#[a-fA-F0-9]{8}$/,p=/^#[a-fA-F0-9]{3}$/,m=/^#[a-fA-F0-9]{4}$/,g=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,y=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,v=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,b=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;var w=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function x(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function S(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return w("#"+x(e)+x(t)+x(n));if("object"==typeof e&&void 0===t&&void 0===n)return w("#"+x(e.red)+x(e.green)+x(e.blue));throw new a(6)}function k(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var i=function(e){if("string"!=typeof e)throw new a(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return h[t]?"#"+h[t]:e}(e);if(t.match(f))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(d)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(p))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(m)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=g.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=y.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])>1?parseFloat(""+o[4])/100:parseFloat(""+o[4])};var s=v.exec(t);if(s){var l="rgb("+u(parseInt(""+s[1],10),parseInt(""+s[2],10)/100,parseInt(""+s[3],10)/100)+")",c=g.exec(l);if(!c)throw new a(4,t,l);return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var w=b.exec(t.substring(0,50));if(w){var x="rgb("+u(parseInt(""+w[1],10),parseInt(""+w[2],10)/100,parseInt(""+w[3],10)/100)+")",S=g.exec(x);if(!S)throw new a(4,t,x);return{red:parseInt(""+S[1],10),green:parseInt(""+S[2],10),blue:parseInt(""+S[3],10),alpha:parseFloat(""+w[4])>1?parseFloat(""+w[4])/100:parseFloat(""+w[4])}}throw new a(5)}(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?S(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?S(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new a(7)}},2703:(e,t,n)=>{"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2587:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,i){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(n);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var l=e.length;a>0&&l>a&&(l=a);for(var c=0;c<l;++c){var u,h,f,d,p=e[c].replace(s,"%20"),m=p.indexOf(r);m>=0?(u=p.substr(0,m),h=p.substr(m+1)):(u=p,h=""),f=decodeURIComponent(u),d=decodeURIComponent(h),t(o,f)?Array.isArray(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o}},2361:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,i){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(i){var o=encodeURIComponent(t(i))+r;return Array.isArray(e[i])?e[i].map((function(e){return o+encodeURIComponent(t(e))})).join(n):o+encodeURIComponent(t(e[i]))})).filter(Boolean).join(n):i?encodeURIComponent(t(i))+r+encodeURIComponent(t(e)):""}},7673:(e,t,n)=>{"use strict";n(2587),t.stringify=n(2361)},667:(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)}function i(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===r(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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}function s(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}function a(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(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.")}()}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||s(e,t)||function(){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,{Z:()=>H});var c=n(7294),u=n(4184),h=n.n(u),f={};function d(e,t){}const p=function(e,t){!function(e,t,n){t||f[n]||(e(!1,n),f[n]=!0)}(d,e,t)};function m(e){var t=c.useRef();t.current=e;var n=c.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[]);return n}var g="undefined"!=typeof window&&window.document&&window.document.createElement?c.useLayoutEffect:c.useEffect,y=function(e,t){var n=c.useRef(!0);g((function(){if(!n.current)return e()}),t),g((function(){return n.current=!1,function(){n.current=!0}}),[])};function v(e){var t=c.useRef(!1),n=l(c.useState(e),2),r=n[0],i=n[1];return c.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[r,function(e,n){n&&t.current||i(e)}]}function b(e){return void 0!==e}var w=n(7462),x=n(3366);function S(e,t){if(null==e)return{};var n,r,i=(0,x.Z)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function k(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 C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O={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>=O.F1&&t<=O.F12)return!1;switch(t){case O.ALT:case O.CAPS_LOCK:case O.CONTEXT_MENU:case O.CTRL:case O.DOWN:case O.END:case O.ESC:case O.HOME:case O.INSERT:case O.LEFT:case O.MAC_FF_META:case O.META:case O.NUMLOCK:case O.NUM_CENTER:case O.PAGE_DOWN:case O.PAGE_UP:case O.PAUSE:case O.PRINT_SCREEN:case O.RIGHT:case O.SHIFT:case O.UP:case O.WIN_KEY:case O.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=O.ZERO&&e<=O.NINE)return!0;if(e>=O.NUM_ZERO&&e<=O.NUM_MULTIPLY)return!0;if(e>=O.A&&e<=O.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case O.SPACE:case O.QUESTION_MARK:case O.NUM_PLUS:case O.NUM_MINUS:case O.NUM_PERIOD:case O.NUM_DIVISION:case O.SEMICOLON:case O.DASH:case O.EQUALS:case O.COMMA:case O.PERIOD:case O.SLASH:case O.APOSTROPHE:case O.SINGLE_QUOTE:case O.OPEN_SQUARE_BRACKET:case O.BACKSLASH:case O.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const M=O,E=c.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0});function A(e,t,n){return(e-t)/(n-t)}function T(e,t,n,r){var i=A(t,n,r),o={};switch(e){case"rtl":o.right="".concat(100*i,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(100*i,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(100*i,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(100*i,"%"),o.transform="translateX(-50%)"}return o}function _(e,t){return Array.isArray(e)?e[t]:e}var R=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"];const D=c.forwardRef((function(e,t){var n,r,o=e.prefixCls,s=e.value,a=e.valueIndex,l=e.onStartMove,u=e.style,f=e.render,d=e.dragging,p=e.onOffsetChange,m=S(e,R),g=c.useContext(E),y=g.min,v=g.max,b=g.direction,x=g.disabled,k=g.keyboard,O=g.range,A=g.tabIndex,D=g.ariaLabelForHandle,P=g.ariaLabelledByForHandle,N=g.ariaValueTextFormatterForHandle,I="".concat(o,"-handle"),L=function(e){x||l(e,a)},j=T(b,s,y,v),F=c.createElement("div",(0,w.Z)({ref:t,className:h()(I,(n={},i(n,"".concat(I,"-").concat(a+1),O),i(n,"".concat(I,"-dragging"),d),n)),style:C(C({},j),u),onMouseDown:L,onTouchStart:L,onKeyDown:function(e){if(!x&&k){var t=null;switch(e.which||e.keyCode){case M.LEFT:t="ltr"===b||"btt"===b?-1:1;break;case M.RIGHT:t="ltr"===b||"btt"===b?1:-1;break;case M.UP:t="ttb"!==b?1:-1;break;case M.DOWN:t="ttb"!==b?-1:1;break;case M.HOME:t="min";break;case M.END:t="max";break;case M.PAGE_UP:t=2;break;case M.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),p(t,a))}},tabIndex:x?null:_(A,a),role:"slider","aria-valuemin":y,"aria-valuemax":v,"aria-valuenow":s,"aria-disabled":x,"aria-label":_(D,a),"aria-labelledby":_(P,a),"aria-valuetext":null===(r=_(N,a))||void 0===r?void 0:r(s)},m));return f&&(F=f(F,{index:a,prefixCls:o,value:s,dragging:d})),F}));var P=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"];const N=c.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,o=e.onOffsetChange,s=e.values,a=e.handleRender,l=e.draggingIndex,u=S(e,P),h=c.useRef({});return c.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=h.current[e])||void 0===t||t.focus()}}})),c.createElement(c.Fragment,null,s.map((function(e,t){return c.createElement(D,(0,w.Z)({ref:function(e){e?h.current[t]=e:delete h.current[t]},dragging:l===t,prefixCls:n,style:_(r,t),key:t,value:e,valueIndex:t,onStartMove:i,onOffsetChange:o,render:a},u))})))}));function I(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function L(e){var t=e.prefixCls,n=e.style,r=e.start,i=e.end,o=e.index,s=e.onStartMove,a=c.useContext(E),l=a.direction,u=a.min,f=a.max,d=a.disabled,p=a.range,m="".concat(t,"-track"),g=A(r,u,f),y=A(i,u,f),v=function(e){!d&&s&&s(e,-1)},b={};switch(l){case"rtl":b.right="".concat(100*g,"%"),b.width="".concat(100*y-100*g,"%");break;case"btt":b.bottom="".concat(100*g,"%"),b.height="".concat(100*y-100*g,"%");break;case"ttb":b.top="".concat(100*g,"%"),b.height="".concat(100*y-100*g,"%");break;default:b.left="".concat(100*g,"%"),b.width="".concat(100*y-100*g,"%")}return c.createElement("div",{className:h()(m,p&&"".concat(m,"-").concat(o+1)),style:C(C({},b),n),onMouseDown:v,onTouchStart:v})}function j(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,o=e.onStartMove,s=c.useContext(E),a=s.included,l=s.range,u=s.min,h=c.useMemo((function(){if(!l){if(0===r.length)return[];var e=null!=i?i:u,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],o=0;o<r.length-1;o+=1)n.push({start:r[o],end:r[o+1]});return n}),[r,l,i,u]);return a?h.map((function(e,r){var i=e.start,s=e.end;return c.createElement(L,{index:r,prefixCls:t,style:_(n,r),start:i,end:s,key:r,onStartMove:o})})):null}function F(e){var t=e.prefixCls,n=e.style,r=e.children,o=e.value,s=e.onClick,a=c.useContext(E),l=a.min,u=a.max,f=a.direction,d=a.includedStart,p=a.includedEnd,m=a.included,g="".concat(t,"-text"),y=T(f,o,l,u);return c.createElement("span",{className:h()(g,i({},"".concat(g,"-active"),m&&d<=o&&o<=p)),style:C(C({},y),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){s(o)}},r)}function B(e){var t=e.prefixCls,n=e.marks,r=e.onClick,i="".concat(t,"-mark");return n.length?c.createElement("div",{className:i},n.map((function(e){var t=e.value,n=e.style,o=e.label;return c.createElement(F,{key:t,prefixCls:i,style:n,value:t,onClick:r},o)}))):null}function z(e){var t=e.prefixCls,n=e.value,r=e.style,o=e.activeStyle,s=c.useContext(E),a=s.min,l=s.max,u=s.direction,f=s.included,d=s.includedStart,p=s.includedEnd,m="".concat(t,"-dot"),g=f&&d<=n&&n<=p,y=C(C({},T(u,n,a,l)),"function"==typeof r?r(n):r);return g&&(y=C(C({},y),"function"==typeof o?o(n):o)),c.createElement("span",{className:h()(m,i({},"".concat(m,"-active"),g)),style:y})}function $(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,o=e.activeStyle,s=c.useContext(E),a=s.min,l=s.max,u=s.step,h=c.useMemo((function(){var e=new Set;if(n.forEach((function(t){e.add(t.value)})),r&&null!==u)for(var t=a;t<=l;)e.add(t),t+=u;return Array.from(e)}),[a,l,u,r,n]);return c.createElement("div",{className:"".concat(t,"-step")},h.map((function(e){return c.createElement(z,{prefixCls:t,key:e,value:e,style:i,activeStyle:o})})))}const H=c.forwardRef((function(e,t){var n,o=e.prefixCls,s=void 0===o?"rc-slider":o,u=e.className,f=e.style,d=e.disabled,g=void 0!==d&&d,w=e.keyboard,x=void 0===w||w,S=e.autoFocus,k=e.onFocus,C=e.onBlur,O=e.min,M=void 0===O?0:O,A=e.max,T=void 0===A?100:A,_=e.step,R=void 0===_?1:_,D=e.value,P=e.defaultValue,L=e.range,F=e.count,z=e.onChange,H=e.onBeforeChange,V=e.onAfterChange,U=e.allowCross,W=void 0===U||U,q=e.pushable,K=void 0!==q&&q,G=e.draggableTrack,J=e.reverse,Q=e.vertical,Y=e.included,X=void 0===Y||Y,Z=e.startPoint,ee=e.trackStyle,te=e.handleStyle,ne=e.railStyle,re=e.dotStyle,ie=e.activeDotStyle,oe=e.marks,se=e.dots,ae=e.handleRender,le=e.tabIndex,ce=void 0===le?0:le,ue=e.ariaLabelForHandle,he=e.ariaLabelledByForHandle,fe=e.ariaValueTextFormatterForHandle,de=c.useRef(),pe=c.useRef(),me=c.useMemo((function(){return Q?J?"ttb":"btt":J?"rtl":"ltr"}),[J,Q]),ge=c.useMemo((function(){return isFinite(M)?M:0}),[M]),ye=c.useMemo((function(){return isFinite(T)?T:100}),[T]),ve=c.useMemo((function(){return null!==R&&R<=0?1:R}),[R]),be=c.useMemo((function(){return!0===K?ve:K>=0&&K}),[K,ve]),we=c.useMemo((function(){return Object.keys(oe||{}).map((function(e){var t=oe[e],n={value:Number(e)};return t&&"object"===r(t)&&!c.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n})).filter((function(e){var t=e.label;return t||"number"==typeof t})).sort((function(e,t){return e.value-t.value}))}),[oe]),xe=function(e,t,n,r,i,o){var s=c.useCallback((function(n){var r=isFinite(n);return r=Math.min(t,n),Math.max(e,r)}),[e,t]),l=c.useCallback((function(r){if(null!==n){var i=e+Math.round((s(r)-e)/n)*n,o=function(e){return(String(e).split(".")[1]||"").length},a=Math.max(o(n),o(t),o(e)),l=Number(i.toFixed(a));return e<=l&&l<=t?l:null}return null}),[n,e,t,s]),u=c.useCallback((function(i){var o=s(i),a=r.map((function(e){return e.value}));null!==n&&a.push(l(i)),a.push(e,t);var c=a[0],u=t-e;return a.forEach((function(e){var t=Math.abs(o-e);t<=u&&(c=e,u=t)})),c}),[e,t,r,n,s,l]),h=function i(o,s,c){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof s){var h,f=o[c],d=f+s,p=[];r.forEach((function(e){p.push(e.value)})),p.push(e,t),p.push(l(f));var m=s>0?1:-1;"unit"===u?p.push(l(f+m*n)):p.push(l(d)),p=p.filter((function(e){return null!==e})).filter((function(e){return s<0?e<=f:e>=f})),"unit"===u&&(p=p.filter((function(e){return e!==f})));var g="unit"===u?f:d;h=p[0];var y=Math.abs(h-g);if(p.forEach((function(e){var t=Math.abs(e-g);t<y&&(h=e,y=t)})),void 0===h)return s<0?e:t;if("dist"===u)return h;if(Math.abs(s)>1){var v=a(o);return v[c]=h,i(v,s-m,c,u)}return h}return"min"===s?e:"max"===s?t:void 0},f=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",i=e[n],o=h(e,t,n,r);return{value:o,changed:o!==i}},d=function(e){return null===o&&0===e||"number"==typeof o&&e<o};return[u,function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",s=e.map(u),a=s[n],l=h(s,t,n,r);if(s[n]=l,!1===i){var c=o||0;n>0&&s[n-1]!==a&&(s[n]=Math.max(s[n],s[n-1]+c)),n<s.length-1&&s[n+1]!==a&&(s[n]=Math.min(s[n],s[n+1]-c))}else if("number"==typeof o||null===o){for(var p=n+1;p<s.length;p+=1)for(var m=!0;d(s[p]-s[p-1])&&m;){var g=f(s,1,p);s[p]=g.value,m=g.changed}for(var y=n;y>0;y-=1)for(var v=!0;d(s[y]-s[y-1])&&v;){var b=f(s,-1,y-1);s[y-1]=b.value,v=b.changed}for(var w=s.length-1;w>0;w-=1)for(var x=!0;d(s[w]-s[w-1])&&x;){var S=f(s,-1,w-1);s[w-1]=S.value,x=S.changed}for(var k=0;k<s.length-1;k+=1)for(var C=!0;d(s[k+1]-s[k])&&C;){var O=f(s,1,k+1);s[k+1]=O.value,C=O.changed}}return{value:s[n],values:s}}]}(ge,ye,ve,we,W,be),Se=l(xe,2),ke=Se[0],Ce=Se[1],Oe=function(e,t){var n=t||{},r=n.defaultValue,i=n.value,o=n.onChange,s=n.postState,a=l(v((function(){return b(i)?i:b(r)?"function"==typeof r?r():r:"function"==typeof e?e():e})),2),c=a[0],u=a[1],h=void 0!==i?i:c,f=s?s(h):h,d=m(o),p=l(v([h]),2),g=p[0],w=p[1];return y((function(){var e=g[0];c!==e&&d(c,e)}),[g]),y((function(){b(i)||u(i)}),[i]),[f,m((function(e,t){u(e,t),w([h],t)}))]}(P,{value:D}),Me=l(Oe,2),Ee=Me[0],Ae=Me[1],Te=c.useMemo((function(){var e=null==Ee?[]:Array.isArray(Ee)?Ee:[Ee],t=l(e,1)[0],n=null===Ee?[]:[void 0===t?ge:t];if(L){if(n=a(e),F||void 0===Ee){var r=F>=0?F+1:2;for(n=n.slice(0,r);n.length<r;){var i;n.push(null!==(i=n[n.length-1])&&void 0!==i?i:ge)}}n.sort((function(e,t){return e-t}))}return n.forEach((function(e,t){n[t]=ke(e)})),n}),[Ee,L,ge,F,ke]),_e=c.useRef(Te);_e.current=Te;var Re=function(e){return L?e:e[0]},De=function(e){var t=a(e).sort((function(e,t){return e-t}));z&&!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new Set;return function e(t,o){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=i.has(t);if(p(!a,"Warning: There may be circular references"),a)return!1;if(t===o)return!0;if(n&&s>1)return!1;i.add(t);var l=s+1;if(Array.isArray(t)){if(!Array.isArray(o)||t.length!==o.length)return!1;for(var c=0;c<t.length;c++)if(!e(t[c],o[c],l))return!1;return!0}if(t&&o&&"object"===r(t)&&"object"===r(o)){var u=Object.keys(t);return u.length===Object.keys(o).length&&u.every((function(n){return e(t[n],o[n],l)}))}return!1}(e,t)}(t,_e.current,!0)&&z(Re(t)),Ae(t)},Pe=function(e){if(!g){var t=0,n=ye-ge;Te.forEach((function(r,i){var o=Math.abs(e-r);o<=n&&(n=o,t=i)}));var r=a(Te);r[t]=e,L&&!Te.length&&void 0===F&&r.push(e),null==H||H(Re(r)),De(r),null==V||V(Re(r))}},Ne=l(c.useState(null),2),Ie=Ne[0],Le=Ne[1];c.useEffect((function(){if(null!==Ie){var e=Te.indexOf(Ie);e>=0&&de.current.focus(e)}Le(null)}),[Ie]);var je=c.useMemo((function(){return(!G||null!==ve)&&G}),[G,ve]),Fe=function(e,t,n,r,i,o,s,u,h){var f=l(c.useState(null),2),d=f[0],p=f[1],m=l(c.useState(-1),2),g=m[0],y=m[1],v=l(c.useState(n),2),b=v[0],w=v[1],x=l(c.useState(n),2),S=x[0],k=x[1],C=c.useRef(null),O=c.useRef(null);c.useEffect((function(){-1===g&&w(n)}),[n,g]),c.useEffect((function(){return function(){document.removeEventListener("mousemove",C.current),document.removeEventListener("mouseup",O.current),document.removeEventListener("touchmove",C.current),document.removeEventListener("touchend",O.current)}}),[]);var M=function(e,t){b.some((function(t,n){return t!==e[n]}))&&(void 0!==t&&p(t),w(e),s(e))},E=function(e,t){if(-1===e){var n=S[0],s=S[S.length-1],l=r-n,c=i-s,u=t*(i-r);u=Math.max(u,l),u=Math.min(u,c);var f=o(n+u);u=f-n;var d=S.map((function(e){return e+u}));M(d)}else{var p=(i-r)*t,m=a(b);m[e]=S[e];var g=h(m,p,e,"dist");M(g.values,g.value)}},A=c.useRef(E);A.current=E;var T=c.useMemo((function(){var e=a(n).sort((function(e,t){return e-t})),t=a(b).sort((function(e,t){return e-t}));return e.every((function(e,n){return e===t[n]}))?b:n}),[n,b]);return[g,d,T,function(r,i){r.stopPropagation();var o=n[i];y(i),p(o),k(n);var s=I(r),a=s.pageX,l=s.pageY,c=function(n){n.preventDefault();var r,o=I(n),s=o.pageX,c=o.pageY,u=s-a,h=c-l,f=e.current.getBoundingClientRect(),d=f.width,p=f.height;switch(t){case"btt":r=-h/p;break;case"ttb":r=h/p;break;case"rtl":r=-u/d;break;default:r=u/d}A.current(i,r)},u=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",c),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",c),C.current=null,O.current=null,y(-1),null==V||V(Re(_e.current))};document.addEventListener("mouseup",u),document.addEventListener("mousemove",c),document.addEventListener("touchend",u),document.addEventListener("touchmove",c),C.current=c,O.current=u}]}(pe,me,Te,ge,ye,ke,De,0,Ce),Be=l(Fe,4),ze=Be[0],$e=Be[1],He=Be[2],Ve=Be[3],Ue=function(e,t){Ve(e,t),null==H||H(Re(_e.current))},We=-1!==ze;c.useEffect((function(){if(!We){var e=Te.lastIndexOf($e);de.current.focus(e)}}),[We]);var qe=c.useMemo((function(){return a(He).sort((function(e,t){return e-t}))}),[He]),Ke=l(c.useMemo((function(){return L?[qe[0],qe[qe.length-1]]:[ge,qe[0]]}),[qe,L,ge]),2),Ge=Ke[0],Je=Ke[1];c.useImperativeHandle(t,(function(){return{focus:function(){de.current.focus(0)},blur:function(){var e=document.activeElement;pe.current.contains(e)&&(null==e||e.blur())}}})),c.useEffect((function(){S&&de.current.focus(0)}),[]);var Qe=c.useMemo((function(){return{min:ge,max:ye,direction:me,disabled:g,keyboard:x,step:ve,included:X,includedStart:Ge,includedEnd:Je,range:L,tabIndex:ce,ariaLabelForHandle:ue,ariaLabelledByForHandle:he,ariaValueTextFormatterForHandle:fe}}),[ge,ye,me,g,x,ve,X,Ge,Je,L,ce,ue,he,fe]);return c.createElement(E.Provider,{value:Qe},c.createElement("div",{ref:pe,className:h()(s,u,(n={},i(n,"".concat(s,"-disabled"),g),i(n,"".concat(s,"-vertical"),Q),i(n,"".concat(s,"-horizontal"),!Q),i(n,"".concat(s,"-with-marks"),we.length),n)),style:f,onMouseDown:function(e){e.preventDefault();var t,n=pe.current.getBoundingClientRect(),r=n.width,i=n.height,o=n.left,s=n.top,a=n.bottom,l=n.right,c=e.clientX,u=e.clientY;switch(me){case"btt":t=(a-u)/i;break;case"ttb":t=(u-s)/i;break;case"rtl":t=(l-c)/r;break;default:t=(c-o)/r}Pe(ke(ge+t*(ye-ge)))}},c.createElement("div",{className:"".concat(s,"-rail"),style:ne}),c.createElement(j,{prefixCls:s,style:ee,values:qe,startPoint:Z,onStartMove:je?Ue:null}),c.createElement($,{prefixCls:s,marks:we,dots:se,style:re,activeStyle:ie}),c.createElement(N,{ref:de,prefixCls:s,style:te,values:He,draggingIndex:ze,onStartMove:Ue,onOffsetChange:function(e,t){if(!g){var n=Ce(Te,e,t);null==H||H(Re(Te)),De(n.values),null==V||V(Re(n.values)),Le(n.value)}},onFocus:k,onBlur:C,handleRender:ae}),c.createElement(B,{prefixCls:s,marks:we,onClick:Pe})))}))},4448:(e,t,n)=>{"use strict";var r=n(7294),i=n(3840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(a[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),h=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},p={};function m(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!h.call(p,e)||!h.call(d,e)&&(f.test(e)?p[e]=!0:(d[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),E=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var N=Symbol.iterator;function I(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=N&&e[N]||e["@@iterator"])?e:null}var L,j=Object.assign;function F(e){if(void 0===L)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var B=!1;function z(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function $(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return z(e.type,!1);case 11:return z(e.type.render,!1);case 1:return z(e.type,!0);default:return""}}function H(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case k:return"Fragment";case S:return"Portal";case O:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case _:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case M:return(e._context.displayName||"Context")+".Provider";case A:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:H(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return H(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function U(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return j({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Q(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=U(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function X(e,t){Y(e,t);var n=U(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,U(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+U(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return j({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:U(n)}}function oe(e,t){var n=U(t.value),r=U(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,he=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var de={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(de).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),de[t]=de[e]}))}));var ye=j({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,ke=null,Ce=null;function Oe(e){if(e=gi(e)){if("function"!=typeof Se)throw Error(o(280));var t=e.stateNode;t&&(t=vi(t),Se(e.stateNode,e.type,t))}}function Me(e){ke?Ce?Ce.push(e):Ce=[e]:ke=e}function Ee(){if(ke){var e=ke,t=Ce;if(Ce=ke=null,Oe(e),t)for(e=0;e<t.length;e++)Oe(t[e])}}function Ae(e,t){return e(t)}function Te(){}var _e=!1;function Re(e,t,n){if(_e)return e(t,n);_e=!0;try{return Ae(e,t,n)}finally{_e=!1,(null!==ke||null!==Ce)&&(Te(),Ee())}}function De(e,t){var n=e.stateNode;if(null===n)return null;var r=vi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Pe=!1;if(u)try{var Ne={};Object.defineProperty(Ne,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",Ne,Ne),window.removeEventListener("test",Ne,Ne)}catch(ue){Pe=!1}function Ie(e,t,n,r,i,o,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Le=!1,je=null,Fe=!1,Be=null,ze={onError:function(e){Le=!0,je=e}};function $e(e,t,n,r,i,o,s,a,l){Le=!1,je=null,Ie.apply(ze,arguments)}function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Ue(e){if(He(e)!==e)throw Error(o(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Ue(i),e;if(s===r)return Ue(i),t;s=s.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=s;break}if(l===r){a=!0,r=i,n=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===n){a=!0,n=s,r=i;break}if(l===r){a=!0,r=s,n=i;break}l=l.sibling}if(!a)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Ke=i.unstable_scheduleCallback,Ge=i.unstable_cancelCallback,Je=i.unstable_shouldYield,Qe=i.unstable_requestPaint,Ye=i.unstable_now,Xe=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null,st=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2,ct=64,ut=4194304;function ht(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=ht(a):0!=(o&=s)&&(r=ht(o))}else 0!=(s=n&~i)?r=ht(s):0!==o&&(r=ht(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-st(t)),r|=e[n],t&=~i;return r}function dt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0==(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var xt,St,kt,Ct,Ot,Mt=!1,Et=[],At=null,Tt=null,_t=null,Rt=new Map,Dt=new Map,Pt=[],Nt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function It(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":_t=null;break;case"pointerover":case"pointerout":Rt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dt.delete(t.pointerId)}}function Lt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=gi(t))&&St(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function jt(e){var t=mi(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void Ot(e.priority,(function(){kt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=gi(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Bt(e,t,n){Ft(e)&&n.delete(t)}function zt(){Mt=!1,null!==At&&Ft(At)&&(At=null),null!==Tt&&Ft(Tt)&&(Tt=null),null!==_t&&Ft(_t)&&(_t=null),Rt.forEach(Bt),Dt.forEach(Bt)}function $t(e,t){e.blockedOn===t&&(e.blockedOn=null,Mt||(Mt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,zt)))}function Ht(e){function t(t){return $t(t,e)}if(0<Et.length){$t(Et[0],e);for(var n=1;n<Et.length;n++){var r=Et[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==At&&$t(At,e),null!==Tt&&$t(Tt,e),null!==_t&&$t(_t,e),Rt.forEach(t),Dt.forEach(t),n=0;n<Pt.length;n++)(r=Pt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&null===(n=Pt[0]).blockedOn;)jt(n),null===n.blockedOn&&Pt.shift()}var Vt=w.ReactCurrentBatchConfig,Ut=!0;function Wt(e,t,n,r){var i=bt,o=Vt.transition;Vt.transition=null;try{bt=1,Kt(e,t,n,r)}finally{bt=i,Vt.transition=o}}function qt(e,t,n,r){var i=bt,o=Vt.transition;Vt.transition=null;try{bt=4,Kt(e,t,n,r)}finally{bt=i,Vt.transition=o}}function Kt(e,t,n,r){if(Ut){var i=Jt(e,t,n,r);if(null===i)$r(e,t,r,Gt,n),It(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return At=Lt(At,e,t,n,r,i),!0;case"dragenter":return Tt=Lt(Tt,e,t,n,r,i),!0;case"mouseover":return _t=Lt(_t,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Rt.set(o,Lt(Rt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Dt.set(o,Lt(Dt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(It(e,r),4&t&&-1<Nt.indexOf(e)){for(;null!==i;){var o=gi(i);if(null!==o&&xt(o),null===(o=Jt(e,t,n,r))&&$r(e,t,r,Gt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else $r(e,t,r,null,n)}}var Gt=null;function Jt(e,t,n,r){if(Gt=null,null!==(e=mi(e=xe(r))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Yt=null,Xt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Xt,r=n.length,i="value"in Yt?Yt.value:Yt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return j(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var sn,an,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),hn=j({},cn,{view:0,detail:0}),fn=on(hn),dn=j({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(sn=e.screenX-ln.screenX,an=e.screenY-ln.screenY):an=sn=0,ln=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:an}}),pn=on(dn),mn=on(j({},dn,{dataTransfer:0})),gn=on(j({},hn,{relatedTarget:0})),yn=on(j({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=on(j({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),bn=on(j({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function Cn(){return kn}var On=on(j({},hn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Mn=on(j({},dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),En=on(j({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),An=on(j({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Tn=on(j({},dn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),_n=[9,13,27,32],Rn=u&&"CompositionEvent"in window,Dn=null;u&&"documentMode"in document&&(Dn=document.documentMode);var Pn=u&&"TextEvent"in window&&!Dn,Nn=u&&(!Rn||Dn&&8<Dn&&11>=Dn),In=String.fromCharCode(32),Ln=!1;function jn(e,t){switch(e){case"keyup":return-1!==_n.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1,zn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zn[e.type]:"textarea"===t}function Hn(e,t,n,r){Me(r),0<(t=Vr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,Un=null;function Wn(e){Ir(e,0)}function qn(e){if(K(yi(e)))return e}function Kn(e,t){if("change"===e)return t}var Gn=!1;if(u){var Jn;if(u){var Qn="oninput"in document;if(!Qn){var Yn=document.createElement("div");Yn.setAttribute("oninput","return;"),Qn="function"==typeof Yn.oninput}Jn=Qn}else Jn=!1;Gn=Jn&&(!document.documentMode||9<document.documentMode)}function Xn(){Vn&&(Vn.detachEvent("onpropertychange",Zn),Un=Vn=null)}function Zn(e){if("value"===e.propertyName&&qn(Un)){var t=[];Hn(t,Un,e,xe(e)),Re(Wn,t)}}function er(e,t,n){"focusin"===e?(Xn(),Un=n,(Vn=t).attachEvent("onpropertychange",Zn)):"focusout"===e&&Xn()}function tr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qn(Un)}function nr(e,t){if("click"===e)return qn(t)}function rr(e,t){if("input"===e||"change"===e)return qn(t)}var ir="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function or(e,t){if(ir(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!h.call(t,i)||!ir(e[i],t[i]))return!1}return!0}function sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ar(e,t){var n,r=sr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function lr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?lr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function cr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hr(e){var t=cr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&lr(n.ownerDocument.documentElement,n)){if(null!==r&&ur(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ar(n,o);var s=ar(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fr=u&&"documentMode"in document&&11>=document.documentMode,dr=null,pr=null,mr=null,gr=!1;function yr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;gr||null==dr||dr!==G(r)||(r="selectionStart"in(r=dr)&&ur(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},mr&&or(mr,r)||(mr=r,0<(r=Vr(pr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=dr)))}function vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var br={animationend:vr("Animation","AnimationEnd"),animationiteration:vr("Animation","AnimationIteration"),animationstart:vr("Animation","AnimationStart"),transitionend:vr("Transition","TransitionEnd")},wr={},xr={};function Sr(e){if(wr[e])return wr[e];if(!br[e])return e;var t,n=br[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return wr[e]=n[t];return e}u&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete br.animationend.animation,delete br.animationiteration.animation,delete br.animationstart.animation),"TransitionEvent"in window||delete br.transitionend.transition);var kr=Sr("animationend"),Cr=Sr("animationiteration"),Or=Sr("animationstart"),Mr=Sr("transitionend"),Er=new Map,Ar="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Tr(e,t){Er.set(e,t),l(t,[e])}for(var _r=0;_r<Ar.length;_r++){var Rr=Ar[_r];Tr(Rr.toLowerCase(),"on"+(Rr[0].toUpperCase()+Rr.slice(1)))}Tr(kr,"onAnimationEnd"),Tr(Cr,"onAnimationIteration"),Tr(Or,"onAnimationStart"),Tr("dblclick","onDoubleClick"),Tr("focusin","onFocus"),Tr("focusout","onBlur"),Tr(Mr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Pr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dr));function Nr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,s,a,l,c){if($e.apply(this,arguments),Le){if(!Le)throw Error(o(198));var u=je;Le=!1,je=null,Fe||(Fe=!0,Be=u)}}(r,t,void 0,e),e.currentTarget=null}function Ir(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;Nr(i,a,c),o=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,c=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;Nr(i,a,c),o=l}}}if(Fe)throw e=Be,Fe=!1,Be=null,e}function Lr(e,t){var n=t[fi];void 0===n&&(n=t[fi]=new Set);var r=e+"__bubble";n.has(r)||(zr(t,e,2,!1),n.add(r))}function jr(e,t,n){var r=0;t&&(r|=4),zr(n,e,r,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function Br(e){if(!e[Fr]){e[Fr]=!0,s.forEach((function(t){"selectionchange"!==t&&(Pr.has(t)||jr(t,!1,e),jr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Fr]||(t[Fr]=!0,jr("selectionchange",!1,t))}}function zr(e,t,n,r){switch(Qt(t)){case 1:var i=Wt;break;case 4:i=qt;break;default:i=Kt}n=i.bind(null,t,n,e),i=void 0,!Pe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function $r(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=mi(a)))return;if(5===(l=s.tag)||6===l){r=o=s;continue e}a=a.parentNode}}r=r.return}Re((function(){var r=o,i=xe(n),s=[];e:{var a=Er.get(e);if(void 0!==a){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=On;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=En;break;case kr:case Cr:case Or:l=yn;break;case Mr:l=An;break;case"scroll":l=fn;break;case"wheel":l=Tn;break;case"copy":case"cut":case"paste":l=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Mn}var u=0!=(4&t),h=!u&&"scroll"===e,f=u?null!==a?a+"Capture":null:a;u=[];for(var d,p=r;null!==p;){var m=(d=p).stateNode;if(5===d.tag&&null!==m&&(d=m,null!==f&&null!=(m=De(p,f))&&u.push(Hr(p,m,d))),h)break;p=p.return}0<u.length&&(a=new l(a,c,null,n,i),s.push({event:a,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===we||!(c=n.relatedTarget||n.fromElement)||!mi(c)&&!c[hi])&&(l||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?mi(c):null)&&(c!==(h=He(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=pn,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=Mn,m="onPointerLeave",f="onPointerEnter",p="pointer"),h=null==l?a:yi(l),d=null==c?a:yi(c),(a=new u(m,p+"leave",l,n,i)).target=h,a.relatedTarget=d,m=null,mi(i)===r&&((u=new u(f,p+"enter",c,n,i)).target=d,u.relatedTarget=h,m=u),h=m,l&&c)e:{for(f=c,p=0,d=u=l;d;d=Ur(d))p++;for(d=0,m=f;m;m=Ur(m))d++;for(;0<p-d;)u=Ur(u),p--;for(;0<d-p;)f=Ur(f),d--;for(;p--;){if(u===f||null!==f&&u===f.alternate)break e;u=Ur(u),f=Ur(f)}u=null}else u=null;null!==l&&Wr(s,a,l,u,!1),null!==c&&null!==h&&Wr(s,h,c,u,!0)}if("select"===(l=(a=r?yi(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=Kn;else if($n(a))if(Gn)g=rr;else{g=tr;var y=er}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=nr);switch(g&&(g=g(e,r))?Hn(s,g,n,i):(y&&y(e,a,r),"focusout"===e&&(y=a._wrapperState)&&y.controlled&&"number"===a.type&&ee(a,"number",a.value)),y=r?yi(r):window,e){case"focusin":($n(y)||"true"===y.contentEditable)&&(dr=y,pr=r,mr=null);break;case"focusout":mr=pr=dr=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,yr(s,n,i);break;case"selectionchange":if(fr)break;case"keydown":case"keyup":yr(s,n,i)}var v;if(Rn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Bn?jn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Nn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Bn&&(v=en()):(Xt="value"in(Yt=i)?Yt.value:Yt.textContent,Bn=!0)),0<(y=Vr(r,b)).length&&(b=new bn(b,e,null,n,i),s.push({event:b,listeners:y}),(v||null!==(v=Fn(n)))&&(b.data=v))),(v=Pn?function(e,t){switch(e){case"compositionend":return Fn(t);case"keypress":return 32!==t.which?null:(Ln=!0,In);case"textInput":return(e=t.data)===In&&Ln?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!Rn&&jn(e,t)?(e=en(),Zt=Xt=Yt=null,Bn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Vr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=v)}Ir(s,t)}))}function Hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=De(e,n))&&r.unshift(Hr(e,o,i)),null!=(o=De(e,t))&&r.push(Hr(e,o,i))),e=e.return}return r}function Ur(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Wr(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===r)break;5===a.tag&&null!==c&&(a=c,i?null!=(l=De(n,o))&&s.unshift(Hr(n,l,a)):i||null!=(l=De(n,o))&&s.push(Hr(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var qr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function Gr(e){return("string"==typeof e?e:""+e).replace(qr,"\n").replace(Kr,"")}function Jr(e,t,n){if(t=Gr(t),Gr(e)!==t&&n)throw Error(o(425))}function Qr(){}var Yr=null,Xr=null;function Zr(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ei="function"==typeof setTimeout?setTimeout:void 0,ti="function"==typeof clearTimeout?clearTimeout:void 0,ni="function"==typeof Promise?Promise:void 0,ri="function"==typeof queueMicrotask?queueMicrotask:void 0!==ni?function(e){return ni.resolve(null).then(e).catch(ii)}:ei;function ii(e){setTimeout((function(){throw e}))}function oi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ht(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ht(t)}function si(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ai(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var li=Math.random().toString(36).slice(2),ci="__reactFiber$"+li,ui="__reactProps$"+li,hi="__reactContainer$"+li,fi="__reactEvents$"+li,di="__reactListeners$"+li,pi="__reactHandles$"+li;function mi(e){var t=e[ci];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hi]||n[ci]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ai(e);null!==e;){if(n=e[ci])return n;e=ai(e)}return t}n=(e=n).parentNode}return null}function gi(e){return!(e=e[ci]||e[hi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function yi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function vi(e){return e[ui]||null}var bi=[],wi=-1;function xi(e){return{current:e}}function Si(e){0>wi||(e.current=bi[wi],bi[wi]=null,wi--)}function ki(e,t){wi++,bi[wi]=e.current,e.current=t}var Ci={},Oi=xi(Ci),Mi=xi(!1),Ei=Ci;function Ai(e,t){var n=e.type.contextTypes;if(!n)return Ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ti(e){return null!=e.childContextTypes}function _i(){Si(Mi),Si(Oi)}function Ri(e,t,n){if(Oi.current!==Ci)throw Error(o(168));ki(Oi,t),ki(Mi,n)}function Di(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,V(e)||"Unknown",i));return j({},n,r)}function Pi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ci,Ei=Oi.current,ki(Oi,e),ki(Mi,Mi.current),!0}function Ni(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Di(e,t,Ei),r.__reactInternalMemoizedMergedChildContext=e,Si(Mi),Si(Oi),ki(Oi,e)):Si(Mi),ki(Mi,n)}var Ii=null,Li=!1,ji=!1;function Fi(e){null===Ii?Ii=[e]:Ii.push(e)}function Bi(){if(!ji&&null!==Ii){ji=!0;var e=0,t=bt;try{var n=Ii;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ii=null,Li=!1}catch(t){throw null!==Ii&&(Ii=Ii.slice(e+1)),Ke(Ze,Bi),t}finally{bt=t,ji=!1}}return null}var zi=[],$i=0,Hi=null,Vi=0,Ui=[],Wi=0,qi=null,Ki=1,Gi="";function Ji(e,t){zi[$i++]=Vi,zi[$i++]=Hi,Hi=e,Vi=t}function Qi(e,t,n){Ui[Wi++]=Ki,Ui[Wi++]=Gi,Ui[Wi++]=qi,qi=e;var r=Ki;e=Gi;var i=32-st(r)-1;r&=~(1<<i),n+=1;var o=32-st(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Ki=1<<32-st(t)+i|n<<i|r,Gi=o+e}else Ki=1<<o|n<<i|r,Gi=e}function Yi(e){null!==e.return&&(Ji(e,1),Qi(e,1,0))}function Xi(e){for(;e===Hi;)Hi=zi[--$i],zi[$i]=null,Vi=zi[--$i],zi[$i]=null;for(;e===qi;)qi=Ui[--Wi],Ui[Wi]=null,Gi=Ui[--Wi],Ui[Wi]=null,Ki=Ui[--Wi],Ui[Wi]=null}var Zi=null,eo=null,to=!1,no=null;function ro(e,t){var n=Tc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function io(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Zi=e,eo=si(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Zi=e,eo=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==qi?{id:Ki,overflow:Gi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Zi=e,eo=null,!0);default:return!1}}function oo(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function so(e){if(to){var t=eo;if(t){var n=t;if(!io(e,t)){if(oo(e))throw Error(o(418));t=si(n.nextSibling);var r=Zi;t&&io(e,t)?ro(r,n):(e.flags=-4097&e.flags|2,to=!1,Zi=e)}}else{if(oo(e))throw Error(o(418));e.flags=-4097&e.flags|2,to=!1,Zi=e}}}function ao(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Zi=e}function lo(e){if(e!==Zi)return!1;if(!to)return ao(e),to=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Zr(e.type,e.memoizedProps)),t&&(t=eo)){if(oo(e))throw co(),Error(o(418));for(;t;)ro(e,t),t=si(t.nextSibling)}if(ao(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){eo=si(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}eo=null}}else eo=Zi?si(e.stateNode.nextSibling):null;return!0}function co(){for(var e=eo;e;)e=si(e.nextSibling)}function uo(){eo=Zi=null,to=!1}function ho(e){null===no?no=[e]:no.push(e)}var fo=w.ReactCurrentBatchConfig;function po(e,t){if(e&&e.defaultProps){for(var n in t=j({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var mo=xi(null),go=null,yo=null,vo=null;function bo(){vo=yo=go=null}function wo(e){var t=mo.current;Si(mo),e._currentValue=t}function xo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function So(e,t){go=e,vo=yo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(ya=!0),e.firstContext=null)}function ko(e){var t=e._currentValue;if(vo!==e)if(e={context:e,memoizedValue:t,next:null},null===yo){if(null===go)throw Error(o(308));yo=e,go.dependencies={lanes:0,firstContext:e}}else yo=yo.next=e;return t}var Co=null;function Oo(e){null===Co?Co=[e]:Co.push(e)}function Mo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Oo(t)):(n.next=i.next,i.next=n),t.interleaved=n,Eo(e,r)}function Eo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ao=!1;function To(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _o(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ro(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Do(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Ml)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Eo(e,n)}return null===(i=r.interleaved)?(t.next=t,Oo(r)):(t.next=i.next,i.next=t),r.interleaved=t,Eo(e,n)}function Po(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function No(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Io(e,t,n,r){var i=e.updateQueue;Ao=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?o=c:s.next=c,s=l;var u=e.alternate;null!==u&&(a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l)}if(null!==o){var h=i.baseState;for(s=0,u=c=l=null,a=o;;){var f=a.lane,d=a.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(f=t,d=n,m.tag){case 1:if("function"==typeof(p=m.payload)){h=p.call(d,h,f);break e}h=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(d,h,f):p))break e;h=j({},h,f);break e;case 2:Ao=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[a]:f.push(a))}else d={eventTime:d,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=d,l=h):u=u.next=d,s|=f;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(f=a).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===u&&(l=h),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Nl|=s,e.lanes=s,e.memoizedState=h}}function Lo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var jo=(new r.Component).refs;function Fo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:j({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Bo={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xl(),i=Zl(e),o=Ro(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Do(e,o,i))&&(ec(t,e,i,r),Po(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xl(),i=Zl(e),o=Ro(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Do(e,o,i))&&(ec(t,e,i,r),Po(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xl(),r=Zl(e),i=Ro(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Do(e,i,r))&&(ec(t,e,r,n),Po(t,e,r))}};function zo(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!(t.prototype&&t.prototype.isPureReactComponent&&or(n,r)&&or(i,o))}function $o(e,t,n){var r=!1,i=Ci,o=t.contextType;return"object"==typeof o&&null!==o?o=ko(o):(i=Ti(t)?Ei:Oi.current,o=(r=null!=(r=t.contextTypes))?Ai(e,i):Ci),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Bo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ho(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Bo.enqueueReplaceState(t,t.state,null)}function Vo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=jo,To(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=ko(o):(o=Ti(t)?Ei:Oi.current,i.context=Ai(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Fo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Bo.enqueueReplaceState(i,i.state,null),Io(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Uo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=i.refs;t===jo&&(t=i.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Wo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qo(e){return(0,e._init)(e._payload)}function Ko(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Rc(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ic(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===k?h(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===D&&qo(o)===t.type)?((r=i(t,n.props)).ref=Uo(e,t,n),r.return=e,r):((r=Dc(n.type,n.key,n.props,null,e.mode,r)).ref=Uo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Lc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,o){return null===t||7!==t.tag?((t=Pc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Ic(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Dc(t.type,t.key,t.props,null,e.mode,n)).ref=Uo(e,null,t),n.return=e,n;case S:return(t=Lc(t,e.mode,n)).return=e,t;case D:return f(e,(0,t._init)(t._payload),n)}if(te(t)||I(t))return(t=Pc(t,e.mode,n,null)).return=e,t;Wo(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===i?c(e,t,n,r):null;case S:return n.key===i?u(e,t,n,r):null;case D:return d(e,t,(i=n._init)(n._payload),r)}if(te(n)||I(n))return null!==i?null:h(e,t,n,r,null);Wo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case x:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case D:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||I(r))return h(t,e=e.get(n)||null,r,i,null);Wo(t,r)}return null}function m(i,o,a,l){for(var c=null,u=null,h=o,m=o=0,g=null;null!==h&&m<a.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var y=d(i,h,a[m],l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(i,h),o=s(y,o,m),null===u?c=y:u.sibling=y,u=y,h=g}if(m===a.length)return n(i,h),to&&Ji(i,m),c;if(null===h){for(;m<a.length;m++)null!==(h=f(i,a[m],l))&&(o=s(h,o,m),null===u?c=h:u.sibling=h,u=h);return to&&Ji(i,m),c}for(h=r(i,h);m<a.length;m++)null!==(g=p(h,i,m,a[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),o=s(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(i,e)})),to&&Ji(i,m),c}function g(i,a,l,c){var u=I(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var h=u=null,m=a,g=a=0,y=null,v=l.next();null!==m&&!v.done;g++,v=l.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=d(i,m,v.value,c);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(i,m),a=s(b,a,g),null===h?u=b:h.sibling=b,h=b,m=y}if(v.done)return n(i,m),to&&Ji(i,g),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=f(i,v.value,c))&&(a=s(v,a,g),null===h?u=v:h.sibling=v,h=v);return to&&Ji(i,g),u}for(m=r(i,m);!v.done;g++,v=l.next())null!==(v=p(m,i,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),a=s(v,a,g),null===h?u=v:h.sibling=v,h=v);return e&&m.forEach((function(e){return t(i,e)})),to&&Ji(i,g),u}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===k&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case x:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===k){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===D&&qo(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=Uo(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===k?((o=Pc(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=Dc(s.type,s.key,s.props,null,r.mode,l)).ref=Uo(r,o,s),l.return=r,r=l)}return a(r);case S:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Lc(s,r.mode,l)).return=r,r=o}return a(r);case D:return e(r,o,(u=s._init)(s._payload),l)}if(te(s))return m(r,o,s,l);if(I(s))return g(r,o,s,l);Wo(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Ic(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var Go=Ko(!0),Jo=Ko(!1),Qo={},Yo=xi(Qo),Xo=xi(Qo),Zo=xi(Qo);function es(e){if(e===Qo)throw Error(o(174));return e}function ts(e,t){switch(ki(Zo,t),ki(Xo,e),ki(Yo,Qo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(Yo),ki(Yo,t)}function ns(){Si(Yo),Si(Xo),Si(Zo)}function rs(e){es(Zo.current);var t=es(Yo.current),n=le(t,e.type);t!==n&&(ki(Xo,e),ki(Yo,n))}function is(e){Xo.current===e&&(Si(Yo),Si(Xo))}var os=xi(0);function ss(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var as=[];function ls(){for(var e=0;e<as.length;e++)as[e]._workInProgressVersionPrimary=null;as.length=0}var cs=w.ReactCurrentDispatcher,us=w.ReactCurrentBatchConfig,hs=0,fs=null,ds=null,ps=null,ms=!1,gs=!1,ys=0,vs=0;function bs(){throw Error(o(321))}function ws(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ir(e[n],t[n]))return!1;return!0}function xs(e,t,n,r,i,s){if(hs=s,fs=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cs.current=null===e||null===e.memoizedState?ia:oa,e=n(r,i),gs){s=0;do{if(gs=!1,ys=0,25<=s)throw Error(o(301));s+=1,ps=ds=null,t.updateQueue=null,cs.current=sa,e=n(r,i)}while(gs)}if(cs.current=ra,t=null!==ds&&null!==ds.next,hs=0,ps=ds=fs=null,ms=!1,t)throw Error(o(300));return e}function Ss(){var e=0!==ys;return ys=0,e}function ks(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ps?fs.memoizedState=ps=e:ps=ps.next=e,ps}function Cs(){if(null===ds){var e=fs.alternate;e=null!==e?e.memoizedState:null}else e=ds.next;var t=null===ps?fs.memoizedState:ps.next;if(null!==t)ps=t,ds=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ds=e).memoizedState,baseState:ds.baseState,baseQueue:ds.baseQueue,queue:ds.queue,next:null},null===ps?fs.memoizedState=ps=e:ps=ps.next=e}return ps}function Os(e,t){return"function"==typeof t?t(e):t}function Ms(e){var t=Cs(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=ds,i=r.baseQueue,s=n.pending;if(null!==s){if(null!==i){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(null!==i){s=i.next,r=r.baseState;var l=a=null,c=null,u=s;do{var h=u.lane;if((hs&h)===h)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=f,a=r):c=c.next=f,fs.lanes|=h,Nl|=h}u=u.next}while(null!==u&&u!==s);null===c?a=r:c.next=l,ir(r,t.memoizedState)||(ya=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{s=i.lane,fs.lanes|=s,Nl|=s,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Es(e){var t=Cs(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{s=e(s,a.action),a=a.next}while(a!==i);ir(s,t.memoizedState)||(ya=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function As(){}function Ts(e,t){var n=fs,r=Cs(),i=t(),s=!ir(r.memoizedState,i);if(s&&(r.memoizedState=i,ya=!0),r=r.queue,$s(Ds.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||null!==ps&&1&ps.memoizedState.tag){if(n.flags|=2048,Ls(9,Rs.bind(null,n,r,i,t),void 0,null),null===El)throw Error(o(349));0!=(30&hs)||_s(n,t,i)}return i}function _s(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=fs.updateQueue)?(t={lastEffect:null,stores:null},fs.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Rs(e,t,n,r){t.value=n,t.getSnapshot=r,Ps(t)&&Ns(e)}function Ds(e,t,n){return n((function(){Ps(t)&&Ns(e)}))}function Ps(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ir(e,n)}catch(e){return!0}}function Ns(e){var t=Eo(e,1);null!==t&&ec(t,e,1,-1)}function Is(e){var t=ks();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Os,lastRenderedState:e},t.queue=e,e=e.dispatch=Zs.bind(null,fs,e),[t.memoizedState,e]}function Ls(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=fs.updateQueue)?(t={lastEffect:null,stores:null},fs.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function js(){return Cs().memoizedState}function Fs(e,t,n,r){var i=ks();fs.flags|=e,i.memoizedState=Ls(1|t,n,void 0,void 0===r?null:r)}function Bs(e,t,n,r){var i=Cs();r=void 0===r?null:r;var o=void 0;if(null!==ds){var s=ds.memoizedState;if(o=s.destroy,null!==r&&ws(r,s.deps))return void(i.memoizedState=Ls(t,n,o,r))}fs.flags|=e,i.memoizedState=Ls(1|t,n,o,r)}function zs(e,t){return Fs(8390656,8,e,t)}function $s(e,t){return Bs(2048,8,e,t)}function Hs(e,t){return Bs(4,2,e,t)}function Vs(e,t){return Bs(4,4,e,t)}function Us(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ws(e,t,n){return n=null!=n?n.concat([e]):null,Bs(4,4,Us.bind(null,t,e),n)}function qs(){}function Ks(e,t){var n=Cs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ws(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Gs(e,t){var n=Cs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ws(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Js(e,t,n){return 0==(21&hs)?(e.baseState&&(e.baseState=!1,ya=!0),e.memoizedState=n):(ir(n,t)||(n=mt(),fs.lanes|=n,Nl|=n,e.baseState=!0),t)}function Qs(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=us.transition;us.transition={};try{e(!1),t()}finally{bt=n,us.transition=r}}function Ys(){return Cs().memoizedState}function Xs(e,t,n){var r=Zl(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ea(e)?ta(t,n):null!==(n=Mo(e,t,n,r))&&(ec(n,e,r,Xl()),na(n,t,r))}function Zs(e,t,n){var r=Zl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ea(e))ta(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,ir(a,s)){var l=t.interleaved;return null===l?(i.next=i,Oo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Mo(e,t,i,r))&&(ec(n,e,r,i=Xl()),na(n,t,r))}}function ea(e){var t=e.alternate;return e===fs||null!==t&&t===fs}function ta(e,t){gs=ms=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function na(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var ra={readContext:ko,useCallback:bs,useContext:bs,useEffect:bs,useImperativeHandle:bs,useInsertionEffect:bs,useLayoutEffect:bs,useMemo:bs,useReducer:bs,useRef:bs,useState:bs,useDebugValue:bs,useDeferredValue:bs,useTransition:bs,useMutableSource:bs,useSyncExternalStore:bs,useId:bs,unstable_isNewReconciler:!1},ia={readContext:ko,useCallback:function(e,t){return ks().memoizedState=[e,void 0===t?null:t],e},useContext:ko,useEffect:zs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fs(4,2,e,t)},useMemo:function(e,t){var n=ks();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ks();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Xs.bind(null,fs,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ks().memoizedState=e},useState:Is,useDebugValue:qs,useDeferredValue:function(e){return ks().memoizedState=e},useTransition:function(){var e=Is(!1),t=e[0];return e=Qs.bind(null,e[1]),ks().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fs,i=ks();if(to){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===El)throw Error(o(349));0!=(30&hs)||_s(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,zs(Ds.bind(null,r,s,e),[e]),r.flags|=2048,Ls(9,Rs.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ks(),t=El.identifierPrefix;if(to){var n=Gi;t=":"+t+"R"+(n=(Ki&~(1<<32-st(Ki)-1)).toString(32)+n),0<(n=ys++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=vs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},oa={readContext:ko,useCallback:Ks,useContext:ko,useEffect:$s,useImperativeHandle:Ws,useInsertionEffect:Hs,useLayoutEffect:Vs,useMemo:Gs,useReducer:Ms,useRef:js,useState:function(){return Ms(Os)},useDebugValue:qs,useDeferredValue:function(e){return Js(Cs(),ds.memoizedState,e)},useTransition:function(){return[Ms(Os)[0],Cs().memoizedState]},useMutableSource:As,useSyncExternalStore:Ts,useId:Ys,unstable_isNewReconciler:!1},sa={readContext:ko,useCallback:Ks,useContext:ko,useEffect:$s,useImperativeHandle:Ws,useInsertionEffect:Hs,useLayoutEffect:Vs,useMemo:Gs,useReducer:Es,useRef:js,useState:function(){return Es(Os)},useDebugValue:qs,useDeferredValue:function(e){var t=Cs();return null===ds?t.memoizedState=e:Js(t,ds.memoizedState,e)},useTransition:function(){return[Es(Os)[0],Cs().memoizedState]},useMutableSource:As,useSyncExternalStore:Ts,useId:Ys,unstable_isNewReconciler:!1};function aa(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function la(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ca(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var ua="function"==typeof WeakMap?WeakMap:Map;function ha(e,t,n){(n=Ro(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),ca(0,t)},n}function fa(e,t,n){(n=Ro(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ca(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ca(0,t),"function"!=typeof r&&(null===Ul?Ul=new Set([this]):Ul.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function da(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ua;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function pa(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ma(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ro(-1,1)).tag=2,Do(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ga=w.ReactCurrentOwner,ya=!1;function va(e,t,n,r){t.child=null===e?Jo(t,null,n,r):Go(t,e.child,n,r)}function ba(e,t,n,r,i){n=n.render;var o=t.ref;return So(t,i),r=xs(e,t,n,r,o,i),n=Ss(),null===e||ya?(to&&n&&Yi(t),t.flags|=1,va(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function wa(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||_c(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Dc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,xa(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:or)(s,r)&&e.ref===t.ref)return Ha(e,t,i)}return t.flags|=1,(e=Rc(o,r)).ref=t.ref,e.return=t,t.child=e}function xa(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(or(o,r)&&e.ref===t.ref){if(ya=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Ha(e,t,i);0!=(131072&e.flags)&&(ya=!0)}}return Ca(e,t,n,r,i)}function Sa(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ki(Rl,_l),_l|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ki(Rl,_l),_l|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,ki(Rl,_l),_l|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,ki(Rl,_l),_l|=r;return va(e,t,i,n),t.child}function ka(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ca(e,t,n,r,i){var o=Ti(n)?Ei:Oi.current;return o=Ai(t,o),So(t,i),n=xs(e,t,n,r,o,i),r=Ss(),null===e||ya?(to&&r&&Yi(t),t.flags|=1,va(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function Oa(e,t,n,r,i){if(Ti(n)){var o=!0;Pi(t)}else o=!1;if(So(t,i),null===t.stateNode)$a(e,t),$o(t,n,r),Vo(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;c="object"==typeof c&&null!==c?ko(c):Ai(t,c=Ti(n)?Ei:Oi.current);var u=n.getDerivedStateFromProps,h="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==c)&&Ho(t,s,r,c),Ao=!1;var f=t.memoizedState;s.state=f,Io(t,r,s,i),l=t.memoizedState,a!==r||f!==l||Mi.current||Ao?("function"==typeof u&&(Fo(t,n,u,r),l=t.memoizedState),(a=Ao||zo(t,n,a,r,f,l,c))?(h||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,_o(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:po(t.type,a),s.props=c,h=t.pendingProps,f=s.context,l="object"==typeof(l=n.contextType)&&null!==l?ko(l):Ai(t,l=Ti(n)?Ei:Oi.current);var d=n.getDerivedStateFromProps;(u="function"==typeof d||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==h||f!==l)&&Ho(t,s,r,l),Ao=!1,f=t.memoizedState,s.state=f,Io(t,r,s,i);var p=t.memoizedState;a!==h||f!==p||Mi.current||Ao?("function"==typeof d&&(Fo(t,n,d,r),p=t.memoizedState),(c=Ao||zo(t,n,c,r,f,p,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ma(e,t,n,r,o,i)}function Ma(e,t,n,r,i,o){ka(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&Ni(t,n,!1),Ha(e,t,o);r=t.stateNode,ga.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Go(t,e.child,null,o),t.child=Go(t,null,a,o)):va(e,t,a,o),t.memoizedState=r.state,i&&Ni(t,n,!0),t.child}function Ea(e){var t=e.stateNode;t.pendingContext?Ri(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ri(0,t.context,!1),ts(e,t.containerInfo)}function Aa(e,t,n,r,i){return uo(),ho(i),t.flags|=256,va(e,t,n,r),t.child}var Ta,_a,Ra,Da,Pa={dehydrated:null,treeContext:null,retryLane:0};function Na(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ia(e,t,n){var r,i=t.pendingProps,s=os.current,a=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&s)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),ki(os,1&s),null===e)return so(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,a?(i=t.mode,a=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Nc(l,i,0,null),e=Pc(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Na(n),t.memoizedState=Pa,e):La(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,i,s,a){if(n)return 256&t.flags?(t.flags&=-257,ja(e,t,a,r=la(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Nc({mode:"visible",children:r.children},i,0,null),(s=Pc(s,i,a,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,0!=(1&t.mode)&&Go(t,e.child,null,a),t.child.memoizedState=Na(a),t.memoizedState=Pa,s);if(0==(1&t.mode))return ja(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,ja(e,t,a,r=la(s=Error(o(419)),r,void 0))}if(l=0!=(a&e.childLanes),ya||l){if(null!==(r=El)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|a))?0:i)&&i!==s.retryLane&&(s.retryLane=i,Eo(e,i),ec(r,e,i,-1))}return dc(),ja(e,t,a,r=la(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Oc.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,eo=si(i.nextSibling),Zi=t,to=!0,no=null,null!==e&&(Ui[Wi++]=Ki,Ui[Wi++]=Gi,Ui[Wi++]=qi,Ki=e.id,Gi=e.overflow,qi=t),(t=La(t,r.children)).flags|=4096,t)}(e,t,l,i,r,s,n);if(a){a=i.fallback,l=t.mode,r=(s=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==s?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Rc(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==r?a=Rc(r,a):(a=Pc(a,l,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,l=null===(l=e.child.memoizedState)?Na(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Pa,i}return e=(a=e.child).sibling,i=Rc(a,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function La(e,t){return(t=Nc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ja(e,t,n,r){return null!==r&&ho(r),Go(t,e.child,null,n),(e=La(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fa(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),xo(e.return,t,n)}function Ba(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function za(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(va(e,t,r.children,n),0!=(2&(r=os.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fa(e,n,t);else if(19===e.tag)Fa(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ki(os,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ss(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ba(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ss(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ba(t,!0,n,null,o);break;case"together":Ba(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $a(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ha(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Nl|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Rc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Rc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Va(e,t){if(!to)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ua(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wa(e,t,n){var r=t.pendingProps;switch(Xi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ua(t),null;case 1:case 17:return Ti(t.type)&&_i(),Ua(t),null;case 3:return r=t.stateNode,ns(),Si(Mi),Si(Oi),ls(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(lo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==no&&(ic(no),no=null))),_a(e,t),Ua(t),null;case 5:is(t);var i=es(Zo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ra(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ua(t),null}if(e=es(Yo.current),lo(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[ci]=t,r[ui]=s,e=0!=(1&t.mode),n){case"dialog":Lr("cancel",r),Lr("close",r);break;case"iframe":case"object":case"embed":Lr("load",r);break;case"video":case"audio":for(i=0;i<Dr.length;i++)Lr(Dr[i],r);break;case"source":Lr("error",r);break;case"img":case"image":case"link":Lr("error",r),Lr("load",r);break;case"details":Lr("toggle",r);break;case"input":Q(r,s),Lr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Lr("invalid",r);break;case"textarea":ie(r,s),Lr("invalid",r)}for(var l in ve(n,s),i=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==s.suppressHydrationWarning&&Jr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Jr(r.textContent,c,e),i=["children",""+c]):a.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Lr("scroll",r)}switch(n){case"input":q(r),Z(r,s,!0);break;case"textarea":q(r),se(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=Qr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[ci]=t,e[ui]=r,Ta(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Lr("cancel",e),Lr("close",e),i=r;break;case"iframe":case"object":case"embed":Lr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Dr.length;i++)Lr(Dr[i],e);i=r;break;case"source":Lr("error",e),i=r;break;case"img":case"image":case"link":Lr("error",e),Lr("load",e),i=r;break;case"details":Lr("toggle",e),i=r;break;case"input":Q(e,r),i=J(e,r),Lr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=j({},r,{value:void 0}),Lr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Lr("invalid",e)}for(s in ve(n,i),c=i)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?ge(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&he(e,u):"children"===s?"string"==typeof u?("textarea"!==n||""!==u)&&fe(e,u):"number"==typeof u&&fe(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=u&&"onScroll"===s&&Lr("scroll",e):null!=u&&b(e,s,u,l))}switch(n){case"input":q(e),Z(e,r,!1);break;case"textarea":q(e),se(e);break;case"option":null!=r.value&&e.setAttribute("value",""+U(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ne(e,!!r.multiple,s,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Qr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ua(t),null;case 6:if(e&&null!=t.stateNode)Da(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=es(Zo.current),es(Yo.current),lo(t)){if(r=t.stateNode,n=t.memoizedProps,r[ci]=t,(s=r.nodeValue!==n)&&null!==(e=Zi))switch(e.tag){case 3:Jr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!=(1&e.mode))}s&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ci]=t,t.stateNode=r}return Ua(t),null;case 13:if(Si(os),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(to&&null!==eo&&0!=(1&t.mode)&&0==(128&t.flags))co(),uo(),t.flags|=98560,s=!1;else if(s=lo(t),null!==r&&null!==r.dehydrated){if(null===e){if(!s)throw Error(o(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(o(317));s[ci]=t}else uo(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ua(t),s=!1}else null!==no&&(ic(no),no=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&os.current)?0===Dl&&(Dl=3):dc())),null!==t.updateQueue&&(t.flags|=4),Ua(t),null);case 4:return ns(),_a(e,t),null===e&&Br(t.stateNode.containerInfo),Ua(t),null;case 10:return wo(t.type._context),Ua(t),null;case 19:if(Si(os),null===(s=t.memoizedState))return Ua(t),null;if(r=0!=(128&t.flags),null===(l=s.rendering))if(r)Va(s,!1);else{if(0!==Dl||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ss(e))){for(t.flags|=128,Va(s,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ki(os,1&os.current|2),t.child}e=e.sibling}null!==s.tail&&Ye()>zl&&(t.flags|=128,r=!0,Va(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ss(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Va(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!to)return Ua(t),null}else 2*Ye()-s.renderingStartTime>zl&&1073741824!==n&&(t.flags|=128,r=!0,Va(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ye(),t.sibling=null,n=os.current,ki(os,r?1&n|2:1&n),t):(Ua(t),null);case 22:case 23:return cc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&_l)&&(Ua(t),6&t.subtreeFlags&&(t.flags|=8192)):Ua(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function qa(e,t){switch(Xi(t),t.tag){case 1:return Ti(t.type)&&_i(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ns(),Si(Mi),Si(Oi),ls(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return is(t),null;case 13:if(Si(os),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));uo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Si(os),null;case 4:return ns(),null;case 10:return wo(t.type._context),null;case 22:case 23:return cc(),null;default:return null}}Ta=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},_a=function(){},Ra=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,es(Yo.current);var o,s=null;switch(n){case"input":i=J(e,i),r=J(e,r),s=[];break;case"select":i=j({},i,{value:void 0}),r=j({},r,{value:void 0}),s=[];break;case"textarea":i=re(e,i),r=re(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Qr)}for(u in ve(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Lr("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Da=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ka=!1,Ga=!1,Ja="function"==typeof WeakSet?WeakSet:Set,Qa=null;function Ya(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Sc(e,t,n)}else n.current=null}function Xa(e,t,n){try{n()}catch(n){Sc(e,t,n)}}var Za=!1;function el(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Xa(t,n,o)}i=i.next}while(i!==r)}}function tl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function rl(e){var t=e.alternate;null!==t&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[ci],delete t[ui],delete t[fi],delete t[di],delete t[pi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function il(e){return 5===e.tag||3===e.tag||4===e.tag}function ol(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||il(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function sl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Qr));else if(4!==r&&null!==(e=e.child))for(sl(e,t,n),e=e.sibling;null!==e;)sl(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(al(e,t,n),e=e.sibling;null!==e;)al(e,t,n),e=e.sibling}var ll=null,cl=!1;function ul(e,t,n){for(n=n.child;null!==n;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Ga||Ya(n,t);case 6:var r=ll,i=cl;ll=null,ul(e,t,n),cl=i,null!==(ll=r)&&(cl?(e=ll,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ll.removeChild(n.stateNode));break;case 18:null!==ll&&(cl?(e=ll,n=n.stateNode,8===e.nodeType?oi(e.parentNode,n):1===e.nodeType&&oi(e,n),Ht(e)):oi(ll,n.stateNode));break;case 4:r=ll,i=cl,ll=n.stateNode.containerInfo,cl=!0,ul(e,t,n),ll=r,cl=i;break;case 0:case 11:case 14:case 15:if(!Ga&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!=(2&o)||0!=(4&o))&&Xa(n,t,s),i=i.next}while(i!==r)}ul(e,t,n);break;case 1:if(!Ga&&(Ya(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Sc(n,t,e)}ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:1&n.mode?(Ga=(r=Ga)||null!==n.memoizedState,ul(e,t,n),Ga=r):ul(e,t,n);break;default:ul(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var r=Mc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function dl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:ll=l.stateNode,cl=!1;break e;case 3:case 4:ll=l.stateNode.containerInfo,cl=!0;break e}l=l.return}if(null===ll)throw Error(o(160));hl(s,a,i),ll=null,cl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Sc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)pl(t,e),t=t.sibling}function pl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dl(t,e),ml(e),4&r){try{el(3,e,e.return),tl(3,e)}catch(t){Sc(e,e.return,t)}try{el(5,e,e.return)}catch(t){Sc(e,e.return,t)}}break;case 1:dl(t,e),ml(e),512&r&&null!==n&&Ya(n,n.return);break;case 5:if(dl(t,e),ml(e),512&r&&null!==n&&Ya(n,n.return),32&e.flags){var i=e.stateNode;try{fe(i,"")}catch(t){Sc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var s=e.memoizedProps,a=null!==n?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===s.type&&null!=s.name&&Y(i,s),be(l,a);var u=be(l,s);for(a=0;a<c.length;a+=2){var h=c[a],f=c[a+1];"style"===h?ge(i,f):"dangerouslySetInnerHTML"===h?he(i,f):"children"===h?fe(i,f):b(i,h,f,u)}switch(l){case"input":X(i,s);break;case"textarea":oe(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;null!=p?ne(i,!!s.multiple,p,!1):d!==!!s.multiple&&(null!=s.defaultValue?ne(i,!!s.multiple,s.defaultValue,!0):ne(i,!!s.multiple,s.multiple?[]:"",!1))}i[ui]=s}catch(t){Sc(e,e.return,t)}}break;case 6:if(dl(t,e),ml(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(t){Sc(e,e.return,t)}}break;case 3:if(dl(t,e),ml(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(t){Sc(e,e.return,t)}break;case 4:default:dl(t,e),ml(e);break;case 13:dl(t,e),ml(e),8192&(i=e.child).flags&&(s=null!==i.memoizedState,i.stateNode.isHidden=s,!s||null!==i.alternate&&null!==i.alternate.memoizedState||(Bl=Ye())),4&r&&fl(e);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&e.mode?(Ga=(u=Ga)||h,dl(t,e),Ga=u):dl(t,e),ml(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!h&&0!=(1&e.mode))for(Qa=e,h=e.child;null!==h;){for(f=Qa=h;null!==Qa;){switch(p=(d=Qa).child,d.tag){case 0:case 11:case 14:case 15:el(4,d,d.return);break;case 1:Ya(d,d.return);var m=d.stateNode;if("function"==typeof m.componentWillUnmount){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Sc(r,n,e)}}break;case 5:Ya(d,d.return);break;case 22:if(null!==d.memoizedState){bl(f);continue}}null!==p?(p.return=d,Qa=p):bl(f)}h=h.sibling}e:for(h=null,f=e;;){if(5===f.tag){if(null===h){h=f;try{i=f.stateNode,u?"function"==typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=f.stateNode,a=null!=(c=f.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",a))}catch(t){Sc(e,e.return,t)}}}else if(6===f.tag){if(null===h)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(t){Sc(e,e.return,t)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:dl(t,e),ml(e),4&r&&fl(e);case 21:}}function ml(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(il(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(fe(i,""),r.flags&=-33),al(e,ol(e),i);break;case 3:case 4:var s=r.stateNode.containerInfo;sl(e,ol(e),s);break;default:throw Error(o(161))}}catch(t){Sc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gl(e,t,n){Qa=e,yl(e,t,n)}function yl(e,t,n){for(var r=0!=(1&e.mode);null!==Qa;){var i=Qa,o=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||Ka;if(!s){var a=i.alternate,l=null!==a&&null!==a.memoizedState||Ga;a=Ka;var c=Ga;if(Ka=s,(Ga=l)&&!c)for(Qa=i;null!==Qa;)l=(s=Qa).child,22===s.tag&&null!==s.memoizedState?wl(i):null!==l?(l.return=s,Qa=l):wl(i);for(;null!==o;)Qa=o,yl(o,t,n),o=o.sibling;Qa=i,Ka=a,Ga=c}vl(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Qa=o):vl(e)}}function vl(e){for(;null!==Qa;){var t=Qa;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ga||tl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ga)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:po(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Lo(t,s,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Lo(t,a,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var h=u.memoizedState;if(null!==h){var f=h.dehydrated;null!==f&&Ht(f)}}}break;default:throw Error(o(163))}Ga||512&t.flags&&nl(t)}catch(e){Sc(t,t.return,e)}}if(t===e){Qa=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qa=n;break}Qa=t.return}}function bl(e){for(;null!==Qa;){var t=Qa;if(t===e){Qa=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qa=n;break}Qa=t.return}}function wl(e){for(;null!==Qa;){var t=Qa;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{tl(4,t)}catch(e){Sc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Sc(t,i,e)}}var o=t.return;try{nl(t)}catch(e){Sc(t,o,e)}break;case 5:var s=t.return;try{nl(t)}catch(e){Sc(t,s,e)}}}catch(e){Sc(t,t.return,e)}if(t===e){Qa=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Qa=a;break}Qa=t.return}}var xl,Sl=Math.ceil,kl=w.ReactCurrentDispatcher,Cl=w.ReactCurrentOwner,Ol=w.ReactCurrentBatchConfig,Ml=0,El=null,Al=null,Tl=0,_l=0,Rl=xi(0),Dl=0,Pl=null,Nl=0,Il=0,Ll=0,jl=null,Fl=null,Bl=0,zl=1/0,$l=null,Hl=!1,Vl=null,Ul=null,Wl=!1,ql=null,Kl=0,Gl=0,Jl=null,Ql=-1,Yl=0;function Xl(){return 0!=(6&Ml)?Ye():-1!==Ql?Ql:Ql=Ye()}function Zl(e){return 0==(1&e.mode)?1:0!=(2&Ml)&&0!==Tl?Tl&-Tl:null!==fo.transition?(0===Yl&&(Yl=mt()),Yl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Qt(e.type)}function ec(e,t,n,r){if(50<Gl)throw Gl=0,Jl=null,Error(o(185));yt(e,n,r),0!=(2&Ml)&&e===El||(e===El&&(0==(2&Ml)&&(Il|=n),4===Dl&&oc(e,Tl)),tc(e,r),1===n&&0===Ml&&0==(1&t.mode)&&(zl=Ye()+500,Li&&Bi()))}function tc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-st(o),a=1<<s,l=i[s];-1===l?0!=(a&n)&&0==(a&r)||(i[s]=dt(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var r=ft(e,e===El?Tl:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){Li=!0,Fi(e)}(sc.bind(null,e)):Fi(sc.bind(null,e)),ri((function(){0==(6&Ml)&&Bi()})),n=null;else{switch(wt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Ec(n,nc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nc(e,t){if(Ql=-1,Yl=0,0!=(6&Ml))throw Error(o(327));var n=e.callbackNode;if(wc()&&e.callbackNode!==n)return null;var r=ft(e,e===El?Tl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=pc(e,r);else{t=r;var i=Ml;Ml|=2;var s=fc();for(El===e&&Tl===t||($l=null,zl=Ye()+500,uc(e,t));;)try{gc();break}catch(t){hc(e,t)}bo(),kl.current=s,Ml=i,null!==Al?t=0:(El=null,Tl=0,t=Dl)}if(0!==t){if(2===t&&0!==(i=pt(e))&&(r=i,t=rc(e,i)),1===t)throw n=Pl,uc(e,0),oc(e,r),tc(e,Ye()),n;if(6===t)oc(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!ir(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=pc(e,r))&&0!==(s=pt(e))&&(r=s,t=rc(e,s)),1===t))throw n=Pl,uc(e,0),oc(e,r),tc(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:bc(e,Fl,$l);break;case 3:if(oc(e,r),(130023424&r)===r&&10<(t=Bl+500-Ye())){if(0!==ft(e,0))break;if(((i=e.suspendedLanes)&r)!==r){Xl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ei(bc.bind(null,e,Fl,$l),t);break}bc(e,Fl,$l);break;case 4:if(oc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-st(r);s=1<<a,(a=t[a])>i&&(i=a),r&=~s}if(r=i,10<(r=(120>(r=Ye()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ei(bc.bind(null,e,Fl,$l),r);break}bc(e,Fl,$l);break;default:throw Error(o(329))}}}return tc(e,Ye()),e.callbackNode===n?nc.bind(null,e):null}function rc(e,t){var n=jl;return e.current.memoizedState.isDehydrated&&(uc(e,t).flags|=256),2!==(e=pc(e,t))&&(t=Fl,Fl=n,null!==t&&ic(t)),e}function ic(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function oc(e,t){for(t&=~Ll,t&=~Il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function sc(e){if(0!=(6&Ml))throw Error(o(327));wc();var t=ft(e,0);if(0==(1&t))return tc(e,Ye()),null;var n=pc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=rc(e,r))}if(1===n)throw n=Pl,uc(e,0),oc(e,t),tc(e,Ye()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bc(e,Fl,$l),tc(e,Ye()),null}function ac(e,t){var n=Ml;Ml|=1;try{return e(t)}finally{0===(Ml=n)&&(zl=Ye()+500,Li&&Bi())}}function lc(e){null!==ql&&0===ql.tag&&0==(6&Ml)&&wc();var t=Ml;Ml|=1;var n=Ol.transition,r=bt;try{if(Ol.transition=null,bt=1,e)return e()}finally{bt=r,Ol.transition=n,0==(6&(Ml=t))&&Bi()}}function cc(){_l=Rl.current,Si(Rl)}function uc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ti(n)),null!==Al)for(n=Al.return;null!==n;){var r=n;switch(Xi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&_i();break;case 3:ns(),Si(Mi),Si(Oi),ls();break;case 5:is(r);break;case 4:ns();break;case 13:case 19:Si(os);break;case 10:wo(r.type._context);break;case 22:case 23:cc()}n=n.return}if(El=e,Al=e=Rc(e.current,null),Tl=_l=t,Dl=0,Pl=null,Ll=Il=Nl=0,Fl=jl=null,null!==Co){for(t=0;t<Co.length;t++)if(null!==(r=(n=Co[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var s=o.next;o.next=i,r.next=s}n.pending=r}Co=null}return e}function hc(e,t){for(;;){var n=Al;try{if(bo(),cs.current=ra,ms){for(var r=fs.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ms=!1}if(hs=0,ps=ds=fs=null,gs=!1,ys=0,Cl.current=null,null===n||null===n.return){Dl=1,Pl=t,Al=null;break}e:{var s=e,a=n.return,l=n,c=t;if(t=Tl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,h=l,f=h.tag;if(0==(1&h.mode)&&(0===f||11===f||15===f)){var d=h.alternate;d?(h.updateQueue=d.updateQueue,h.memoizedState=d.memoizedState,h.lanes=d.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=pa(a);if(null!==p){p.flags&=-257,ma(p,a,l,0,t),1&p.mode&&da(s,u,t),c=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){da(s,u,t),dc();break e}c=Error(o(426))}else if(to&&1&l.mode){var y=pa(a);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),ma(y,a,l,0,t),ho(aa(c,l));break e}}s=c=aa(c,l),4!==Dl&&(Dl=2),null===jl?jl=[s]:jl.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,No(s,ha(0,c,t));break e;case 1:l=c;var v=s.type,b=s.stateNode;if(0==(128&s.flags)&&("function"==typeof v.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Ul||!Ul.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t,No(s,fa(s,l,t));break e}}s=s.return}while(null!==s)}vc(n)}catch(e){t=e,Al===n&&null!==n&&(Al=n=n.return);continue}break}}function fc(){var e=kl.current;return kl.current=ra,null===e?ra:e}function dc(){0!==Dl&&3!==Dl&&2!==Dl||(Dl=4),null===El||0==(268435455&Nl)&&0==(268435455&Il)||oc(El,Tl)}function pc(e,t){var n=Ml;Ml|=2;var r=fc();for(El===e&&Tl===t||($l=null,uc(e,t));;)try{mc();break}catch(t){hc(e,t)}if(bo(),Ml=n,kl.current=r,null!==Al)throw Error(o(261));return El=null,Tl=0,Dl}function mc(){for(;null!==Al;)yc(Al)}function gc(){for(;null!==Al&&!Je();)yc(Al)}function yc(e){var t=xl(e.alternate,e,_l);e.memoizedProps=e.pendingProps,null===t?vc(e):Al=t,Cl.current=null}function vc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Wa(n,t,_l)))return void(Al=n)}else{if(null!==(n=qa(n,t)))return n.flags&=32767,void(Al=n);if(null===e)return Dl=6,void(Al=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Al=t);Al=t=e}while(null!==t);0===Dl&&(Dl=5)}function bc(e,t,n){var r=bt,i=Ol.transition;try{Ol.transition=null,bt=1,function(e,t,n,r){do{wc()}while(null!==ql);if(0!=(6&Ml))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-st(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,s),e===El&&(Al=El=null,Tl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Wl||(Wl=!0,Ec(tt,(function(){return wc(),null}))),s=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||s){s=Ol.transition,Ol.transition=null;var a=bt;bt=1;var l=Ml;Ml|=4,Cl.current=null,function(e,t){if(Yr=Ut,ur(e=cr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(e){n=null;break e}var a=0,l=-1,c=-1,u=0,h=0,f=e,d=null;t:for(;;){for(var p;f!==n||0!==i&&3!==f.nodeType||(l=a+i),f!==s||0!==r&&3!==f.nodeType||(c=a+r),3===f.nodeType&&(a+=f.nodeValue.length),null!==(p=f.firstChild);)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=a),d===s&&++h===r&&(c=a),null!==(p=f.nextSibling))break;d=(f=d).parentNode}f=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xr={focusedElem:e,selectionRange:n},Ut=!1,Qa=t;null!==Qa;)if(e=(t=Qa).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Qa=e;else for(;null!==Qa;){t=Qa;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,y=m.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:po(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(o(163))}}catch(e){Sc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Qa=e;break}Qa=t.return}m=Za,Za=!1}(e,n),pl(n,e),hr(Xr),Ut=!!Yr,Xr=Yr=null,e.current=n,gl(n,e,i),Qe(),Ml=l,bt=a,Ol.transition=s}else e.current=n;if(Wl&&(Wl=!1,ql=e,Kl=i),0===(s=e.pendingLanes)&&(Ul=null),function(e){if(ot&&"function"==typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),tc(e,Ye()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Hl)throw Hl=!1,e=Vl,Vl=null,e;0!=(1&Kl)&&0!==e.tag&&wc(),0!=(1&(s=e.pendingLanes))?e===Jl?Gl++:(Gl=0,Jl=e):Gl=0,Bi()}(e,t,n,r)}finally{Ol.transition=i,bt=r}return null}function wc(){if(null!==ql){var e=wt(Kl),t=Ol.transition,n=bt;try{if(Ol.transition=null,bt=16>e?16:e,null===ql)var r=!1;else{if(e=ql,ql=null,Kl=0,0!=(6&Ml))throw Error(o(331));var i=Ml;for(Ml|=4,Qa=e.current;null!==Qa;){var s=Qa,a=s.child;if(0!=(16&Qa.flags)){var l=s.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Qa=u;null!==Qa;){var h=Qa;switch(h.tag){case 0:case 11:case 15:el(8,h,s)}var f=h.child;if(null!==f)f.return=h,Qa=f;else for(;null!==Qa;){var d=(h=Qa).sibling,p=h.return;if(rl(h),h===u){Qa=null;break}if(null!==d){d.return=p,Qa=d;break}Qa=p}}}var m=s.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Qa=s}}if(0!=(2064&s.subtreeFlags)&&null!==a)a.return=s,Qa=a;else e:for(;null!==Qa;){if(0!=(2048&(s=Qa).flags))switch(s.tag){case 0:case 11:case 15:el(9,s,s.return)}var v=s.sibling;if(null!==v){v.return=s.return,Qa=v;break e}Qa=s.return}}var b=e.current;for(Qa=b;null!==Qa;){var w=(a=Qa).child;if(0!=(2064&a.subtreeFlags)&&null!==w)w.return=a,Qa=w;else e:for(a=b;null!==Qa;){if(0!=(2048&(l=Qa).flags))try{switch(l.tag){case 0:case 11:case 15:tl(9,l)}}catch(e){Sc(l,l.return,e)}if(l===a){Qa=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,Qa=x;break e}Qa=l.return}}if(Ml=i,Bi(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Ol.transition=t}}return!1}function xc(e,t,n){e=Do(e,t=ha(0,t=aa(n,t),1),1),t=Xl(),null!==e&&(yt(e,1,t),tc(e,t))}function Sc(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ul||!Ul.has(r))){t=Do(t,e=fa(t,e=aa(n,e),1),1),e=Xl(),null!==t&&(yt(t,1,e),tc(t,e));break}}t=t.return}}function kc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Xl(),e.pingedLanes|=e.suspendedLanes&n,El===e&&(Tl&n)===n&&(4===Dl||3===Dl&&(130023424&Tl)===Tl&&500>Ye()-Bl?uc(e,0):Ll|=n),tc(e,t)}function Cc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=Xl();null!==(e=Eo(e,t))&&(yt(e,t,n),tc(e,n))}function Oc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cc(e,n)}function Mc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Cc(e,n)}function Ec(e,t){return Ke(e,t)}function Ac(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tc(e,t,n,r){return new Ac(e,t,n,r)}function _c(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Rc(e,t){var n=e.alternate;return null===n?((n=Tc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dc(e,t,n,r,i,s){var a=2;if(r=e,"function"==typeof e)_c(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case k:return Pc(n.children,i,s,t);case C:a=8,i|=8;break;case O:return(e=Tc(12,n,t,2|i)).elementType=O,e.lanes=s,e;case T:return(e=Tc(13,n,t,i)).elementType=T,e.lanes=s,e;case _:return(e=Tc(19,n,t,i)).elementType=_,e.lanes=s,e;case P:return Nc(n,i,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case M:a=10;break e;case E:a=9;break e;case A:a=11;break e;case R:a=14;break e;case D:a=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Tc(a,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Pc(e,t,n,r){return(e=Tc(7,e,r,t)).lanes=n,e}function Nc(e,t,n,r){return(e=Tc(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function Ic(e,t,n){return(e=Tc(6,e,null,t)).lanes=n,e}function Lc(e,t,n){return(t=Tc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,r,i,o,s,a,l){return e=new jc(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Tc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},To(o),e}function Bc(e){if(!e)return Ci;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ti(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ti(n))return Di(e,n,t)}return t}function zc(e,t,n,r,i,o,s,a,l){return(e=Fc(n,r,!0,e,0,o,0,a,l)).context=Bc(null),n=e.current,(o=Ro(r=Xl(),i=Zl(n))).callback=null!=t?t:null,Do(n,o,i),e.current.lanes=i,yt(e,i,r),tc(e,r),e}function $c(e,t,n,r){var i=t.current,o=Xl(),s=Zl(i);return n=Bc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ro(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Do(i,t,s))&&(ec(e,i,s,o),Po(e,i,s)),s}function Hc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Uc(e,t){Vc(e,t),(e=e.alternate)&&Vc(e,t)}xl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Mi.current)ya=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return ya=!1,function(e,t,n){switch(t.tag){case 3:Ea(t),uo();break;case 5:rs(t);break;case 1:Ti(t.type)&&Pi(t);break;case 4:ts(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ki(mo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(ki(os,1&os.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ia(e,t,n):(ki(os,1&os.current),null!==(e=Ha(e,t,n))?e.sibling:null);ki(os,1&os.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return za(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ki(os,os.current),r)break;return null;case 22:case 23:return t.lanes=0,Sa(e,t,n)}return Ha(e,t,n)}(e,t,n);ya=0!=(131072&e.flags)}else ya=!1,to&&0!=(1048576&t.flags)&&Qi(t,Vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$a(e,t),e=t.pendingProps;var i=Ai(t,Oi.current);So(t,n),i=xs(null,t,r,e,i,n);var s=Ss();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ti(r)?(s=!0,Pi(t)):s=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,To(t),i.updater=Bo,t.stateNode=i,i._reactInternals=t,Vo(t,r,e,n),t=Ma(null,t,r,!0,s,n)):(t.tag=0,to&&s&&Yi(t),va(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch($a(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return _c(e)?1:0;if(null!=e){if((e=e.$$typeof)===A)return 11;if(e===R)return 14}return 2}(r),e=po(r,e),i){case 0:t=Ca(null,t,r,e,n);break e;case 1:t=Oa(null,t,r,e,n);break e;case 11:t=ba(null,t,r,e,n);break e;case 14:t=wa(null,t,r,po(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ca(e,t,r,i=t.elementType===r?i:po(r,i),n);case 1:return r=t.type,i=t.pendingProps,Oa(e,t,r,i=t.elementType===r?i:po(r,i),n);case 3:e:{if(Ea(t),null===e)throw Error(o(387));r=t.pendingProps,i=(s=t.memoizedState).element,_o(e,t),Io(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated){if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Aa(e,t,r,n,i=aa(Error(o(423)),t));break e}if(r!==i){t=Aa(e,t,r,n,i=aa(Error(o(424)),t));break e}for(eo=si(t.stateNode.containerInfo.firstChild),Zi=t,to=!0,no=null,n=Jo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(uo(),r===i){t=Ha(e,t,n);break e}va(e,t,r,n)}t=t.child}return t;case 5:return rs(t),null===e&&so(t),r=t.type,i=t.pendingProps,s=null!==e?e.memoizedProps:null,a=i.children,Zr(r,i)?a=null:null!==s&&Zr(r,s)&&(t.flags|=32),ka(e,t),va(e,t,a,n),t.child;case 6:return null===e&&so(t),null;case 13:return Ia(e,t,n);case 4:return ts(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Go(t,null,r,n):va(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,ba(e,t,r,i=t.elementType===r?i:po(r,i),n);case 7:return va(e,t,t.pendingProps,n),t.child;case 8:case 12:return va(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,ki(mo,r._currentValue),r._currentValue=a,null!==s)if(ir(s.value,a)){if(s.children===i.children&&!Mi.current){t=Ha(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===s.tag){(c=Ro(-1,n&-n)).tag=2;var u=s.updateQueue;if(null!==u){var h=(u=u.shared).pending;null===h?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),xo(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(o(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),xo(a,n,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}va(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,So(t,n),r=r(i=ko(i)),t.flags|=1,va(e,t,r,n),t.child;case 14:return i=po(r=t.type,t.pendingProps),wa(e,t,r,i=po(r.type,i),n);case 15:return xa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:po(r,i),$a(e,t),t.tag=1,Ti(r)?(e=!0,Pi(t)):e=!1,So(t,n),$o(t,r,i),Vo(t,r,i,n),Ma(null,t,r,!0,e,n);case 19:return za(e,t,n);case 22:return Sa(e,t,n)}throw Error(o(156,t.tag))};var Wc="function"==typeof reportError?reportError:function(e){console.error(e)};function qc(e){this._internalRoot=e}function Kc(e){this._internalRoot=e}function Gc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function Yc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if("function"==typeof i){var a=i;i=function(){var e=Hc(s);a.call(e)}}$c(t,s,e,i)}else s=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Hc(s);o.call(e)}}var s=zc(t,r,e,0,null,!1,0,"",Qc);return e._reactRootContainer=s,e[hi]=s.current,Br(8===e.nodeType?e.parentNode:e),lc(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var a=r;r=function(){var e=Hc(l);a.call(e)}}var l=Fc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[hi]=l.current,Br(8===e.nodeType?e.parentNode:e),lc((function(){$c(t,l,n,r)})),l}(n,t,e,i,r);return Hc(s)}Kc.prototype.render=qc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));$c(e,t,null,null)},Kc.prototype.unmount=qc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;lc((function(){$c(null,e,null,null)})),t[hi]=null}},Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&0!==t&&t<Pt[n].priority;n++);Pt.splice(n,0,e),0===n&&jt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ht(t.pendingLanes);0!==n&&(vt(t,1|n),tc(t,Ye()),0==(6&Ml)&&(zl=Ye()+500,Bi()))}break;case 13:lc((function(){var t=Eo(e,1);if(null!==t){var n=Xl();ec(t,e,1,n)}})),Uc(e,1)}},St=function(e){if(13===e.tag){var t=Eo(e,134217728);null!==t&&ec(t,e,134217728,Xl()),Uc(e,134217728)}},kt=function(e){if(13===e.tag){var t=Zl(e),n=Eo(e,t);null!==n&&ec(n,e,t,Xl()),Uc(e,t)}},Ct=function(){return bt},Ot=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Se=function(e,t,n){switch(t){case"input":if(X(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=vi(r);if(!i)throw Error(o(90));K(r),X(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ae=ac,Te=lc;var Xc={usingClientEntryPoint:!1,Events:[gi,yi,vi,Me,Ee,ac]},Zc={findFiberByHostInstance:mi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},eu={bundleType:Zc.bundleType,version:Zc.version,rendererPackageName:Zc.rendererPackageName,rendererConfig:Zc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(e))?null:e.stateNode},findFiberByHostInstance:Zc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tu.isDisabled&&tu.supportsFiber)try{it=tu.inject(eu),ot=tu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Gc(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Gc(e))throw Error(o(299));var n=!1,r="",i=Wc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Fc(e,1,!1,null,0,n,0,r,i),e[hi]=t.current,Br(8===e.nodeType?e.parentNode:e),new qc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return null===(e=We(t))?null:e.stateNode},t.flushSync=function(e){return lc(e)},t.hydrate=function(e,t,n){if(!Jc(t))throw Error(o(200));return Yc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Gc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,s="",a=Wc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=zc(t,null,e,1,null!=n?n:null,i,0,s,a),e[hi]=t.current,Br(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Kc(t)},t.render=function(e,t,n){if(!Jc(t))throw Error(o(200));return Yc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jc(e))throw Error(o(40));return!!e._reactRootContainer&&(lc((function(){Yc(null,null,e,!1,(function(){e._reactRootContainer=null,e[hi]=null}))})),!0)},t.unstable_batchedUpdates=ac,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Yc(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},745:(e,t,n)=>{"use strict";var r=n(3935);t.s=r.createRoot,r.hydrateRoot},3935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(4448)},463:(e,t,n)=>{"use strict";n.d(t,{uI:()=>se});var r=n(7294),i=n(5697),o=n.n(i);function s(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function a(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function c(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create;var u=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function h(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=u.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var f=[".DS_Store","Thumbs.db"];function d(e){return"object"==typeof e&&null!==e}function p(e){return v(e.target.files).map((function(e){return h(e)}))}function m(e){return s(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return h(e)}))]}}))}))}function g(e,t){return s(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return e.items?(n=v(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(b))]):[3,2];case 1:return[2,y(w(r.sent()))];case 2:return[2,y(v(e.files).map((function(e){return h(e)})))]}}))}))}function y(e){return e.filter((function(e){return-1===f.indexOf(e.name)}))}function v(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function b(e){if("function"!=typeof e.webkitGetAsEntry)return x(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?k(t):x(e)}function w(e){return e.reduce((function(e,t){return c(c([],l(e),!1),l(Array.isArray(t)?w(t):[t]),!1)}),[])}function x(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=h(t);return Promise.resolve(n)}function S(e){return s(this,void 0,void 0,(function(){return a(this,(function(t){return[2,e.isDirectory?k(e):C(e)]}))}))}function k(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function i(){var o=this;t.readEntries((function(t){return s(o,void 0,void 0,(function(){var o,s,l;return a(this,(function(a){switch(a.label){case 0:if(t.length)return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return o=a.sent(),e(o),[3,4];case 3:return s=a.sent(),n(s),[3,4];case 4:return[3,6];case 5:l=Promise.all(t.map(S)),r.push(l),i(),a.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function C(e){return s(this,void 0,void 0,(function(){return a(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=h(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var O=n(8363);function M(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||R(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.")}()}function E(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 A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||R(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){if(e){if("string"==typeof e)return D(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)?D(e,t):void 0}}function D(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}var P=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:"file-invalid-type",message:"File type must be ".concat(t)}},N=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},I=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},L={code:"too-many-files",message:"Too many files"};function j(e,t){var n="application/x-moz-file"===e.type||(0,O.Z)(e,t);return[n,n?null:P(t)]}function F(e,t,n){if(B(e.size))if(B(t)&&B(n)){if(e.size>n)return[!1,N(n)];if(e.size<t)return[!1,I(t)]}else{if(B(t)&&e.size<t)return[!1,I(t)];if(B(n)&&e.size>n)return[!1,N(n)]}return[!0,null]}function B(e){return null!=e}function z(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function $(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function H(e){e.preventDefault()}function V(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.some((function(t){return!z(e)&&t&&t.apply(void 0,[e].concat(r)),z(e)}))}}function U(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function W(e){return/^.*\.[\w]+$/.test(e)}var q=["children"],K=["open"],G=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],J=["refKey","onChange","onClick"];function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||Y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e,t){if(e){if("string"==typeof e)return X(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)?X(e,t):void 0}}function X(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}function Z(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 ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var re=(0,r.forwardRef)((function(e,t){var n=e.children,i=se(ne(e,q)),o=i.open,s=ne(i,K);return(0,r.useImperativeHandle)(t,(function(){return{open:o}}),[o]),r.createElement(r.Fragment,null,n(ee(ee({},s),{},{open:o})))}));re.displayName="Dropzone";var ie={disabled:!1,getFilesFromEvent:function(e){return s(this,void 0,void 0,(function(){return a(this,(function(t){return d(e)&&d(e.dataTransfer)?[2,g(e.dataTransfer,e.type)]:d(n=e)&&d(n.target)?[2,p(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,m(e)]:[2,[]];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};re.defaultProps=ie,re.propTypes={children:o().func,accept:o().objectOf(o().arrayOf(o().string)),multiple:o().bool,preventDropOnDocument:o().bool,noClick:o().bool,noKeyboard:o().bool,noDrag:o().bool,noDragEventsBubbling:o().bool,minSize:o().number,maxSize:o().number,maxFiles:o().number,disabled:o().bool,getFilesFromEvent:o().func,onFileDialogCancel:o().func,onFileDialogOpen:o().func,useFsAccessApi:o().bool,autoFocus:o().bool,onDragEnter:o().func,onDragLeave:o().func,onDragOver:o().func,onDrop:o().func,onDropAccepted:o().func,onDropRejected:o().func,onError:o().func,validator:o().func};var oe={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ee(ee({},ie),e),n=t.accept,i=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,a=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,f=t.onDragOver,d=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,x=t.noClick,S=t.noKeyboard,k=t.noDrag,C=t.noDragEventsBubbling,O=t.onError,E=t.validator,R=(0,r.useMemo)((function(){return function(e){if(B(e))return Object.entries(e).reduce((function(e,t){var n=_(t,2),r=n[0],i=n[1];return[].concat(M(e),[r],M(i))}),[]).filter((function(e){return U(e)||W(e)})).join(",")}(n)}),[n]),D=(0,r.useMemo)((function(){return function(e){return B(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=_(e,2),n=t[0],r=t[1],i=!0;return U(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),Array.isArray(r)&&r.every(W)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),i=!1),i})).reduce((function(e,t){var n=_(t,2),r=n[0],i=n[1];return A(A({},e),{},T({},r,i))}),{})}]:e}(n)}),[n]),P=(0,r.useMemo)((function(){return"function"==typeof y?y:le}),[y]),N=(0,r.useMemo)((function(){return"function"==typeof g?g:le}),[g]),I=(0,r.useRef)(null),q=(0,r.useRef)(null),K=Q((0,r.useReducer)(ae,oe),2),Z=K[0],re=K[1],se=Z.isFocused,ce=Z.isFileDialogActive,ue=(0,r.useRef)("undefined"!=typeof window&&window.isSecureContext&&v&&"showOpenFilePicker"in window),he=function(){!ue.current&&ce&&setTimeout((function(){q.current&&(q.current.files.length||(re({type:"closeDialog"}),N()))}),300)};(0,r.useEffect)((function(){return window.addEventListener("focus",he,!1),function(){window.removeEventListener("focus",he,!1)}}),[q,ce,N,ue]);var fe=(0,r.useRef)([]),de=function(e){I.current&&I.current.contains(e.target)||(e.preventDefault(),fe.current=[])};(0,r.useEffect)((function(){return w&&(document.addEventListener("dragover",H,!1),document.addEventListener("drop",de,!1)),function(){w&&(document.removeEventListener("dragover",H),document.removeEventListener("drop",de))}}),[I,w]),(0,r.useEffect)((function(){return!i&&b&&I.current&&I.current.focus(),function(){}}),[I,b,i]);var pe=(0,r.useCallback)((function(e){O?O(e):console.error(e)}),[O]),me=(0,r.useCallback)((function(e){var t;e.preventDefault(),e.persist(),Ae(e),fe.current=[].concat(function(e){if(Array.isArray(e))return X(e)}(t=fe.current)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||Y(t)||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.")}(),[e.target]),$(e)&&Promise.resolve(o(e)).then((function(t){if(!z(e)||C){var n=t.length,r=n>0&&function(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,s=e.maxFiles,a=e.validator;return!(!o&&t.length>1||o&&s>=1&&t.length>s)&&t.every((function(e){var t=_(j(e,n),1)[0],o=_(F(e,r,i),1)[0],s=a?a(e):null;return t&&o&&!s}))}({files:t,accept:R,minSize:a,maxSize:s,multiple:l,maxFiles:c,validator:E});re({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e)}})).catch((function(e){return pe(e)}))}),[o,u,pe,C,R,a,s,l,c,E]),ge=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),Ae(e);var t=$(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&f&&f(e),!1}),[f,C]),ye=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),Ae(e);var t=fe.current.filter((function(e){return I.current&&I.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),fe.current=t,t.length>0||(re({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),$(e)&&h&&h(e))}),[I,h,C]),ve=(0,r.useCallback)((function(e,t){var n=[],r=[];e.forEach((function(e){var t=Q(j(e,R),2),i=t[0],o=t[1],l=Q(F(e,a,s),2),c=l[0],u=l[1],h=E?E(e):null;if(i&&c&&!h)n.push(e);else{var f=[o,u];h&&(f=f.concat(h)),r.push({file:e,errors:f.filter((function(e){return e}))})}})),(!l&&n.length>1||l&&c>=1&&n.length>c)&&(n.forEach((function(e){r.push({file:e,errors:[L]})})),n.splice(0)),re({acceptedFiles:n,fileRejections:r,type:"setFiles"}),d&&d(n,r,t),r.length>0&&m&&m(r,t),n.length>0&&p&&p(n,t)}),[re,l,R,a,s,c,d,p,m,E]),be=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),Ae(e),fe.current=[],$(e)&&Promise.resolve(o(e)).then((function(t){z(e)&&!C||ve(t,e)})).catch((function(e){return pe(e)})),re({type:"reset"})}),[o,ve,pe,C]),we=(0,r.useCallback)((function(){if(ue.current){re({type:"openDialog"}),P();var e={multiple:l,types:D};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){ve(e,null),re({type:"closeDialog"})})).catch((function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(N(e),re({type:"closeDialog"})):function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?(ue.current=!1,q.current?(q.current.value=null,q.current.click()):pe(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):pe(e)}))}else q.current&&(re({type:"openDialog"}),P(),q.current.value=null,q.current.click())}),[re,P,N,v,ve,pe,D,l]),xe=(0,r.useCallback)((function(e){I.current&&I.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),we()))}),[I,we]),Se=(0,r.useCallback)((function(){re({type:"focus"})}),[]),ke=(0,r.useCallback)((function(){re({type:"blur"})}),[]),Ce=(0,r.useCallback)((function(){x||(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?setTimeout(we,0):we())}),[x,we]),Oe=function(e){return i?null:e},Me=function(e){return S?null:Oe(e)},Ee=function(e){return k?null:Oe(e)},Ae=function(e){C&&e.stopPropagation()},Te=(0,r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.role,o=e.onKeyDown,s=e.onFocus,a=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,h=e.onDragLeave,f=e.onDrop,d=ne(e,G);return ee(ee(te({onKeyDown:Me(V(o,xe)),onFocus:Me(V(s,Se)),onBlur:Me(V(a,ke)),onClick:Oe(V(l,Ce)),onDragEnter:Ee(V(c,me)),onDragOver:Ee(V(u,ge)),onDragLeave:Ee(V(h,ye)),onDrop:Ee(V(f,be)),role:"string"==typeof r&&""!==r?r:"presentation"},n,I),i||S?{}:{tabIndex:0}),d)}}),[I,xe,Se,ke,Ce,me,ge,ye,be,S,k,i]),_e=(0,r.useCallback)((function(e){e.stopPropagation()}),[]),Re=(0,r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,i=e.onClick,o=ne(e,J);return ee(ee({},te({accept:R,multiple:l,type:"file",style:{display:"none"},onChange:Oe(V(r,be)),onClick:Oe(V(i,_e)),tabIndex:-1},n,q)),o)}}),[q,n,l,be,i]);return ee(ee({},Z),{},{isFocused:se&&!i,getRootProps:Te,getInputProps:Re,rootRef:I,inputRef:q,open:Oe(we)})}function ae(e,t){switch(t.type){case"focus":return ee(ee({},e),{},{isFocused:!0});case"blur":return ee(ee({},e),{},{isFocused:!1});case"openDialog":return ee(ee({},oe),{},{isFileDialogActive:!0});case"closeDialog":return ee(ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ee(ee({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ee(ee({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ee({},oe);default:return e}}function le(){}},9921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case h:case o:case a:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case f:case g:case m:case l:return e;default:return t}}case i:return t}}}function S(e){return x(e)===h}t.AsyncMode=u,t.ConcurrentMode=h,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=d,t.isAsyncMode=function(e){return S(e)||x(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===a},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===h||e===a||e===s||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===v||e.$$typeof===b||e.$$typeof===w||e.$$typeof===y)},t.typeOf=x},9864:(e,t,n)=>{"use strict";e.exports=n(9921)},9655:(e,t,n)=>{"use strict";var r;n.d(t,{UT:()=>u,rU:()=>d});var i=n(7294),o=n(9250),s=n(2599);function a(){return a=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},a.apply(this,arguments)}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const l=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],c=(r||(r=n.t(i,2))).startTransition;function u(e){let{basename:t,children:n,future:r,window:a}=e,l=i.useRef();null==l.current&&(l.current=(0,s.q_)({window:a,v5Compat:!0}));let u=l.current,[h,f]=i.useState({action:u.action,location:u.location}),{v7_startTransition:d}=r||{},p=i.useCallback((e=>{d&&c?c((()=>f(e))):f(e)}),[f,d]);return i.useLayoutEffect((()=>u.listen(p)),[u,p]),i.createElement(o.F0,{basename:t,children:n,location:h.location,navigationType:h.action,navigator:u})}const h="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,f=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,d=i.forwardRef((function(e,t){let n,{onClick:r,relative:c,reloadDocument:u,replace:d,state:p,target:m,to:g,preventScrollReset:y}=e,v=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,l),{basename:b}=i.useContext(o.Us),w=!1;if("string"==typeof g&&f.test(g)&&(n=g,h))try{let e=new URL(window.location.href),t=g.startsWith("//")?new URL(e.protocol+g):new URL(g),n=(0,s.Zn)(t.pathname,b);t.origin===e.origin&&null!=n?g=n+t.search+t.hash:w=!0}catch(e){}let x=(0,o.oQ)(g,{relative:c}),S=function(e,t){let{target:n,replace:r,state:a,preventScrollReset:l,relative:c}=void 0===t?{}:t,u=(0,o.s0)(),h=(0,o.TH)(),f=(0,o.WU)(e,{relative:c});return i.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:(0,s.Ep)(h)===(0,s.Ep)(f);u(e,{replace:n,state:a,preventScrollReset:l,relative:c})}}),[h,u,f,r,a,n,e,l,c])}(g,{replace:d,state:p,target:m,preventScrollReset:y,relative:c});return i.createElement("a",a({},v,{href:n||x,onClick:w||u?r:function(e){r&&r(e),e.defaultPrevented||S(e)},ref:t,target:m}))}));var p,m;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(p||(p={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(m||(m={}))},9250:(e,t,n)=>{"use strict";var r;n.d(t,{F0:()=>R,Fg:()=>T,TH:()=>m,UO:()=>b,Us:()=>c,V$:()=>x,WU:()=>w,j3:()=>_,oQ:()=>d,s0:()=>y,w3:()=>a});var i=n(7294),o=n(2599);function s(){return s=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},s.apply(this,arguments)}const a=i.createContext(null),l=i.createContext(null),c=i.createContext(null),u=i.createContext(null),h=i.createContext({outlet:null,matches:[],isDataRoute:!1}),f=i.createContext(null);function d(e,t){let{relative:n}=void 0===t?{}:t;p()||(0,o.J0)(!1);let{basename:r,navigator:s}=i.useContext(c),{hash:a,pathname:l,search:u}=w(e,{relative:n}),h=l;return"/"!==r&&(h="/"===l?r:(0,o.RQ)([r,l])),s.createHref({pathname:h,search:u,hash:a})}function p(){return null!=i.useContext(u)}function m(){return p()||(0,o.J0)(!1),i.useContext(u).location}function g(e){i.useContext(c).static||i.useLayoutEffect(e)}function y(){let{isDataRoute:e}=i.useContext(h);return e?function(){let{router:e}=function(e){let t=i.useContext(a);return t||(0,o.J0)(!1),t}(M.UseNavigateStable),t=A(E.UseNavigateStable),n=i.useRef(!1);return g((()=>{n.current=!0})),i.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,s({fromRouteId:t},i)))}),[e,t])}():function(){p()||(0,o.J0)(!1);let e=i.useContext(a),{basename:t,navigator:n}=i.useContext(c),{matches:r}=i.useContext(h),{pathname:s}=m(),l=JSON.stringify((0,o.Zq)(r).map((e=>e.pathnameBase))),u=i.useRef(!1);return g((()=>{u.current=!0})),i.useCallback((function(r,i){if(void 0===i&&(i={}),!u.current)return;if("number"==typeof r)return void n.go(r);let a=(0,o.pC)(r,JSON.parse(l),s,"path"===i.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:(0,o.RQ)([t,a.pathname])),(i.replace?n.replace:n.push)(a,i.state,i)}),[t,n,l,s,e])}()}const v=i.createContext(null);function b(){let{matches:e}=i.useContext(h),t=e[e.length-1];return t?t.params:{}}function w(e,t){let{relative:n}=void 0===t?{}:t,{matches:r}=i.useContext(h),{pathname:s}=m(),a=JSON.stringify((0,o.Zq)(r).map((e=>e.pathnameBase)));return i.useMemo((()=>(0,o.pC)(e,JSON.parse(a),s,"path"===n)),[e,a,s,n])}function x(e,t){return function(e,t,n){p()||(0,o.J0)(!1);let{navigator:r}=i.useContext(c),{matches:a}=i.useContext(h),l=a[a.length-1],f=l?l.params:{},d=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let g,y=m();if(t){var v;let e="string"==typeof t?(0,o.cP)(t):t;"/"===d||(null==(v=e.pathname)?void 0:v.startsWith(d))||(0,o.J0)(!1),g=e}else g=y;let b=g.pathname||"/",w="/"===d?b:b.slice(d.length)||"/",x=(0,o.fp)(e,{pathname:w}),S=function(e,t,n){var r;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){var s;if(null==(s=n)||!s.errors)return null;e=n.matches}let a=e,l=null==(r=n)?void 0:r.errors;if(null!=l){let e=a.findIndex((e=>e.route.id&&(null==l?void 0:l[e.route.id])));e>=0||(0,o.J0)(!1),a=a.slice(0,Math.min(a.length,e+1))}return a.reduceRight(((e,r,o)=>{let s=r.route.id?null==l?void 0:l[r.route.id]:null,c=null;n&&(c=r.route.errorElement||k);let u=t.concat(a.slice(0,o+1)),h=()=>{let t;return t=s?c:r.route.Component?i.createElement(r.route.Component,null):r.route.element?r.route.element:e,i.createElement(O,{match:r,routeContext:{outlet:e,matches:u,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?i.createElement(C,{location:n.location,revalidation:n.revalidation,component:c,error:s,children:h(),routeContext:{outlet:null,matches:u,isDataRoute:!0}}):h()}),null)}(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},f,e.params),pathname:(0,o.RQ)([d,r.encodeLocation?r.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:(0,o.RQ)([d,r.encodeLocation?r.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,n);return t&&S?i.createElement(u.Provider,{value:{location:s({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:o.aU.Pop}},S):S}(e,t)}function S(){let e=function(){var e;let t=i.useContext(f),n=function(e){let t=i.useContext(l);return t||(0,o.J0)(!1),t}(E.UseRouteError),r=A(E.UseRouteError);return t||(null==(e=n.errors)?void 0:e[r])}(),t=(0,o.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:r},n):null,null)}const k=i.createElement(S,null);class C extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?i.createElement(h.Provider,{value:this.props.routeContext},i.createElement(f.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function O(e){let{routeContext:t,match:n,children:r}=e,o=i.useContext(a);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),i.createElement(h.Provider,{value:t},r)}var M=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(M||{}),E=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(E||{});function A(e){let t=function(e){let t=i.useContext(h);return t||(0,o.J0)(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||(0,o.J0)(!1),n.route.id}function T(e){let{to:t,replace:n,state:r,relative:s}=e;p()||(0,o.J0)(!1);let{matches:a}=i.useContext(h),{pathname:l}=m(),c=y(),u=(0,o.pC)(t,(0,o.Zq)(a).map((e=>e.pathnameBase)),l,"path"===s),f=JSON.stringify(u);return i.useEffect((()=>c(JSON.parse(f),{replace:n,state:r,relative:s})),[c,f,s,n,r]),null}function _(e){return function(e){let t=i.useContext(h).outlet;return t?i.createElement(v.Provider,{value:e},t):t}(e.context)}function R(e){let{basename:t="/",children:n=null,location:r,navigationType:s=o.aU.Pop,navigator:a,static:l=!1}=e;p()&&(0,o.J0)(!1);let h=t.replace(/^\/*/,"/"),f=i.useMemo((()=>({basename:h,navigator:a,static:l})),[h,a,l]);"string"==typeof r&&(r=(0,o.cP)(r));let{pathname:d="/",search:m="",hash:g="",state:y=null,key:v="default"}=r,b=i.useMemo((()=>{let e=(0,o.Zn)(d,h);return null==e?null:{location:{pathname:e,search:m,hash:g,state:y,key:v},navigationType:s}}),[h,d,m,g,y,v,s]);return null==b?null:i.createElement(c.Provider,{value:f},i.createElement(u.Provider,{children:n,value:b}))}(r||(r=n.t(i,2))).startTransition,new Promise((()=>{}));class D extends i.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,i=AwaitRenderStatus.pending;if(n instanceof Promise)if(this.state.error){AwaitRenderStatus.error;let e=this.state.error;Promise.reject().catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?void 0!==r._error?AwaitRenderStatus.error:void 0!==r._data?AwaitRenderStatus.success:AwaitRenderStatus.pending:(AwaitRenderStatus.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),n.then((e=>Object.defineProperty(n,"_data",{get:()=>e})),(e=>Object.defineProperty(n,"_error",{get:()=>e}))));else AwaitRenderStatus.success,Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});if(i===AwaitRenderStatus.error&&r._error instanceof AbortedDeferredError)throw neverSettledPromise;if(i===AwaitRenderStatus.error&&!t)throw r._error;if(i===AwaitRenderStatus.error)return React.createElement(AwaitContext.Provider,{value:r,children:t});if(i===AwaitRenderStatus.success)return React.createElement(AwaitContext.Provider,{value:r,children:e});throw r}}},3460:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7294),i=n(296),o=n.n(i);function s(e){let{debounce:t,scroll:n,polyfill:i,offsetSize:s}=void 0===e?{debounce:0,scroll:!1,offsetSize:!1}:e;const l=i||("undefined"==typeof window?class{}:window.ResizeObserver);if(!l)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[u,h]=(0,r.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),f=(0,r.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:u}),d=t?"number"==typeof t?t:t.scroll:null,p=t?"number"==typeof t?t:t.resize:null,m=(0,r.useRef)(!1);(0,r.useEffect)((()=>(m.current=!0,()=>{m.current=!1})));const[g,y,v]=(0,r.useMemo)((()=>{const e=()=>{if(!f.current.element)return;const{left:e,top:t,width:n,height:r,bottom:i,right:o,x:a,y:l}=f.current.element.getBoundingClientRect(),u={left:e,top:t,width:n,height:r,bottom:i,right:o,x:a,y:l};f.current.element instanceof HTMLElement&&s&&(u.height=f.current.element.offsetHeight,u.width=f.current.element.offsetWidth),Object.freeze(u),m.current&&!c(f.current.lastBounds,u)&&h(f.current.lastBounds=u)};return[e,p?o()(e,p):e,d?o()(e,d):e]}),[h,s,d,p]);function b(){f.current.scrollContainers&&(f.current.scrollContainers.forEach((e=>e.removeEventListener("scroll",v,!0))),f.current.scrollContainers=null),f.current.resizeObserver&&(f.current.resizeObserver.disconnect(),f.current.resizeObserver=null)}function w(){f.current.element&&(f.current.resizeObserver=new l(v),f.current.resizeObserver.observe(f.current.element),n&&f.current.scrollContainers&&f.current.scrollContainers.forEach((e=>e.addEventListener("scroll",v,{capture:!0,passive:!0}))))}var x,S,k;return x=v,S=Boolean(n),(0,r.useEffect)((()=>{if(S){const e=x;return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",e,!0)}}}),[x,S]),k=y,(0,r.useEffect)((()=>{const e=k;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[k]),(0,r.useEffect)((()=>{b(),w()}),[n,v,y]),(0,r.useEffect)((()=>b),[]),[e=>{e&&e!==f.current.element&&(b(),f.current.element=e,f.current.scrollContainers=a(e),w())},u,g]}function a(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some((e=>"auto"===e||"scroll"===e))&&t.push(e),[...t,...a(e.parentElement)]}const l=["x","y","top","bottom","left","right","width","height"],c=(e,t)=>l.every((n=>e[n]===t[n]))},5251:(e,t,n)=>{"use strict";var r=n(7294),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},2408:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var w=b.prototype=new v;w.constructor=b,m(w,y.prototype),w.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,k={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,r){var i,o={},s=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)S.call(t,i)&&!C.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:s,ref:a,props:o,_owner:k.current}}function M(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,i,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return s=s(l=e),e=""===o?"."+A(l,0):o,x(s)?(i="",null!=e&&(i=e.replace(E,"$&/")+"/"),T(s,t,i,"",(function(e){return e}))):null!=s&&(M(s)&&(s=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,i+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(E,"$&/")+"/")+e)),t.push(s)),1;if(l=0,o=""===o?".":o+":",x(e))for(var c=0;c<e.length;c++){var u=o+A(a=e[c],c);l+=T(a,t,i,u,s)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(a=e.next()).done;)l+=T(a=a.value,t,i,u=o+A(a,c++),s);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function _(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function R(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var D={current:null},P={transition:null},N={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:P,ReactCurrentOwner:k};t.Children={map:_,forEach:function(e,t,n){_(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return _(e,(function(){t++})),t},toArray:function(e){return _(e,(function(e){return e}))||[]},only:function(e){if(!M(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=s,t.PureComponent=b,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=m({},e.props),o=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)S.call(t,c)&&!C.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:s,props:i,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=M,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return D.current.useCallback(e,t)},t.useContext=function(e){return D.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return D.current.useDeferredValue(e)},t.useEffect=function(e,t){return D.current.useEffect(e,t)},t.useId=function(){return D.current.useId()},t.useImperativeHandle=function(e,t,n){return D.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return D.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return D.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return D.current.useMemo(e,t)},t.useReducer=function(e,t,n){return D.current.useReducer(e,t,n)},t.useRef=function(e){return D.current.useRef(e)},t.useState=function(e){return D.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return D.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return D.current.useTransition()},t.version="18.2.0"},7294:(e,t,n)=>{"use strict";e.exports=n(2408)},5893:(e,t,n)=>{"use strict";e.exports=n(5251)},3697:(e,t,n)=>{"use strict";var r=n(5972).functionsHaveConfigurableNames(),i=Object,o=TypeError;e.exports=function(){if(null!=this&&this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e},r&&Object.defineProperty&&Object.defineProperty(e.exports,"name",{value:"get flags"})},2847:(e,t,n)=>{"use strict";var r=n(4289),i=n(5559),o=n(3697),s=n(1721),a=n(2753),l=i(s());r(l,{getPolyfill:s,implementation:o,shim:a}),e.exports=l},1721:(e,t,n)=>{"use strict";var r=n(3697),i=n(4289).supportsDescriptors,o=Object.getOwnPropertyDescriptor;e.exports=function(){if(i&&"gim"===/a/gim.flags){var e=o(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(n,"sticky",{get:function(){t+="y"}}),"dy"===t)return e.get}}return r}},2753:(e,t,n)=>{"use strict";var r=n(4289).supportsDescriptors,i=n(1721),o=Object.getOwnPropertyDescriptor,s=Object.defineProperty,a=TypeError,l=Object.getPrototypeOf,c=/a/;e.exports=function(){if(!r||!l)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=i(),t=l(c),n=o(t,"flags");return n&&n.get===e||s(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},53:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],h=1,f=null,d=3,p=!1,m=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function x(e){if(g=!1,w(e),!m)if(null!==r(c))m=!0,P(S);else{var t=r(u);null!==t&&N(x,t.startTime-e)}}function S(e,n){m=!1,g&&(g=!1,v(M),M=-1),p=!0;var o=d;try{for(w(n),f=r(c);null!==f&&(!(f.expirationTime>n)||e&&!T());){var s=f.callback;if("function"==typeof s){f.callback=null,d=f.priorityLevel;var a=s(f.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?f.callback=a:f===r(c)&&i(c),w(n)}else i(c);f=r(c)}if(null!==f)var l=!0;else{var h=r(u);null!==h&&N(x,h.startTime-n),l=!1}return l}finally{f=null,d=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,C=!1,O=null,M=-1,E=5,A=-1;function T(){return!(t.unstable_now()-A<E)}function _(){if(null!==O){var e=t.unstable_now();A=e;var n=!0;try{n=O(!0,e)}finally{n?k():(C=!1,O=null)}}else C=!1}if("function"==typeof b)k=function(){b(_)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,D=R.port2;R.port1.onmessage=_,k=function(){D.postMessage(null)}}else k=function(){y(_,0)};function P(e){O=e,C||(C=!0,k())}function N(e,n){M=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,P(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},t.unstable_scheduleCallback=function(e,i,o){var s=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:h++,callback:i,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(v(M),M=-1):g=!0,N(x,o-s))):(e.sortIndex=a,n(c,e),m||p||(m=!0,P(S))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}},3840:(e,t,n)=>{"use strict";e.exports=n(53)},7478:(e,t,n)=>{"use strict";var r=n(210),i=n(1924),o=n(631),s=r("%TypeError%"),a=r("%WeakMap%",!0),l=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),f=i("Map.prototype.get",!0),d=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new s("Side channel does not contain "+o(e))},get:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(l){if(t)return f(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return h(e,r)}else if(l){if(t)return p(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,i){a&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new a),u(e,r,i)):l?(t||(t=new l),d(t,r,i)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,i))}};return r}},8213:(e,t)=>{class n{constructor(){this._array=[],this._set=new Map}static fromArray(e,t){const r=new n;for(let n=0,i=e.length;n<i;n++)r.add(e[n],t);return r}size(){return this._set.size}add(e,t){const n=this.has(e),r=this._array.length;n&&!t||this._array.push(e),n||this._set.set(e,r)}has(e){return this._set.has(e)}indexOf(e){const t=this._set.get(e);if(t>=0)return t;throw new Error('"'+e+'" is not in the set.')}at(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)}toArray(){return this._array.slice()}}t.I=n},6400:(e,t,n)=>{const r=n(7923);t.encode=function(e){let t,n="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,i>>>=5,i>0&&(t|=32),n+=r.encode(t)}while(i>0);return n}},7923:(e,t)=>{const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)}},9216:(e,t)=>{function n(e,r,i,o,s,a){const l=Math.floor((r-e)/2)+e,c=s(i,o[l],!0);return 0===c?l:c>0?r-l>1?n(l,r,i,o,s,a):a==t.LEAST_UPPER_BOUND?r<o.length?r:-1:l:l-e>1?n(e,l,i,o,s,a):a==t.LEAST_UPPER_BOUND?l:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,i,o){if(0===r.length)return-1;let s=n(-1,r.length,e,r,i,o||t.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===i(r[s],r[s-1],!0);)--s;return s}},1188:(e,t,n)=>{const r=n(2728);t.H=class{constructor(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(e,t){this._array.forEach(e,t)}add(e){!function(e,t){const n=e.generatedLine,i=t.generatedLine,o=e.generatedColumn,s=t.generatedColumn;return i>n||i==n&&s>=o||r.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))}toArray(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array}}},8429:(e,t,n)=>{if(function(){return"undefined"!=typeof window&&this===window}.call()){let t=null;e.exports=function(){if("string"==typeof t)return fetch(t).then((e=>e.arrayBuffer()));if(t instanceof ArrayBuffer)return Promise.resolve(t);throw new Error("You must provide the string URL or ArrayBuffer contents of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer")},e.exports.initialize=e=>t=e}else{const t=n(5574),r=n(6152);e.exports=function(){return new Promise(((e,n)=>{const i=r.join("/","mappings.wasm");t.readFile(i,null,((t,r)=>{t?n(t):e(r.buffer)}))}))},e.exports.initialize=e=>{console.debug("SourceMapConsumer.initialize is a no-op when running in node.js")}}},6771:(e,t,n)=>{const r=n(2728),i=n(9216),o=n(8213).I,s=(n(6400),n(8429)),a=n(1225),l=Symbol("smcInternal");class c{constructor(e,t){return e==l?Promise.resolve(this):function(e,t){let n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));const i=null!=n.sections?new h(n,t):new u(n,t);return Promise.resolve(i)}(e,t)}static initialize(e){s.initialize(e["lib/mappings.wasm"])}static fromSourceMap(e,t){return function(e,t){return u.fromSourceMap(e,t)}(e,t)}static async with(e,t,n){const r=await new c(e,t);try{return await n(r)}finally{r.destroy()}}_parseMappings(e,t){throw new Error("Subclasses must implement _parseMappings")}eachMapping(e,t,n){throw new Error("Subclasses must implement eachMapping")}allGeneratedPositionsFor(e){throw new Error("Subclasses must implement allGeneratedPositionsFor")}destroy(){throw new Error("Subclasses must implement destroy")}}c.prototype._version=3,c.GENERATED_ORDER=1,c.ORIGINAL_ORDER=2,c.GREATEST_LOWER_BOUND=1,c.LEAST_UPPER_BOUND=2,t.SourceMapConsumer=c;class u extends c{constructor(e,t){return super(l).then((n=>{let i=e;"string"==typeof e&&(i=r.parseSourceMapInput(e));const s=r.getArg(i,"version");let l=r.getArg(i,"sources");const c=r.getArg(i,"names",[]);let u=r.getArg(i,"sourceRoot",null);const h=r.getArg(i,"sourcesContent",null),f=r.getArg(i,"mappings"),d=r.getArg(i,"file",null);if(s!=n._version)throw new Error("Unsupported version: "+s);return u&&(u=r.normalize(u)),l=l.map(String).map(r.normalize).map((function(e){return u&&r.isAbsolute(u)&&r.isAbsolute(e)?r.relative(u,e):e})),n._names=o.fromArray(c.map(String),!0),n._sources=o.fromArray(l,!0),n._absoluteSources=n._sources.toArray().map((function(e){return r.computeSourceURL(u,e,t)})),n.sourceRoot=u,n.sourcesContent=h,n._mappings=f,n._sourceMapURL=t,n.file=d,n._computedColumnSpans=!1,n._mappingsPtr=0,n._wasm=null,a().then((e=>(n._wasm=e,n)))}))}_findSourceIndex(e){let t=e;if(null!=this.sourceRoot&&(t=r.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);for(let t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==e)return t;return-1}static fromSourceMap(e,t){return new u(e.toString())}get sources(){return this._absoluteSources.slice()}_getMappingsPtr(){return 0===this._mappingsPtr&&this._parseMappings(this._mappings,this.sourceRoot),this._mappingsPtr}_parseMappings(e,t){const n=e.length,r=this._wasm.exports.allocate_mappings(n),i=new Uint8Array(this._wasm.exports.memory.buffer,r,n);for(let t=0;t<n;t++)i[t]=e.charCodeAt(t);const o=this._wasm.exports.parse_mappings(r);if(!o){const e=this._wasm.exports.get_last_error();let t=`Error parsing mappings (code ${e}): `;switch(e){case 1:t+="the mappings contained a negative line, column, source index, or name index";break;case 2:t+="the mappings contained a number larger than 2**32";break;case 3:t+="reached EOF while in the middle of parsing a VLQ";break;case 4:t+="invalid base 64 character while parsing a VLQ";break;default:t+="unknown error code"}throw new Error(t)}this._mappingsPtr=o}eachMapping(e,t,n){const i=t||null,o=n||c.GENERATED_ORDER,s=this.sourceRoot;this._wasm.withMappingCallback((t=>{null!==t.source&&(t.source=this._sources.at(t.source),t.source=r.computeSourceURL(s,t.source,this._sourceMapURL),null!==t.name&&(t.name=this._names.at(t.name))),e.call(i,t)}),(()=>{switch(o){case c.GENERATED_ORDER:this._wasm.exports.by_generated_location(this._getMappingsPtr());break;case c.ORIGINAL_ORDER:this._wasm.exports.by_original_location(this._getMappingsPtr());break;default:throw new Error("Unknown order of iteration.")}}))}allGeneratedPositionsFor(e){let t=r.getArg(e,"source");const n=r.getArg(e,"line"),i=e.column||0;if(t=this._findSourceIndex(t),t<0)return[];if(n<1)throw new Error("Line numbers must be >= 1");if(i<0)throw new Error("Column numbers must be >= 0");const o=[];return this._wasm.withMappingCallback((e=>{let t=e.lastGeneratedColumn;this._computedColumnSpans&&null===t&&(t=1/0),o.push({line:e.generatedLine,column:e.generatedColumn,lastColumn:t})}),(()=>{this._wasm.exports.all_generated_locations_for(this._getMappingsPtr(),t,n-1,"column"in e,i)})),o}destroy(){0!==this._mappingsPtr&&(this._wasm.exports.free_mappings(this._mappingsPtr),this._mappingsPtr=0)}computeColumnSpans(){this._computedColumnSpans||(this._wasm.exports.compute_column_spans(this._getMappingsPtr()),this._computedColumnSpans=!0)}originalPositionFor(e){const t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")};if(t.generatedLine<1)throw new Error("Line numbers must be >= 1");if(t.generatedColumn<0)throw new Error("Column numbers must be >= 0");let n,i=r.getArg(e,"bias",c.GREATEST_LOWER_BOUND);if(null==i&&(i=c.GREATEST_LOWER_BOUND),this._wasm.withMappingCallback((e=>n=e),(()=>{this._wasm.exports.original_location_for(this._getMappingsPtr(),t.generatedLine-1,t.generatedColumn,i)})),n&&n.generatedLine===t.generatedLine){let e=r.getArg(n,"source",null);null!==e&&(e=this._sources.at(e),e=r.computeSourceURL(this.sourceRoot,e,this._sourceMapURL));let t=r.getArg(n,"name",null);return null!==t&&(t=this._names.at(t)),{source:e,line:r.getArg(n,"originalLine",null),column:r.getArg(n,"originalColumn",null),name:t}}return{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))}sourceContentFor(e,t){if(!this.sourcesContent)return null;const n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];let i,o=e;if(null!=this.sourceRoot&&(o=r.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(i=r.urlParse(this.sourceRoot))){const e=o.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];if((!i.path||"/"==i.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(t)return null;throw new Error('"'+o+'" is not in the SourceMap.')}generatedPositionFor(e){let t=r.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};const n={source:t,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")};if(n.originalLine<1)throw new Error("Line numbers must be >= 1");if(n.originalColumn<0)throw new Error("Column numbers must be >= 0");let i,o=r.getArg(e,"bias",c.GREATEST_LOWER_BOUND);if(null==o&&(o=c.GREATEST_LOWER_BOUND),this._wasm.withMappingCallback((e=>i=e),(()=>{this._wasm.exports.generated_location_for(this._getMappingsPtr(),n.source,n.originalLine-1,n.originalColumn,o)})),i&&i.source===n.source){let e=i.lastGeneratedColumn;return this._computedColumnSpans&&null===e&&(e=1/0),{line:r.getArg(i,"generatedLine",null),column:r.getArg(i,"generatedColumn",null),lastColumn:e}}return{line:null,column:null,lastColumn:null}}}u.prototype.consumer=c;class h extends c{constructor(e,t){return super(l).then((n=>{let i=e;"string"==typeof e&&(i=r.parseSourceMapInput(e));const s=r.getArg(i,"version"),a=r.getArg(i,"sections");if(s!=n._version)throw new Error("Unsupported version: "+s);n._sources=new o,n._names=new o,n.__generatedMappings=null,n.__originalMappings=null,n.__generatedMappingsUnsorted=null,n.__originalMappingsUnsorted=null;let l={line:-1,column:0};return Promise.all(a.map((e=>{if(e.url)throw new Error("Support for url field in sections not implemented.");const n=r.getArg(e,"offset"),i=r.getArg(n,"line"),o=r.getArg(n,"column");if(i<l.line||i===l.line&&o<l.column)throw new Error("Section offsets must be ordered and non-overlapping.");return l=n,new c(r.getArg(e,"map"),t).then((e=>({generatedOffset:{generatedLine:i+1,generatedColumn:o+1},consumer:e})))}))).then((e=>(n._sections=e,n)))}))}get _generatedMappings(){return this.__generatedMappings||this._sortGeneratedMappings(),this.__generatedMappings}get _originalMappings(){return this.__originalMappings||this._sortOriginalMappings(),this.__originalMappings}get _generatedMappingsUnsorted(){return this.__generatedMappingsUnsorted||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappingsUnsorted}get _originalMappingsUnsorted(){return this.__originalMappingsUnsorted||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappingsUnsorted}_sortGeneratedMappings(){const e=this._generatedMappingsUnsorted;e.sort(r.compareByGeneratedPositionsDeflated),this.__generatedMappings=e}_sortOriginalMappings(){const e=this._originalMappingsUnsorted;e.sort(r.compareByOriginalPositions),this.__originalMappings=e}get sources(){const e=[];for(let t=0;t<this._sections.length;t++)for(let n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}originalPositionFor(e){const t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=i.search(t,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn})),o=this._sections[n];return o?o.consumer.originalPositionFor({line:t.generatedLine-(o.generatedOffset.generatedLine-1),column:t.generatedColumn-(o.generatedOffset.generatedLine===t.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))}sourceContentFor(e,t){for(let t=0;t<this._sections.length;t++){const n=this._sections[t].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')}generatedPositionFor(e){for(let t=0;t<this._sections.length;t++){const n=this._sections[t];if(-1===n.consumer._findSourceIndex(r.getArg(e,"source")))continue;const i=n.consumer.generatedPositionFor(e);if(i)return{line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)}}return{line:null,column:null}}_parseMappings(e,t){const n=this.__generatedMappingsUnsorted=[],i=this.__originalMappingsUnsorted=[];for(let e=0;e<this._sections.length;e++){const t=this._sections[e],o=[];t.consumer.eachMapping((e=>o.push(e)));for(let e=0;e<o.length;e++){const s=o[e];let a=r.computeSourceURL(t.consumer.sourceRoot,null,this._sourceMapURL);this._sources.add(a),a=this._sources.indexOf(a);let l=null;s.name&&(this._names.add(s.name),l=this._names.indexOf(s.name));const c={source:a,generatedLine:s.generatedLine+(t.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(t.generatedOffset.generatedLine===s.generatedLine?t.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:l};n.push(c),"number"==typeof c.originalLine&&i.push(c)}}}eachMapping(e,t,n){const i=t||null;let o;switch(n||c.GENERATED_ORDER){case c.GENERATED_ORDER:o=this._generatedMappings;break;case c.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}const s=this.sourceRoot;o.map((function(e){let t=null;return null!==e.source&&(t=this._sources.at(e.source),t=r.computeSourceURL(s,t,this._sourceMapURL)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,i)}_findMapping(e,t,n,r,o,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,t,o,s)}allGeneratedPositionsFor(e){const t=r.getArg(e,"line"),n={source:r.getArg(e,"source"),originalLine:t,originalColumn:r.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];if(n.originalLine<1)throw new Error("Line numbers must be >= 1");if(n.originalColumn<0)throw new Error("Column numbers must be >= 0");const o=[];let s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(s>=0){let n=this._originalMappings[s];if(void 0===e.column){const e=n.originalLine;for(;n&&n.originalLine===e;){let e=n.lastGeneratedColumn;this._computedColumnSpans&&null===e&&(e=1/0),o.push({line:r.getArg(n,"generatedLine",null),column:r.getArg(n,"generatedColumn",null),lastColumn:e}),n=this._originalMappings[++s]}}else{const e=n.originalColumn;for(;n&&n.originalLine===t&&n.originalColumn==e;){let e=n.lastGeneratedColumn;this._computedColumnSpans&&null===e&&(e=1/0),o.push({line:r.getArg(n,"generatedLine",null),column:r.getArg(n,"generatedColumn",null),lastColumn:e}),n=this._originalMappings[++s]}}}return o}destroy(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.destroy()}}},4433:(e,t,n)=>{const r=n(6400),i=n(2728),o=n(8213).I,s=n(1188).H;class a{constructor(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new s,this._sourcesContents=null}static fromSourceMap(e){const t=e.sourceRoot,n=new a({file:e.file,sourceRoot:t});return e.eachMapping((function(e){const r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=i.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){let o=r;null!==t&&(o=i.relative(t,r)),n._sources.has(o)||n._sources.add(o);const s=e.sourceContentFor(r);null!=s&&n.setSourceContent(r,s)})),n}addMapping(e){const t=i.getArg(e,"generated"),n=i.getArg(e,"original",null);let r=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,o),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:o})}setSourceContent(e,t){let n=e;null!=this._sourceRoot&&(n=i.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))}applySourceMap(e,t,n){let r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}const s=this._sourceRoot;null!=s&&(r=i.relative(s,r));const a=this._mappings.toArray().length>0?new o:this._sources,l=new o;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){const r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=r.source&&(t.source=r.source,null!=n&&(t.source=i.join(n,t.source)),null!=s&&(t.source=i.relative(s,t.source)),t.originalLine=r.line,t.originalColumn=r.column,null!=r.name&&(t.name=r.name))}const o=t.source;null==o||a.has(o)||a.add(o);const c=t.name;null==c||l.has(c)||l.add(c)}),this),this._sources=a,this._names=l,e.sources.forEach((function(t){const r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=i.join(n,t)),null!=s&&(t=i.relative(s,t)),this.setSourceContent(t,r))}),this)}_validateMapping(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!n&&!r);else if(!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))}_serializeMappings(){let e,t,n,o,s=0,a=1,l=0,c=0,u=0,h=0,f="";const d=this._mappings.toArray();for(let p=0,m=d.length;p<m;p++){if(t=d[p],e="",t.generatedLine!==a)for(s=0;t.generatedLine!==a;)e+=";",a++;else if(p>0){if(!i.compareByGeneratedPositionsInflated(t,d[p-1]))continue;e+=","}e+=r.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(o=this._sources.indexOf(t.source),e+=r.encode(o-h),h=o,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-l),l=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-u),u=n)),f+=e}return f}_generateSourcesContent(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));const n=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)}toJSON(){const e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e}toString(){return JSON.stringify(this.toJSON())}}a.prototype._version=3,t.h=a},7085:(e,t,n)=>{n(4433).h,n(2728)},2728:(e,t)=>{t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};const n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){const t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function o(e){let t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}t.urlParse=i,t.urlGenerate=o;const s=function(e){const n=[];return function(e){for(let t=0;t<n.length;t++)if(n[t].input===e){const e=n[0];return n[0]=n[t],n[t]=e,n[0].result}const r=function(e){let n=e;const r=i(e);if(r){if(!r.path)return e;n=r.path}const s=t.isAbsolute(n),a=[];let l=0,c=0;for(;;){if(l=c,c=n.indexOf("/",l),-1===c){a.push(n.slice(l));break}for(a.push(n.slice(l,c));c<n.length&&"/"===n[c];)c++}let u=0;for(c=a.length-1;c>=0;c--){const e=a[c];"."===e?a.splice(c,1):".."===e?u++:u>0&&(""===e?(a.splice(c+1,u),u=0):(a.splice(c,2),u--))}return n=a.join("/"),""===n&&(n=s?"/":"."),r?(r.path=n,o(r)):n}(e);return n.unshift({input:e,result:r}),n.length>32&&n.pop(),r}}();function a(e,t){""===e&&(e="."),""===t&&(t=".");const n=i(t),a=i(e);if(a&&(e=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),o(n);if(n||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,o(a);const l="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,o(a)):l}t.normalize=s,t.join=a,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");let n=0;for(;0!==t.indexOf(e+"/");){const r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};const l=!("__proto__"in Object.create(null));function c(e){return e}function u(e){if(!e)return!1;const t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(let n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function h(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=l?c:function(e){return u(e)?"$"+e:e},t.fromSetString=l?c:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){let r=h(e.source,t.source);return 0!==r?r:(r=e.originalLine-t.originalLine,0!==r?r:(r=e.originalColumn-t.originalColumn,0!==r||n?r:(r=e.generatedColumn-t.generatedColumn,0!==r?r:(r=e.generatedLine-t.generatedLine,0!==r?r:h(e.name,t.name)))))},t.compareByGeneratedPositionsDeflated=function(e,t,n){let r=e.generatedLine-t.generatedLine;return 0!==r?r:(r=e.generatedColumn-t.generatedColumn,0!==r||n?r:(r=h(e.source,t.source),0!==r?r:(r=e.originalLine-t.originalLine,0!==r?r:(r=e.originalColumn-t.originalColumn,0!==r?r:h(e.name,t.name)))))},t.compareByGeneratedPositionsInflated=function(e,t){let n=e.generatedLine-t.generatedLine;return 0!==n?n:(n=e.generatedColumn-t.generatedColumn,0!==n?n:(n=h(e.source,t.source),0!==n?n:(n=e.originalLine-t.originalLine,0!==n?n:(n=e.originalColumn-t.originalColumn,0!==n?n:h(e.name,t.name)))))},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){const e=i(n);if(!e)throw new Error("sourceMapURL could not be parsed");if(e.path){const t=e.path.lastIndexOf("/");t>=0&&(e.path=e.path.substring(0,t+1))}t=a(o(e),t)}return s(t)}},1225:(e,t,n)=>{const r=n(8429);function i(){this.generatedLine=0,this.generatedColumn=0,this.lastGeneratedColumn=null,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}let o=null;e.exports=function(){if(o)return o;const e=[];return o=r().then((t=>WebAssembly.instantiate(t,{env:{mapping_callback(t,n,r,o,s,a,l,c,u,h){const f=new i;f.generatedLine=t+1,f.generatedColumn=n,r&&(f.lastGeneratedColumn=o-1),s&&(f.source=a,f.originalLine=l+1,f.originalColumn=c,u&&(f.name=h)),e[e.length-1](f)},start_all_generated_locations_for(){console.time("all_generated_locations_for")},end_all_generated_locations_for(){console.timeEnd("all_generated_locations_for")},start_compute_column_spans(){console.time("compute_column_spans")},end_compute_column_spans(){console.timeEnd("compute_column_spans")},start_generated_location_for(){console.time("generated_location_for")},end_generated_location_for(){console.timeEnd("generated_location_for")},start_original_location_for(){console.time("original_location_for")},end_original_location_for(){console.timeEnd("original_location_for")},start_parse_mappings(){console.time("parse_mappings")},end_parse_mappings(){console.timeEnd("parse_mappings")},start_sort_by_generated_location(){console.time("sort_by_generated_location")},end_sort_by_generated_location(){console.timeEnd("sort_by_generated_location")},start_sort_by_original_location(){console.time("sort_by_original_location")},end_sort_by_original_location(){console.timeEnd("sort_by_original_location")}}}))).then((t=>({exports:t.instance.exports,withMappingCallback:(t,n)=>{e.push(t);try{n()}finally{e.pop()}}}))).then(null,(e=>{throw o=null,e})),o}},9125:(e,t,n)=>{n(4433).h,t.SourceMapConsumer=n(6771).SourceMapConsumer,n(7085)},9829:function(e,t){var n,r,i;!function(o,s){"use strict";r=[],void 0===(i="function"==typeof(n=function(){function e(e){return e.charAt(0).toUpperCase()+e.substring(1)}function t(e){return function(){return this[e]}}var n=["isConstructor","isEval","isNative","isToplevel"],r=["columnNumber","lineNumber"],i=["fileName","functionName","source"],o=n.concat(r,i,["args"],["evalOrigin"]);function s(t){if(t)for(var n=0;n<o.length;n++)void 0!==t[o[n]]&&this["set"+e(o[n])](t[o[n]])}s.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof s)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new s(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",n=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+n+")":"[eval]:"+t+":"+n:r?r+" ("+e+":"+t+":"+n+")":e+":"+t+":"+n}},s.fromString=function(e){var t=e.indexOf("("),n=e.lastIndexOf(")"),r=e.substring(0,t),i=e.substring(t+1,n).split(","),o=e.substring(n+1);if(0===o.indexOf("@"))var a=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(o,""),l=a[1],c=a[2],u=a[3];return new s({functionName:r,args:i||void 0,fileName:l,lineNumber:c||void 0,columnNumber:u||void 0})};for(var a=0;a<n.length;a++)s.prototype["get"+e(n[a])]=t(n[a]),s.prototype["set"+e(n[a])]=function(e){return function(t){this[e]=Boolean(t)}}(n[a]);for(var l=0;l<r.length;l++)s.prototype["get"+e(r[l])]=t(r[l]),s.prototype["set"+e(r[l])]=function(e){return function(t){if(n=t,isNaN(parseFloat(n))||!isFinite(n))throw new TypeError(e+" must be a Number");var n;this[e]=Number(t)}}(r[l]);for(var c=0;c<i.length;c++)s.prototype["get"+e(i[c])]=t(i[c]),s.prototype["set"+e(i[c])]=function(e){return function(t){this[e]=String(t)}}(i[c]);return s})?n.apply(t,r):n)||(e.exports=i)}()},6373:(e,t,n)=>{"use strict";var r=n(9496),i=SyntaxError,o="object"==typeof StopIteration?StopIteration:null;e.exports=function(e){if(!o)throw new i("this environment lacks StopIteration");r.set(e,"[[Done]]",!1);var t={next:function(){var e=r.get(this,"[[Iterator]]"),t=r.get(e,"[[Done]]");try{return{done:t,value:t?void 0:e.next()}}catch(t){if(r.set(e,"[[Done]]",!0),t!==o)throw t;return{done:!0,value:void 0}}}};return r.set(t,"[[Iterator]]",e),t}},6597:(e,t,n)=>{"use strict";var r=n(3379),i=n.n(r),o=n(7795),s=n.n(o),a=n(569),l=n.n(a),c=n(3565),u=n.n(c),h=n(7446),f=n.n(h),d=n(4589),p=n.n(d),m=n(8687),g={};g.styleTagTransform=p(),g.setAttributes=u(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=f(),i()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals},3379: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 o={},s=[],a=0;a<e.length;a++){var l=e[a],c=r.base?l[0]+r.base:l[0],u=o[c]||0,h="".concat(c," ").concat(u);o[c]=u+1;var f=n(h),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)t[f].references++,t[f].updater(d);else{var p=i(d,r);r.byIndex=a,t.splice(a,0,{identifier:h,updater:p,references:1})}s.push(h)}return s}function i(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,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=n(o[s]);t[a].references--}for(var l=r(e,i),c=0;c<o.length;c++){var u=n(o[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=l}}},569: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)}},7446:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795: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 i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589: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))}}},4194:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(3832),i=n.n(r),o=n(7563),s=n(211),a=n(6686),l=n(2190);function c(e,t,n){switch(e.type){case o.K$:case o.h5:case o.Ab:return e.return=e.return||e.value;case o.Fr:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach((function(e){e.type===o.Ab&&(e.children=e.value)}))}var r=(0,s.q)(Array.prototype.concat(e.children),c);return(0,a.to)(r)?e.return=e.value+"{"+r+"}":""}function u(e,t,n,r){if(e.type===o.lK||e.type===o.QY||e.type===o.Fr&&(!e.parent||e.parent.type===o.iD||e.parent.type===o.Fr)){var s=i().transform(c(e));e.children=s?(0,l.MY)(s)[0].children:[],e.return=""}}Object.defineProperty(u,"name",{value:"stylisRTLPlugin"});const h=u},9225:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o});var r=n(7294),i=n(9250);const o=({children:e})=>{var t;const{navigator:n}=(0,r.useContext)(i.Us),o=(0,i.s0)(),s=null==(t=(0,r.useContext)(i.w3))?void 0:t.router,a=(0,i.TH)();return e({replace(e){o(e.search||"?",{replace:!0,state:e.state})},push(e){o(e.search||"?",{replace:!1,state:e.state})},get location(){var e,t,r;return null!=(r=null!=(t=null==(e=null==s?void 0:s.state)?void 0:e.location)?t:null==n?void 0:n.location)?r:a}})}},4420:(e,t,n)=>{"use strict";function r(e,t,n=!0){return{...e,default:t,decode:(...r)=>{const i=e.decode(...r);return void 0===i||n&&null===i?t:i}}}function i(e,t){if(null==e)return e;if(0===e.length&&(!t||t&&""!==e))return null;const n=e instanceof Array?e[0]:e;return null==n||t||""!==n?n:null}function o(e){return null==e?e:String(e)}function s(e){const t=i(e,!0);return null==t?t:String(t)}n.d(t,{JsonParam:()=>u,NumberParam:()=>c,QueryParamProvider:()=>A,StringParam:()=>a,createEnumParam:()=>l,useQueryParams:()=>P,withDefault:()=>r});const a={encode:o,decode:s},l=e=>({encode:o,decode:t=>function(e,t){const n=s(e);return null==n||t.includes(n)?n:void 0}(t,e)}),c={encode:function(e){return null==e?e:String(e)},decode:function(e){const t=i(e);return null==t?t:""===t?null:+t}},u={encode:function(e){return null==e?e:JSON.stringify(e)},decode:function(e){const t=i(e);if(null==t)return t;let n=null;try{n=JSON.parse(t)}catch(e){}return n}};'{}[],":'.split("").map((e=>[e,encodeURIComponent(e)]));var h=n(7294);const f=new class{constructor(){this.paramsMap=new Map,this.registeredParams=new Map}set(e,t,n,r){this.paramsMap.set(e,{stringified:t,decoded:n,decode:r})}has(e,t,n){if(!this.paramsMap.has(e))return!1;const r=this.paramsMap.get(e);return!!r&&r.stringified===t&&(null==n||r.decode===n)}get(e){var t;if(this.paramsMap.has(e))return null==(t=this.paramsMap.get(e))?void 0:t.decoded}registerParams(e){for(const t of e){const e=this.registeredParams.get(t)||0;this.registeredParams.set(t,e+1)}}unregisterParams(e){for(const t of e){const e=(this.registeredParams.get(t)||0)-1;e<=0?(this.registeredParams.delete(t),this.paramsMap.has(t)&&this.paramsMap.delete(t)):this.registeredParams.set(t,e)}}clear(){this.paramsMap.clear(),this.registeredParams.clear()}};function d(e,t,n,r){var i;if(!n||!t.length)return e;let o={...e},s=!1;for(const e of t)Object.prototype.hasOwnProperty.call(o,e)||(o[e]=null!=(i=n[e])?i:r,s=!0);return s?o:e}const p=Object.prototype.hasOwnProperty;function m(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function g(e,t,n){var r,i;if(m(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(let s=0;s<o.length;s++){const a=null!=(i=null==(r=null==n?void 0:n[o[s]])?void 0:r.equals)?i:m;if(!p.call(t,o[s])||!a(e[o[s]],t[o[s]]))return!1}return!0}function y(e,t,n){const r={},i=Object.keys(t);for(const o of i){const i=t[o],s=e[o];let a;if(n.has(o,s,i.decode))a=n.get(o);else{if(a=i.decode(s),i.equals&&n.has(o,s)){const e=n.get(o);i.equals(a,e)&&(a=e)}void 0!==a&&n.set(o,s,a,i.decode)}void 0===a&&void 0!==i.default&&(a=i.default),r[o]=a}return r}function v(){let e;return function(t,n,r){const i=y(t,n,r);return null!=e&&g(e,i)?e:(e=i,i)}}let b,w,x,S={};const k=(e,t,n)=>{if(b===t&&x===e&&w===n)return S;b=t,x=e;const r=e(null!=t?t:"");w=n;const i=function(e){if(e)return Object.fromEntries(e.split("\n").map((e=>e.split("\0"))))}(n);for(let[e,t]of Object.entries(r)){(null==i?void 0:i[e])&&(delete r[e],e=i[e],r[e]=t);const n=S[e];g(t,n)&&(r[e]=n)}return S=r,r};function C(e,t){null==t&&(t={});const n={...e,...t};return t.params&&e.params&&(n.params={...e.params,...t.params}),n}const O={adapter:{},options:{searchStringToObject:function(e){const t=new URLSearchParams(e),n={};for(let[e,r]of t)Object.prototype.hasOwnProperty.call(n,e)?Array.isArray(n[e])?n[e].push(r):n[e]=[n[e],r]:n[e]=r;return n},objectToSearchString:function(e){const t=new URLSearchParams,n=Object.entries(e);for(const[e,r]of n)if(null!=r)if(Array.isArray(r))for(const n of r)t.append(e,null!=n?n:"");else t.append(e,r);return t.toString()},updateType:"pushIn",includeKnownParams:void 0,includeAllParams:!1,removeDefaultsFromUrl:!1,enableBatching:!1,skipUpdateWhenNoChange:!0}},M=h.createContext(O);function E({children:e,adapter:t,options:n}){const{adapter:r,options:i}=h.useContext(M),o=h.useMemo((()=>({adapter:null!=t?t:r,options:C(i,n)})),[t,n,r,i]);return h.createElement(M.Provider,{value:o},e)}function A({children:e,adapter:t,options:n}){const r=t;return r?h.createElement(r,null,(t=>h.createElement(E,{adapter:t,options:n},e))):h.createElement(E,{options:n},e)}function T({changes:e,updateType:t,currentSearchString:n,paramConfigMap:r,options:i}){const{searchStringToObject:o,objectToSearchString:s}=i;let a;null==t&&(t=i.updateType);const l=k(o,n),c=d(r,Object.keys(e),i.params);let u,h;return u="function"==typeof e?e(y(l,c,f)):e,a=function(e,t){const n={},r=Object.keys(t);for(const i of r){const r=t[i];e[i]?n[i]=e[i].encode(t[i]):n[i]=null==r?r:String(r)}return n}(c,u),i.removeDefaultsFromUrl&&function(e,t){var n;for(const r in e)void 0!==(null==(n=t[r])?void 0:n.default)&&void 0!==e[r]&&t[r].encode(t[r].default)===e[r]&&(e[r]=void 0)}(a,c),a=function(e,t){var n;let r={};for(const i in e)null!=(null==(n=t[i])?void 0:n.urlName)?r[t[i].urlName]=e[i]:r[i]=e[i];return r}(a,c),h=s("push"===t||"replace"===t?a:{...l,...a}),(null==h?void 0:h.length)&&"?"!==h[0]&&(h=`?${h}`),null!=h?h:""}const _=e=>e(),R=e=>setTimeout((()=>e()),0),D=[];function P(e,t){const{adapter:n,options:r}=function(){const e=h.useContext(M);if(void 0===e||e===O)throw new Error("useQueryParams must be used within a QueryParamProvider");return e}(),[i]=(0,h.useState)(v),{paramConfigMap:o,options:s}=function(e,t){let n,r;return void 0===e?(n={},r=t):Array.isArray(e)?(n=Object.fromEntries(e.map((e=>[e,"inherit"]))),r=t):(n=e,r=t),{paramConfigMap:n,options:r}}(e,t),l=(0,h.useMemo)((()=>C(r,s)),[r,s]);let c=function(e,t){var n,r,i;const o={};let s=!1;const l=Object.keys(e);let c=l;if(t.includeKnownParams||!1!==t.includeKnownParams&&0===l.length){const e=Object.keys(null!=(n=t.params)?n:{});c.push(...e)}for(const n of c){const l=e[n];null==l||"object"!=typeof l?(s=!0,o[n]=null!=(i=null==(r=t.params)?void 0:r[n])?i:a):o[n]=l}return s?o:e}(o,l);const u=k(l.searchStringToObject,n.location.search,function(e){let t;for(const n in e)if(e[n].urlName){const r=`${e[n].urlName}\0${n}`;t?t.push(r):t=[r]}return t?t.join("\n"):void 0}(c));l.includeAllParams&&(c=d(c,Object.keys(u),l.params,a));const p=i(u,c,f),m=Object.keys(c).join("\0");(0,h.useEffect)((()=>{const e=m.split("\0");return f.registerParams(e),()=>{f.unregisterParams(e)}}),[m]);const g={adapter:n,paramConfigMap:c,options:l},y=(0,h.useRef)(g);null==y.current&&(y.current=g),(0,h.useEffect)((()=>{y.current.adapter=n,y.current.paramConfigMap=c,y.current.options=l}),[n,c,l]);const[b]=(0,h.useState)((()=>(e,t)=>{const{adapter:n,paramConfigMap:r,options:i}=y.current;null==t&&(t=i.updateType),function(e,{immediate:t}={}){D.push(e);let n=t?_:R;1===D.length&&n((()=>{const t=D.slice();D.length=0;const n=t[0].currentSearchString;let r;for(let e=0;e<t.length;++e)r=T(0===e?t[e]:{...t[e],currentSearchString:r});e.options.skipUpdateWhenNoChange&&r===n||function({searchString:e,adapter:t,navigate:n,updateType:r}){const i={...t.location,search:e};n&&("string"==typeof r&&r.startsWith("replace")?t.replace(i):t.push(i))}({searchString:null!=r?r:"",adapter:t[t.length-1].adapter,navigate:!0,updateType:t[t.length-1].updateType})}))}({changes:e,updateType:t,currentSearchString:n.location.search,paramConfigMap:r,options:i,adapter:n},{immediate:!i.enableBatching})}));return[p,b]}},3250:(e,t,n)=>{"use strict";var r=n(7294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return a((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),s((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},139:(e,t,n)=>{"use strict";var r=n(7294),i=n(1688),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var h=a(null);if(null===h.current){var f={hasValue:!1,value:null};h.current=f}else f=h.current;h=c((function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&f.hasValue){var t=f.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(s=e,a=n)}var s,a,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,i]);var d=s(e,h[0],h[1]);return l((function(){f.hasValue=!0,f.value=d}),[d]),u(d),d}},1688:(e,t,n)=>{"use strict";e.exports=n(3250)},2798:(e,t,n)=>{"use strict";e.exports=n(139)},8721:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const o=new Uint8Array(16);function s(){if(!i&&(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));const l=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const i=(e=e||{}).random||(e.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(i)}},3679:(e,t,n)=>{"use strict";var r=n(9981),i=n(4578),o=n(6814),s=n(2636),a=n(3376);e.exports=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e?null:r(e)?"String":i(e)?"Number":o(e)?"Boolean":s(e)?"Symbol":a(e)?"BigInt":void 0}},6430:(e,t,n)=>{"use strict";var r=n(4029),i=n(3083),o=n(1924),s=n(7296),a=o("Object.prototype.toString"),l=n(6410)(),c="undefined"==typeof globalThis?n.g:globalThis,u=i(),h=o("String.prototype.slice"),f={},d=Object.getPrototypeOf;l&&s&&d&&r(u,(function(e){if("function"==typeof c[e]){var t=new c[e];if(Symbol.toStringTag in t){var n=d(t),r=s(n,Symbol.toStringTag);if(!r){var i=d(n);r=s(i,Symbol.toStringTag)}f[e]=r.get}}}));var p=n(5692);e.exports=function(e){return!!p(e)&&(l&&Symbol.toStringTag in e?function(e){var t=!1;return r(f,(function(n,r){if(!t)try{var i=n.call(e);i===r&&(t=i)}catch(e){}})),t}(e):h(a(e),8,-1))}},3083:(e,t,n)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof i[r[t]]&&(e[e.length]=r[t]);return e}},3216:(e,t,n)=>{"use strict";var r=n(2584),i=n(6373);if(n(1405)()||n(5419)()){var o=Symbol.iterator;e.exports=function(e){return null!=e&&void 0!==e[o]?e[o]():r(e)?Array.prototype[o].call(e):void 0}}else{var s=n(5826),a=n(9981),l=n(210),c=l("%Map%",!0),u=l("%Set%",!0),h=n(1924),f=h("Array.prototype.push"),d=h("String.prototype.charCodeAt"),p=h("String.prototype.slice"),m=function(e){var t=0;return{next:function(){var n,r=t>=e.length;return r||(n=e[t],t+=1),{done:r,value:n}}}},g=function(e,t){if(s(e)||r(e))return m(e);if(a(e)){var n=0;return{next:function(){var t=function(e,t){if(t+1>=e.length)return t+1;var n=d(e,t);if(n<55296||n>56319)return t+1;var r=d(e,t+1);return r<56320||r>57343?t+1:t+2}(e,n),r=p(e,n,t);return n=t,{done:t>e.length,value:r}}}}return t&&void 0!==e["_es6-shim iterator_"]?e["_es6-shim iterator_"]():void 0};if(c||u){var y=n(8379),v=n(9572),b=h("Map.prototype.forEach",!0),w=h("Set.prototype.forEach",!0);if("undefined"==typeof process||!process.versions||!process.versions.node)var x=h("Map.prototype.iterator",!0),S=h("Set.prototype.iterator",!0);var k=h("Map.prototype.@@iterator",!0)||h("Map.prototype._es6-shim iterator_",!0),C=h("Set.prototype.@@iterator",!0)||h("Set.prototype._es6-shim iterator_",!0);e.exports=function(e){return function(e){if(y(e)){if(x)return i(x(e));if(k)return k(e);if(b){var t=[];return b(e,(function(e,n){f(t,[n,e])})),m(t)}}if(v(e)){if(S)return i(S(e));if(C)return C(e);if(w){var n=[];return w(e,(function(e){f(n,e)})),m(n)}}}(e)||g(e)}}else e.exports=function(e){if(null!=e)return g(e,!0)}}},3483:(e,t,n)=>{"use strict";var r=n(8379),i=n(9572),o=n(1718),s=n(5899);e.exports=function(e){if(e&&"object"==typeof e){if(r(e))return"Map";if(i(e))return"Set";if(o(e))return"WeakMap";if(s(e))return"WeakSet"}return!1}},7462:(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,{Z:()=>r})},3366:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{Z:()=>r})},8120:(e,t,n)=>{"use strict";n.d(t,{BO:()=>Se,D0:()=>ve,Gz:()=>ze,IS:()=>Be,Py:()=>ue,QQ:()=>W,Wl:()=>K,Xs:()=>Ee,YW:()=>he,as:()=>E,bg:()=>S,cp:()=>g,f_:()=>Ae,gc:()=>O,gm:()=>x,jT:()=>I,n0:()=>M,nZ:()=>k,q6:()=>ae,r$:()=>F,uU:()=>ke,xv:()=>r,yy:()=>xe});class r{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),o.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let n=[];return this.decompose(e,t,n,0),o.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new l(this),i=new l(e);for(let e=t,o=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(o+=r.value.length,r.done||o>=n)return!0}}iter(e=1){return new l(this,e)}iterRange(e,t=this.length){return new c(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new u(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new i(e):o.from(i.split(e,[])):r.empty}}class i extends r{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.text[i],s=r+o.length;if((t?n:s)>=e)return new h(r,s,n,o);r=s+1,n++}}decompose(e,t,n,r){let o=e<=0&&t>=this.length?this:new i(a(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=s(o.text,e.text.slice(),0,o.length);if(t.length<=32)n.push(new i(t,e.length+o.length));else{let e=t.length>>1;n.push(new i(t.slice(0,e)),new i(t.slice(e)))}}else n.push(o)}replace(e,t,n){if(!(n instanceof i))return super.replace(e,t,n);let r=s(this.text,s(n.text,a(this.text,0,e)),t),l=this.length+n.length-(t-e);return r.length<=32?new i(r,l):o.from(i.split(r,[]),l)}sliceString(e,t=this.length,n="\n"){let r="";for(let i=0,o=0;i<=t&&o<this.text.length;o++){let s=this.text[o],a=i+s.length;i>e&&o&&(r+=n),e<a&&t>i&&(r+=s.slice(Math.max(0,e-i),t-i)),i=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let o of e)n.push(o),r+=o.length+1,32==n.length&&(t.push(new i(n,r)),n=[],r=-1);return r>-1&&t.push(new i(n,r)),t}}class o extends r{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.children[i],s=r+o.length,a=n+o.lines-1;if((t?a:s)>=e)return o.lineInner(e,t,n,r);r=s+1,n=a+1}}decompose(e,t,n,r){for(let i=0,o=0;o<=t&&i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e<=a&&t>=o){let i=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!i?n.push(s):s.decompose(e-o,t-o,n,i)}o=a+1}}replace(e,t,n){if(n.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let s=this.children[r],a=i+s.length;if(e>=i&&t<=a){let l=s.replace(e-i,t-i,n),c=this.lines-s.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let i=this.children.slice();return i[r]=l,new o(i,this.length-(t-e)+n.length)}return super.replace(i,a,l)}i=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){let r="";for(let i=0,o=0;i<this.children.length&&o<=t;i++){let s=this.children[i],a=o+s.length;o>e&&i&&(r+=n),e<a&&t>o&&(r+=s.sliceString(e-o,t-o,n)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof o))return 0;let n=0,[r,i,s,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==s||i==a)return n;let o=this.children[r],l=e.children[i];if(o!=l)return n+o.scanIdentical(l,t);n+=o.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new i(n,t)}let r=Math.max(32,n>>5),s=r<<1,a=r>>1,l=[],c=0,u=-1,h=[];function f(e){let t;if(e.lines>s&&e instanceof o)for(let t of e.children)f(t);else e.lines>a&&(c>a||!c)?(d(),l.push(e)):e instanceof i&&c&&(t=h[h.length-1])instanceof i&&e.lines+t.lines<=32?(c+=e.lines,u+=e.length+1,h[h.length-1]=new i(t.text.concat(e.text),t.length+1+e.length)):(c+e.lines>r&&d(),c+=e.lines,u+=e.length+1,h.push(e))}function d(){0!=c&&(l.push(1==h.length?h[0]:o.from(h,u)),u=-1,c=h.length=0)}for(let t of e)f(t);return d(),1==l.length?l[0]:new o(l,t)}}function s(e,t,n=0,r=1e9){for(let i=0,o=0,s=!0;o<e.length&&i<=r;o++){let a=e[o],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(t[t.length-1]+=a,s=!1):t.push(a)),i=l+1}return t}function a(e,t,n){return s(e,[""],t,n)}r.empty=new i([""],0);class l{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof i?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],o=this.offsets[n],s=o>>1,a=r instanceof i?r.text.length:r.children.length;if(s==(t>0?a:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof i){let i=r.text[s+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let o=r.children[s+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof i?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class c{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new l(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class u{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(r.prototype[Symbol.iterator]=function(){return this.iter()},l.prototype[Symbol.iterator]=c.prototype[Symbol.iterator]=u.prototype[Symbol.iterator]=function(){return this});class h{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}let f="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let e=1;e<f.length;e++)f[e]+=f[e-1];function d(e){for(let t=1;t<f.length;t+=2)if(f[t]>e)return f[t-1]<=e;return!1}function p(e){return e>=127462&&e<=127487}const m=8205;function g(e,t,n=!0,r=!0){return(n?y:v)(e,t,r)}function y(e,t,n){if(t==e.length)return t;t&&b(e.charCodeAt(t))&&w(e.charCodeAt(t-1))&&t--;let r=x(e,t);for(t+=k(r);t<e.length;){let i=x(e,t);if(r==m||i==m||n&&d(i))t+=k(i),r=i;else{if(!p(i))break;{let n=0,r=t-2;for(;r>=0&&p(x(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function v(e,t,n){for(;t>0;){let r=y(e,t-2,n);if(r<t)return r;t--}return 0}function b(e){return e>=56320&&e<57344}function w(e){return e>=55296&&e<56320}function x(e,t){let n=e.charCodeAt(t);if(!w(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return b(r)?r-56320+(n-55296<<10)+65536:n}function S(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function k(e){return e<65536?1:2}const C=/\r\n?|\n/;var O=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(O||(O={}));class M{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],o=this.sections[t++];o<0?(e(n,r,i),r+=i):r+=o,n+=i}}iterChangedRanges(e,t=!1){_(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];r<0?e.push(n,r):e.push(r,n)}return new M(e)}composeDesc(e){return this.empty?e:e.empty?this:D(this,e)}mapDesc(e,t=!1){return e.empty?this:R(this,e,t)}mapPos(e,t=-1,n=O.Simple){let r=0,i=0;for(let o=0;o<this.sections.length;){let s=this.sections[o++],a=this.sections[o++],l=r+s;if(a<0){if(l>e)return i+(e-r);i+=s}else{if(n!=O.Simple&&l>=e&&(n==O.TrackDel&&r<e&&l>e||n==O.TrackBefore&&r<e||n==O.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!s)return e==r||t<0?i:i+a;i+=a}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=r+this.sections[n++];if(this.sections[n++]>=0&&r<=t&&i>=e)return!(r<e&&i>t)||"cover";r=i}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new M(e)}static create(e){return new M(e)}}class E extends M{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return _(this,((t,n,r,i,o)=>e=e.replace(r,r+(n-t),o)),!1),e}mapDesc(e,t=!1){return R(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,o=0;i<t.length;i+=2){let s=t[i],a=t[i+1];if(a>=0){t[i]=a,t[i+1]=s;let l=i>>1;for(;n.length<l;)n.push(r.empty);n.push(s?e.slice(o,o+s):r.empty)}o+=s}return new E(t,n)}compose(e){return this.empty?e:e.empty?this:D(this,e,!0)}map(e,t=!1){return e.empty?this:R(this,e,t,!0)}iterChanges(e,t=!1){_(this,e,t)}get desc(){return M.create(this.sections)}filter(e){let t=[],n=[],r=[],i=new P(this);e:for(let o=0,s=0;;){let a=o==e.length?1e9:e[o++];for(;s<a||s==a&&0==i.len;){if(i.done)break e;let e=Math.min(i.len,a-s);A(r,e,-1);let o=-1==i.ins?-1:0==i.off?i.ins:0;A(t,e,o),o>0&&T(n,t,i.text),i.forward(e),s+=e}let l=e[o++];for(;s<l;){if(i.done)break e;let e=Math.min(i.len,l-s);A(t,e,-1),A(r,e,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(e),s+=e}}return{changes:new E(t,n),filtered:M.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let i=[],o=[],s=0,a=null;function l(e=!1){if(!e&&!i.length)return;s<t&&A(i,t-s,-1);let n=new E(i,o);a=a?a.compose(n.map(a)):n,i=[],o=[],s=0}return function e(c){if(Array.isArray(c))for(let t of c)e(t);else if(c instanceof E){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);l(),a=a?a.compose(c.map(a)):c}else{let{from:e,to:a=e,insert:u}=c;if(e>a||e<0||a>t)throw new RangeError(`Invalid change range ${e} to ${a} (in doc of length ${t})`);let h=u?"string"==typeof u?r.of(u.split(n||C)):u:r.empty,f=h.length;if(e==a&&0==f)return;e<s&&l(),e>s&&A(i,e-s,-1),A(i,a-e,f),T(o,i,h),s=a}}(e),l(!a),a}static empty(e){return new E(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;i<e.length;i++){let o=e[i];if("number"==typeof o)t.push(o,-1);else{if(!Array.isArray(o)||"number"!=typeof o[0]||o.some(((e,t)=>t&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)t.push(o[0],0);else{for(;n.length<i;)n.push(r.empty);n[i]=r.of(o.slice(1)),t.push(o[0],n[i].length)}}}return new E(t,n)}static createSet(e,t){return new E(e,t)}}function A(e,t,n,r=!1){if(0==t&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function T(e,t,n){if(0==n.length)return;let i=t.length-2>>1;if(i<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<i;)e.push(r.empty);e.push(n)}}function _(e,t,n){let i=e.inserted;for(let o=0,s=0,a=0;a<e.sections.length;){let l=e.sections[a++],c=e.sections[a++];if(c<0)o+=l,s+=l;else{let u=o,h=s,f=r.empty;for(;u+=l,h+=c,c&&i&&(f=f.append(i[a-2>>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)l=e.sections[a++],c=e.sections[a++];t(o,u,s,h,f),o=u,s=h}}}function R(e,t,n,r=!1){let i=[],o=r?[]:null,s=new P(e),a=new P(t);for(let e=-1;;)if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);A(i,e,-1),s.forward(e),a.forward(e)}else if(a.ins>=0&&(s.ins<0||e==s.i||0==s.off&&(a.len<s.len||a.len==s.len&&!n))){let t=a.len;for(A(i,a.ins,-1);t;){let n=Math.min(s.len,t);s.ins>=0&&e<s.i&&s.len<=n&&(A(i,0,s.ins),o&&T(o,i,s.text),e=s.i),s.forward(n),t-=n}a.next()}else{if(!(s.ins>=0)){if(s.done&&a.done)return o?E.createSet(i,o):M.create(i);throw new Error("Mismatched change set lengths")}{let t=0,n=s.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else{if(!(0==a.ins&&a.len<n))break;n-=a.len,a.next()}A(i,t,e<s.i?s.ins:0),o&&e<s.i&&T(o,i,s.text),e=s.i,s.forward(s.len-n)}}}function D(e,t,n=!1){let r=[],i=n?[]:null,o=new P(e),s=new P(t);for(let e=!1;;){if(o.done&&s.done)return i?E.createSet(r,i):M.create(r);if(0==o.ins)A(r,o.len,0,e),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");{let t=Math.min(o.len2,s.len),n=r.length;if(-1==o.ins){let n=-1==s.ins?-1:s.off?0:s.ins;A(r,t,n,e),i&&n&&T(i,r,s.text)}else-1==s.ins?(A(r,o.off?0:o.len,t,e),i&&T(i,r,o.textBit(t))):(A(r,o.off?0:o.len,s.off?0:s.ins,e),i&&!s.off&&T(i,r,s.text));e=(o.ins>t||s.ins>=0&&s.len>t)&&(e||r.length>n),o.forward2(t),s.forward(t)}}else A(r,0,s.ins,e),i&&T(i,r,s.text),s.next()}}class P{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?r.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?r.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class N{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let e=3&this.flags;return 3==e?null:e}get goalColumn(){let e=this.flags>>5;return 33554431==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new N(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return I.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return I.range(this.anchor,n)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return I.range(e.anchor,e.head)}static create(e,t,n){return new N(e,t,n)}}class I{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:I.create(this.ranges.map((n=>n.map(e,t))),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new I([this.main],0)}addRange(e,t=!0){return I.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,I.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((e=>e.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new I(e.ranges.map((e=>N.fromJSON(e))),e.main)}static single(e,t=e){return new I([I.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;r<e.length;r++){let i=e[r];if(i.empty?i.from<=n:i.from<n)return I.normalized(e.slice(),t);n=i.to}return new I(e,t)}static cursor(e,t=0,n,r){return N.create(e,e,(0==t?0:t<0?4:8)|(null==n?3:Math.min(2,n))|(null!=r?r:33554431)<<5)}static range(e,t,n,r){let i=(null!=n?n:33554431)<<5|(null==r?3:Math.min(2,r));return t<e?N.create(t,e,24|i):N.create(e,t,(t>e?4:0)|i)}static normalized(e,t=0){let n=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(n);for(let n=1;n<e.length;n++){let r=e[n],i=e[n-1];if(r.empty?r.from<=i.to:r.from<i.to){let o=i.from,s=Math.max(r.to,i.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?I.range(s,o):I.range(o,s))}}return new I(e,t)}}function L(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let j=0;class F{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=j++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}static define(e={}){return new F(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:B),!!e.static,e.enables)}of(e){return new z([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new z(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new z(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(n=>t(n.field(e))))}}function B(e,t){return e==t||e.length==t.length&&e.every(((e,n)=>e===t[n]))}class z{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=j++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,o=e[i]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:0==(1&(null!==(t=e[n.id])&&void 0!==t?t:1))&&c.push(e[n.id]);return{create:e=>(e.values[o]=n(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||H(e,c)){let t=n(e);if(s?!$(t,e.values[o],r):!r(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[i];if(null!=l){let i=Z(t,l);if(this.dependencies.every((n=>n instanceof F?t.facet(n)===e.facet(n):!(n instanceof W)||t.field(n,!1)==e.field(n,!1)))||(s?$(a=n(e),i,r):r(a=n(e),i)))return e.values[o]=i,0}else a=n(e);return e.values[o]=a,1}}}}function $(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function H(e,t){let n=!1;for(let r of t)1&X(e,r)&&(n=!0);return n}function V(e,t,n){let r=n.map((t=>e[t.id])),i=n.map((e=>e.type)),o=r.filter((e=>!(1&e))),s=e[t.id]>>1;function a(e){let n=[];for(let t=0;t<r.length;t++){let o=Z(e,r[t]);if(2==i[t])for(let e of o)n.push(e);else n.push(o)}return t.combine(n)}return{create(e){for(let t of r)X(e,t);return e.values[s]=a(e),1},update(e,n){if(!H(e,o))return 0;let r=a(e);return t.compare(r,e.values[s])?0:(e.values[s]=r,1)},reconfigure(e,i){let o=H(e,r),l=i.config.facets[t.id],c=i.facet(t);if(l&&!o&&B(n,l))return e.values[s]=c,0;let u=a(e);return t.compare(u,c)?(e.values[s]=c,0):(e.values[s]=u,1)}}}const U=F.define({static:!0});class W{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(e){let t=new W(j++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(U).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,U.of({field:this,create:e})]}get extension(){return this}}function q(e){return t=>new G(t,e)}const K={highest:q(0),high:q(1),default:q(2),low:q(3),lowest:q(4)};class G{constructor(e,t){this.inner=e,this.prec=t}}class J{of(e){return new Q(this,e)}reconfigure(e){return J.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Q{constructor(e,t){this.compartment=e,this.inner=t}}class Y{constructor(e,t,n,r,i,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let r=[],i=Object.create(null),o=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],i=new Map;return function e(o,s){let a=i.get(o);if(null!=a){if(a<=s)return;let e=r[a].indexOf(o);e>-1&&r[a].splice(e,1),o instanceof Q&&n.delete(o.compartment)}if(i.set(o,s),Array.isArray(o))for(let t of o)e(t,s);else if(o instanceof Q){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(o.compartment)||o.inner;n.set(o.compartment,r),e(r,s)}else if(o instanceof G)e(o.inner,o.prec);else if(o instanceof W)r[s].push(o),o.provides&&e(o.provides,s);else if(o instanceof z)r[s].push(o),o.facet.extensions&&e(o.facet.extensions,2);else{let t=o.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(t,s)}}(e,2),r.reduce(((e,t)=>e.concat(t)))}(e,t,o))n instanceof W?r.push(n):(i[n.facet.id]||(i[n.facet.id]=[])).push(n);let s=Object.create(null),a=[],l=[];for(let e of r)s[e.id]=l.length<<1,l.push((t=>e.slot(t)));let c=null==n?void 0:n.config.facets;for(let e in i){let t=i[e],r=t[0].facet,o=c&&c[e]||[];if(t.every((e=>0==e.type)))if(s[r.id]=a.length<<1|1,B(o,t))a.push(n.facet(r));else{let e=r.combine(t.map((e=>e.value)));a.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(s[e.id]=a.length<<1|1,a.push(e.value)):(s[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));s[r.id]=l.length<<1,l.push((e=>V(e,r,t)))}}let u=l.map((e=>e(s)));return new Y(e,o,u,s,a,i)}}function X(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Z(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const ee=F.define(),te=F.define({combine:e=>e.some((e=>e)),static:!0}),ne=F.define({combine:e=>e.length?e[0]:void 0,static:!0}),re=F.define(),ie=F.define(),oe=F.define(),se=F.define({combine:e=>!!e.length&&e[0]});class ae{constructor(e,t){this.type=e,this.value=t}static define(){return new le}}class le{of(e){return new ae(this,e)}}class ce{constructor(e){this.map=e}of(e){return new ue(this,e)}}class ue{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new ue(this.type,t)}is(e){return this.type==e}static define(e={}){return new ce(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}ue.reconfigure=ue.define(),ue.appendConfig=ue.define();class he{constructor(e,t,n,r,i,o){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,n&&L(n,t.newLength),i.some((e=>e.type==he.time))||(this.annotations=i.concat(he.time.of(Date.now())))}static create(e,t,n,r,i,o){return new he(e,t,n,r,i,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(he.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function fe(e,t){let n=[];for(let r=0,i=0;;){let o,s;if(r<e.length&&(i==t.length||t[i]>=e[r]))o=e[r++],s=e[r++];else{if(!(i<t.length))return n;o=t[i++],s=t[i++]}!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function de(e,t,n){var r;let i,o,s;return n?(i=t.changes,o=E.empty(t.changes.length),s=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(i)),{changes:s,selection:t.selection?t.selection.map(o):null===(r=e.selection)||void 0===r?void 0:r.map(i),effects:ue.mapEffects(e.effects,i).concat(ue.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function pe(e,t,n){let r=t.selection,i=ye(t.annotations);return t.userEvent&&(i=i.concat(he.userEvent.of(t.userEvent))),{changes:t.changes instanceof E?t.changes:E.of(t.changes||[],n,e.facet(ne)),selection:r&&(r instanceof I?r:I.single(r.anchor,r.head)),effects:ye(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function me(e,t,n){let r=pe(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(n=!1);for(let i=1;i<t.length;i++){!1===t[i].filter&&(n=!1);let o=!!t[i].sequential;r=de(r,pe(e,t[i],o?r.changes.newLength:e.doc.length),o)}let i=he.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){let t=e.startState,n=t.facet(oe),r=e;for(let i=n.length-1;i>=0;i--){let o=n[i](e);o&&Object.keys(o).length&&(r=de(r,pe(t,o,e.changes.newLength),!0))}return r==e?e:he.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(re)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:fe(n,t))}if(!0!==n){let r,i;if(!1===n)i=e.changes.invertedDesc,r=E.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=he.create(t,r,e.selection&&e.selection.map(i),ue.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(ie);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof he?i:Array.isArray(i)&&1==i.length&&i[0]instanceof he?i[0]:me(t,ye(i),!1)}return e}(i):i)}he.time=ae.define(),he.userEvent=ae.define(),he.addToHistory=ae.define(),he.remote=ae.define();const ge=[];function ye(e){return null==e?ge:Array.isArray(e)?e:[e]}var ve=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(ve||(ve={}));const be=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let we;try{we=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class xe{constructor(e,t,n,r,i,o){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)X(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null!=n)return X(this,n),Z(this,n);if(t)throw new RangeError("Field is not present in this state")}update(...e){return me(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:r,compartments:i}=n;for(let t of e.effects)t.is(J.reconfigure)?(n&&(i=new Map,n.compartments.forEach(((e,t)=>i.set(t,e))),n=null),i.set(t.value.compartment,t.value.extension)):t.is(ue.reconfigure)?(n=null,r=t.value):t.is(ue.appendConfig)&&(n=null,r=ye(r).concat(t.value));n?t=e.startState.values.slice():(n=Y.resolve(r,i,this),t=new xe(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values),new xe(n,e.newDoc,e.newSelection,t,((t,n)=>n.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:I.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],o=ye(n.effects);for(let n=1;n<t.ranges.length;n++){let s=e(t.ranges[n]),a=this.changes(s.changes),l=a.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(l);let c=r.mapDesc(a,!0);i.push(s.range.map(c)),r=r.compose(l),o=ue.mapEffects(o,l).concat(ue.mapEffects(ye(s.effects),c))}return{changes:r,selection:I.create(i,t.mainIndex),effects:o}}changes(e=[]){return e instanceof E?e:E.of(e,this.doc.length,this.facet(xe.lineSeparator))}toText(e){return r.of(e.split(this.facet(xe.lineSeparator)||C))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(X(this,t),Z(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof W&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(n)for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let i=n[t],o=e[t];r.push(i.init((e=>i.spec.fromJSON(o,e))))}return xe.create({doc:e.doc,selection:I.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Y.resolve(e.extensions||[],new Map),n=e.doc instanceof r?e.doc:r.of((e.doc||"").split(t.staticFacet(xe.lineSeparator)||C)),i=e.selection?e.selection instanceof I?e.selection:I.single(e.selection.anchor,e.selection.head):I.single(0);return L(i,n.length),t.staticFacet(te)||(i=i.asSingle()),new xe(t,n,i,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(xe.tabSize)}get lineBreak(){return this.facet(xe.lineSeparator)||"\n"}get readOnly(){return this.facet(se)}phrase(e,...t){for(let t of this.facet(xe.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]}))),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(ee))for(let o of i(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return t=this.languageDataAt("wordChars",e).join(""),e=>{if(!/\S/.test(e))return ve.Space;if(function(e){if(we)return we.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||be.test(n)))return!0}return!1}(e))return ve.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return ve.Word;return ve.Other};var t}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let e=g(t,o,!1);if(i(t.slice(e,o))!=ve.Word)break;o=e}for(;s<r;){let e=g(t,s);if(i(t.slice(s,e))!=ve.Word)break;s=e}return o==s?null:I.range(o+n,s+n)}}function Se(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],o=r[e];if(void 0===o)r[e]=i;else if(o===i||void 0===i);else{if(!Object.hasOwnProperty.call(n,e))throw new Error("Config merge conflict for field "+e);r[e]=n[e](o,i)}}for(let e in t)void 0===r[e]&&(r[e]=t[e]);return r}xe.allowMultipleSelections=te,xe.tabSize=F.define({combine:e=>e.length?e[0]:4}),xe.lineSeparator=ne,xe.readOnly=se,xe.phrases=F.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every((n=>e[n]==t[n]))}}),xe.languageData=ee,xe.changeFilter=re,xe.transactionFilter=ie,xe.transactionExtender=oe,J.reconfigure=ue.define();class ke{eq(e){return this==e}range(e,t=e){return Ce.create(e,t,this)}}ke.prototype.startSide=ke.prototype.endSide=0,ke.prototype.point=!1,ke.prototype.mapMode=O.TrackDel;class Ce{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new Ce(e,t,n)}}function Oe(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class Me{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let o=r,s=i.length;;){if(o==s)return o;let r=o+s>>1,a=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==o)return a>=0?o:s;a>=0?s=r:o=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i<o;i++)if(!1===r(this.from[i]+e,this.to[i]+e,this.value[i]))return!1}map(e,t){let n=[],r=[],i=[],o=-1,s=-1;for(let a=0;a<this.value.length;a++){let l,c,u=this.value[a],h=this.from[a]+e,f=this.to[a]+e;if(h==f){let e=t.mapPos(h,u.startSide,u.mapMode);if(null==e)continue;if(l=c=e,u.startSide!=u.endSide&&(c=t.mapPos(h,u.endSide),c<l))continue}else if(l=t.mapPos(h,u.startSide),c=t.mapPos(f,u.endSide),l>c||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(o<0&&(o=l),u.point&&(s=Math.max(s,c-l)),n.push(u),r.push(l-o),i.push(c-o))}return{mapped:n.length?new Me(r,i,n,s):null,pos:o}}}class Ee{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new Ee(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(Oe)),this.isEmpty)return t.length?Ee.of(t):this;let s=new _e(this,null,-1).goto(0),a=0,l=[],c=new Ae;for(;s.value||a<t.length;)if(a<t.length&&(s.from-t[a].from||s.startSide-t[a].value.startSide)>=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(s.chunkIndex)<t[a].from)&&(!o||r>this.chunkEnd(s.chunkIndex)||i<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||r>s.to||i<s.from||o(s.from,s.to,s.value))&&(c.addInner(s.from,s.to,s.value)||l.push(Ce.create(s.from,s.to,s.value))),s.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?Ee.empty:this.nextLayer.update({add:l,filter:o,filterFrom:r,filterTo:i}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],r=-1;for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i],a=e.touchesRange(o,o+s.length);if(!1===a)r=Math.max(r,s.maxPoint),t.push(s),n.push(e.mapPos(o));else if(!0===a){let{mapped:i,pos:a}=s.map(o,e);i&&(r=Math.max(r,i.maxPoint),t.push(i),n.push(a))}}let i=this.nextLayer.map(e);return 0==t.length?i:new Ee(n,t,i||Ee.empty,r)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],o=this.chunk[r];if(t>=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return Re.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Re.from(e).goto(t)}static compare(e,t,n,r,i=-1){let o=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i)),s=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i)),a=Te(o,s,n),l=new Pe(o,a,i),c=new Pe(s,a,i);n.iterGaps(((e,t,n)=>Ne(l,e,c,t,n,r))),n.empty&&0==n.length&&Ne(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let i=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),o=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(i.length!=o.length)return!1;if(!i.length)return!0;let s=Te(i,o),a=new Pe(i,s,0).goto(n),l=new Pe(o,s,0).goto(n);for(;;){if(a.to!=l.to||!Ie(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(e,t,n,r,i=-1){let o=new Pe(e,null,i).goto(t),s=t,a=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),i=o.pointFrom<t?n.length+1:Math.min(n.length,a);r.point(s,e,o.point,n,i,o.pointRank),a=Math.min(o.openEnd(e),n.length)}else e>s&&(r.span(s,e,o.active,a),a=o.openEnd(e));if(o.to>n)return a+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new Ae;for(let r of e instanceof Ce?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(Oe(t,r)>0)return e.slice().sort(Oe);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}}Ee.empty=new Ee([],[],null,-1),Ee.empty.nextLayer=Ee.empty;class Ae{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new Me(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Ae)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),0))}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Ee.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=Ee.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Te(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let o=r.get(e.chunk[t]);null==o||(n?n.mapPos(o):o)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(o,o+e.chunk[t].length))||i.add(e.chunk[t])}return i}class _e{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Re{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let i=0;i<e.length;i++)for(let o=e[i];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&r.push(new _e(o,t,n,i));return 1==r.length?r[0]:new Re(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)De(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)De(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),De(this.heap,0)}}}function De(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}class Pe{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Re.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Le(this.active,e),Le(this.activeTo,e),Le(this.activeRank,e),this.minActive=Fe(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&this.activeRank[t]<=i;)t++;je(this.active,t,n),je(this.activeTo,t,r),je(this.activeRank,t,i),e&&je(e,t,this.cursor.from),this.minActive=Fe(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&Le(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Ne(e,t,n,r,i,o){e.goto(t),n.goto(r);let s=r+i,a=r,l=r-t;for(;;){let t=e.to+l-n.to||e.endSide-n.endSide,r=t<0?e.to+l:n.to,i=Math.min(r,s);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&Ie(e.activeForPoint(e.to+l),n.activeForPoint(n.to))||o.comparePoint(a,i,e.point,n.point):i>a&&!Ie(e.active,n.active)&&o.compareRange(a,i,e.active,n.active),r>s)break;a=r,t<=0&&e.next(),t>=0&&n.next()}}function Ie(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function Le(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function je(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function Fe(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Be(e,t,n=e.length){let r=0;for(let i=0;i<n;)9==e.charCodeAt(i)?(r+=t-r%t,i++):(r++,i=g(e,i));return r}function ze(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=g(e,r)}return!0===r?-1:e.length}},2393:(e,t,n)=>{"use strict";n.d(t,{p:()=>fe,Nm:()=>Ge,tk:()=>Hn,SJ:()=>pi,lg:()=>Fe,l9:()=>ue,S2:()=>Ur,Uw:()=>fr,qr:()=>Sr,Sd:()=>ci,gB:()=>si,v5:()=>vi,ZO:()=>Nr,HQ:()=>Li,AE:()=>_r,bF:()=>oi,$f:()=>Qn,Eu:()=>Di,OO:()=>Ne,W$:()=>Fr,Zs:()=>$r,$1:()=>Zn,mH:()=>di,hJ:()=>Zr});for(var r=n(8120),i=n(8699),o={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:"'"},s={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},a="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),l=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),c="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),u=l||a&&+a[1]<57,h=0;h<10;h++)o[48+h]=o[96+h]=String(h);for(h=1;h<=24;h++)o[h+111]="F"+h;for(h=65;h<=90;h++)o[h]=String.fromCharCode(h+32),s[h]=String.fromCharCode(h);for(var f in o)s.hasOwnProperty(f)||(s[f]=o[f]);function d(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function p(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function m(e,t){if(!t.anchorNode)return!1;try{return p(e,t.anchorNode)}catch(e){return!1}}function g(e){return 3==e.nodeType?A(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function y(e,t,n,r){return!!n&&(b(e,t,n,r,-1)||b(e,t,n,r,1))}function v(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function b(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:w(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=v(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?w(e):0}}}function w(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}const x={left:0,right:0,top:0,bottom:0};function S(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function k(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class C{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let O,M=null;function E(e){if(e.setActive)return e.setActive();if(M)return e.focus(M);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==M?{get preventScroll(){return M={preventScroll:!0},!0}}:void 0),!M){M=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}function A(e,t,n=t){let r=O||(O=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function T(e,t,n){let r={key:t,code:t,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,e.dispatchEvent(i);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,e.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function _(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}class R{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new R(e.parentNode,v(e),t)}static after(e,t){return new R(e.parentNode,v(e)+1,t)}}const D=[];class P{constructor(){this.parent=null,this.dom=null,this.dirty=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}coordsAt(e,t){return null}sync(e,t){if(2&this.dirty){let n,r=this.dom,i=null;for(let o of this.children){if(o.dirty){if(!o.dom&&(n=i?i.nextSibling:r.firstChild)){let e=P.get(n);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,t),o.dirty=0}if(n=i?i.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=o.dom&&(t.written=!0),o.dom.parentNode==r)for(;n&&n!=o.dom;)n=N(n);else r.insertBefore(o.dom,n);i=o.dom}for(n=i?i.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=N(n)}else if(1&this.dirty)for(let n of this.children)n.dirty&&(n.sync(e,t),n.dirty=0)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let r=0==w(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}n=r<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!P.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let r=this.children[e];if(r.dom==n)return t;t+=r.length+r.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,i=-1,o=-1,s=-1;for(let a=0,l=n,c=n;a<this.children.length;a++){let n=this.children[a],u=l+n.length;if(l<e&&u>t)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=a,i=l),l>t&&n.dom.parentNode==this.dom){o=a,s=c;break}c=u,l=u+n.breakAfter}return{from:i,to:s<0?n+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),1&t.dirty)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=D){this.markDirty();for(let n=e;n<t;n++){let e=this.children[n];e.parent==this&&e.destroy()}this.children.splice(e,t-e,...n);for(let e=0;e<n.length;e++)n[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new I(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}merge(e,t,n,r,i,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor}getSide(){return 0}destroy(){this.parent=null}}function N(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}P.prototype.breakAfter=0;class I{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function L(e,t,n,r,i,o,s,a,l){let{children:c}=e,u=c.length?c[t]:null,h=o.length?o[o.length-1]:null,f=h?h.breakAfter:s;if(!(t==r&&u&&!s&&!f&&o.length<2&&u.merge(n,i,o.length?h:null,0==n,a,l))){if(r<c.length){let e=c[r];e&&i<e.length?(t==r&&(e=e.split(i),i=0),!f&&h&&e.merge(0,i,h,!0,0,l)?o[o.length-1]=e:(i&&e.merge(0,i,null,!1,0,l),o.push(e))):(null==e?void 0:e.breakAfter)&&(h?h.breakAfter=1:s=1),r++}for(u&&(u.breakAfter=s,n>0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(n,u.length,null,!1,a,0),t++));t<r&&o.length;)if(c[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else{if(!c[t].become(o[0]))break;t++,o.shift(),a=o.length?0:l}!o.length&&t&&r<c.length&&!c[t-1].breakAfter&&c[r].merge(0,0,c[t-1],!1,a,l)&&t--,(t<r||o.length)&&e.replaceChildren(t,r,o)}}function j(e,t,n,r,i,o){let s=e.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:u}=s.findPos(t,-1),h=t-n;for(let e of r)h+=e.length;e.length+=h,L(e,c,u,a,l,r,0,i,o)}let F="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},B="undefined"!=typeof document?document:{documentElement:{style:{}}};const z=/Edge\/(\d+)/.exec(F.userAgent),$=/MSIE \d/.test(F.userAgent),H=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(F.userAgent),V=!!($||H||z),U=!V&&/gecko\/(\d+)/i.test(F.userAgent),W=!V&&/Chrome\/(\d+)/.exec(F.userAgent),q="webkitFontSmoothing"in B.documentElement.style,K=!V&&/Apple Computer/.test(F.vendor),G=K&&(/Mobile\/\w+/.test(F.userAgent)||F.maxTouchPoints>2);var J={mac:G||/Mac/.test(F.platform),windows:/Win/.test(F.platform),linux:/Linux|X11/.test(F.platform),ie:V,ie_version:$?B.documentMode||6:H?+H[1]:z?+z[1]:0,gecko:U,gecko_version:U?+(/Firefox\/(\d+)/.exec(F.userAgent)||[0,0])[1]:0,chrome:!!W,chrome_version:W?+W[1]:0,ios:G,android:/Android\b/.test(F.userAgent),webkit:q,safari:K,webkit_version:q?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=B.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class Q extends P{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return(!n||n instanceof Q&&!(this.length-(t-e)+n.length>256))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Q(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new R(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return X(this.dom,e,t)}}class Y extends P{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(_(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e,t){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof Y&&n.mark.eq(this.mark))||e&&i<=0||t<this.length&&o<=0)||(j(this,e,t,n?n.children:[],i-1,o-1),this.markDirty(),0))}split(e){let t=[],n=0,r=-1,i=0;for(let o of this.children){let s=n+o.length;s>e&&t.push(n<e?o.split(e-n):o),r<0&&n>=e&&(r=i),n=s,i++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Y(this.mark,t,o)}domAtPos(e){return ie(this,e)}coordsAt(e,t){return se(this,e,t)}}function X(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,o=t,s=0;0==t&&n<0||t==r&&n>=0?J.chrome||J.gecko||(t?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=A(e,i,o).getClientRects();if(!a.length)return x;let l=a[(s?s<0:n>=0)?0:a.length-1];return J.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,(e=>e.width))||l),s?S(l,s<0):l||null}class Z extends P{constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}static create(e,t,n){return new(e.customView||Z)(e,t,n)}split(e){let t=Z.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof Z&&this.widget.compare(n.widget))||e>0&&i<=0||t<this.length&&o<=0)||(this.length=e+(n?n.length:0)+(this.length-t),0))}become(e){return e.length==this.length&&e instanceof Z&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.eq(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return r.xv.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,i=this.posAtStart;return n?n.slice(i,i+this.length):r.xv.empty}domAtPos(e){return 0==e?R.before(this.dom):R.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.dom.getClientRects(),r=null;if(!n.length)return x;for(let t=e>0?n.length-1:0;r=n[t],!(e>0?0==t:t==n.length-1||r.top<r.bottom);t+=e>0?-1:1);return this.length?r:S(r,this.side>0)}get isEditable(){return!1}get isWidget(){return!0}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ee extends Z{domAtPos(e){let{topView:t,text:n}=this.widget;return t?te(e,0,t,n,((e,t)=>e.domAtPos(t)),(e=>new R(n,Math.min(e,n.nodeValue.length)))):new R(n,Math.min(e,n.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:n,text:r}=this.widget;return n?ne(e,t,n,r):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:n,text:r}=this.widget;return n?te(e,t,n,r,((e,t,n)=>e.coordsAt(t,n)),((e,t)=>X(r,e,t))):X(r,e,t)}destroy(){var e;super.destroy(),null===(e=this.widget.topView)||void 0===e||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function te(e,t,n,r,i,o){if(n instanceof Y){for(let s=n.dom.firstChild;s;s=s.nextSibling){let n=P.get(s);if(!n)return o(e,t);let a=p(s,r),l=n.length+(a?r.nodeValue.length:0);if(e<l||e==l&&n.getSide()<=0)return a?te(e,t,n,r,i,o):i(n,e,t);e-=l}return i(n,n.length,-1)}return n.dom==r?o(e,t):i(n,e,t)}function ne(e,t,n,r){if(n instanceof Y){let i=0;for(let o of n.children){let n=p(o.dom,r);if(p(o.dom,e))return i+(n?ne(e,t,o,r):o.localPosFromDOM(e,t));i+=n?r.nodeValue.length:o.length}}else if(n.dom==r)return Math.min(t,r.nodeValue.length);return n.localPosFromDOM(e,t)}class re extends P{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof re&&e.side==this.side}split(){return new re(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?R.before(this.dom):R.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){let t=this.dom.getBoundingClientRect(),n=function(e,t){let n=e.parent,r=n?n.children.indexOf(e):-1;for(;n&&r>=0;)if(t<0?r>0:r<n.children.length){let e=n.children[r+t];if(e instanceof Q){let n=e.coordsAt(t<0?e.length:0,t);if(n)return n}r+=t}else{if(!(n instanceof Y&&n.parent)){let e=n.dom.lastChild;if(e&&"BR"==e.nodeName)return e.getClientRects()[0];break}r=n.parent.children.indexOf(n)+(t<0?0:1),n=n.parent}}(this,this.side>0?-1:1);return n&&n.top<t.bottom&&n.bottom>t.top?{left:t.left,right:t.right,top:n.top,bottom:n.bottom}:t}get overrideDOMText(){return r.xv.empty}}function ie(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;i<r.length;i++){let o=r[i],s=e+o.length;if(!(s==e&&o.getSide()<=0)){if(t>e&&t<s&&o.dom.parentNode==n)return o.domAtPos(t-e);if(t<=e)break;e=s}}for(let e=i;e>0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e<r.length;e++){let t=r[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new R(n,0)}function oe(e,t,n){let r,{children:i}=e;n>0&&t instanceof Y&&i.length&&(r=i[i.length-1])instanceof Y&&r.mark.eq(t.mark)?oe(r,t.children[0],n-1):(i.push(t),t.setParent(e)),e.length+=t.length}function se(e,t,n){let r=null,i=-1,o=null,s=-1;!function e(t,n){for(let a=0,l=0;a<t.children.length&&l<=n;a++){let c=t.children[a],u=l+c.length;u>=n&&(c.children.length?e(c,n-l):!o&&(u>n||l==u&&c.getSide()>0)?(o=c,s=n-l):(l<n||l==u&&c.getSide()<0)&&(r=c,i=n-l)),l=u}}(e,t);let a=(n<0?r:o)||r||o;return a?a.coordsAt(Math.max(0,a==r?i:s),n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=g(t);return n[n.length-1]||null}(e)}function ae(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}function le(e,t){if(e==t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(let i of n)if(-1==r.indexOf(i)||e[i]!==t[i])return!1;return!0}function ce(e,t,n){let r=null;if(t)for(let i in t)n&&i in n||e.removeAttribute(r=i);if(n)for(let i in n)t&&t[i]==n[i]||e.setAttribute(r=i,n[i]);return!!r}Q.prototype.children=Z.prototype.children=re.prototype.children=D;class ue{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}ignoreEvent(e){return!0}get customView(){return null}destroy(e){}}var he=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(he||(he={}));class fe extends r.uU{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new de(e)}static widget(e){let t=e.side||0,n=!!e.block;return t+=n?t>0?3e8:-4e8:t>0?1e8:-1e8,new me(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:o}=ge(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(o?r?2e8:1:-6e8)}return new me(e,t,n,r,e.widget||null,!0)}static line(e){return new pe(e)}static set(e,t=!1){return r.Xs.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}fe.none=r.Xs.empty;class de extends fe{constructor(e){let{start:t,end:n}=ge(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof de&&this.tagName==e.tagName&&this.class==e.class&&le(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}de.prototype.point=!1;class pe extends fe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof pe&&this.spec.class==e.spec.class&&le(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}pe.prototype.mapMode=r.gc.TrackBefore,pe.prototype.point=!0;class me extends fe{constructor(e,t,n,i,o,s){super(t,n,o,e),this.block=i,this.isReplace=s,this.mapMode=i?t<=0?r.gc.TrackBefore:r.gc.TrackAfter:r.gc.TrackDel}get type(){return this.startSide<this.endSide?he.WidgetRange:this.startSide<=0?he.WidgetBefore:he.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(e){return e instanceof me&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function ge(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function ye(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}me.prototype.point=!0;class ve extends P{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,i,o){if(n){if(!(n instanceof ve))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),j(this,e,t,n?n.children:[],i,o),!0}split(e){let t=new ve;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let e=n;e<this.children.length;e++)t.append(this.children[e],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){le(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){oe(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=ae(t,this.attrs||{})),n&&(this.attrs=ae({class:n},this.attrs||{}))}domAtPos(e){return ie(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.dirty|=6)}sync(e,t){var n;this.dom?4&this.dirty&&(_(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(ce(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&P.get(r)instanceof Y;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=P.get(r))||void 0===n?void 0:n.isEditable)||J.ios&&this.children.some((e=>e instanceof Q))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof Q)||/[^ -~]/.test(n.text))return null;let r=g(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=se(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight<t){let r=(t-e.textHeight)/2;return{top:n.top+r,bottom:n.bottom-r,left:n.left,right:n.left}}}return n}become(e){return!1}get type(){return he.Text}static find(e,t){for(let n=0,r=0;n<e.children.length;n++){let i=e.children[n],o=r+i.length;if(o>=t){if(i instanceof ve)return i;if(o>t)break}r=o+i.breakAfter}return null}}class be extends P{constructor(e,t,n){super(),this.widget=e,this.length=t,this.type=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof be&&this.widget.compare(n.widget))||e>0&&i<=0||t<this.length&&o<=0)||(this.length=e+(n?n.length:0)+(this.length-t),0))}domAtPos(e){return 0==e?R.before(this.dom):R.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new be(this.widget,t,this.type);return n.breakAfter=this.breakAfter,n}get children(){return D}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):r.xv.empty}domBoundsAround(){return null}become(e){return e instanceof be&&e.type==this.type&&e.widget.constructor==this.widget.constructor&&(e.widget.eq(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class we{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof be&&e.type==he.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new ve),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(xe(new re(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(xe(new Q(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,o){if(this.disallowBlockEffectsFor[o]&&n instanceof me){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof me)if(n.block){let{type:e}=n;e!=he.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new be(n.widget||new Se("div"),s,e))}else{let o=Z.create(n.widget||new Se("span"),s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&i<=r.length&&(e<t||n.startSide>0),l=!o.isEditable&&(e<t||i>r.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(xe(new re(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(xe(o,r),i),this.atCursorPos=l,this.pendingBuffer=l?e<t||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(e,t,n,i,o){let s=new we(e,t,n,o);return s.openEnd=r.Xs.spans(i,t,n,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function xe(e,t){for(let n of t)e=new Y(n,[e],e.length);return e}class Se extends ue{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}}const ke=r.r$.define(),Ce=r.r$.define(),Oe=r.r$.define(),Me=r.r$.define(),Ee=r.r$.define(),Ae=r.r$.define(),Te=r.r$.define(),_e=r.r$.define({combine:e=>e.some((e=>e))}),Re=r.r$.define({combine:e=>e.some((e=>e))});class De{constructor(e,t="nearest",n="nearest",r=5,i=5){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i}map(e){return e.empty?this:new De(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const Pe=r.Py.define({map:(e,t)=>e.map(t)});function Ne(e,t,n){let r=e.facet(Me);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const Ie=r.r$.define({combine:e=>!e.length||e[0]});let Le=0;const je=r.r$.define();class Fe{constructor(e,t,n,r){this.id=e,this.create=t,this.domEventHandlers=n,this.extension=r(this)}static define(e,t){const{eventHandlers:n,provide:r,decorations:i}=t||{};return new Fe(Le++,e,n,(e=>{let t=[je.of(e)];return i&&t.push(He.of((t=>{let n=t.plugin(e);return n?i(n):fe.none}))),r&&t.push(r(e)),t}))}static fromClass(e,t){return Fe.define((t=>new e(t)),t)}}class Be{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Ne(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ne(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){Ne(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const ze=r.r$.define(),$e=r.r$.define(),He=r.r$.define(),Ve=r.r$.define(),Ue=r.r$.define(),We=r.r$.define();class qe{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new qe(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let r=0,i=0,o=0,s=0;;r++){let a=r==e.length?null:e[r],l=o-s,c=a?a.fromB:1e9;for(;i<t.length&&t[i]<c;){let e=t[i],r=t[i+1],o=Math.max(s,e),a=Math.min(c,r);if(o<=a&&new qe(o+l,a+l,o,a).addToSet(n),r>c)break;i+=2}if(!a)return n;new qe(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class Ke{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=r.as.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let i=[];this.changes.iterChangedRanges(((e,t,n,r)=>i.push(new qe(e,t,n,r)))),this.changedRanges=i}static create(e,t,n){return new Ke(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}var Ge=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(Ge||(Ge={}));const Je=Ge.LTR,Qe=Ge.RTL;function Ye(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}const Xe=Ye("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Ze=Ye("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),et=Object.create(null),tt=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);et[t]=n,et[n]=-t}const nt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class rt{constructor(e,t,n){this.from=e,this.to=t,this.level=n}get dir(){return this.level%2?Qe:Je}side(e,t){return this.dir==t==e?this.to:this.from}static find(e,t,n,r){let i=-1;for(let o=0;o<e.length;o++){let s=e[o];if(s.from<=t&&s.to>=t){if(s.level==n)return o;(i<0||(0!=r?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}const it=[];function ot(e){return[new rt(0,e,0)]}let st="";function at(e,t,n,i,o){var s;let a=i.head-e.from,l=-1;if(0==a){if(!o||!e.length)return null;t[0].level!=n&&(a=t[0].side(!1,n),l=0)}else if(a==e.length){if(o)return null;let e=t[t.length-1];e.level!=n&&(a=e.side(!0,n),l=t.length-1)}l<0&&(l=rt.find(t,a,null!==(s=i.bidiLevel)&&void 0!==s?s:-1,i.assoc));let c=t[l];a==c.side(o,n)&&(c=t[l+=o?1:-1],a=c.side(!o,n));let u=o==(c.dir==n),h=(0,r.cp)(e.text,a,u);if(st=e.text.slice(Math.min(a,h),Math.max(a,h)),h!=c.side(o,n))return r.jT.cursor(h+e.from,u?-1:1,c.level);let f=l==(o?t.length-1:0)?null:t[l+(o?1:-1)];return f||c.level==n?f&&f.level<c.level?r.jT.cursor(f.side(!o,n)+e.from,o?1:-1,f.level):r.jT.cursor(h+e.from,o?-1:1,c.level):r.jT.cursor(o?e.to:e.from,o?-1:1,n)}const lt="￿";class ct{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(r.yy.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=lt}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r),this.readNode(r);let e=r.nextSibling;if(e==t)break;let i=P.get(r),o=P.get(e);(i&&o?i.breakAfter:(i?i.breakAfter:ut(r))||ut(e)&&("BR"!=r.nodeName||r.cmIgnore))&&this.lineBreak(),r=e}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,o=-1,s=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(i=r.exec(t))&&(o=i.index,s=i[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let t=P.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+Math.min(t,n.offset))}}function ut(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}class ht{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class ft extends P{constructor(e){super(),this.view=e,this.compositionDeco=fe.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new ve],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new qe(0,0,0,e.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every((({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=fe.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=function(e,t){let n=pt(e);if(!n)return fe.none;let{from:r,to:i,node:o,text:s}=n,a=t.mapPos(r,1),l=Math.max(a,t.mapPos(i,-1)),{state:c}=e,u=3==o.nodeType?o.nodeValue:new ct([],c).readRange(o.firstChild,null).text;if(l-a<u.length)if(c.doc.sliceString(a,Math.min(c.doc.length,a+u.length),lt)==u)l=a+u.length;else{if(c.doc.sliceString(Math.max(0,l-u.length),l,lt)!=u)return fe.none;a=l-u.length}else if(c.doc.sliceString(a,l,lt)!=u)return fe.none;let h=P.get(o);return h instanceof ee?h=h.widget.topView:h&&(h.parent=null),fe.set(fe.replace({widget:new mt(o,s,h),inclusive:!0}).range(a,l))}(this.view,e.changes)),(J.ie||J.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let n=function(e,t,n){let i=new yt;return r.Xs.compare(e,t,n,i),i.changes}(this.decorations,this.updateDeco(),e.changes);return t=qe.extendWithRanges(t,n),(0!=this.dirty||0!=t.length)&&(this.updateInner(t,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=J.chrome||J.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.dirty=0,e&&(e.written||n.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}));let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof be&&e.widget instanceof dt&&r.push(e.dom);n.updateGaps(r)}updateChildren(e,t){let n=this.childCursor(t);for(let t=e.length-1;;t--){let r=t>=0?e[t]:null;if(!r)break;let{fromA:i,toA:o,fromB:s,toB:a}=r,{content:l,breakAtStart:c,openStart:u,openEnd:h}=we.build(this.view.state.doc,s,a,this.decorations,this.dynamicDecorationMap),{i:f,off:d}=n.findPos(o,1),{i:p,off:m}=n.findPos(i,-1);L(this,p,m,f,d,l,c,u,h)}}updateSelection(e=!1,t=!1){if(!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),!t&&!this.mayControlSelection())return;let n=this.forceSelection;this.forceSelection=!1;let r=this.view.state.selection.main,i=this.domAtPos(r.anchor),o=r.empty?i:this.domAtPos(r.head);if(J.gecko&&r.empty&&1==(s=i).node.nodeType&&s.node.firstChild&&(0==s.offset||"false"==s.node.childNodes[s.offset-1].contentEditable)&&(s.offset==s.node.childNodes.length||"false"==s.node.childNodes[s.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore((()=>i.node.insertBefore(e,i.node.childNodes[i.offset]||null))),i=o=new R(e,0),n=!0}var s;let a=this.view.observer.selectionRange;!n&&a.focusNode&&y(i.node,i.offset,a.anchorNode,a.anchorOffset)&&y(o.node,o.offset,a.focusNode,a.focusOffset)||(this.view.observer.ignore((()=>{J.android&&J.chrome&&this.dom.contains(a.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(a.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=d(this.view.root);if(e)if(r.empty){if(J.gecko){let e=(t=i.node,n=i.offset,1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(n<t.childNodes.length&&"false"==t.childNodes[n].contentEditable?2:0));if(e&&3!=e){let t=gt(i.node,i.offset,1==e?1:-1);t&&(i=new R(t,1==e?0:t.nodeValue.length))}}e.collapse(i.node,i.offset),null!=r.bidiLevel&&null!=a.cursorBidiLevel&&(a.cursorBidiLevel=r.bidiLevel)}else if(e.extend){e.collapse(i.node,i.offset);try{e.extend(o.node,o.offset)}catch(e){}}else{let t=document.createRange();r.anchor>r.head&&([i,o]=[o,i]),t.setEnd(o.node,o.offset),t.setStart(i.node,i.offset),e.removeAllRanges(),e.addRange(t)}var t,n})),this.view.observer.setSelectionRange(i,o)),this.impreciseAnchor=i.precise?null:new R(a.anchorNode,a.anchorOffset),this.impreciseHead=o.precise?null:new R(a.focusNode,a.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,n=d(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=ve.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}mayControlSelection(){let e=this.view.root.activeElement;return e==this.dom||m(this.dom,this.view.observer.selectionRange)&&!(e&&this.dom.contains(e))}nearest(e){for(let t=e;t;){let e=P.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(n<e.length||e instanceof ve)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){for(let n=this.length,r=this.children.length-1;;r--){let i=this.children[r],o=n-i.breakAfter-i.length;if(e>o||e==o&&i.type!=he.WidgetBefore&&i.type!=he.WidgetAfter&&(!r||2==t||this.children[r-1].breakAfter||this.children[r-1].type==he.WidgetBefore&&t>-2))return i.coordsAt(e-o,t);n=o}}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==Ge.LTR;for(let e=0,l=0;l<this.children.length;l++){let c=this.children[l],u=e+c.length;if(u>r)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),o){let t=c.dom.lastChild,r=t?g(t):[];if(r.length){let t=r[r.length-1],o=a?t.right-n.left:n.right-t.left;o>s&&(s=o,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?Ge.RTL:Ge.LTR}measureTextSize(){for(let e of this.children)if(e instanceof ve){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let i=g(r.firstChild)[0];e=r.getBoundingClientRect().height,t=i?i.width/27:7,n=i?i.height:e,r.remove()})),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new I(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){let r=t.lineBlockAt(o).bottom-t.lineBlockAt(n).top;e.push(fe.replace({widget:new dt(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return fe.set(e)}updateDeco(){let e=this.view.state.facet(He).map(((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e));for(let t=e.length;t<e.length+3;t++)this.dynamicDecorationMap[t]=!1;return this.decorations=[...e,this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){let t,{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=0,o=0,s=0,a=0;for(let e of this.view.state.facet(Ue).map((e=>e(this.view))))if(e){let{left:t,right:n,top:r,bottom:l}=e;null!=t&&(i=Math.max(i,t)),null!=n&&(o=Math.max(o,n)),null!=r&&(s=Math.max(s,r)),null!=l&&(a=Math.max(a,l))}let l={left:r.left-i,top:r.top-s,right:r.right+o,bottom:r.bottom+a};!function(e,t,n,r,i,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e;u;)if(1==u.nodeType){let e,h=u==l.body;if(h)e=k(c);else{if(u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();e={left:t.left,right:t.left+u.clientWidth,top:t.top,bottom:t.top+u.clientHeight}}let f=0,d=0;if("nearest"==i)t.top<e.top?(d=-(e.top-t.top+s),n>0&&t.bottom>e.bottom+d&&(d=t.bottom-e.bottom+d+s)):t.bottom>e.bottom&&(d=t.bottom-e.bottom+s,n<0&&t.top-d<e.top&&(d=-(e.top+d-t.top+s)));else{let r=t.bottom-t.top,o=e.bottom-e.top;d=("center"==i&&r<=o?t.top+r/2-o/2:"start"==i||"center"==i&&n<0?t.top-s:t.bottom-o+s)-e.top}if("nearest"==r?t.left<e.left?(f=-(e.left-t.left+o),n>0&&t.right>e.right+f&&(f=t.right-e.right+f+o)):t.right>e.right&&(f=t.right-e.right+o,n<0&&t.left<e.left+f&&(f=-(e.left+f-t.left+o))):f=("center"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==a?t.left-o:t.right-(e.right-e.left)+o)-e.left,f||d)if(h)c.scrollBy(f,d);else{let e=0,n=0;if(d){let e=u.scrollTop;u.scrollTop+=d,n=u.scrollTop-e}if(f){let t=u.scrollLeft;u.scrollLeft+=f,e=u.scrollLeft-t}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-f)<1&&(r="nearest"),n&&Math.abs(n-d)<1&&(i="nearest")}if(h)break;u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,l,n.head<n.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==Ge.LTR)}}class dt extends ue{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function pt(e){let t=e.observer.selectionRange,n=t.focusNode&&gt(t.focusNode,t.focusOffset,0);if(!n)return null;let r=e.docView.nearest(n);if(!r)return null;if(r instanceof ve){let e=n;for(;e.parentNode!=r.dom;)e=e.parentNode;let t=e.previousSibling;for(;t&&!P.get(t);)t=t.previousSibling;let i=t?P.get(t).posAtEnd:r.posAtStart;return{from:i,to:i,node:e,text:n}}{for(;;){let{parent:e}=r;if(!e)return null;if(e instanceof ve)break;r=e}let e=r.posAtStart;return{from:e,to:e+r.length,node:r.dom,text:n}}}class mt extends ue{constructor(e,t,n){super(),this.top=e,this.text=t,this.topView=n}eq(e){return this.top==e.top&&this.text==e.text}toDOM(){return this.top}ignoreEvent(){return!1}get customView(){return ee}}function gt(e,t,n){if(n<=0)for(let n=e,r=t;;){if(3==n.nodeType)return n;if(!(1==n.nodeType&&r>0))break;n=n.childNodes[r-1],r=w(n)}if(n>=0)for(let r=e,i=t;;){if(3==r.nodeType)return r;if(!(1==r.nodeType&&i<r.childNodes.length&&n>=0))break;r=r.childNodes[i],i=0}return null}class yt{constructor(){this.changes=[]}compareRange(e,t){ye(e,t,this.changes)}comparePoint(e,t){ye(e,t,this.changes)}}function vt(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function bt(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function wt(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function xt(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function St(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function kt(e,t,n){let r,i,o,s,a,l,c,u,h=!1;for(let f=e.firstChild;f;f=f.nextSibling){let e=g(f);for(let d=0;d<e.length;d++){let p=e[d];i&&wt(i,p)&&(p=xt(St(p,i.bottom),i.top));let m=vt(t,p),g=bt(n,p);if(0==m&&0==g)return 3==f.nodeType?Ct(f,t,n):kt(f,t,n);if(!r||s>g||s==g&&o>m){r=f,i=p,o=m,s=g;let a=g?n<p.top?-1:1:m?t<p.left?-1:1:0;h=!a||(a>0?d<e.length-1:d>0)}0==m?n>p.bottom&&(!c||c.bottom<p.bottom)?(a=f,c=p):n<p.top&&(!u||u.top>p.top)&&(l=f,u=p):c&&wt(c,p)?c=St(c,p.bottom):u&&wt(u,p)&&(u=xt(u,p.top))}}if(c&&c.bottom>=n?(r=a,i=c):u&&u.top<=n&&(r=l,i=u),!r)return{node:e,offset:0};let f=Math.max(i.left,Math.min(i.right,t));return 3==r.nodeType?Ct(r,f,n):h&&"false"!=r.contentEditable?kt(r,f,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(i.left+i.right)/2?1:0)}}function Ct(e,t,n){let r=e.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let r=A(e,a,a+1).getClientRects();for(let l=0;l<r.length;l++){let c=r[l];if(c.top==c.bottom)continue;s||(s=t-c.left);let u=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u<o){let n=t>=(c.left+c.right)/2,r=n;if((J.chrome||J.gecko)&&A(e,a).getBoundingClientRect().left==c.right&&(r=!n),u<=0)return{node:e,offset:a+(r?1:0)};i=a+(r?1:0),o=u}}}return{node:e,offset:i>-1?i:s>0?e.nodeValue.length:0}}function Ot(e,t,n,r=-1){var i,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:h}=t,f=h-l;if(f<0)return 0;if(f>c)return e.state.doc.length;for(let t=e.defaultLineHeight/2,i=!1;s=e.elementAtHeight(f),s.type!=he.Text;)for(;f=r>0?s.bottom+t:s.top-t,!(f>=0&&f<=c);){if(i)return n?null:0;i=!0,r=-r}h=l+f;let d=s.from;if(d<e.viewport.from)return 0==e.viewport.from?0:n?null:Mt(e,a,s,u,h);if(d>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:Mt(e,a,s,u,h);let p=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:p,g=m.elementFromPoint(u,h);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,h),g&&!e.contentDOM.contains(g)&&(g=null));let y,v=-1;if(g&&0!=(null===(i=e.docView.nearest(g))||void 0===i?void 0:i.isEditable))if(p.caretPositionFromPoint){let e=p.caretPositionFromPoint(u,h);e&&({offsetNode:y,offset:v}=e)}else if(p.caretRangeFromPoint){let t=p.caretRangeFromPoint(u,h);t&&(({startContainer:y,startOffset:v}=t),(!e.contentDOM.contains(y)||J.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return A(e,r-1,r).getBoundingClientRect().left>n}(y,v,u)||J.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}return n-(1==e.nodeType?e.getBoundingClientRect():A(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,v,u))&&(y=void 0))}if(!y||!e.docView.dom.contains(y)){let t=ve.find(e.docView,d);if(!t)return f>s.top+s.height/2?s.to:s.from;({node:y,offset:v}=kt(t.dom,u,h))}let b=e.docView.nearest(y);if(!b)return null;if(b.isWidget&&1==(null===(o=b.dom)||void 0===o?void 0:o.nodeType)){let e=b.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?b.posAtStart:b.posAtEnd}return b.localPosFromDOM(y,v)+b.posAtStart}function Mt(e,t,n,i,o){let s=Math.round((i-t.left)*e.defaultCharacterWidth);e.lineWrapping&&n.height>1.5*e.defaultLineHeight&&(s+=Math.floor((o-n.top)/e.defaultLineHeight)*e.viewState.heightOracle.lineLength);let a=e.state.sliceDoc(n.from,n.to);return n.from+(0,r.Gz)(a,s,e.state.tabSize)}function Et(e,t,n,i){let o=e.state.doc.lineAt(t.head),s=e.bidiSpans(o),a=e.textDirectionAt(o.from);for(let l=t,c=null;;){let t=at(o,s,a,l,n),u=st;if(!t){if(o.number==(n?e.state.doc.lines:1))return l;u="\n",o=e.state.doc.line(o.number+(n?1:-1)),s=e.bidiSpans(o),t=r.jT.cursor(n?o.from:o.to)}if(c){if(!c(u))return l}else{if(!i)return t;c=i(u)}l=t}}function At(e,t,n){let i=e.state.facet(Ve).map((t=>t(e)));for(;;){let e=!1;for(let o of i)o.between(n.from-1,n.from+1,((i,o,s)=>{n.from>i&&n.from<o&&(n=t.head>n.from?r.jT.cursor(i,1):r.jT.cursor(o,-1),e=!0)}));if(!e)return n}}class Tt{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;let t=(t,n)=>{this.ignoreDuringComposition(n)||"keydown"==n.type&&this.keydown(e,n)||(this.mustFlushObserver(n)&&e.observer.forceFlush(),this.runCustomHandlers(n.type,e,n)?n.preventDefault():t(e,n))};for(let n in Lt){let r=Lt[n];e.contentDOM.addEventListener(n,(n=>{It(e,n)&&t(r,n)}),jt[n]),this.registeredEvents.push(n)}e.scrollDOM.addEventListener("mousedown",(n=>{if(n.target==e.scrollDOM&&n.clientY>e.contentDOM.getBoundingClientRect().bottom&&(t(Lt.mousedown,n),!n.defaultPrevented&&2==n.button)){let t=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout((()=>e.contentDOM.style.minHeight=t),200)}})),J.chrome&&102==J.chrome_version&&e.scrollDOM.addEventListener("wheel",(()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout((()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""}),100)}),{passive:!0}),this.notifiedFocused=e.hasFocus,J.safari&&e.contentDOM.addEventListener("input",(()=>null))}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var n;let r;this.customHandlers=[];for(let i of t)if(r=null===(n=i.update(e).spec)||void 0===n?void 0:n.domEventHandlers){this.customHandlers.push({plugin:i.value,handlers:r});for(let t in r)this.registeredEvents.indexOf(t)<0&&"scroll"!=t&&(this.registeredEvents.push(t),e.contentDOM.addEventListener(t,(n=>{It(e,n)&&this.runCustomHandlers(t,e,n)&&n.preventDefault()})))}}runCustomHandlers(e,t,n){for(let r of this.customHandlers){let i=r.handlers[e];if(i)try{if(i.call(r.plugin,n,t)||n.defaultPrevented)return!0}catch(e){Ne(t.state,e)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let n of this.customHandlers){let r=n.handlers.scroll;if(r)try{r.call(n.plugin,t,e)}catch(t){Ne(e.state,t)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&Date.now()<this.lastEscPress+2e3)return!0;if(J.android&&J.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let n;return!(!J.ios||t.synthetic||t.altKey||t.metaKey||!((n=_t.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||Rt.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)||(this.pendingIOSKey=n||t,setTimeout((()=>this.flushIOSKey(e)),250),0))}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(this.pendingIOSKey=void 0,T(e.contentDOM,t.key,t.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(J.safari&&!J.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}mustFlushObserver(e){return"keydown"==e.type&&229!=e.keyCode}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const _t=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Rt="dthko",Dt=[16,17,18,20,91,92,224,225];function Pt(e){return.7*e+8}class Nt{constructor(e,t,n,i){this.view=e,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(e.contentDOM);let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(r.yy.allowMultipleSelections)&&function(e,t){let n=e.state.facet(ke);return n.length?n[0](t):J.mac?t.metaKey:t.ctrlKey}(e,t),this.dragMove=function(e,t){let n=e.state.facet(Ce);return n.length?n[0](t):J.mac?!t.altKey:!t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=d(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=Jt(t))&&null}start(e){!1===this.dragging&&(e.preventDefault(),this.select(e))}move(e){var t;if(0==e.buttons)return this.destroy();if(!1!==this.dragging)return;this.select(this.lastEvent=e);let n=0,r=0,i=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=i.left?n=-Pt(i.left-e.clientX):e.clientX>=i.right&&(n=Pt(e.clientX-i.right)),e.clientY<=i.top?r=-Pt(i.top-e.clientY):e.clientY>=i.bottom&&(r=Pt(e.clientY-i.bottom)),this.setScrollSpeed(n,r)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}select(e){let t=this.style.get(e,this.extend,this.multiple);!this.mustSelect&&t.eq(this.view.state.selection)&&t.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:t,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout((()=>this.select(this.lastEvent)),20)}}function It(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=P.get(r))&&n.ignoreEvent(t))return!1;return!0}const Lt=Object.create(null),jt=Object.create(null),Ft=J.ie&&J.ie_version<15||J.ios&&J.webkit_version<604;function Bt(e,t){let n,{state:i}=e,o=1,s=i.toText(t),a=s.lines==i.selection.ranges.length;if(null!=Yt&&i.selection.ranges.every((e=>e.empty))&&Yt==s.toString()){let e=-1;n=i.changeByRange((n=>{let l=i.doc.lineAt(n.from);if(l.from==e)return{range:n};e=l.from;let c=i.toText((a?s.line(o++).text:t)+i.lineBreak);return{changes:{from:l.from,insert:c},range:r.jT.cursor(n.from+c.length)}}))}else n=a?i.changeByRange((e=>{let t=s.line(o++);return{changes:{from:e.from,to:e.to,insert:t.text},range:r.jT.cursor(e.from+t.length)}})):i.replaceSelection(s);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function zt(e,t,n,i){if(1==i)return r.jT.cursor(t,n);if(2==i)return function(e,t,n=1){let i=e.charCategorizer(t),o=e.doc.lineAt(t),s=t-o.from;if(0==o.length)return r.jT.cursor(t);0==s?n=1:s==o.length&&(n=-1);let a=s,l=s;n<0?a=(0,r.cp)(o.text,s,!1):l=(0,r.cp)(o.text,s);let c=i(o.text.slice(a,l));for(;a>0;){let e=(0,r.cp)(o.text,a,!1);if(i(o.text.slice(e,a))!=c)break;a=e}for(;l<o.length;){let e=(0,r.cp)(o.text,l);if(i(o.text.slice(l,e))!=c)break;l=e}return r.jT.range(a+o.from,l+o.from)}(e.state,t,n);{let n=ve.find(e.docView,t),i=e.state.doc.lineAt(n?n.posAtEnd:t),o=n?n.posAtStart:i.from,s=n?n.posAtEnd:i.to;return s<e.state.doc.length&&s==i.to&&s++,r.jT.range(o,s)}}Lt.keydown=(e,t)=>{e.inputState.setSelectionOrigin("select"),27==t.keyCode?e.inputState.lastEscPress=Date.now():Dt.indexOf(t.keyCode)<0&&(e.inputState.lastEscPress=0)},Lt.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},Lt.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},jt.touchstart=jt.touchmove={passive:!0},Lt.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let r of e.state.facet(Oe))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=Ut(e,t),i=Jt(t),o=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),o=o.map(e.changes))},get(t,s,a){let l=Ut(e,t),c=zt(e,l.pos,l.bias,i);if(n.pos!=l.pos&&!s){let t=zt(e,n.pos,n.bias,i),o=Math.min(t.from,c.from),s=Math.max(t.to,c.to);c=o<c.from?r.jT.range(o,s):r.jT.range(s,o)}return s?o.replaceRange(o.main.extend(c.from,c.to)):a&&o.ranges.length>1&&o.ranges.some((e=>e.eq(c)))?function(e,t){for(let n=0;;n++)if(e.ranges[n].eq(t))return r.jT.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}(o,c):a?o.addRange(c):r.jT.create([c])}}}(e,t)),n){let r=e.root.activeElement!=e.contentDOM;e.inputState.startMouseSelection(new Nt(e,t,n,r)),r&&e.observer.ignore((()=>E(e.contentDOM))),e.inputState.mouseSelection&&e.inputState.mouseSelection.start(t)}};let $t=(e,t)=>e>=t.top&&e<=t.bottom,Ht=(e,t,n)=>$t(t,n)&&e>=n.left&&e<=n.right;function Vt(e,t,n,r){let i=ve.find(e.docView,t);if(!i)return 1;let o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&Ht(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&Ht(n,r,a)?1:s&&$t(r,s)?-1:1}function Ut(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:Vt(e,n,t.clientX,t.clientY)}}const Wt=J.ie&&J.ie_version<=11;let qt=null,Kt=0,Gt=0;function Jt(e){if(!Wt)return e.detail;let t=qt,n=Gt;return qt=e,Gt=Date.now(),Kt=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Kt+1)%3:1}function Qt(e,t,n,r){if(!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();let{mouseSelection:o}=e.inputState,s=r&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:i,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"})}Lt.dragstart=(e,t)=>{let{selection:{main:n}}=e.state,{mouseSelection:r}=e.inputState;r&&(r.dragging=n),t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove")},Lt.drop=(e,t)=>{if(!t.dataTransfer)return;if(e.state.readOnly)return t.preventDefault();let n=t.dataTransfer.files;if(n&&n.length){t.preventDefault();let r=Array(n.length),i=0,o=()=>{++i==n.length&&Qt(e,t,r.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=o,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])}}else Qt(e,t,t.dataTransfer.getData("Text"),!0)},Lt.paste=(e,t)=>{if(e.state.readOnly)return t.preventDefault();e.observer.flush();let n=Ft?null:t.clipboardData;n?(Bt(e,n.getData("text/plain")||n.getData("text/uri-text")),t.preventDefault()):function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{e.focus(),n.remove(),Bt(e,n.value)}),50)}(e)};let Yt=null;Lt.copy=Lt.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!i)return;Yt=i?n:null;let o=Ft?null:t.clipboardData;o?(t.preventDefault(),o.clearData(),o.setData("text/plain",n)):function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout((()=>{r.remove(),e.focus()}),50)}(e,n),"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})};const Xt=r.q6.define();function Zt(e,t){let n=[];for(let r of e.facet(Te)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:Xt.of(!0)}):null}function en(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Zt(e.state,t);n?e.dispatch(n):e.update([])}}),10)}Lt.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),en(e)},Lt.blur=e=>{e.observer.clearSelectionRange(),en(e)},Lt.compositionstart=Lt.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},Lt.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionFirstChange=null,J.chrome&&J.android&&e.observer.flushSoon(),setTimeout((()=>{e.inputState.composing<0&&e.docView.compositionDeco.size&&e.update([])}),50)},Lt.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Lt.beforeinput=(e,t)=>{var n;let r;if(J.chrome&&J.android&&(r=_t.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}};const tn=["pre-wrap","normal","pre-line","break-spaces"];class nn{constructor(e){this.lineWrapping=e,this.doc=r.xv.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return tn.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}refresh(e,t,n,r,i,o){let s=tn.indexOf(e)>-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e<o.length;e++){let t=o[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class rn{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class on{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this.type=i}get to(){return this.from+this.length}get bottom(){return this.top+this.height}join(e){let t=(Array.isArray(this.type)?this.type:[this]).concat(Array.isArray(e.type)?e.type:[e]);return new on(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var sn=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(sn||(sn={}));const an=.001;class ln{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>an&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return ln.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],h=i.lineAt(a,sn.ByPosNoHeight,n.setDoc(t),0,0),f=h.to>=l?h:i.lineAt(l,sn.ByPosNoHeight,n,0,0);for(u+=f.to-l,l=f.to;s>0&&h.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a<h.from&&(h=i.lineAt(a,sn.ByPosNoHeight,n,0,0));c+=h.from-a,a=h.from;let d=pn.build(n.setDoc(o),e,c,u);i=i.replace(a,l,d)}return i.updateHeight(n,0)}static empty(){return new un(0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,r=0,i=0;for(;;)if(t==n)if(r>2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r<i){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(i+=t.size)}let o=0;return null==e[t-1]?(o=1,t--):null==e[t]&&(o=1,n++),new fn(ln.of(e.slice(0,t)),o,ln.of(e.slice(n)))}}ln.prototype.size=1;class cn extends ln{constructor(e,t,n){super(e,t),this.type=n}blockAt(e,t,n,r){return new on(r,this.length,n,this.height,this.type)}lineAt(e,t,n,r,i){return this.blockAt(0,n,r,i)}forEachLine(e,t,n,r,i,o){e<=i+this.length&&t>=i&&o(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class un extends cn{constructor(e,t){super(e,t,he.Text),this.collapsed=0,this.widgetHeight=0}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof un||r instanceof hn&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof hn?r=new un(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ln.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class hn extends ln{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,s=(this.height-t)/(this.length-o-1)}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:s}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),o=t.doc.lineAt(i),l=s+o.length*a,c=Math.max(n,e-l/2);return new on(o.from,o.length,c,l,he.Text)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(i+r);return new on(a,l,n+s*r,s,he.Text)}}lineAt(e,t,n,r,i){if(t==sn.ByHeight)return this.blockAt(e,n,r,i);if(t==sn.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new on(t,r-t,0,0,he.Text)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-o,h=r+s*u+a*(l.from-i-u);return new on(l.from,l.length,Math.max(r,Math.min(h,r+this.height-c)),c,he.Text)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=e,u=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;u+=a*n+l*(e-i-n)}let r=a+l*t.length;o(new on(t.from,t.length,u,r,he.Text)),u+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof hn?n[n.length-1]=new hn(e.length+r):n.push(null,new hn(r-1))}if(e>0){let t=n[0];t instanceof hn?n[0]=new hn(e+t.length):n.unshift(new hn(e-1),null)}return ln.of(n)}decomposeLeft(e,t){t.push(new hn(e-1),null)}decomposeRight(e,t){t.push(null,new hn(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new hn(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==s?s=i:Math.abs(i-s)>=an&&(s=-2);let a=new un(t,i);a.outdated=!1,n.push(a),o+=t+1}o<=i&&n.push(null,new hn(i-o).updateHeight(e,o));let a=ln.of(n);return(s<0||Math.abs(a.height-this.height)>=an||Math.abs(s-this.heightMetrics(e,t).perLine)>=an)&&(e.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class fn extends ln{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let o=r+this.left.height,s=i+this.left.length+this.break,a=t==sn.ByHeight?e<o:e<s,l=a?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,o,s);if(this.break||(a?l.to<s:l.from>s))return l;let c=t==sn.ByPosNoHeight?sn.ByPosNoHeight:sn.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let s=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,n,r,i,o),t>=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,sn.ByPos,n,r,i);e<l.from&&this.left.forEachLine(e,l.from-1,n,r,i,o),l.to>=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,o)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&dn(i,o-1),t<this.length){let e=i.length;this.decomposeRight(t,i),dn(i,e)}return ln.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ln.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:o}=this,s=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(e,s,n,r):o.updateHeight(e,s,n),a?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function dn(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof hn&&(r=e[t+1])instanceof hn&&e.splice(t-1,3,new hn(n.length+1+r.length))}class pn{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof un?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new un(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0;r<0&&(r=this.oracle.lineHeight);let i=t-e;n.block?this.addBlock(new cn(i,r,n.type)):(i||r>=5)&&this.addLineDeco(r,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new un(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new hn(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof un)return e;let t=new un(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine(),e.type!=he.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=he.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let n=this.ensureLine();n.length+=t,n.collapsed+=t,n.widgetHeight=Math.max(n.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof un||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new un(0,-1));let n=e;for(let e of this.nodes)e instanceof un&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,i){let o=new pn(n,e);return r.Xs.spans(t,n,i,o,0),o.finish(n)}}class mn{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&ye(e,t,this.changes,5)}}function gn(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(1==t.nodeType){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();o=Math.max(o,r.left),s=Math.min(s,r.right),a=Math.max(a,r.top),l=t==e.parentNode?r.bottom:Math.min(l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function yn(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class vn{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e){return fe.replace({widget:new bn(this.size,e)}).range(this.from,this.to)}}class bn extends ue{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class wn{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaler=On,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ge.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet($e).some((e=>"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new nn(t),this.stateDeco=e.facet(He).filter((e=>"function"!=typeof e)),this.heightMap=ln.empty().applyChanges(this.stateDeco,r.xv.empty,this.heightOracle.setDoc(e.doc),[new qe(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=fe.set(this.lineGaps.map((e=>e.draw(!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some((({from:e,to:t})=>r>=e&&r<=t))){let{from:t,to:n}=this.lineBlockAt(r);e.push(new xn(t,n))}}this.viewports=e.sort(((e,t)=>e.from-t.from)),this.scaler=this.heightMap.height<=7e6?On:new Mn(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(1==this.scaler.scale?e:En(e,this.scaler))}))}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(He).filter((e=>"function"!=typeof e));let i=e.changedRanges,o=qe.extendWithRanges(i,function(e,t,n){let i=new mn;return r.Xs.compare(e,t,n,i,0),i.changes}(n,this.stateDeco,e?e.changes:r.as.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2);let a=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<a.from||t.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Re)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),i=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?Ge.RTL:Ge.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=t.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0,h=parseInt(n.paddingTop)||0,f=parseInt(n.paddingBottom)||0;this.paddingTop==h&&this.paddingBottom==f||(this.paddingTop=h,this.paddingBottom=f,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let d=(this.printing?yn:gn)(t,this.paddingTop),p=d.top-this.pixelViewport.top,m=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let y=a.width;if(this.contentDOMWidth==y&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),l){let t=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(t)&&(s=!0),s||i.lineWrapping&&Math.abs(y-this.contentDOMWidth)>i.charWidth){let{lineHeight:n,charWidth:r,textHeight:a}=e.docView.measureTextSize();s=n>0&&i.refresh(o,n,r,a,y/r,t),s&&(e.docView.minWidth=0,c|=8)}p>0&&m>0?u=Math.max(p,m):p<0&&m<0&&(u=Math.min(p,m)),i.heightChanged=!1;for(let n of this.viewports){let o=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(s?ln.empty().applyChanges(this.stateDeco,r.xv.empty,this.heightOracle,[new qe(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new rn(n.from,o))}i.heightChanged&&(c|=2)}let v=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&c||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new xn(r.lineAt(o-1e3*n,sn.ByHeight,i,0,0).from,r.lineAt(s+1e3*(1-n),sn.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,sn.ByPos,i,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e<a.from?s.top:s.bottom-o,a=new xn(r.lineAt(n-500,sn.ByHeight,i,0,0).from,r.lineAt(n+o+500,sn.ByHeight,i,0,0).to)}}return a}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new xn(this.heightMap.lineAt(n,sn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,sn.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,sn.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,sn.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==e||r<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i<s+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new vn(t.mapPos(r.from),t.mapPos(r.to),r.size));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,i=n?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=Ge.LTR&&!n)return[];let a=[],l=(i,s,c,u)=>{if(s-i<o)return;let h=this.state.selection.main,f=[h.from];h.empty||f.push(h.to);for(let e of f)if(e>i&&e<s)return l(i,e-10,c,u),void l(e+10,s,c,u);let d=function(e,t){for(let n of e)if(t(n))return n}(e,(e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-i)<o&&Math.abs(e.to-s)<o&&!f.some((t=>e.from<t&&e.to>t))));if(!d){if(s<c.to&&t&&n&&t.visibleRanges.some((e=>e.from<=s&&e.to>=s))){let e=t.moveToLineBoundary(r.jT.cursor(s),!1,!0).head;e>i&&(s=e)}d=new vn(i,s,this.gapSize(c,i,s,u))}a.push(d)};for(let e of this.viewportLines){if(e.length<s)continue;let t=Sn(e.from,e.to,this.stateDeco);if(t.total<s)continue;let r,o,a=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let n,s,l=i/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=a){let r=Cn(t,a),i=((this.visibleBottom-this.visibleTop)/2+l)/e.height;n=r-i,s=r+i}else n=(this.visibleTop-e.top-l)/e.height,s=(this.visibleBottom-e.top+l)/e.height;r=kn(t,n),o=kn(t,s)}else{let e,n,s=t.total*this.heightOracle.charWidth,l=i*this.heightOracle.charWidth;if(null!=a){let r=Cn(t,a),i=((this.pixelViewport.right-this.pixelViewport.left)/2+l)/s;e=r-i,n=r+i}else e=(this.pixelViewport.left-l)/s,n=(this.pixelViewport.right+l)/s;r=kn(t,e),o=kn(t,n)}r>e.from&&l(e.from,r,e,t),o<e.to&&l(o,e.to,e,t)}return a}gapSize(e,t,n,r){let i=Cn(r,n)-Cn(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){vn.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=fe.set(e.map((e=>e.draw(this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];r.Xs.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some(((e,n)=>e.from!=t[n].from||e.to!=t[n].to));return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||En(this.heightMap.lineAt(e,sn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return En(this.heightMap.lineAt(this.scaler.fromDOM(e),sn.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(e){return En(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class xn{constructor(e,t){this.from=e,this.to=t}}function Sn(e,t,n){let i=[],o=e,s=0;return r.Xs.spans(n,e,t,{span(){},point(e,t){e>o&&(i.push({from:o,to:e}),s+=e-o),o=t}},20),o<t&&(i.push({from:o,to:t}),s+=t-o),{total:s,ranges:i}}function kn({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function Cn(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const On={toDOM:e=>e,fromDOM:e=>e,scale:1};class Mn{constructor(e,t,n){let r=0,i=0,o=0;this.viewports=n.map((({from:n,to:i})=>{let o=t.lineAt(n,sn.ByPos,e,0,0).top,s=t.lineAt(i,sn.ByPos,e,0,0).bottom;return r+=s-o,{from:n,to:i,top:o,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=o+(e.top-i)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}}function En(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new on(e.from,e.length,n,r-n,Array.isArray(e.type)?e.type.map((e=>En(e,t))):e.type)}const An=r.r$.define({combine:e=>e.join(" ")}),Tn=r.r$.define({combine:e=>e.indexOf(!0)>-1}),_n=i.V.newName(),Rn=i.V.newName(),Dn=i.V.newName(),Pn={"&light":"."+Rn,"&dark":"."+Dn};function Nn(e,t,n){return new i.V(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]})):e+" "+t})}const In=Nn("."+_n,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Pn);class Ln{constructor(e,t,n,i){this.typeOver=i,this.bounds=null,this.text="";let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=o||s?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;return n&&(t.push(new ht(n,r)),i==n&&o==r||t.push(new ht(i,o))),t}(e),n=new ct(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,i=2==e.length?e[1].pos:n;return n>-1&&i>-1?r.jT.single(n+t,i+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=o&&o.node==t.focusNode&&o.offset==t.focusOffset||!p(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),i=s&&s.node==t.anchorNode&&s.offset==t.anchorOffset||!p(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=r.jT.single(i,n)}}}function jn(e,t){let n,{newSel:i}=t,o=e.state.selection.main;if(t.bounds){let{from:i,to:s}=t.bounds,a=o.from,l=null;(8===e.inputState.lastKeyCode&&e.inputState.lastKeyTime>Date.now()-100||J.android&&t.text.length<s-i)&&(a=o.to,l="end");let c=function(e,t,n,r){let i=Math.min(e.length,t.length),o=0;for(;o<i&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==i&&e.length==t.length)return null;let s=e.length,a=t.length;for(;s>0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;return"end"==r&&(n-=s+Math.max(0,o-Math.min(s,a))-o),s<o&&e.length<t.length?(o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o):a<o&&(o-=n<=o&&n>=a?o-n:0,s=o+(s-a),a=o),{from:o,toA:s,toB:a}}(e.state.doc.sliceString(i,s,lt),t.text,a-i,l);c&&(J.chrome&&13==e.inputState.lastKeyCode&&c.toB==c.from+2&&t.text.slice(c.from,c.toB)==lt+lt&&c.toB--,n={from:i+c.from,to:i+c.toA,insert:r.xv.of(t.text.slice(c.from,c.toB).split(lt))})}else i&&(!e.hasFocus&&e.state.facet(Ie)||i.main.eq(o))&&(i=null);if(!n&&!i)return!1;if(!n&&t.typeOver&&!o.empty&&i&&i.main.empty?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,o.to)}:n&&n.from>=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,o.to))}:(J.mac||J.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(i&&2==n.insert.length&&(i=r.jT.single(i.main.anchor-1,i.main.head-1)),n={from:o.from,to:o.to,insert:r.xv.of([" "])}):J.chrome&&n&&n.from==n.to&&n.from==o.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(i&&(i=r.jT.single(i.main.anchor-1,i.main.head-1)),n={from:o.from,to:o.to,insert:r.xv.of([" "])}),n){let t=e.state;if(J.ios&&e.inputState.flushIOSKey(e))return!0;if(J.android&&(n.from==o.from&&n.to==o.to&&1==n.insert.length&&2==n.insert.lines&&T(e.contentDOM,"Enter",13)||n.from==o.from-1&&n.to==o.to&&0==n.insert.length&&T(e.contentDOM,"Backspace",8)||n.from==o.from&&n.to==o.to+1&&0==n.insert.length&&T(e.contentDOM,"Delete",46)))return!0;let s,a=n.insert.toString();if(e.state.facet(Ae).some((t=>t(e,n.from,n.to,a))))return!0;if(e.inputState.composing>=0&&e.inputState.composing++,n.from>=o.from&&n.to<=o.to&&n.to-n.from>=(o.to-o.from)/3&&(!i||i.main.empty&&i.main.from==n.from+n.insert.length)&&e.inputState.composing<0){let r=o.from<n.from?t.sliceDoc(o.from,n.from):"",i=o.to>n.to?t.sliceDoc(n.to,o.to):"";s=t.replaceSelection(e.state.toText(r+n.insert.sliceString(0,void 0,e.state.lineBreak)+i))}else{let a=t.changes(n),l=i&&!t.selection.main.eq(i.main)&&i.main.to<=a.newLength?i.main:void 0;if(t.selection.ranges.length>1&&e.inputState.composing>=0&&n.to<=o.to&&n.to>=o.to-10){let i=e.state.sliceDoc(n.from,n.to),c=pt(e)||e.state.doc.lineAt(o.head),u=o.to-n.to,h=o.to-o.from;s=t.changeByRange((s=>{if(s.from==o.from&&s.to==o.to)return{changes:a,range:l||s.map(a)};let f=s.to-u,d=f-i.length;if(s.to-s.from!=h||e.state.sliceDoc(d,f)!=i||c&&s.to>=c.from&&s.from<=c.to)return{range:s};let p=t.changes({from:d,to:f,insert:n.insert}),m=s.to-o.to;return{changes:p,range:l?r.jT.range(Math.max(0,l.anchor+m),Math.max(0,l.head+m)):s.map(p)}}))}else s={changes:a,selection:l&&t.selection.replaceRange(l)}}let l="input.type";return e.composing&&(l+=".compose",e.inputState.compositionFirstChange&&(l+=".start",e.inputState.compositionFirstChange=!1)),e.dispatch(s,{scrollIntoView:!0,userEvent:l}),!0}if(i&&!i.main.eq(o)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:i,scrollIntoView:t,userEvent:n}),!0}return!1}const Fn={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Bn=J.ie&&J.ie_version<=11;class zn{constructor(e){this.view=e,this.active=!1,this.selectionRange=new C,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(J.ie&&J.ie_version<=11||J.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Bn&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(e.scrollDOM),this.resizeContent=new ResizeObserver((()=>this.view.requestMeasure())),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,n)=>t!=e[n])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Ie)?n.root.activeElement!=this.dom:!m(n.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(J.ie&&J.ie_version<=11||J.android&&J.chrome)&&!n.state.selection.main.empty&&r.focusNode&&y(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=J.safari&&11==e.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=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let r=t.startContainer,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return y(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this.view)||d(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=m(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(;;)if(r){if(1!=n.nodeType)return!1;let e=n.childNodes[r-1];"false"==e.contentEditable?r--:(n=e,r=w(n))}else{if(n==e)return!0;r=v(n),n=n.parentNode}}(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Fn),Bn&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Bn&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),!this.flush()&&e.force&&T(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}processRecords(){let e=this.queue;for(let t of this.observer.takeRecords())e.push(t);e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&m(this.dom,this.selectionRange);return e<0&&!r?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new Ln(this.view,e,t,n))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let n=this.view.state,r=jn(this.view,t);return this.view.state==n&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.dirty|=4),"childList"==e.type){let n=$n(t,e.previousSibling||e.target.previousSibling,-1),r=$n(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n,r;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function $n(e,t,n){for(;t;){let r=P.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}class Hn{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(e=>this.update([e])),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new wn(e.state||r.yy.create(e)),this.plugins=this.state.facet(je).map((e=>new Be(e)));for(let e of this.plugins)e.update(this);this.observer=new zn(this),this.inputState=new Tt(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new ft(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(1==e.length&&e[0]instanceof r.YW?e[0]:this.state.update(...e))}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,i=!1,o=this.state;for(let t of e){if(t.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=t.state}if(this.destroyed)return void(this.viewState.state=o);let s=this.hasFocus,a=0,l=null;e.some((e=>e.annotation(Xt)))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=Zt(o,s),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(r.yy.phrases)!=this.state.facet(r.yy.phrases))return this.setState(o);t=Ke.create(this,o,e),t.flags|=a;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(h&&(h=h.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;h=new De(e.empty?e:r.jT.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Pe)&&(h=e.value)}this.viewState.update(t,h),this.bidiCache=Wn.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(We)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(An)!=t.state.facet(An)&&(this.viewState.mustMeasureContent=!0),(n||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(Ee))e(t);(l||u)&&Promise.resolve().then((()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!jn(this,u)&&c.force&&T(this.contentDOM,c.key,c.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new wn(e),this.plugins=e.facet(je).map((e=>new Be(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new ft(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(je),n=e.state.facet(je);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new Be(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this)}measure(e=!0){if(this.destroyed)return;this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:n,scrollTop:r,clientHeight:i}=this.scrollDOM,o=r>n-i-4?n:r;try{for(let e=0;;e++){this.updateState=1;let n=this.viewport,r=this.viewState.lineBlockAtHeight(o),i=this.viewState.measure(this);if(!i&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&i||([this.measureRequests,s]=[s,this.measureRequests]);let a=s.map((e=>{try{return e.read(this)}catch(e){return Ne(this.state,e),Un}})),l=Ke.create(this,this.state,[]),c=!1,u=!1;l.flags|=i,t?t.flags|=i:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),c=this.docView.update(l));for(let e=0;e<s.length;e++)if(a[e]!=Un)try{let t=s[e];t.write&&t.write(a[e],this)}catch(e){Ne(this.state,e)}if(this.viewState.editorHeight)if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,u=!0;else{let e=this.viewState.lineBlockAt(r.from).top-r.top;(e>1||e<-1)&&(this.scrollDOM.scrollTop+=e,u=!0)}if(c&&this.docView.updateSelection(!0),this.viewport.from==n.from&&this.viewport.to==n.to&&!u&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Ee))e(t)}get themeClasses(){return _n+" "+(this.state.facet(Tn)?Dn:Rn)+" "+this.state.facet(An)}updateAttrs(){let e=qn(this,ze,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Ie)?"true":"false",class:"cm-content",style:`${J.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),qn(this,$e,t);let n=this.observer.ignore((()=>{let n=ce(this.contentDOM,this.contentAttrs,t),r=ce(this.dom,this.editorAttrs,e);return n||r}));return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)e.is(Hn.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(We),i.V.mount(this.root,this.styleModules.concat(In).reverse())}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find((t=>t.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return At(this,e,Et(this,e,t,n))}moveByGroup(e,t){return At(this,e,Et(this,e,t,(t=>function(e,t,n){let i=e.state.charCategorizer(t),o=i(n);return e=>{let t=i(e);return o==r.D0.Space&&(o=t),o==t}}(this,e.head,t))))}moveToLineBoundary(e,t,n=!0){return function(e,t,n,i){let o=e.state.doc.lineAt(t.head),s=i&&e.lineWrapping?e.coordsAtPos(t.assoc<0&&t.head>o.from?t.head-1:t.head):null;if(s){let t=e.dom.getBoundingClientRect(),i=e.textDirectionAt(o.from),a=e.posAtCoords({x:n==(i==Ge.LTR)?t.right-1:t.left+1,y:(s.top+s.bottom)/2});if(null!=a)return r.jT.cursor(a,n?-1:1)}let a=ve.find(e.docView,t.head),l=a?n?a.posAtEnd:a.posAtStart:n?o.to:o.from;return r.jT.cursor(l,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return At(this,e,function(e,t,n,i){let o=t.head,s=n?1:-1;if(o==(n?e.state.doc.length:0))return r.jT.cursor(o,t.assoc);let a,l=t.goalColumn,c=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(o),h=e.documentTop;if(u)null==l&&(l=u.left-c.left),a=s<0?u.top:u.bottom;else{let t=e.viewState.lineBlockAt(o);null==l&&(l=Math.min(c.right-c.left,e.defaultCharacterWidth*(o-t.from))),a=(s<0?t.top:t.bottom)+h}let f=c.left+l,d=null!=i?i:e.defaultLineHeight>>1;for(let n=0;;n+=10){let i=a+(d+n)*s,u=Ot(e,{x:f,y:i},!1,s);if(i<c.top||i>c.bottom||(s<0?u<o:u>o))return r.jT.cursor(u,t.assoc,void 0,l)}}(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Ot(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r);return S(n,i[rt.find(i,e-r.from,-1,t)].dir==Ge.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(_e)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Vn)return ot(e.length);let t=this.textDirectionAt(e.from);for(let n of this.bidiCache)if(n.from==e.from&&n.dir==t)return n.order;let n=function(e,t){let n=e.length,r=t==Je?1:2,i=t==Je?2:1;if(!e||1==r&&!nt.test(e))return ot(n);for(let t=0,i=r,s=r;t<n;t++){let n=(o=e.charCodeAt(t))<=247?Xe[o]:1424<=o&&o<=1524?2:1536<=o&&o<=1785?Ze[o-1536]:1774<=o&&o<=2220?4:8192<=o&&o<=8203?256:64336<=o&&o<=65023?4:8204==o?256:1;512==n?n=i:8==n&&4==s&&(n=16),it[t]=4==n?2:n,7&n&&(s=n),i=n}var o;for(let e=0,t=r,i=r;e<n;e++){let r=it[e];if(128==r)e<n-1&&t==it[e+1]&&24&t?r=it[e]=t:it[e]=256;else if(64==r){let r=e+1;for(;r<n&&64==it[r];)r++;let o=e&&8==t||r<n&&8==it[r]?1==i?1:8:256;for(let t=e;t<r;t++)it[t]=o;e=r-1}else 8==r&&1==i&&(it[e]=1);t=r,7&r&&(i=r)}for(let t,o,s,a=0,l=0,c=0;a<n;a++)if(o=et[t=e.charCodeAt(a)])if(o<0){for(let e=l-3;e>=0;e-=3)if(tt[e+1]==-o){let t=tt[e+2],n=2&t?r:4&t?1&t?i:r:0;n&&(it[a]=it[tt[e]]=n),l=e;break}}else{if(189==tt.length)break;tt[l++]=a,tt[l++]=t,tt[l++]=c}else if(2==(s=it[a])||1==s){let e=s==r;c=e?0:1;for(let t=l-3;t>=0;t-=3){let n=tt[t+2];if(2&n)break;if(e)tt[t+2]|=2;else{if(4&n)break;tt[t+2]|=4}}}for(let e=0;e<n;e++)if(256==it[e]){let t=e+1;for(;t<n&&256==it[t];)t++;let i=1==(e?it[e-1]:r),o=i==(1==(t<n?it[t]:r))?i?1:2:r;for(let n=e;n<t;n++)it[n]=o;e=t-1}let s=[];if(1==r)for(let e=0;e<n;){let t=e,r=1!=it[e++];for(;e<n&&r==(1!=it[e]);)e++;if(r)for(let n=e;n>t;){let e=n,r=2!=it[--n];for(;n>t&&r==(2!=it[n-1]);)n--;s.push(new rt(n,e,r?2:1))}else s.push(new rt(t,e,0))}else for(let e=0;e<n;){let t=e,r=2==it[e++];for(;e<n&&r==(2==it[e]);)e++;s.push(new rt(t,e,r?1:2))}return s}(e.text,t);return this.bidiCache.push(new Wn(e.from,e.to,t,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||J.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{E(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Pe.of(new De("number"==typeof e?r.jT.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return Fe.define((()=>({})),{eventHandlers:e})}static theme(e,t){let n=i.V.newName(),r=[An.of(n),We.of(Nn(`.${n}`,e))];return t&&t.dark&&r.push(Tn.of(!0)),r}static baseTheme(e){return r.Wl.lowest(We.of(Nn("."+_n,e,Pn)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&P.get(n)||P.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}Hn.styleModule=We,Hn.inputHandler=Ae,Hn.focusChangeEffect=Te,Hn.perLineTextDirection=_e,Hn.exceptionSink=Me,Hn.updateListener=Ee,Hn.editable=Ie,Hn.mouseSelectionStyle=Oe,Hn.dragMovesSelection=Ce,Hn.clickAddsSelectionRange=ke,Hn.decorations=He,Hn.atomicRanges=Ve,Hn.scrollMargins=Ue,Hn.darkTheme=Tn,Hn.contentAttributes=$e,Hn.editorAttributes=ze,Hn.lineWrapping=Hn.contentAttributes.of({class:"cm-lineWrapping"}),Hn.announce=r.Py.define();const Vn=4096,Un={};class Wn{constructor(e,t,n,r){this.from=e,this.to=t,this.dir=n,this.order=r}static update(e,t){if(t.empty)return e;let n=[],r=e.length?e[e.length-1].dir:Ge.LTR;for(let i=Math.max(0,e.length-10);i<e.length;i++){let o=e[i];o.dir!=r||t.touchesRange(o.from,o.to)||n.push(new Wn(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.order))}return n}}function qn(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&ae(o,n)}return n}const Kn=J.mac?"mac":J.windows?"win":J.linux?"linux":"key";function Gn(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const Jn=r.Wl.default(Hn.domEventHandlers({keydown:(e,t)=>nr(Xn(t.state),e,t,"editor")})),Qn=r.r$.define({enables:Jn}),Yn=new WeakMap;function Xn(e){let t=e.facet(Qn),n=Yn.get(t);return n||Yn.set(t,n=function(e,t=Kn){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,r,o,s)=>{var a,l;let c=n[e]||(n[e]=Object.create(null)),u=r.split(/ (?!$)/).map((e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e<n.length-1;++e){const a=n[e];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))o=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==t?s=!0:i=!0}}return r&&(a="Alt-"+a),i&&(a="Ctrl-"+a),s&&(a="Meta-"+a),o&&(a="Shift-"+a),a}(e,t)));for(let t=1;t<u.length;t++){let n=u.slice(0,t).join(" ");i(n,!0),c[n]||(c[n]={preventDefault:!0,run:[t=>{let r=er={view:t,prefix:n,scope:e};return setTimeout((()=>{er==r&&(er=null)}),tr),!0}]})}let h=u.join(" ");i(h,!1);let f=c[h]||(c[h]={preventDefault:!1,run:(null===(l=null===(a=c._any)||void 0===a?void 0:a.run)||void 0===l?void 0:l.slice())||[]});o&&f.run.push(o),s&&(f.preventDefault=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,run:[]});for(let t in e)e[t].run.push(r.any)}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault)}return n}(t.reduce(((e,t)=>e.concat(t)),[]))),n}function Zn(e,t,n){return nr(Xn(e.state),t,e,n)}let er=null;const tr=4e3;function nr(e,t,n,i){let a=function(e){var t=!(u&&(e.ctrlKey||e.altKey||e.metaKey)||c&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?s:o)[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}(t),l=(0,r.gm)(a,0),h=(0,r.nZ)(l)==a.length&&" "!=a,f="",d=!1;er&&er.view==n&&er.scope==i&&(f=er.prefix+" ",(d=Dt.indexOf(t.keyCode)<0)&&(er=null));let p,m,g=new Set,y=e=>{if(e){for(let r of e.run)if(!g.has(r)&&(g.add(r),r(n,t)))return!0;e.preventDefault&&(d=!0)}return!1},v=e[i];if(v){if(y(v[f+Gn(a,t,!h)]))return!0;if(h&&(t.altKey||t.metaKey||t.ctrlKey)&&!(J.windows&&t.ctrlKey&&t.altKey)&&(p=o[t.keyCode])&&p!=a){if(y(v[f+Gn(p,t,!0)]))return!0;if(t.shiftKey&&(m=s[t.keyCode])!=a&&m!=p&&y(v[f+Gn(m,t,!1)]))return!0}else if(h&&t.shiftKey&&y(v[f+Gn(a,t,!0)]))return!0;if(y(v._any))return!0}return d}class rr{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=ir(e);return[new rr(t,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),o=e.textDirection==Ge.LTR,s=e.contentDOM,a=s.getBoundingClientRect(),l=ir(e),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),h=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=a.right-(u?parseInt(u.paddingRight):0),d=sr(e,r),p=sr(e,i),m=d.type==he.Text?d:null,g=p.type==he.Text?p:null;if(e.lineWrapping&&(m&&(m=or(e,r,m)),g&&(g=or(e,i,g))),m&&g&&m.from==g.from)return v(b(n.from,n.to,m));{let t=m?b(n.from,null,m):w(d,!1),r=g?b(null,n.to,g):w(p,!0),i=[];return(m||d).to<(g||p).from-1?i.push(y(h,t.bottom,f,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==he.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),v(t).concat(i).concat(v(r))}function y(e,n,r,i){return new rr(t,e-l.left,n-l.top-.01,r-e,i-n+.01)}function v({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(y(n[i],e,n[i+1],t));return r}function b(t,n,r){let i=1e9,s=-1e9,a=[];function l(t,n,l,c,u){let d=e.coordsAtPos(t,t==r.to?-2:2),p=e.coordsAtPos(l,l==r.from?2:-2);i=Math.min(d.top,p.top,i),s=Math.max(d.bottom,p.bottom,s),u==Ge.LTR?a.push(o&&n?h:d.left,o&&c?f:p.right):a.push(!o&&c?h:p.left,!o&&n?f:d.right)}let c=null!=t?t:r.from,u=null!=n?n:r.to;for(let r of e.visibleRanges)if(r.to>c&&r.from<u)for(let i=Math.max(r.from,c),o=Math.min(r.to,u);;){let r=e.state.doc.lineAt(i);for(let s of e.bidiSpans(r)){let e=s.from+r.from,a=s.to+r.from;if(e>=o)break;a>i&&l(Math.max(e,i),null==t&&e<=c,Math.min(a,o),null==n&&a>=u,s.dir)}if(i=r.to+1,i>=o)break}return 0==a.length&&l(c,null==t,u,null==n,e.textDirection),{top:i,bottom:s,horizontal:a}}function w(e,t){let n=a.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}}function ir(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==Ge.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function or(e,t,n){let i=r.jT.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(i,!0,!0).from),type:he.Text}}function sr(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==he.Text))return e;return n}class ar{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(lr)!=e.state.facet(lr)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(lr);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}draw(e){if(e.length!=this.drawn.length||e.some(((e,t)=>{return n=e,r=this.drawn[t],!(n.constructor==r.constructor&&n.eq(r));var n,r}))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const lr=r.r$.define();function cr(e){return[Fe.define((t=>new ar(t,e))),lr.of(e)]}const ur=!J.ios,hr=r.r$.define({combine:e=>(0,r.BO)(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function fr(e={}){return[hr.of(e),pr,gr,vr,Re.of(!0)]}function dr(e){return e.startState.facet(hr)!=e.state.facet(hr)}const pr=cr({above:!0,markers(e){let{state:t}=e,n=t.facet(hr),i=[];for(let o of t.selection.ranges){let s=o==t.selection.main;if(o.empty?!s||ur:n.drawRangeCursor){let t=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=o.empty?o:r.jT.cursor(o.head,o.head>o.anchor?-1:1);for(let r of rr.forRange(e,t,n))i.push(r)}}return i},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=dr(e);return n&&mr(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){mr(t.state,e)},class:"cm-cursorLayer"});function mr(e,t){t.style.animationDuration=e.facet(hr).cursorBlinkRate+"ms"}const gr=cr({above:!1,markers:e=>e.state.selection.ranges.map((t=>t.empty?[]:rr.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t))),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||dr(e),class:"cm-selectionLayer"}),yr={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};ur&&(yr[".cm-line"].caretColor="transparent !important");const vr=r.Wl.highest(Hn.theme(yr)),br=r.Py.define({map:(e,t)=>null==e?null:t.mapPos(e)}),wr=r.QQ.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is(br)?t.value:e),e))}),xr=Fe.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(wr);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(wr)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let e=this.view.state.field(wr),t=null!=e&&this.view.coordsAtPos(e);if(!t)return null;let n=this.view.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+this.view.scrollDOM.scrollLeft,top:t.top-n.top+this.view.scrollDOM.scrollTop,height:t.bottom-t.top}}drawCursor(e){this.cursor&&(e?(this.cursor.style.left=e.left+"px",this.cursor.style.top=e.top+"px",this.cursor.style.height=e.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(wr)!=e&&this.view.dispatch({effects:br.of(e)})}},{eventHandlers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Sr(){return[wr,xr]}function kr(e,t,n,r,i){t.lastIndex=0;for(let o,s=e.iterRange(n,r),a=n;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=t.exec(s.value);)i(a+o.index,o)}class Cr{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,i)=>{let o=n(e,t,r);o&&i(r,r+e[0].length,o)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n)}this.boundary=i,this.maxLength=o}createDeco(e){let t=new r.f_,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),o=Math.min(e.state.doc.lineAt(o).to,o+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}(e,this.maxLength))kr(e.state.doc,this.regexp,t,r,((t,r)=>this.addMatch(r,e,t,n)));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges(((t,i,o,s)=>{s>e.view.viewport.from&&o<e.view.viewport.to&&(n=Math.min(o,n),r=Math.max(s,r))})),e.viewportChanged||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let o=Math.max(i.from,n),s=Math.min(i.to,r);if(s>o){let n=e.state.doc.lineAt(o),r=n.to<s?e.state.doc.lineAt(s):n,a=Math.max(i.from,n.from),l=Math.min(i.to,r.to);if(this.boundary){for(;o>n.from;o--)if(this.boundary.test(n.text[o-1-n.from])){a=o;break}for(;s<r.to;s++)if(this.boundary.test(r.text[s-r.from])){l=s;break}}let c,u=[],h=(e,t,n)=>u.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=a-n.from;(c=this.regexp.exec(n.text))&&c.index<l-n.from;)this.addMatch(c,e,c.index+n.from,h);else kr(e.state.doc,this.regexp,a,l,((t,n)=>this.addMatch(n,e,t,h)));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>e<a||t>l,add:u})}}return t}}const Or=null!=/x/.unicode?"gu":"g",Mr=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",Or),Er={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ar=null;const Tr=r.r$.define({combine(e){let t=(0,r.BO)(e,{render:null,specialChars:Mr,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==Ar&&"undefined"!=typeof document&&document.body){let t=document.body.style;Ar=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return Ar||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,Or)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,Or)),t}});function _r(e={}){return[Tr.of(e),Rr||(Rr=Fe.fromClass(class{constructor(e){this.view=e,this.decorations=fe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(Tr)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new Cr({regexp:e.specialChars,decoration:(t,n,i)=>{let{doc:o}=n.state,s=(0,r.gm)(t[0],0);if(9==s){let e=o.lineAt(i),t=n.state.tabSize,s=(0,r.IS)(e.text,t,i-e.from);return fe.replace({widget:new Pr((t-s%t)*this.view.defaultCharacterWidth)})}return this.decorationCache[s]||(this.decorationCache[s]=fe.replace({widget:new Dr(e,s)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(Tr);e.startState.facet(Tr)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}let Rr=null;class Dr extends ue{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"␤":String.fromCharCode(9216+e)}(this.code),n=e.state.phrase("Control character")+" "+(Er[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;let i=document.createElement("span");return i.textContent=t,i.title=n,i.setAttribute("aria-label",n),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class Pr extends ue{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Nr(){return Lr}const Ir=fe.line({class:"cm-activeLine"}),Lr=Fe.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(Ir.range(i.from)),t=i.from)}return fe.set(n)}},{decorations:e=>e.decorations});class jr extends ue{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}ignoreEvent(){return!1}}function Fr(e){return Fe.fromClass(class{constructor(t){this.view=t,this.placeholder=fe.set([fe.widget({widget:new jr(e),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?fe.none:this.placeholder}},{decorations:e=>e.decorations})}const Br=2e3;function zr(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),i=e.state.doc.lineAt(n),o=n-i.from,s=o>Br?-1:o==i.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):(0,r.IS)(i.text,e.state.tabSize,n-i.from);return{line:i.number,col:s,off:o}}function $r(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return Hn.mouseSelectionStyle.of(((e,n)=>t(n)?function(e,t){let n=zr(e,t),i=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),r=e.state.doc.lineAt(t);n={line:r.number,col:n.col,off:Math.min(n.off,r.length)},i=i.map(e.changes)}},get(t,o,s){let a=zr(e,t);if(!a)return i;let l=function(e,t,n){let i=Math.min(t.line,n.line),o=Math.max(t.line,n.line),s=[];if(t.off>Br||n.off>Br||t.col<0||n.col<0){let a=Math.min(t.off,n.off),l=Math.max(t.off,n.off);for(let t=i;t<=o;t++){let n=e.doc.line(t);n.length<=l&&s.push(r.jT.range(n.from+a,n.to+l))}}else{let a=Math.min(t.col,n.col),l=Math.max(t.col,n.col);for(let t=i;t<=o;t++){let n=e.doc.line(t),i=(0,r.Gz)(n.text,a,e.tabSize,!0);if(i<0)s.push(r.jT.cursor(n.to));else{let t=(0,r.Gz)(n.text,l,e.tabSize);s.push(r.jT.range(n.from+i,n.from+t))}}}return s}(e.state,n,a);return l.length?s?r.jT.create(l.concat(i.ranges)):r.jT.create(l):i}}:null}(e,n):null))}const Hr={Alt:[18,e=>e.altKey],Control:[17,e=>e.ctrlKey],Shift:[16,e=>e.shiftKey],Meta:[91,e=>e.metaKey]},Vr={style:"cursor: crosshair"};function Ur(e={}){let[t,n]=Hr[e.key||"Alt"],r=Fe.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventHandlers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,Hn.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?Vr:null}))]}const Wr="-10000px";class qr{constructor(e,t,n){this.facet=t,this.createTooltipView=n,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e)),this.tooltipViews=this.tooltips.map(n)}update(e){var t;let n=e.state.facet(this.facet),r=n.filter((e=>e));if(n===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[];for(let t=0;t<r.length;t++){let n=r[t],o=-1;if(n){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==n.create&&(o=e)}if(o<0)i[t]=this.createTooltipView(n);else{let n=i[t]=this.tooltipViews[o];n.update&&n.update(e)}}}for(let e of this.tooltipViews)i.indexOf(e)<0&&(e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e));return this.input=n,this.tooltips=r,this.tooltipViews=i,!0}}function Kr(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const Gr=r.r$.define({combine:e=>{var t,n,r;return{position:J.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find((e=>e.parent)))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find((e=>e.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||Kr}}}),Jr=new WeakMap,Qr=Fe.fromClass(class{constructor(e){this.view=e,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(Gr);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new qr(e,Zr,(e=>this.createTooltip(e))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(Gr);if(r.position!=this.position){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e){let t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",t.dom.appendChild(e)}return t.dom.style.position=this.position,t.dom.style.top=Wr,this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(Gr).tooltipSpace(this.view)}}writeMeasure(e){var t;let{editor:n,space:r}=e,i=[];for(let o=0;o<this.manager.tooltips.length;o++){let s=this.manager.tooltips[o],a=this.manager.tooltipViews[o],{dom:l}=a,c=e.pos[o],u=e.size[o];if(!c||c.bottom<=Math.max(n.top,r.top)||c.top>=Math.min(n.bottom,r.bottom)||c.right<Math.max(n.left,r.left)-.1||c.left>Math.min(n.right,r.right)+.1){l.style.top=Wr;continue}let h=s.arrow?a.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,d=u.right-u.left,p=null!==(t=Jr.get(a))&&void 0!==t?t:u.bottom-u.top,m=a.offset||Xr,g=this.view.textDirection==Ge.LTR,y=u.width>r.right-r.left?g?r.left:r.right-u.width:g?Math.min(c.left-(h?14:0)+m.x,r.right-d):Math.max(r.left,c.left-d+(h?14:0)-m.x),v=!!s.above;!s.strictSide&&(v?c.top-(u.bottom-u.top)-m.y<r.top:c.bottom+(u.bottom-u.top)+m.y>r.bottom)&&v==r.bottom-c.bottom>c.top-r.top&&(v=!v);let b=(v?c.top-r.top:r.bottom-c.bottom)-f;if(b<p&&!1!==a.resize){if(b<this.view.defaultLineHeight){l.style.top=Wr;continue}Jr.set(a,p),l.style.height=(p=b)+"px"}else l.style.height&&(l.style.height="");let w=v?c.top-p-f-m.y:c.bottom+f+m.y,x=y+d;if(!0!==a.overlap)for(let e of i)e.left<x&&e.right>y&&e.top<w+p&&e.bottom>w&&(w=v?e.top-p-2-f:e.bottom+f+2);"absolute"==this.position?(l.style.top=w-e.parent.top+"px",l.style.left=y-e.parent.left+"px"):(l.style.top=w+"px",l.style.left=y+"px"),h&&(h.style.left=c.left+(g?m.x:-m.x)-(y+14-7)+"px"),!0!==a.overlap&&i.push({left:y,top:w,right:x,bottom:w+p}),l.classList.toggle("cm-tooltip-above",v),l.classList.toggle("cm-tooltip-below",!v),a.positioned&&a.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=Wr}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Yr=Hn.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Xr={x:0,y:0},Zr=r.r$.define({enables:[Qr,Yr]}),ei=r.r$.define();class ti{constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new qr(e,ei,(e=>this.createHostedView(e)))}static create(e){return new ti(e)}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}}const ni=Zr.compute([ei],(e=>{let t=e.facet(ei).filter((e=>e));return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.filter((e=>null!=e.end)).map((e=>e.end))),create:ti.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class ri{constructor(e,t,n,r,i){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{lastMove:e}=this,t=this.view.contentDOM.contains(e.target)?this.view.posAtCoords(e):null;if(null==t)return;let n=this.view.coordsAtPos(t);if(null==n||e.y<n.top||e.y>n.bottom||e.x<n.left-this.view.defaultCharacterWidth||e.x>n.right+this.view.defaultCharacterWidth)return;let r=this.view.bidiSpans(this.view.state.doc.lineAt(t)).find((e=>e.from<=t&&e.to>=t)),i=r&&r.dir==Ge.RTL?-1:1,o=this.source(this.view,t,e.x<n.left?-i:i);if(null==o?void 0:o.then){let e=this.pending={pos:t};o.then((t=>{this.pending==e&&(this.pending=null,t&&this.view.dispatch({effects:this.setHover.of(t)}))}),(e=>Ne(this.view.state,e,"hover tooltip")))}else o&&this.view.dispatch({effects:this.setHover.of(o)})}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let n=this.active;if(n&&!ii(this.lastMove.target)||this.pending){let{pos:r}=n||this.pending,i=null!==(t=null==n?void 0:n.end)&&void 0!==t?t:r;(r==i?this.view.posAtCoords(this.lastMove)==r:function(e,t,n,r,i,o){let s=document.createRange(),a=e.domAtPos(t),l=e.domAtPos(n);s.setEnd(l.node,l.offset),s.setStart(a.node,a.offset);let c=s.getClientRects();s.detach();for(let e=0;e<c.length;e++){let t=c[e];if(Math.max(t.top-i,i-t.bottom,t.left-r,r-t.right)<=6)return!0}return!1}(this.view,r,i,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!ii(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function ii(e){for(let t=e;t;t=t.parentNode)if(1==t.nodeType&&t.classList.contains("cm-tooltip"))return!0;return!1}function oi(e,t={}){let n=r.Py.define(),i=r.QQ.define({create:()=>null,update(e,i){if(e&&(t.hideOnChange&&(i.docChanged||i.selection)||t.hideOn&&t.hideOn(i,e)))return null;if(e&&i.docChanged){let t=i.changes.mapPos(e.pos,-1,r.gc.TrackDel);if(null==t)return null;let n=Object.assign(Object.create(null),e);n.pos=t,null!=e.end&&(n.end=i.changes.mapPos(e.end)),e=n}for(let t of i.effects)t.is(n)&&(e=t.value),t.is(ai)&&(e=null);return e},provide:e=>ei.from(e)});return[i,Fe.define((r=>new ri(r,e,i,n,t.hoverTime||300))),ni]}function si(e,t){let n=e.plugin(Qr);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const ai=r.Py.define(),li=r.r$.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function ci(e,t){let n=e.plugin(ui),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const ui=Fe.fromClass(class{constructor(e){this.input=e.state.facet(di),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(li);this.top=new hi(e,!0,t.topContainer),this.bottom=new hi(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(li);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new hi(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new hi(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(di);if(n!=this.input){let t=n.filter((e=>e)),r=[],i=[],o=[],s=[];for(let n of t){let t,a=this.specs.indexOf(n);a<0?(t=n(e.view),s.push(t)):(t=this.panels[a],t.update&&t.update(e)),r.push(t),(t.top?i:o).push(t)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(o);for(let e of s)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>Hn.scrollMargins.of((t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class hi{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=fi(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=fi(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function fi(e){let t=e.nextSibling;return e.remove(),t}const di=r.r$.define({enables:ui});class pi extends r.uU{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}pi.prototype.elementClass="",pi.prototype.toDOM=void 0,pi.prototype.mapMode=r.gc.TrackBefore,pi.prototype.startSide=pi.prototype.endSide=-1,pi.prototype.point=!0;const mi=r.r$.define(),gi={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>r.Xs.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},yi=r.r$.define();function vi(e){return[wi(),yi.of(Object.assign(Object.assign({},gi),e))]}const bi=r.r$.define({combine:e=>e.some((e=>e))});function wi(e){let t=[xi];return e&&!1===e.fixed&&t.push(bi.of(!0)),t}const xi=Fe.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=e.state.facet(yi).map((t=>new Oi(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(bi),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(bi)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let n=r.Xs.iter(this.view.state.facet(mi),this.view.viewport.from),i=[],o=this.gutters.map((e=>new Ci(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks){let t;if(Array.isArray(e.type)){for(let n of e.type)if(n.type==he.Text){t=n;break}}else t=e.type==he.Text?e:void 0;if(t){i.length&&(i=[]),ki(n,i,e.from);for(let e of o)e.line(this.view,t,i)}}for(let e of o)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(yi),n=e.state.facet(yi),i=e.docChanged||e.heightChanged||e.viewportChanged||!r.Xs.eq(e.startState.facet(mi),e.state.facet(mi),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(i=!0);else{i=!0;let r=[];for(let i of n){let n=t.indexOf(i);n<0?r.push(new Oi(this.view,i)):(this.gutters[n].update(e),r.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),r.indexOf(e)<0&&e.destroy();for(let e of r)this.dom.appendChild(e.dom);this.gutters=r}return i}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>Hn.scrollMargins.of((t=>{let n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==Ge.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}:null}))});function Si(e){return Array.isArray(e)?e:[e]}function ki(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class Ci{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=r.Xs.iter(e.markers,t.from)}line(e,t,n){let r=[];ki(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let o=this.gutter;if(0==r.length&&!o.config.renderEmptyElements)return;let s=t.top-this.height;if(this.i==o.elements.length){let n=new Mi(e,t.height,s,r);o.elements.push(n),o.dom.appendChild(n.dom)}else o.elements[this.i].update(e,t.height,s,r);this.height=t.bottom,this.i++}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Oi{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,(r=>{let i,o=r.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let e=o.getBoundingClientRect();i=(e.top+e.bottom)/2}else i=r.clientY;let s=e.lineBlockAtHeight(i-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()}));this.markers=Si(t.markers(e)),t.initialSpacer&&(this.spacer=new Mi(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Si(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!r.Xs.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class Mi{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.dom.style.height=(this.height=t)+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,o=0;;){let s=o,a=i<t.length?t[i++]:null,l=!1;if(a){let e=a.elementClass;e&&(n+=" "+e);for(let e=o;e<this.markers.length;e++)if(this.markers[e].compare(a)){s=e,l=!0;break}}else s=this.markers.length;for(;o<s;){let e=this.markers[o++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!a)break;a.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(a.toDOM(e),r)),l&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}const Ei=r.r$.define(),Ai=r.r$.define({combine:e=>(0,r.BO)(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})});class Ti extends pi{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function _i(e,t){return e.state.facet(Ai).formatNumber(t,e.state)}const Ri=yi.compute([Ai],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(Ei),lineMarker:(e,t,n)=>n.some((e=>e.toDOM))?null:new Ti(_i(e,e.state.doc.lineAt(t.from).number)),lineMarkerChange:e=>e.startState.facet(Ai)!=e.state.facet(Ai),initialSpacer:e=>new Ti(_i(e,Pi(e.state.doc.lines))),updateSpacer(e,t){let n=_i(t.view,Pi(t.view.state.doc.lines));return n==e.number?e:new Ti(n)},domEventHandlers:e.facet(Ai).domEventHandlers})));function Di(e={}){return[Ai.of(e),wi(),Ri]}function Pi(e){let t=9;for(;t<e;)t=10*t+9;return t}const Ni=new class extends pi{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Ii=mi.compute(["selection"],(e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(Ni.range(i)))}return r.Xs.of(t)}));function Li(){return Ii}},5761:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});var r=n(3989),i=n(2161);class o extends r.l{constructor(){super(),this.setup=e=>{if(!i.sk&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach((e=>{e()}))}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}}const s=new o},9499:(e,t,n)=>{"use strict";function r(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,s,a,l;const c=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,u=null==(r=e.fetchOptions)||null==(s=r.meta)?void 0:s.fetchMore,h=null==u?void 0:u.pageParam,f="forward"===(null==u?void 0:u.direction),d="backward"===(null==u?void 0:u.direction),p=(null==(a=e.state.data)?void 0:a.pages)||[],m=(null==(l=e.state.data)?void 0:l.pageParams)||[];let g=m,y=!1;const v=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),b=(e,t,n,r)=>(g=r?[t,...g]:[...g,t],r?[n,...e]:[...e,n]),w=(t,n,r,i)=>{if(y)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);const o={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};var s;s=o,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>{var t,n;return null!=(t=e.signal)&&t.aborted?y=!0:null==(n=e.signal)||n.addEventListener("abort",(()=>{y=!0})),e.signal}});const a=v(o);return Promise.resolve(a).then((e=>b(t,r,e,i)))};let x;if(p.length)if(f){const t=void 0!==h,n=t?h:i(e.options,p);x=w(p,t,n)}else if(d){const t=void 0!==h,n=t?h:o(e.options,p);x=w(p,t,n,!0)}else{g=[];const t=void 0===e.options.getNextPageParam;x=c&&p[0]&&!c(p[0],0,p)?Promise.resolve(b([],m[0],p[0])):w([],t,m[0]);for(let n=1;n<p.length;n++)x=x.then((r=>{if(!c||!p[n]||c(p[n],n,p)){const o=t?m[n]:i(e.options,r);return w(r,t,o)}return Promise.resolve(b(r,m[n],p[n]))}))}else x=w([]);return x.then((e=>({pages:e,pageParams:g})))}}}}function i(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function o(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}function s(e,t){if(e.getNextPageParam&&Array.isArray(t)){const n=i(e,t);return null!=n&&!1!==n}}function a(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){const n=o(e,t);return null!=n&&!1!==n}}n.d(t,{Gm:()=>r,Qy:()=>s,ZF:()=>a})},819:(e,t,n)=>{"use strict";n.d(t,{_:()=>r});const r=console},9886:(e,t,n)=>{"use strict";n.d(t,{R:()=>l,m:()=>a});var r=n(819),i=n(81),o=n(9643),s=n(2379);class a extends o.F{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||r._,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter((t=>t!==e)),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){const e=()=>{var e;return this.retryer=(0,s.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t="loading"===this.state.status;try{var n,r,i,o,a,l,c,u;if(!t){var h,f,d,p;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(h=(f=this.mutationCache.config).onMutate)?void 0:h.call(f,this.state.variables,this));const e=await(null==(d=(p=this.options).onMutate)?void 0:d.call(p,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}const s=await e();return await(null==(n=(r=this.mutationCache.config).onSuccess)?void 0:n.call(r,s,this.state.variables,this.state.context,this)),await(null==(i=(o=this.options).onSuccess)?void 0:i.call(o,s,this.state.variables,this.state.context)),await(null==(a=(l=this.mutationCache.config).onSettled)?void 0:a.call(l,s,null,this.state.variables,this.state.context,this)),await(null==(c=(u=this.options).onSettled)?void 0:c.call(u,s,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:s}),s}catch(e){try{var m,g,y,v,b,w,x,S;throw await(null==(m=(g=this.mutationCache.config).onError)?void 0:m.call(g,e,this.state.variables,this.state.context,this)),await(null==(y=(v=this.options).onError)?void 0:y.call(v,e,this.state.variables,this.state.context)),await(null==(b=(w=this.mutationCache.config).onSettled)?void 0:b.call(w,void 0,e,this.state.variables,this.state.context,this)),await(null==(x=(S=this.options).onSettled)?void 0:x.call(S,void 0,e,this.state.variables,this.state.context)),e}finally{this.dispatch({type:"error",error:e})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!(0,s.Kw)(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),i.V.batch((()=>{this.observers.forEach((t=>{t.onMutationUpdate(e)})),this.mutationCache.notify({mutation:this,type:"updated",action:e})}))}}function l(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}},81:(e,t,n)=>{"use strict";n.d(t,{V:()=>i});var r=n(2161);const i=function(){let e=[],t=0,n=e=>{e()},i=e=>{e()};const o=i=>{t?e.push(i):(0,r.A4)((()=>{n(i)}))};return{batch:o=>{let s;t++;try{s=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&(0,r.A4)((()=>{i((()=>{t.forEach((e=>{n(e)}))}))}))})()}return s},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{i=e}}}()},6474:(e,t,n)=>{"use strict";n.d(t,{N:()=>s});var r=n(3989),i=n(2161);class o extends r.l{constructor(){super(),this.setup=e=>{if(!i.sk&&window.addEventListener){const t=()=>e();return window.addEventListener("online",t,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()}))}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach((e=>{e()}))}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}}const s=new o},948:(e,t,n)=>{"use strict";n.d(t,{S:()=>g});var r=n(2161),i=n(819),o=n(81),s=n(2379),a=n(9643);class l extends a.F{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||i._,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){const n=(0,r.oE)(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(r.ZT).catch(r.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some((e=>!1!==e.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((e=>e.getCurrentResult().isStale))}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,r.Kp)(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,i;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return null==(o=this.retryer)||o.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}Array.isArray(this.options.queryKey);const a=(0,r.G9)(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};c(l);const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn")};var h;c(u),null==(n=this.options.behavior)||n.onFetch(u),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(i=u.fetchOptions)?void 0:i.meta))&&this.dispatch({type:"fetch",meta:null==(h=u.fetchOptions)?void 0:h.meta});const f=e=>{var t,n,r,i;(0,s.DV)(e)&&e.silent||this.dispatch({type:"error",error:e}),(0,s.DV)(e)||(null==(t=(n=this.cache.config).onError)||t.call(n,e,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=(0,s.Mz)({fn:u.fetchFn,abort:null==a?void 0:a.abort.bind(a),onSuccess:e=>{var t,n,r,i;void 0!==e?(this.setData(e),null==(t=(n=this.cache.config).onSuccess)||t.call(n,e,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):f(new Error("undefined"))},onError:f,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=e.meta)?n:null,fetchStatus:(0,s.Kw)(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(r=e.dataUpdatedAt)?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return(0,s.DV)(i)&&i.revert&&this.revertState?{...this.revertState}:{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),o.V.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate(e)})),this.cache.notify({query:this,type:"updated",action:e})}))}}var c=n(3989);class u extends c.l{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var i;const o=t.queryKey,s=null!=(i=t.queryHash)?i:(0,r.Rm)(o,t);let a=this.get(s);return a||(a=new l({cache:this,logger:e.getLogger(),queryKey:o,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((t=>t!==e)),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){o.V.batch((()=>{this.queries.forEach((e=>{this.remove(e)}))}))}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=(0,r.I6)(e,t);return void 0===n.exact&&(n.exact=!0),this.queries.find((e=>(0,r._x)(n,e)))}findAll(e,t){const[n]=(0,r.I6)(e,t);return Object.keys(n).length>0?this.queries.filter((e=>(0,r._x)(n,e))):this.queries}notify(e){o.V.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){o.V.batch((()=>{this.queries.forEach((e=>{e.onFocus()}))}))}onOnline(){o.V.batch((()=>{this.queries.forEach((e=>{e.onOnline()}))}))}}var h=n(9886);class f extends c.l{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const r=new h.m({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter((t=>t!==e)),this.notify({type:"removed",mutation:e})}clear(){o.V.batch((()=>{this.mutations.forEach((e=>{this.remove(e)}))}))}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((t=>(0,r.X7)(e,t)))}findAll(e){return this.mutations.filter((t=>(0,r.X7)(e,t)))}notify(e){o.V.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then((()=>{const e=this.mutations.filter((e=>e.state.isPaused));return o.V.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(r.ZT)))),Promise.resolve())))})).then((()=>{this.resuming=void 0})),this.resuming}}var d=n(5761),p=n(6474),m=n(9499);class g{constructor(e={}){this.queryCache=e.queryCache||new u,this.mutationCache=e.mutationCache||new f,this.logger=e.logger||i._,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=d.j.subscribe((()=>{d.j.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=p.N.subscribe((()=>{p.N.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=(0,r.I6)(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const i=(0,r._v)(e,t,n),o=this.getQueryData(i.queryKey);return o?Promise.resolve(o):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const i=this.queryCache.find(e),o=null==i?void 0:i.state.data,s=(0,r.SE)(t,o);if(void 0===s)return;const a=(0,r._v)(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return o.V.batch((()=>this.getQueryCache().findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=(0,r.I6)(e,t),i=this.queryCache;o.V.batch((()=>{i.findAll(n).forEach((e=>{i.remove(e)}))}))}resetQueries(e,t,n){const[i,s]=(0,r.I6)(e,t,n),a=this.queryCache,l={type:"active",...i};return o.V.batch((()=>(a.findAll(i).forEach((e=>{e.reset()})),this.refetchQueries(l,s))))}cancelQueries(e,t,n){const[i,s={}]=(0,r.I6)(e,t,n);void 0===s.revert&&(s.revert=!0);const a=o.V.batch((()=>this.queryCache.findAll(i).map((e=>e.cancel(s)))));return Promise.all(a).then(r.ZT).catch(r.ZT)}invalidateQueries(e,t,n){const[i,s]=(0,r.I6)(e,t,n);return o.V.batch((()=>{var e,t;if(this.queryCache.findAll(i).forEach((e=>{e.invalidate()})),"none"===i.refetchType)return Promise.resolve();const n={...i,type:null!=(e=null!=(t=i.refetchType)?t:i.type)?e:"active"};return this.refetchQueries(n,s)}))}refetchQueries(e,t,n){const[i,s]=(0,r.I6)(e,t,n),a=o.V.batch((()=>this.queryCache.findAll(i).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...s,cancelRefetch:null==(t=null==s?void 0:s.cancelRefetch)||t,meta:{refetchPage:i.refetchPage}})}))));let l=Promise.all(a).then(r.ZT);return null!=s&&s.throwOnError||(l=l.catch(r.ZT)),l}fetchQuery(e,t,n){const i=(0,r._v)(e,t,n),o=this.defaultQueryOptions(i);void 0===o.retry&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(r.ZT).catch(r.ZT)}fetchInfiniteQuery(e,t,n){const i=(0,r._v)(e,t,n);return i.behavior=(0,m.Gm)(),this.fetchQuery(i)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(r.ZT).catch(r.ZT)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find((t=>(0,r.yF)(e)===(0,r.yF)(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>(0,r.to)(e,t.queryKey)));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find((t=>(0,r.yF)(e)===(0,r.yF)(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>(0,r.to)(e,t.mutationKey)));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=(0,r.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}},2924:(e,t,n)=>{"use strict";n.d(t,{z:()=>l});var r=n(2161),i=n(81),o=n(5761),s=n(3989),a=n(2379);class l extends s.l{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.length&&(this.currentQuery.addObserver(this),c(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return u(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return u(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),(0,r.VS)(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const o=this.hasListeners();o&&h(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===i&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();const s=this.computeRefetchInterval();!o||this.currentQuery===i&&this.options.enabled===n.enabled&&s===this.currentRefetchInterval||this.updateRefetchInterval(s)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e);return this.createResult(t,e)}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach((n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})})),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then((()=>(this.updateResult(),this.currentResult)))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(r.ZT)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),r.sk||this.currentResult.isStale||!(0,r.PN)(this.options.staleTime))return;const e=(0,r.Kp)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((()=>{this.currentResult.isStale||this.updateResult()}),e)}computeRefetchInterval(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!r.sk&&!1!==this.options.enabled&&(0,r.PN)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((()=>{(this.options.refetchIntervalInBackground||o.j.isFocused())&&this.executeFetch()}),this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const n=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,u=e!==n,d=u?e.state:this.currentQueryInitialState,p=u?this.currentResult:this.previousQueryResult,{state:m}=e;let g,{dataUpdatedAt:y,error:v,errorUpdatedAt:b,fetchStatus:w,status:x}=m,S=!1,k=!1;if(t._optimisticResults){const r=this.hasListeners(),o=!r&&c(e,t),s=r&&h(e,n,t,i);(o||s)&&(w=(0,a.Kw)(e.options.networkMode)?"fetching":"paused",y||(x="loading")),"isRestoring"===t._optimisticResults&&(w="idle")}if(t.keepPreviousData&&!m.dataUpdatedAt&&null!=p&&p.isSuccess&&"error"!==x)g=p.data,y=p.dataUpdatedAt,x=p.status,S=!0;else if(t.select&&void 0!==m.data)if(o&&m.data===(null==s?void 0:s.data)&&t.select===this.selectFn)g=this.selectResult;else try{this.selectFn=t.select,g=t.select(m.data),g=(0,r.oE)(null==o?void 0:o.data,g,t),this.selectResult=g,this.selectError=null}catch(e){this.selectError=e}else g=m.data;if(void 0!==t.placeholderData&&void 0===g&&"loading"===x){let e;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==l?void 0:l.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.selectError=null}catch(e){this.selectError=e}void 0!==e&&(x="success",g=(0,r.oE)(null==o?void 0:o.data,e,t),k=!0)}this.selectError&&(v=this.selectError,g=this.selectResult,b=Date.now(),x="error");const C="fetching"===w,O="loading"===x,M="error"===x;return{status:x,fetchStatus:w,isLoading:O,isSuccess:"success"===x,isError:M,isInitialLoading:O&&C,data:g,dataUpdatedAt:y,error:v,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:C,isRefetching:C&&!O,isLoadingError:M&&0===m.dataUpdatedAt,isPaused:"paused"===w,isPlaceholderData:k,isPreviousData:S,isRefetchError:M&&0!==m.dataUpdatedAt,isStale:f(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,(0,r.VS)(n,t))return;this.currentResult=n;const i={cache:!0};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options;if("all"===e||!e&&!this.trackedProps.size)return!0;const n=new Set(null!=e?e:this.trackedProps);return this.options.useErrorBoundary&&n.add("error"),Object.keys(this.currentResult).some((e=>{const r=e;return this.currentResult[r]!==t[r]&&n.has(r)}))})()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||(0,a.DV)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){i.V.batch((()=>{var t,n,r,i;if(e.onSuccess)null==(t=(n=this.options).onSuccess)||t.call(n,this.currentResult.data),null==(r=(i=this.options).onSettled)||r.call(i,this.currentResult.data,null);else if(e.onError){var o,s,a,l;null==(o=(s=this.options).onError)||o.call(s,this.currentResult.error),null==(a=(l=this.options).onSettled)||a.call(l,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach((e=>{e(this.currentResult)})),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})}))}}function c(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&u(e,t,t.refetchOnMount)}function u(e,t,n){if(!1!==t.enabled){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&f(e,t)}return!1}function h(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&f(e,n)}function f(e,t){return e.isStaleByTime(t.staleTime)}},9643:(e,t,n)=>{"use strict";n.d(t,{F:()=>i});var r=n(2161);class i{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,r.PN)(this.cacheTime)&&(this.gcTimeout=setTimeout((()=>{this.optionalRemove()}),this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:r.sk?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}},2379:(e,t,n)=>{"use strict";n.d(t,{DV:()=>c,Kw:()=>a,Mz:()=>u});var r=n(5761),i=n(6474),o=n(2161);function s(e){return Math.min(1e3*2**e,3e4)}function a(e){return"online"!==(null!=e?e:"online")||i.N.isOnline()}class l{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function c(e){return e instanceof l}function u(e){let t,n,c,u=!1,h=0,f=!1;const d=new Promise(((e,t)=>{n=e,c=t})),p=()=>!r.j.isFocused()||"always"!==e.networkMode&&!i.N.isOnline(),m=r=>{f||(f=!0,null==e.onSuccess||e.onSuccess(r),null==t||t(),n(r))},g=n=>{f||(f=!0,null==e.onError||e.onError(n),null==t||t(),c(n))},y=()=>new Promise((n=>{t=e=>{const t=f||!p();return t&&n(e),t},null==e.onPause||e.onPause()})).then((()=>{t=void 0,f||null==e.onContinue||e.onContinue()})),v=()=>{if(f)return;let t;try{t=e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch((t=>{var n,r;if(f)return;const i=null!=(n=e.retry)?n:3,a=null!=(r=e.retryDelay)?r:s,l="function"==typeof a?a(h,t):a,c=!0===i||"number"==typeof i&&h<i||"function"==typeof i&&i(h,t);!u&&c?(h++,null==e.onFail||e.onFail(h,t),(0,o.Gh)(l).then((()=>{if(p())return y()})).then((()=>{u?g(t):v()}))):g(t)}))};return a(e.networkMode)?v():y().then(v),{promise:d,cancel:t=>{f||(g(new l(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?d:Promise.resolve(),cancelRetry:()=>{u=!0},continueRetry:()=>{u=!1}}}},3989:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});class r{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter((t=>t!==e)),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}},2161:(e,t,n)=>{"use strict";n.d(t,{A4:()=>C,G9:()=>O,Gh:()=>k,I6:()=>u,Kp:()=>a,PN:()=>s,Rm:()=>d,SE:()=>o,VS:()=>v,X7:()=>f,ZT:()=>i,_v:()=>l,_x:()=>h,lV:()=>c,oE:()=>M,sk:()=>r,to:()=>m,yF:()=>p});const r="undefined"==typeof window||"Deno"in window;function i(){}function o(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function a(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t,n){return S(e)?"function"==typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function c(e,t,n){return S(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}function u(e,t,n){return S(e)?[{...t,queryKey:e},n]:[e||{},t]}function h(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(S(s))if(r){if(t.queryHash!==d(s,t.options))return!1}else if(!m(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return!("boolean"==typeof a&&t.isStale()!==a||void 0!==i&&i!==t.state.fetchStatus||o&&!o(t))}function f(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(S(o)){if(!t.options.mutationKey)return!1;if(n){if(p(t.options.mutationKey)!==p(o))return!1}else if(!m(t.options.mutationKey,o))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||i&&!i(t))}function d(e,t){return((null==t?void 0:t.queryKeyHashFn)||p)(e)}function p(e){return JSON.stringify(e,((e,t)=>w(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function m(e,t){return g(e,t)}function g(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!g(e[n],t[n])))}function y(e,t){if(e===t)return e;const n=b(e)&&b(t);if(n||w(e)&&w(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let r=0;r<o;r++){const o=n?r:i[r];s[o]=y(e[o],t[o]),s[o]===e[o]&&a++}return r===o&&a===r?e:s}return t}function v(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w(e){if(!x(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!x(n)&&!!n.hasOwnProperty("isPrototypeOf")}function x(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return Array.isArray(e)}function k(e){return new Promise((t=>{setTimeout(t,e)}))}function C(e){k(0).then(e)}function O(){if("function"==typeof AbortController)return new AbortController}function M(e,t,n){return null!=n.isDataEqual&&n.isDataEqual(e,t)?e:"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?y(e,t):t}},5945:(e,t,n)=>{"use strict";n.d(t,{NL:()=>a,aH:()=>l});var r=n(7294);const i=r.createContext(void 0),o=r.createContext(!1);function s(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=i),window.ReactQueryClientContext):i)}const a=({context:e}={})=>{const t=r.useContext(s(e,r.useContext(o)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},l=({client:e,children:t,context:n,contextSharing:i=!1})=>{r.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]);const a=s(n,i);return r.createElement(o.Provider,{value:!n&&i},r.createElement(a.Provider,{value:e},t))}},5079:(e,t,n)=>{"use strict";n.d(t,{r:()=>v});var r=n(7294),i=n(464),o=n(81);const s=r.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),a=()=>r.useContext(s);var l=n(5945);const c=r.createContext(!1),u=()=>r.useContext(c);c.Provider;var h=n(4798);const f=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},d=e=>{r.useEffect((()=>{e.clearReset()}),[e])},p=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&(0,h.L)(n,[e.error,r]),m=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},g=(e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n),y=(e,t,n)=>t.fetchOptimistic(e).then((({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)})).catch((t=>{n.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)}));function v(e,t){const n=(0,l.NL)({context:e.context}),s=u(),c=a(),h=n.defaultQueryOptions(e);h._optimisticResults=s?"isRestoring":"optimistic",h.onError&&(h.onError=o.V.batchCalls(h.onError)),h.onSuccess&&(h.onSuccess=o.V.batchCalls(h.onSuccess)),h.onSettled&&(h.onSettled=o.V.batchCalls(h.onSettled)),m(h),f(h,c),d(c);const[v]=r.useState((()=>new t(n,h))),b=v.getOptimisticResult(h);if((0,i.$)(r.useCallback((e=>s?()=>{}:v.subscribe(o.V.batchCalls(e))),[v,s]),(()=>v.getCurrentResult()),(()=>v.getCurrentResult())),r.useEffect((()=>{v.setOptions(h,{listeners:!1})}),[h,v]),g(h,b,s))throw y(h,v,c);if(p({result:b,errorResetBoundary:c,useErrorBoundary:h.useErrorBoundary,query:v.getCurrentQuery()}))throw b.error;return h.notifyOnChangeProps?b:v.trackResult(b)}},8596:(e,t,n)=>{"use strict";n.d(t,{N:()=>l});var r=n(2161),i=n(2924),o=n(9499);class s extends i.z{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,o.Gm)()},t)}getOptimisticResult(e){return e.behavior=(0,o.Gm)(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,t){var n,r,i,s,a,l;const{state:c}=e,u=super.createResult(e,t),{isFetching:h,isRefetching:f}=u,d=h&&"forward"===(null==(n=c.fetchMeta)||null==(r=n.fetchMore)?void 0:r.direction),p=h&&"backward"===(null==(i=c.fetchMeta)||null==(s=i.fetchMore)?void 0:s.direction);return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,o.Qy)(t,null==(a=c.data)?void 0:a.pages),hasPreviousPage:(0,o.ZF)(t,null==(l=c.data)?void 0:l.pages),isFetchingNextPage:d,isFetchingPreviousPage:p,isRefetching:f&&!d&&!p}}}var a=n(5079);function l(e,t,n){const i=(0,r._v)(e,t,n);return(0,a.r)(i,s)}},4469:(e,t,n)=>{"use strict";n.d(t,{D:()=>f});var r=n(7294),i=n(464),o=n(2161),s=n(9886),a=n(81),l=n(3989);class c extends l.l{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.client.defaultMutationOptions(e),(0,o.VS)(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)}onMutationUpdate(e){this.updateResult();const t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:(0,s.R)(),t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){a.V.batch((()=>{var t,n,r,i;if(this.mutateOptions&&this.hasListeners())if(e.onSuccess)null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(i=this.mutateOptions).onSettled)||r.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(e.onError){var o,s,a,l;null==(o=(s=this.mutateOptions).onError)||o.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(a=(l=this.mutateOptions).onSettled)||a.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}e.listeners&&this.listeners.forEach((e=>{e(this.currentResult)}))}))}}var u=n(5945),h=n(4798);function f(e,t,n){const s=(0,o.lV)(e,t,n),l=(0,u.NL)({context:s.context}),[f]=r.useState((()=>new c(l,s)));r.useEffect((()=>{f.setOptions(s)}),[f,s]);const p=(0,i.$)(r.useCallback((e=>f.subscribe(a.V.batchCalls(e))),[f]),(()=>f.getCurrentResult()),(()=>f.getCurrentResult())),m=r.useCallback(((e,t)=>{f.mutate(e,t).catch(d)}),[f]);if(p.error&&(0,h.L)(f.options.useErrorBoundary,[p.error]))throw p.error;return{...p,mutate:m,mutateAsync:p.mutate}}function d(){}},6492:(e,t,n)=>{"use strict";n.d(t,{a:()=>s});var r=n(2161),i=n(2924),o=n(5079);function s(e,t,n){const s=(0,r._v)(e,t,n);return(0,o.r)(s,i.z)}},464:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});const r=n(1688).useSyncExternalStore},4798:(e,t,n)=>{"use strict";function r(e,t){return"function"==typeof e?e(...t):!!e}n.d(t,{L:()=>r})},3845:(e,t,n)=>{"use strict";n.d(t,{ML:()=>We,hj:()=>ie,vc:()=>Qe,NB:()=>Ye,DK:()=>Xe,nU:()=>H,XP:()=>Oe,b5:()=>Me,qv:()=>Ee,u9:()=>Te,QC:()=>_e,Nl:()=>I,Jo:()=>Ce,tI:()=>Re,Cf:()=>qe,K9:()=>Ze,P1:()=>B,x2:()=>Ke,zK:()=>Ge,S0:()=>Je});var r=n(2376),i=n(4348),o=n(2337),s=n(7823),a=n(6560);const l=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);const c=(e,t,n)=>{let i=function(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}(e,n);if(!i)return!1;let o=f(i);if(!o){let n=i.blockRange(),r=n&&(0,a.k9)(n);return null!=r&&(t&&t(e.tr.lift(n,r).scrollIntoView()),!0)}let l=o.nodeBefore;if(!l.type.spec.isolating&&S(e,o,t))return!0;if(0==i.parent.content.size&&(u(l,"end")||r.qv.isSelectable(l))){let n=(0,a.dR)(e.doc,i.before(),i.after(),s.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let i=e.tr.step(n);i.setSelection(u(l,"end")?r.Y1.findFrom(i.doc.resolve(i.mapping.map(o.pos,-1)),-1):r.qv.create(i.doc,o.pos-l.nodeSize)),t(i.scrollIntoView())}return!0}}return!(!l.isAtom||o.depth!=i.depth-1||(t&&t(e.tr.delete(o.pos-l.nodeSize,o.pos).scrollIntoView()),0))};function u(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 h=(e,t,n)=>{let{$head:i,empty:o}=e.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):i.parentOffset>0)return!1;s=f(i)}let a=s&&s.nodeBefore;return!(!a||!r.qv.isSelectable(a)||(t&&t(e.tr.setSelection(r.qv.create(e.doc,s.pos-a.nodeSize)).scrollIntoView()),0))};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}const d=(e,t,n)=>{let i=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(!i)return!1;let o=m(i);if(!o)return!1;let l=o.nodeAfter;if(S(e,o,t))return!0;if(0==i.parent.content.size&&(u(l,"start")||r.qv.isSelectable(l))){let n=(0,a.dR)(e.doc,i.before(),i.after(),s.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let i=e.tr.step(n);i.setSelection(u(l,"start")?r.Y1.findFrom(i.doc.resolve(i.mapping.map(o.pos)),1):r.qv.create(i.doc,i.mapping.map(o.pos))),t(i.scrollIntoView())}return!0}}return!(!l.isAtom||o.depth!=i.depth-1||(t&&t(e.tr.delete(o.pos,o.pos+l.nodeSize).scrollIntoView()),0))},p=(e,t,n)=>{let{$head:i,empty:o}=e.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):i.parentOffset<i.parent.content.size)return!1;s=m(i)}let a=s&&s.nodeAfter;return!(!a||!r.qv.isSelectable(a)||(t&&t(e.tr.setSelection(r.qv.create(e.doc,s.pos)).scrollIntoView()),0))};function m(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}const g=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))};function y(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const v=(e,t)=>{let{$head:n,$anchor:i}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let o=n.node(-1),s=n.indexAfter(-1),a=y(o.contentMatchAt(s));if(!a||!o.canReplaceWith(s,s,a))return!1;if(t){let i=n.after(),o=e.tr.replaceWith(i,i,a.createAndFill());o.setSelection(r.Y1.near(o.doc.resolve(i),1)),t(o.scrollIntoView())}return!0},b=(e,t)=>{let n=e.selection,{$from:i,$to:o}=n;if(n instanceof r.C1||i.parent.inlineContent||o.parent.inlineContent)return!1;let s=y(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let n=(!i.parentOffset&&o.index()<o.parent.childCount?i:o).pos,a=e.tr.insert(n,s.createAndFill());a.setSelection(r.Bs.create(a.doc,n+1)),t(a.scrollIntoView())}return!0},w=(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 r=n.before();if((0,a.Ax)(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&(0,a.k9)(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};var x;function S(e,t,n){let i,o,l=t.nodeBefore,c=t.nodeAfter;if(l.type.spec.isolating||c.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!i.isTextblock&&!(0,a.Mn)(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let h=t.parent.canReplace(t.index(),t.index()+1);if(h&&(i=(o=l.contentMatchAt(l.childCount)).findWrapping(c.type))&&o.matchType(i[0]||c.type).validEnd){if(n){let r=t.pos+c.nodeSize,o=s.HY.empty;for(let e=i.length-1;e>=0;e--)o=s.HY.from(i[e].create(null,o));o=s.HY.from(l.copy(o));let u=e.tr.step(new a.FC(t.pos-1,r,t.pos,r,new s.p2(o,1,0),i.length,!0)),h=r+2*i.length;(0,a.Mn)(u.doc,h)&&u.join(h),n(u.scrollIntoView())}return!0}let f=r.Y1.findFrom(t,1),d=f&&f.$from.blockRange(f.$to),p=d&&(0,a.k9)(d);if(null!=p&&p>=t.depth)return n&&n(e.tr.lift(d,p).scrollIntoView()),!0;if(h&&u(c,"start",!0)&&u(l,"end")){let r=l,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let o=c,u=1;for(;!o.isTextblock;o=o.firstChild)u++;if(r.canReplace(r.childCount,r.childCount,o.content)){if(n){let r=s.HY.empty;for(let e=i.length-1;e>=0;e--)r=s.HY.from(i[e].copy(r));n(e.tr.step(new a.FC(t.pos-i.length,t.pos+c.nodeSize,t.pos+u,t.pos+c.nodeSize-u,new s.p2(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function k(e){return function(t,n){let i=t.selection,o=e<0?i.$from:i.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return!!o.node(s).isTextblock&&(n&&n(t.tr.setSelection(r.Bs.create(t.doc,e<0?o.start(s):o.end(s)))),!0)}}const C=k(-1),O=k(1);function M(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(o,s,((r,o)=>{if(i)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)i=!0;else{let t=n.doc.resolve(o),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}}))}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];i.setBlockType(o,s,e,t)}r(i.scrollIntoView())}return!0}}function E(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let A=E(l,c,h),T=E(l,d,p);const _={Enter:E(g,b,w,((e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof r.qv&&e.selection.node.isBlock)return!(!n.parentOffset||!(0,a.Ax)(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let o=i.parentOffset==i.parent.content.size,s=e.tr;(e.selection instanceof r.Bs||e.selection instanceof r.C1)&&s.deleteSelection();let l=0==n.depth?null:y(n.node(-1).contentMatchAt(n.indexAfter(-1))),c=x?[x]:o&&l?[{type:l}]:void 0,u=(0,a.Ax)(s.doc,s.mapping.map(n.pos),1,c);if(c||u||!(0,a.Ax)(s.doc,s.mapping.map(n.pos),1,l?[{type:l}]:void 0)||(l&&(c=[{type:l}]),u=!0),u&&(s.split(s.mapping.map(n.pos),1,c),!o&&!n.parentOffset&&n.parent.type!=l)){let e=s.mapping.map(n.before()),t=s.doc.resolve(e);l&&n.node(-1).canReplaceWith(t.index(),t.index()+1,l)&&s.setNodeMarkup(s.mapping.map(n.before()),l)}t(s.scrollIntoView())}return!0})),"Mod-Enter":v,Backspace:A,"Mod-Backspace":A,"Shift-Backspace":A,Delete:T,"Mod-Delete":T,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new r.C1(e.doc))),!0)},R={"Ctrl-h":_.Backspace,"Alt-Backspace":_["Mod-Backspace"],"Ctrl-d":_.Delete,"Ctrl-Alt-Backspace":_["Mod-Delete"],"Alt-Delete":_["Mod-Delete"],"Alt-d":_["Mod-Delete"],"Ctrl-a":C,"Ctrl-e":O};for(let e in _)R[e]=_[e];function D(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class P{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(...e)=>{const n=t(...e)(o);return i.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(i),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s=[],a=!!e,l=e||i.tr,c={...Object.fromEntries(Object.entries(n).map((([e,n])=>[e,(...e)=>{const r=this.buildProps(l,t),i=n(...e)(r);return s.push(i),c}]))),run:()=>(a||!t||l.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(l),s.every((e=>!0===e)))};return c}createCan(e){const{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map((([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})]))),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s={tr:e,editor:r,view:o,state:D({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map((([e,t])=>[e,(...e)=>t(...e)(s)])))}};return s}}class N{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach((e=>e.apply(this,t))),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((e=>e!==t)):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function I(e,t,n){return void 0===e.config[t]&&e.parent?I(e.parent,t,n):"function"==typeof e.config[t]?e.config[t].bind({...n,parent:e.parent?I(e.parent,t,n):null}):e.config[t]}function L(e){return{baseExtensions:e.filter((e=>"extension"===e.type)),nodeExtensions:e.filter((e=>"node"===e.type)),markExtensions:e.filter((e=>"mark"===e.type))}}function j(e){const t=[],{nodeExtensions:n,markExtensions:r}=L(e),i=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((e=>{const n=I(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});n&&n().forEach((e=>{e.types.forEach((n=>{Object.entries(e.attributes).forEach((([e,r])=>{t.push({type:n,name:e,attribute:{...o,...r}})}))}))}))})),i.forEach((e=>{const n={name:e.name,options:e.options,storage:e.storage},r=I(e,"addAttributes",n);if(!r)return;const i=r();Object.entries(i).forEach((([n,r])=>{const i={...o,...r};"function"==typeof(null==i?void 0:i.default)&&(i.default=i.default()),(null==i?void 0:i.isRequired)&&void 0===(null==i?void 0:i.default)&&delete i.default,t.push({type:e.name,name:n,attribute:i})}))})),t}function F(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function B(...e){return e.filter((e=>!!e)).reduce(((e,t)=>{const n={...e};return Object.entries(t).forEach((([e,t])=>{if(n[e])if("class"===e){const r=t?t.split(" "):[],i=n[e]?n[e].split(" "):[],o=r.filter((e=>!i.includes(e)));n[e]=[...i,...o].join(" ")}else n[e]="style"===e?[n[e],t].join("; "):t;else n[e]=t})),n}),{})}function z(e,t){return t.filter((e=>e.attribute.rendered)).map((t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]})).reduce(((e,t)=>B(e,t)),{})}function $(e){return"function"==typeof e}function H(e,t=undefined,...n){return $(e)?t?e.bind(t)(...n):e(...n):e}function V(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;const i=t.reduce(((e,t)=>{const r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!=typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null==r?e:{...e,[t.name]:r}}),{});return{...r,...i}}}}function U(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>("attrs"!==e||!function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t)))}function W(e,t){return t.nodes[e]||t.marks[e]||null}function q(e,t){return Array.isArray(t)?t.some((t=>("string"==typeof t?t:t.name)===e.name)):t}const K=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,((e,t,i,o)=>{var s,a;const l=(null===(a=(s=e.type.spec).toText)||void 0===a?void 0:a.call(s,{node:e,pos:t,parent:i,index:o}))||e.textContent||"%leaf%";n+=l.slice(0,Math.max(0,r-t))})),n};function G(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class J{constructor(e){this.find=e.find,this.handler=e.handler}}const Q=(e,t)=>{if(G(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Y(e){var t;const{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((e=>e.type.spec.code))))return!1;let u=!1;const h=K(c)+o;return s.forEach((e=>{if(u)return;const t=Q(h,e.find);if(!t)return;const s=l.state.tr,c=D({state:l.state,transaction:s}),f={from:r-(t[0].length-o.length),to:i},{commands:d,chain:p,can:m}=new P({editor:n,state:c});null!==e.handler({state:c,range:f,match:t,commands:d,chain:p,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:i,text:o}),l.dispatch(s),u=!0)})),u}function X(e){const{editor:t,rules:n}=e,i=new r.Sy({state:{init:()=>null,apply:(e,t)=>e.getMeta(i)||(e.selectionSet||e.docChanged?null:t)},props:{handleTextInput:(e,r,o,s)=>Y({editor:t,from:r,to:o,text:s,rules:n,plugin:i}),handleDOMEvents:{compositionend:e=>(setTimeout((()=>{const{$cursor:r}=e.state.selection;r&&Y({editor:t,from:r.pos,to:r.pos,text:"",rules:n,plugin:i})})),!1)},handleKeyDown(e,r){if("Enter"!==r.key)return!1;const{$cursor:o}=e.state.selection;return!!o&&Y({editor:t,from:o.pos,to:o.pos,text:"\n",rules:n,plugin:i})}},isInputRules:!0});return i}class Z{constructor(e){this.find=e.find,this.handler=e.handler}}function ee(e){const{editor:t,rules:n}=e;let i=null,o=!1,s=!1,a=new ClipboardEvent("paste"),l=new DragEvent("drop");const c=n.map((e=>new r.Sy({view(e){const t=t=>{var n;i=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:(e,t)=>(s=i===e.dom.parentElement,l=t,!1),paste:(e,t)=>{var n;const r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return a=t,o=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(n,r,i)=>{const c=n[0],u="paste"===c.getMeta("uiEvent")&&!o,h="drop"===c.getMeta("uiEvent")&&!s;if(!u&&!h)return;const f=r.doc.content.findDiffStart(i.doc.content),d=r.doc.content.findDiffEnd(i.doc.content);if("number"!=typeof f||!d||f===d.b)return;const p=i.tr,m=D({state:i,transaction:p}),g=function(e){const{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:c,can:u}=new P({editor:t,state:n}),h=[];return n.doc.nodesBetween(r,i,((e,t)=>{if(!e.isTextblock||e.type.spec.code)return;const f=Math.max(r,t),d=Math.min(i,t+e.content.size);((e,t)=>{if(G(t))return[...e.matchAll(t)];const n=t(e);return n?n.map((t=>{const n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(f-t,d-t,void 0,""),o.find).forEach((e=>{if(void 0===e.index)return;const t=f+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},d=o.handler({state:n,range:i,match:e,commands:l,chain:c,can:u,pasteEvent:s,dropEvent:a});h.push(d)}))})),h.every((e=>null!==e))}({editor:t,state:m,from:Math.max(f-1,0),to:d.b-1,rule:e,pasteEvent:a,dropEvent:l});return g&&p.steps.length?(l=new DragEvent("drop"),a=new ClipboardEvent("paste"),p):void 0}})));return c}class te{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=te.resolve(e),this.schema=function(e,t){var n;const r=j(e),{nodeExtensions:i,markExtensions:o}=L(e),a=null===(n=i.find((e=>I(e,"topNode"))))||void 0===n?void 0:n.name,l=Object.fromEntries(i.map((n=>{const i=r.filter((e=>e.type===n.name)),o={name:n.name,options:n.options,storage:n.storage,editor:t},s=U({...e.reduce(((e,t)=>{const r=I(t,"extendNodeSchema",o);return{...e,...r?r(n):{}}}),{}),content:H(I(n,"content",o)),marks:H(I(n,"marks",o)),group:H(I(n,"group",o)),inline:H(I(n,"inline",o)),atom:H(I(n,"atom",o)),selectable:H(I(n,"selectable",o)),draggable:H(I(n,"draggable",o)),code:H(I(n,"code",o)),defining:H(I(n,"defining",o)),isolating:H(I(n,"isolating",o)),attrs:Object.fromEntries(i.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),a=H(I(n,"parseHTML",o));a&&(s.parseDOM=a.map((e=>V(e,i))));const l=I(n,"renderHTML",o);l&&(s.toDOM=e=>l({node:e,HTMLAttributes:z(e,i)}));const c=I(n,"renderText",o);return c&&(s.toText=c),[n.name,s]}))),c=Object.fromEntries(o.map((n=>{const i=r.filter((e=>e.type===n.name)),o={name:n.name,options:n.options,storage:n.storage,editor:t},s=U({...e.reduce(((e,t)=>{const r=I(t,"extendMarkSchema",o);return{...e,...r?r(n):{}}}),{}),inclusive:H(I(n,"inclusive",o)),excludes:H(I(n,"excludes",o)),group:H(I(n,"group",o)),spanning:H(I(n,"spanning",o)),code:H(I(n,"code",o)),attrs:Object.fromEntries(i.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),a=H(I(n,"parseHTML",o));a&&(s.parseDOM=a.map((e=>V(e,i))));const l=I(n,"renderHTML",o);return l&&(s.toDOM=e=>l({mark:e,HTMLAttributes:z(e,i)})),[n.name,s]})));return new s.V_({topNode:a,nodes:l,marks:c})}(this.extensions,t),this.extensions.forEach((e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:W(e.name,this.schema)};"mark"===e.type&&(null===(t=H(I(e,"keepOnSplit",n)))||void 0===t||t)&&this.splittableMarks.push(e.name);const r=I(e,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);const i=I(e,"onCreate",n);i&&this.editor.on("create",i);const o=I(e,"onUpdate",n);o&&this.editor.on("update",o);const s=I(e,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);const a=I(e,"onTransaction",n);a&&this.editor.on("transaction",a);const l=I(e,"onFocus",n);l&&this.editor.on("focus",l);const c=I(e,"onBlur",n);c&&this.editor.on("blur",c);const u=I(e,"onDestroy",n);u&&this.editor.on("destroy",u)}))}static resolve(e){const t=te.sort(te.flatten(e)),n=function(e){const t=e.filter(((t,n)=>e.indexOf(t)!==n));return[...new Set(t)]}(t.map((e=>e.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((e=>`'${e}'`)).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map((e=>{const t=I(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return t?[e,...this.flatten(t())]:e})).flat(10)}static sort(e){return e.sort(((e,t)=>{const n=I(e,"priority")||100,r=I(t,"priority")||100;return n>r?-1:n<r?1:0}))}get commands(){return this.extensions.reduce(((e,t)=>{const n=I(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:W(t.name,this.schema)});return n?{...e,...n()}:e}),{})}get plugins(){const{editor:e}=this,t=te.sort([...this.extensions].reverse()),n=[],r=[],i=t.map((t=>{const i={name:t.name,options:t.options,storage:t.storage,editor:e,type:W(t.name,this.schema)},s=[],a=I(t,"addKeyboardShortcuts",i);let l={};if("mark"===t.type&&t.config.exitable&&(l.ArrowRight=()=>Qe.handleExit({editor:e,mark:t})),a){const t=Object.fromEntries(Object.entries(a()).map((([t,n])=>[t,()=>n({editor:e})])));l={...l,...t}}const c=(0,o.h)(l);s.push(c);const u=I(t,"addInputRules",i);q(t,e.options.enableInputRules)&&u&&n.push(...u());const h=I(t,"addPasteRules",i);q(t,e.options.enablePasteRules)&&h&&r.push(...h());const f=I(t,"addProseMirrorPlugins",i);if(f){const e=f();s.push(...e)}return s})).flat();return[X({editor:e,rules:n}),...ee({editor:e,rules:r}),...i]}get attributes(){return j(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=L(this.extensions);return Object.fromEntries(t.filter((e=>!!I(e,"addNodeView"))).map((t=>{const n=this.attributes.filter((e=>e.type===t.name)),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:F(t.name,this.schema)},i=I(t,"addNodeView",r);return i?[t.name,(r,o,s,a)=>{const l=z(r,n);return i()({editor:e,node:r,getPos:s,decorations:a,HTMLAttributes:l,extension:t})}]:[]})))}}function ne(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function re(e,t){const n={...e};return ne(e)&&ne(t)&&Object.keys(t).forEach((r=>{ne(t[r])?r in e?n[r]=re(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})})),n}class ie{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=H(I(this,"addOptions",{name:this.name}))),this.storage=H(I(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ie(e)}configure(e={}){const t=this.extend();return t.options=re(this.options,e),t.storage=H(I(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new ie(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=H(I(t,"addOptions",{name:t.name})),t.storage=H(I(t,"addStorage",{name:t.name,options:t.options})),t}}function oe(e,t,n){const{from:r,to:i}=t,{blockSeparator:o="\n\n",textSerializers:s={}}=n||{};let a="",l=!0;return e.nodesBetween(r,i,((e,n,c,u)=>{var h;const f=null==s?void 0:s[e.type.name];f?(e.isBlock&&!l&&(a+=o,l=!0),c&&(a+=f({node:e,pos:n,parent:c,index:u,range:t}))):e.isText?(a+=null===(h=null==e?void 0:e.text)||void 0===h?void 0:h.slice(Math.max(r,n)-n,i-n),l=!1):e.isBlock&&!l&&(a+=o,l=!0)})),a}function se(e){return Object.fromEntries(Object.entries(e.nodes).filter((([,e])=>e.spec.toText)).map((([e,t])=>[e,t.spec.toText])))}const ae=ie.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i;return oe(r,{from:Math.min(...o.map((e=>e.$from.pos))),to:Math.max(...o.map((e=>e.$to.pos)))},{textSerializers:se(n)})}}})]}});function le(e,t,n={strict:!0}){const r=Object.keys(t);return!r.length||r.every((r=>n.strict?t[r]===e[r]:G(t[r])?t[r].test(e[r]):t[r]===e[r]))}function ce(e,t,n={}){return e.find((e=>e.type===t&&le(e.attrs,n)))}function ue(e,t,n={}){return!!ce(e,t,n)}function he(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=ce([...r.node.marks],t,n);if(!i)return;let o=r.index,s=e.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(ce([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,s-=e.parent.child(o).nodeSize;for(;a<e.parent.childCount&&ue([...e.parent.child(a).marks],t,n);)l+=e.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function fe(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function de(e){return e instanceof r.Bs}function pe(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function me(e,t=null){if(!t)return null;const n=r.Y1.atStart(e),i=r.Y1.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return i;const o=n.from,s=i.to;return"all"===t?r.Bs.create(e,pe(0,o,s),pe(e.content.size,o,s)):r.Bs.create(e,pe(t,o,s),pe(t,o,s))}function ge(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function ye(e){const t=`<body>${e}</body>`;return(new window.DOMParser).parseFromString(t,"text/html").body}function ve(e,t,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof e&&null!==e)try{return Array.isArray(e)&&e.length>0?s.HY.fromArray(e.map((e=>t.nodeFromJSON(e)))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),ve("",t,n)}if("string"==typeof e){const r=s.aw.fromSchema(t);return n.slice?r.parseSlice(ye(e),n.parseOptions).content:r.parse(ye(e),n.parseOptions)}return ve("",t,n)}function be(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function we(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,s=t?F(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,((e,t)=>{if(e.isText)return;const n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);a.push({node:e,from:n,to:o})}));const l=i-r,c=a.filter((e=>!s||s.name===e.node.type.name)).filter((e=>le(e.node.attrs,n,{strict:!1})));return o?!!c.length:c.reduce(((e,t)=>e+t.to-t.from),0)>=l}function xe(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Se(e,t){const n="string"==typeof t?[t]:t;return Object.keys(e).reduce(((t,r)=>(n.includes(r)||(t[r]=e[r]),t)),{})}function ke(e,t,n={}){return ve(e,t,{slice:!1,parseOptions:n})}function Ce(e,t){const n=fe(t,e.schema),{from:r,to:i,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,(e=>{s.push(...e.marks)}));const a=s.find((e=>e.type.name===n.name));return a?{...a.attrs}:{}}function Oe(e,t){const n=new a.wx(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}function Me(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}function Ee(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function Ae(e){return t=>Ee(t.$from,e)}function Te(e,t){const n=xe("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){const n=F(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,(e=>{o.push(e)}));const s=o.reverse().find((e=>e.type.name===n.name));return s?{...s.attrs}:{}}(e,t):"mark"===n?Ce(e,t):{}}function _e(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,i)=>{const o=[];if(e.ranges.length)e.forEach(((e,t)=>{o.push({from:e,to:t})}));else{const{from:e,to:t}=n[i];if(void 0===e||void 0===t)return;o.push({from:e,to:t})}o.forEach((({from:e,to:n})=>{const o=t.slice(i).map(e,-1),s=t.slice(i).map(n),a=t.invert().map(o,-1),l=t.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})}))})),function(e){const t=function(e,t=JSON.stringify){const n={};return e.filter((e=>{const r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter(((e,n)=>!t.filter(((e,t)=>t!==n)).some((t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))))}(r)}function Re(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach((t=>{const i=he(n.resolve(e-1),t.type);i&&r.push({mark:t,...i})})):n.nodesBetween(e,t,((e,t)=>{r.push(...e.marks.map((n=>({from:t,to:t+e.nodeSize,mark:n}))))})),r}function De(e,t,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=e.find((e=>e.type===t&&e.name===n));return!!r&&r.attribute.keepOnSplit})))}function Pe(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?fe(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter((e=>!o||o.name===e.type.name)).find((e=>le(e.attrs,n,{strict:!1})));let s=0;const a=[];if(i.forEach((({$from:t,$to:n})=>{const r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,((e,t)=>{if(!e.isText&&!e.marks.length)return;const n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);s+=o-n,a.push(...e.marks.map((e=>({mark:e,from:n,to:o}))))}))})),0===s)return!1;const l=a.filter((e=>!o||o.name===e.mark.type.name)).filter((e=>le(e.mark.attrs,n,{strict:!1}))).reduce(((e,t)=>e+t.to-t.from),0),c=a.filter((e=>!o||e.mark.type!==o&&e.mark.type.excludes(o))).reduce(((e,t)=>e+t.to-t.from),0);return(l>0?l+c:l)>=s}function Ne(e,t){const{nodeExtensions:n}=L(t),r=n.find((t=>t.name===e));if(!r)return!1;const i=H(I(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof i&&i.split(" ").includes("list")}function Ie(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter((e=>null==t?void 0:t.includes(e.type.name)));e.tr.ensureMarks(r)}}const Le=(e,t)=>{const n=Ae((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const i=e.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!(0,a.Mn)(e.doc,n.pos)||(e.join(n.pos),!0)},je=(e,t)=>{const n=Ae((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const i=e.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!(0,a.Mn)(e.doc,r)||(e.join(r),!0)};var Fe=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame((()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return!n||(i.forEach((({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,((e,n)=>{if(e.type.isText)return;const{doc:r,mapping:i}=t,o=r.resolve(i.map(n)),s=r.resolve(i.map(n+e.nodeSize)),l=o.blockRange(s);if(!l)return;const c=(0,a.k9)(l);if(e.type.isTextblock){const{defaultType:e}=o.parent.contentMatchAt(o.index());t.setNodeMarkup(l.start,e)}(c||0===c)&&t.lift(l,c)}))})),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>b(e,t),cut:(e,t)=>({editor:n,tr:i})=>{const{state:o}=n,s=o.doc.slice(e.from,e.to);i.deleteRange(e.from,e.to);const a=i.mapping.map(t);return i.insert(a,s.content),i.setSelection(new r.Bs(i.doc.resolve(a-1))),!0},deleteCurrentNode:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let n=i.depth;n>0;n-=1)if(i.node(n).type===r.type){if(t){const t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1},deleteNode:e=>({tr:t,state:n,dispatch:r})=>{const i=F(e,n.schema),o=t.selection.$anchor;for(let e=o.depth;e>0;e-=1)if(o.node(e).type===i){if(r){const n=o.before(e),r=o.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},deleteSelection:()=>({state:e,dispatch:t})=>l(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>v(e,t),extendMarkRange:(e,t={})=>({tr:n,state:i,dispatch:o})=>{const s=fe(e,i.schema),{doc:a,selection:l}=n,{$from:c,from:u,to:h}=l;if(o){const e=he(c,s,t);if(e&&e.from<=u&&e.to>=h){const t=r.Bs.create(a,e.from,e.to);n.setSelection(t)}}return!0},first:e=>t=>{const n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1},focus:(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{ge()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===e||!1===e)return!0;if(o&&null===e&&!de(n.state.selection))return s(),!0;const a=me(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},forEach:(e,t)=>n=>e.every(((e,r)=>t(e,{...n,index:r}))),insertContent:(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,t,n)=>({tr:i,dispatch:o,editor:s})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const o=ve(t,s.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===o.toString())return!0;let{from:l,to:c}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},u=!0,h=!0;if((o.toString().startsWith("<")?o:[o]).forEach((e=>{e.check(),u=!!u&&e.isText&&0===e.marks.length,h=!!h&&e.isBlock})),l===c&&h){const{parent:e}=i.doc.resolve(l);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(l-=1,c+=1)}u?Array.isArray(t)?i.insertText(t.map((e=>e.text||"")).join(""),l,c):"object"==typeof t&&t&&t.text?i.insertText(t.text,l,c):i.insertText(t,l,c):i.replaceWith(l,c,o),n.updateSelection&&function(e,t,n){const i=e.steps.length-1;if(i<t)return;const o=e.steps[i];if(!(o instanceof a.Pu||o instanceof a.FC))return;const s=e.mapping.maps[i];let l=0;s.forEach(((e,t,n,r)=>{0===l&&(l=r)})),e.setSelection(r.Y1.near(e.doc.resolve(l),-1))}(i,i.steps.length-1)}return!0},joinUp:()=>({state:e,dispatch:t})=>((e,t)=>{let n,i=e.selection,o=i instanceof r.qv;if(o){if(i.node.isTextblock||!(0,a.Mn)(e.doc,i.from))return!1;n=i.from}else if(n=(0,a.GJ)(e.doc,i.from,-1),null==n)return!1;if(t){let i=e.tr.join(n);o&&i.setSelection(r.qv.create(i.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0})(e,t),joinDown:()=>({state:e,dispatch:t})=>((e,t)=>{let n,i=e.selection;if(i instanceof r.qv){if(i.node.isTextblock||!(0,a.Mn)(e.doc,i.to))return!1;n=i.to}else if(n=(0,a.GJ)(e.doc,i.to,1),null==n)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0})(e,t),joinBackward:()=>({state:e,dispatch:t})=>c(e,t),joinForward:()=>({state:e,dispatch:t})=>d(e,t),joinItemBackward:()=>({tr:e,state:t,dispatch:n})=>{try{const r=(0,a.GJ)(t.doc,t.selection.$from.pos,-1);return null!=r&&(e.join(r,2),n&&n(e),!0)}catch{return!1}},joinItemForward:()=>({state:e,dispatch:t,tr:n})=>{try{const r=(0,a.GJ)(e.doc,e.selection.$from.pos,1);return null!=r&&(n.join(r,2),t&&t(n),!0)}catch(e){return!1}},keyboardShortcut:e=>({editor:t,view:n,tr:r,dispatch:i})=>{const o=function(e){const t=e.split(/-(?!$)/);let n,r,i,o,s=t[t.length-1];"Space"===s&&(s=" ");for(let e=0;e<t.length-1;e+=1){const s=t[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else{if(!/^mod$/i.test(s))throw new Error(`Unrecognized modifier name: ${s}`);ge()||be()?o=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),o&&(s=`Meta-${s}`),i&&(s=`Shift-${s}`),s}(e).split(/-(?!$)/),s=o.find((e=>!["Alt","Ctrl","Meta","Shift"].includes(e))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction((()=>{n.someProp("handleKeyDown",(e=>e(n,a)))}));return null==l||l.steps.forEach((e=>{const t=e.map(r.mapping);t&&i&&r.maybeStep(t)})),!0},lift:(e,t={})=>({state:n,dispatch:r})=>!!we(n,F(e,n.schema),t)&&((e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&(0,a.k9)(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:e,dispatch:t})=>w(e,t),liftListItem:e=>({state:t,dispatch:n})=>{return(r=F(e,t.schema),function(e,t){let{$from:n,$to:i}=e.selection,o=n.blockRange(i,(e=>e.childCount>0&&e.firstChild.type==r));return!!o&&(!t||(n.node(o.depth-1).type==r?function(e,t,n,r){let i=e.tr,o=r.end,l=r.$to.end(r.depth);o<l&&(i.step(new a.FC(o-1,l,o,l,new s.p2(s.HY.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new s.Ts(i.doc.resolve(r.$from.pos),i.doc.resolve(l),r.depth));const c=(0,a.k9)(r);if(null==c)return!1;i.lift(r,c);let u=i.mapping.map(o,-1)-1;return(0,a.Mn)(i.doc,u)&&i.join(u),t(i.scrollIntoView()),!0}(e,t,r,o):function(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,o=n.startIndex;t>o;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let o=r.doc.resolve(n.start),l=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,u=n.endIndex==i.childCount,h=o.node(-1),f=o.index(-1);if(!h.canReplace(f+(c?0:1),f+1,l.content.append(u?s.HY.empty:s.HY.from(i))))return!1;let d=o.pos,p=d+l.nodeSize;return r.step(new a.FC(d-(c?1:0),p+(u?1:0),d+1,p-1,new s.p2((c?s.HY.empty:s.HY.from(i.copy(s.HY.empty))).append(u?s.HY.empty:s.HY.from(i.copy(s.HY.empty))),c?0:1,u?0:1),c?0:1)),t(r.scrollIntoView()),!0}(e,t,o)))})(t,n);var r},newlineInCode:()=>({state:e,dispatch:t})=>g(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=xe("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(o=F(e,r.schema)),"mark"===a&&(s=fe(e,r.schema)),i&&n.selection.ranges.forEach((e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,((e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,Se(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((i=>{s===i.type&&n.addMark(r,r+e.nodeSize,s.create(Se(i.attrs,t)))}))}))})),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),selectNodeBackward:()=>({state:e,dispatch:t})=>h(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>p(e,t),selectParentNode:()=>({state:e,dispatch:t})=>((e,t)=>{let n,{$from:i,to:o}=e.selection,s=i.sharedDepth(o);return 0!=s&&(n=i.before(s),t&&t(e.tr.setSelection(r.qv.create(e.doc,n))),!0)})(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>O(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>C(e,t),setContent:(e,t=!1,n={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,a=ke(e,i.schema,n);return o&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=fe(e,r.schema);if(i)if(s){const e=Ce(r,l);n.addStoredMark(l.create({...e,...t}))}else a.forEach((e=>{const i=e.$from.pos,o=e.$to.pos;r.doc.nodesBetween(i,o,((e,r)=>{const s=Math.max(r,i),a=Math.min(r+e.nodeSize,o);e.marks.find((e=>e.type===l))?e.marks.forEach((e=>{l===e.type&&n.addMark(s,a,l.create({...e.attrs,...t}))})):n.addMark(s,a,l.create(t))}))}));return function(e,t,n){var r;const{selection:i}=t;let o=null;if(de(i)&&(o=i.$cursor),o){const t=null!==(r=e.storedMarks)&&void 0!==r?r:o.marks();return!!n.isInSet(t)||!t.some((e=>e.type.excludes(n)))}const{ranges:s}=i;return s.some((({$from:t,$to:r})=>{let i=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,((e,t,r)=>{if(i)return!1;if(e.isInline){const t=!r||r.type.allowsMarkType(n),o=!!n.isInSet(e.marks)||!e.marks.some((e=>e.type.excludes(n)));i=t&&o}return!i})),i}))}(r,n,l)},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:i})=>{const o=F(e,n.schema);return o.isTextblock?i().command((({commands:e})=>!!M(o,t)(n)||e.clearNodes())).command((({state:e})=>M(o,t)(e,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,i=pe(e,0,n.content.size),o=r.qv.create(n,i);t.setSelection(o)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,{from:i,to:o}="number"==typeof e?{from:e,to:e}:e,s=r.Bs.atStart(n).from,a=r.Bs.atEnd(n).to,l=pe(i,s,a),c=pe(o,s,a),u=r.Bs.create(n,l,c);t.setSelection(u)}return!0},sinkListItem:e=>({state:t,dispatch:n})=>{const r=F(e,t.schema);return(i=r,function(e,t){let{$from:n,$to:r}=e.selection,o=n.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==i));if(!o)return!1;let l=o.startIndex;if(0==l)return!1;let c=o.parent,u=c.child(l-1);if(u.type!=i)return!1;if(t){let n=u.lastChild&&u.lastChild.type==c.type,r=s.HY.from(n?i.create():null),l=new s.p2(s.HY.from(i.create(null,s.HY.from(c.type.create(null,r)))),n?3:1,0),h=o.start,f=o.end;t(e.tr.step(new a.FC(h-(n?3:1),f,h,f,l,1,!0)).scrollIntoView())}return!0})(t,n);var i},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:i,editor:o})=>{const{selection:s,doc:l}=t,{$from:c,$to:u}=s,h=De(o.extensionManager.attributes,c.node().type.name,c.node().attrs);if(s instanceof r.qv&&s.node.isBlock)return!(!c.parentOffset||!(0,a.Ax)(l,c.pos)||(i&&(e&&Ie(n,o.extensionManager.splittableMarks),t.split(c.pos).scrollIntoView()),0));if(!c.parent.isBlock)return!1;if(i){const i=u.parentOffset===u.parent.content.size;s instanceof r.Bs&&t.deleteSelection();const l=0===c.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(c.node(-1).contentMatchAt(c.indexAfter(-1)));let f=i&&l?[{type:l,attrs:h}]:void 0,d=(0,a.Ax)(t.doc,t.mapping.map(c.pos),1,f);if(f||d||!(0,a.Ax)(t.doc,t.mapping.map(c.pos),1,l?[{type:l}]:void 0)||(d=!0,f=l?[{type:l,attrs:h}]:void 0),d&&(t.split(t.mapping.map(c.pos),1,f),l&&!i&&!c.parentOffset&&c.parent.type!==l)){const e=t.mapping.map(c.before()),n=t.doc.resolve(e);c.node(-1).canReplaceWith(n.index(),n.index()+1,l)&&t.setNodeMarkup(t.mapping.map(c.before()),l)}e&&Ie(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},splitListItem:e=>({tr:t,state:n,dispatch:i,editor:o})=>{var l;const c=F(e,n.schema),{$from:u,$to:h}=n.selection,f=n.selection.node;if(f&&f.isBlock||u.depth<2||!u.sameParent(h))return!1;const d=u.node(-1);if(d.type!==c)return!1;const p=o.extensionManager.attributes;if(0===u.parent.content.size&&u.node(-1).childCount===u.indexAfter(-1)){if(2===u.depth||u.node(-3).type!==c||u.index(-2)!==u.node(-2).childCount-1)return!1;if(i){let e=s.HY.empty;const n=u.index(-1)?1:u.index(-2)?2:3;for(let t=u.depth-n;t>=u.depth-3;t-=1)e=s.HY.from(u.node(t).copy(e));const i=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,o=De(p,u.node().type.name,u.node().attrs),a=(null===(l=c.contentMatch.defaultType)||void 0===l?void 0:l.createAndFill(o))||void 0;e=e.append(s.HY.from(c.createAndFill(null,a)||void 0));const h=u.before(u.depth-(n-1));t.replace(h,u.after(-i),new s.p2(e,4-n,0));let f=-1;t.doc.nodesBetween(h,t.doc.content.size,((e,t)=>{if(f>-1)return!1;e.isTextblock&&0===e.content.size&&(f=t+1)})),f>-1&&t.setSelection(r.Bs.near(t.doc.resolve(f))),t.scrollIntoView()}return!0}const m=h.pos===u.end()?d.contentMatchAt(0).defaultType:null,g=De(p,d.type.name,d.attrs),y=De(p,u.node().type.name,u.node().attrs);t.delete(u.pos,h.pos);const v=m?[{type:c,attrs:g},{type:m,attrs:y}]:[{type:c,attrs:g}];if(!(0,a.Ax)(t.doc,u.pos,2))return!1;if(i){const{selection:e,storedMarks:r}=n,{splittableMarks:s}=o.extensionManager,a=r||e.$to.parentOffset&&e.$from.marks();if(t.split(u.pos,2,v).scrollIntoView(),!a||!i)return!0;const l=a.filter((e=>s.includes(e.type.name)));t.ensureMarks(l)}return!0},toggleList:(e,t,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:h,splittableMarks:f}=i.extensionManager,d=F(e,s.schema),p=F(t,s.schema),{selection:m,storedMarks:g}=s,{$from:y,$to:v}=m,b=y.blockRange(v),w=g||m.$to.parentOffset&&m.$from.marks();if(!b)return!1;const x=Ae((e=>Ne(e.type.name,h)))(m);if(b.depth>=1&&x&&b.depth-x.depth<=1){if(x.node.type===d)return c.liftListItem(p);if(Ne(x.node.type.name,h)&&d.validContent(x.node.content)&&a)return l().command((()=>(o.setNodeMarkup(x.pos,d),!0))).command((()=>Le(o,d))).command((()=>je(o,d))).run()}return n&&w&&a?l().command((()=>{const e=u().wrapInList(d,r),t=w.filter((e=>f.includes(e.type.name)));return o.ensureMarks(t),!!e||c.clearNodes()})).wrapInList(d,r).command((()=>Le(o,d))).command((()=>je(o,d))).run():l().command((()=>!!u().wrapInList(d,r)||c.clearNodes())).wrapInList(d,r).command((()=>Le(o,d))).command((()=>je(o,d))).run()},toggleMark:(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=fe(e,r.schema);return Pe(r,s,t)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,t)},toggleNode:(e,t,n={})=>({state:r,commands:i})=>{const o=F(e,r.schema),s=F(t,r.schema);return we(r,o,n)?i.setNode(s):i.setNode(o,n)},toggleWrap:(e,t={})=>({state:n,commands:r})=>{const i=F(e,n.schema);return we(n,i,t)?r.lift(i):r.wrapIn(i,t)},undoInputRule:()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){const t=e.tr,n=o.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(o.text){const n=t.doc.resolve(o.from).marks();t.replaceWith(o.from,o.to,e.schema.text(o.text,n))}else t.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos)})),!0},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=fe(e,r.schema),{$from:c,empty:u,ranges:h}=a;if(!i)return!0;if(u&&s){let{from:e,to:t}=a;const r=null===(o=c.marks().find((e=>e.type===l)))||void 0===o?void 0:o.attrs,i=he(c,l,r);i&&(e=i.from,t=i.to),n.removeMark(e,t,l)}else h.forEach((e=>{n.removeMark(e.$from.pos,e.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=xe("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(o=F(e,r.schema)),"mark"===a&&(s=fe(e,r.schema)),i&&n.selection.ranges.forEach((e=>{const i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,((e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),s&&e.marks.length&&e.marks.forEach((o=>{if(s===o.type){const l=Math.max(r,i),c=Math.min(r+e.nodeSize,a);n.addMark(l,c,s.create({...o.attrs,...t}))}}))}))})),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),l=s&&(0,a.nd)(s,e,t);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}(F(e,n.schema),t)(n,r),wrapInList:(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,l=i.blockRange(o),c=!1,u=l;if(!l)return!1;if(l.depth>=2&&i.node(l.depth-1).type.compatibleContent(e)&&0==l.startIndex){if(0==i.index(l.depth-1))return!1;let e=n.doc.resolve(l.start-2);u=new s.Ts(e,e,l.depth),l.endIndex<l.parent.childCount&&(l=new s.Ts(i,n.doc.resolve(o.end(l.depth)),l.depth)),c=!0}let h=(0,a.nd)(u,e,t,l);return!!h&&(r&&r(function(e,t,n,r,i){let o=s.HY.empty;for(let e=n.length-1;e>=0;e--)o=s.HY.from(n[e].type.create(n[e].attrs,o));e.step(new a.FC(t.start-(r?2:0),t.end,t.start,t.end,new s.p2(o,0,0),n.length,!0));let l=0;for(let e=0;e<n.length;e++)n[e].type==i&&(l=e+1);let c=n.length-l,u=t.start+n.length-(r?2:0),h=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&(0,a.Ax)(e.doc,u,c)&&(e.split(u,c),u+=2*c),u+=h.child(n).nodeSize;return e}(n.tr,l,h,c,e).scrollIntoView()),!0)}}(F(e,n.schema),t)(n,r)});const Be=ie.create({name:"commands",addCommands:()=>({...Fe})}),ze=ie.create({name:"editable",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("editable"),props:{editable:()=>this.editor.options.editable}})]}}),$e=ie.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new r.Sy({key:new r.H$("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),He=ie.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first((({commands:e})=>[()=>e.undoInputRule(),()=>e.command((({tr:t})=>{const{selection:n,doc:i}=t,{empty:o,$anchor:s}=n,{pos:a,parent:l}=s,c=s.parent.isTextblock?t.doc.resolve(a-1):s,u=c.parent.type.spec.isolating,h=s.pos-s.parentOffset,f=u&&1===c.parent.childCount?h===s.pos:r.Y1.atStart(i).from===a;return!(!(o&&f&&l.type.isTextblock)||l.textContent.length)&&e.clearNodes()})),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()])),t=()=>this.editor.commands.first((({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},o={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ge()||be()?o:i},addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clearDocument"),appendTransaction:(e,t,n)=>{if(!e.some((e=>e.docChanged))||t.doc.eq(n.doc))return;const{empty:i,from:o,to:s}=t.selection,a=r.Y1.atStart(t.doc).from,l=r.Y1.atEnd(t.doc).to;if(i||o!==a||s!==l)return;if(0!==n.doc.textBetween(0,n.doc.content.size," "," ").length)return;const c=n.tr,u=D({state:n,transaction:c}),{commands:h}=new P({editor:this.editor,state:u});return h.clearNodes(),c.steps.length?c:void 0}})]}}),Ve=ie.create({name:"tabindex",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var Ue=Object.freeze({__proto__:null,ClipboardTextSerializer:ae,Commands:Be,Editable:ze,FocusEvents:$e,Keymap:He,Tabindex:Ve});class We extends N{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(null!==r)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML='.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  white-space: break-spaces;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n  font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n  white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n  white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n  display: inline !important;\n  border: none !important;\n  margin: 0 !important;\n  width: 1px !important;\n  height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n  margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n  content: "";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n  opacity: 0\n}',document.getElementsByTagName("head")[0].appendChild(i),i}(0,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const n=$(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((e=>!e.key.startsWith(t)))});this.view.updateState(n)}createExtensionManager(){const e=[...this.options.enableCoreExtensions?Object.values(Ue):[],...this.options.extensions].filter((e=>["extension","node","mark"].includes(null==e?void 0:e.type)));this.extensionManager=new te(e,this)}createCommandManager(){this.commandManager=new P({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=ke(this.options.content,this.schema,this.options.parseOptions),t=me(e,this.options.autofocus);this.view=new i.tk(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:r.yy.create({doc:e,selection:t||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((e=>{var t;return null===(t=this.capturedTransaction)||void 0===t?void 0:t.step(e)})):void(this.capturedTransaction=e);const t=this.state.apply(e),n=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),i=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return Te(this.state,e)}isActive(e,t){const n="string"==typeof e?e:null,r="string"==typeof e?t:e;return function(e,t,n={}){if(!t)return we(e,null,n)||Pe(e,null,n);const r=xe(t,e.schema);return"node"===r?we(e,t,n):"mark"===r&&Pe(e,t,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function(e,t){const n=s.PW.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:n={}}=e||{};return function(e,t){return oe(e,{from:0,to:e.content.size},t)}(this.state.doc,{blockSeparator:t,textSerializers:{...se(this.schema),...n}})}get isEmpty(){return function(e){var t;const n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}function qe(e){return new J({find:e.find,handler:({state:t,range:n,match:r})=>{const i=H(e.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];if(s){const r=a.search(/\S/),l=n.from+a.indexOf(s),c=l+s.length;if(Re(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>l)).length)return null;c<n.to&&o.delete(c,n.to),l>n.from&&o.delete(n.from+r,l);const u=n.from+r+s.length;o.addMark(n.from+r,u,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function Ke(e){return new J({find:e.find,handler:({state:t,range:n,match:r})=>{const i=H(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from;let a=n.to;const l=e.type.create(i);if(r[1]){let e=s+r[0].lastIndexOf(r[1]);e>a?e=a:a=e+r[1].length;const t=r[0][r[0].length-1];o.insertText(t,s+r[0].length-1),o.replaceWith(e,a,l)}else r[0]&&o.insert(s-1,e.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a));o.scrollIntoView()}})}function Ge(e){return new J({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=H(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function Je(e){return new J({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=H(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&(0,a.nd)(l,e.type,o);if(!c)return null;if(s.wrap(l,c),e.keepMarks&&e.editor){const{selection:n,storedMarks:r}=t,{splittableMarks:i}=e.editor.extensionManager,o=r||n.$to.parentOffset&&n.$from.marks();if(o){const e=o.filter((e=>i.includes(e.type.name)));s.ensureMarks(e)}}if(e.keepAttributes){const t="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";i().updateAttributes(t,o).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===e.type&&(0,a.Mn)(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,u))&&s.join(n.from-1)}})}class Qe{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=H(I(this,"addOptions",{name:this.name}))),this.storage=H(I(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Qe(e)}configure(e={}){const t=this.extend();return t.options=re(this.options,e),t.storage=H(I(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Qe(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=H(I(t,"addOptions",{name:t.name})),t.storage=H(I(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const i=r.marks();if(!i.find((e=>(null==e?void 0:e.type.name)===t.name)))return!1;const o=i.find((e=>(null==e?void 0:e.type.name)===t.name));return o&&n.removeStoredMark(o),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}}class Ye{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=H(I(this,"addOptions",{name:this.name}))),this.storage=H(I(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ye(e)}configure(e={}){const t=this.extend();return t.options=re(this.options,e),t.storage=H(I(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Ye(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=H(I(t,"addOptions",{name:t.name})),t.storage=H(I(t,"addStorage",{name:t.name,options:t.options})),t}}class Xe{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,i,o,s,a,l;const{view:c}=this.editor,u=e.target,h=3===u.nodeType?null===(t=u.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(u))||!h)return;let f=0,d=0;if(this.dom!==h){const t=this.dom.getBoundingClientRect(),n=h.getBoundingClientRect(),r=null!==(i=e.offsetX)&&void 0!==i?i:null===(o=e.nativeEvent)||void 0===o?void 0:o.offsetX,l=null!==(s=e.offsetY)&&void 0!==s?s:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;f=n.x-t.x+r,d=n.y-t.y+l}null===(l=e.dataTransfer)||void 0===l||l.setDragImage(this.dom,f,d);const p=r.qv.create(c.state.doc,this.getPos()),m=c.state.tr.setSelection(p);c.dispatch(m)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const n=e.target;if(!this.dom.contains(n)||(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(n)))return!1;const i=e.type.startsWith("drag"),o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o&&!i)return!0;const{isEditable:s}=this.editor,{isDragging:a}=this,l=!!this.node.type.spec.draggable,c=r.qv.isSelectable(this.node),u="copy"===e.type,h="paste"===e.type,f="cut"===e.type,d="mousedown"===e.type;if(!l&&c&&i&&e.preventDefault(),l&&i&&!a)return e.preventDefault(),!1;if(l&&s&&!a&&d){const e=n.closest("[data-drag-handle]");e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener("dragend",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("drop",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(()=>{this.isDragging=!1}),{once:!0}))}return!(a||o||u||h||f||d&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!(!this.node.isLeaf&&!this.node.isAtom)||"selection"!==e.type&&(!(this.dom.contains(e.target)&&"childList"===e.type&&(ge()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every((e=>e.isContentEditable)))&&(this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target))))}updateAttributes(e){this.editor.commands.command((({tr:t})=>{const n=this.getPos();return t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0}))}deleteNode(){const e=this.getPos(),t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}function Ze(e){return new Z({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{const o=H(e.getAttributes,void 0,r,i);if(!1===o||null===o)return null;const{tr:s}=t,a=r[r.length-1],l=r[0];let c=n.to;if(a){const r=l.search(/\S/),i=n.from+l.indexOf(a),u=i+a.length;if(Re(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>i)).length)return null;u<n.to&&s.delete(u,n.to),i>n.from&&s.delete(n.from+r,i),c=n.from+r+a.length,s.addMark(n.from+r,c,e.type.create(o||{})),s.removeStoredMark(e.type)}}})}},9734:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>o});var r=n(3845);const i=/^\s*>\s$/,o=r.NB.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,r.S0)({find:i,type:this.type})]}})},7937:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l});var r=n(3845);const i=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,o=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,s=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,a=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,l=r.vc.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.Cf)({find:i,type:this.type}),(0,r.Cf)({find:s,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:o,type:this.type}),(0,r.K9)({find:a,type:this.type})]}})},561:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>a});var r=n(3845);const i=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.P1)(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),o=r.vc.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=(0,r.Jo)(e,this.type);return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),s=/^\s*([-+*])\s$/,a=r.NB.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(i.name,this.editor.getAttributes(o.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=(0,r.S0)({find:s,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.S0)({find:s,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(o.name),editor:this.editor})),[e]}})},353:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r}),n(3621);const r=n(3845).hj.create({name:"color",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return null===(t=e.style.color)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands:()=>({setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()})})},336:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3845).NB.create({name:"doc",topNode:!0,content:"block+"})},9966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(3845),i=n(2337),o=n(2376),s=n(7823),a=n(4348);class l extends o.Y1{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return l.valid(n)?new l(n):o.Y1.near(n)}content(){return s.p2.empty}eq(e){return e instanceof l&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new l(e.resolve(t.pos))}getBookmark(){return new c(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&l.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(l.valid(s))return s}for(;;){let s=t>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!o.qv.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue e}break}i=s,r+=t;let a=e.doc.resolve(r);if(l.valid(a))return a}return null}}}l.prototype.visible=!1,l.findFrom=l.findGapCursorFrom,o.Y1.jsonID("gapcursor",l);class c{constructor(e){this.pos=e}map(e){return new c(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return l.valid(t)?new l(t):o.Y1.near(t)}}const u=(0,i.$)({ArrowLeft:h("horiz",-1),ArrowRight:h("horiz",1),ArrowUp:h("vert",-1),ArrowDown:h("vert",1)});function h(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let s=e.selection,a=t>0?s.$to:s.$from,c=s.empty;if(s instanceof o.Bs){if(!i.endOfTextblock(n)||0==a.depth)return!1;c=!1,a=e.doc.resolve(t>0?a.after():a.before())}let u=l.findGapCursorFrom(a,t,c);return!!u&&(r&&r(e.tr.setSelection(new l(u))),!0)}}function f(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!l.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&o.qv.isSelectable(e.state.doc.nodeAt(i.inside))||(e.dispatch(e.state.tr.setSelection(new l(r))),0))}function d(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof l))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=s.HY.empty;for(let e=r.length-1;e>=0;e--)i=s.HY.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new s.p2(i,0,0));return a.setSelection(o.Bs.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function p(e){if(!(e.selection instanceof l))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",a.EH.create(e.doc,[a.p.widget(e.selection.head,t,{key:"gapcursor"})])}const m=r.hj.create({name:"gapCursor",addProseMirrorPlugins:()=>[new o.Sy({props:{decorations:p,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&l.valid(n)?new l(n):null,handleClick:f,handleKeyDown:u,handleDOMEvents:{beforeinput:d}}})],extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!==(t=(0,r.nU)((0,r.Nl)(e,"allowGapCursor",n)))&&void 0!==t?t:null}}})},5525:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3845);const i=r.NB.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.P1)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&o){const t=a.filter((e=>s.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})},7490:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3845);const i=r.NB.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>(0,r.zK)({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}})},8486:(e,t,n)=>{"use strict";n.d(t,{Z:()=>M});var r=n(3845),i=200,o=function(){};o.prototype.append=function(e){return e.length?(e=o.from(e),!this.length&&e||e.length<i&&this.leafAppend(e)||this.length<i&&e.leafPrepend(this)||this.appendInner(e)):this},o.prototype.prepend=function(e){return e.length?o.from(e).append(this):this},o.prototype.appendInner=function(e){return new a(this,e)},o.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?o.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},o.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},o.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},o.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},o.from=function(e){return e instanceof o?e:e&&e.length?new s(e):o.empty};var s=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=i)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=i)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(o);o.empty=new s([]);var a=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;return!(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r))&&!(n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))&&void 0},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;return!(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i))&&!(n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))&&void 0},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(o);const l=o;var c=n(6560),u=n(2376);class h{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}t&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(i,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new f(e.map));let t,i=e.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new f(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(r)):e.selection,s=new h(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(e,t,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new f(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?i.pop():s=s.slice(0,s.length-1)),i.push(u),t&&(o++,t=void 0),r||(a=u)}let l=o-n.depth;return l>p&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),o-=l),new h(s.append(i),o)}remapping(e,t){let n=new c.vs;return this.items.forEach(((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new h(this.items.append(e.map((e=>new f(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(a+1,r));c&&s++,n.push(new f(l,o,c))}else n.push(new f(l))}),r);let l=[];for(let e=t;e<o;e++)l.push(new f(i.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new h(c,s);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach(((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=o.selection&&o.selection.map(t.slice(n));a&&i++;let l,c=new f(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else o.map&&n--}),this.items.length,0),new h(l.from(r.reverse()),i)}}h.empty=new h(l.empty,0);class f{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new f(t.getMap().invert(),t,this.selection)}}}class d{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}const p=20;function m(e){let t=[];return e.forEach(((e,n,r,i)=>t.push(r,i))),t}function g(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function y(e,t,n,r){let i=w(t),o=x.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,i);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),c=new d(r?l:s.remaining,r?s.remaining:l,null,0,-1);n(s.transform.setSelection(a).setMeta(x,{redo:r,historyState:c}).scrollIntoView())}let v=!1,b=null;function w(e){let t=e.plugins;if(b!=t){v=!1,b=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){v=!0;break}}return v}const x=new u.H$("history"),S=new u.H$("closeHistory");function k(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new u.Sy({key:x,state:{init:()=>new d(h.empty,h.empty,null,0,-1),apply:(t,n,r)=>function(e,t,n,r){let i,o=n.getMeta(x);if(o)return o.historyState;n.getMeta(S)&&(e=new d(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(x))return s.getMeta(x).redo?new d(e.done.addTransform(n,void 0,r,w(t)),e.undone,m(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new d(e.done,e.undone.addTransform(n,void 0,r,w(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new d(e.done.rebased(n,i),e.undone.rebased(n,i),g(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new d(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),g(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),o=0==e.prevTime||!s&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)})),n}(n,e.prevRanges)),a=s?g(e.prevRanges,n.mapping):m(n.mapping.maps[n.steps.length-1]);return new d(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,w(t)),h.empty,a,n.time,null==i?e.prevComposition:i)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?C:"historyRedo"==n?O:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const C=(e,t)=>{let n=x.getState(e);return!(!n||0==n.done.eventCount||(t&&y(n,e,t,!1),0))},O=(e,t)=>{let n=x.getState(e);return!(!n||0==n.undone.eventCount||(t&&y(n,e,t,!0),0))},M=r.hj.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>C(e,t),redo:()=>({state:e,dispatch:t})=>O(e,t)}),addProseMirrorPlugins(){return[k(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},6761:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>o});var r=n(3845);const i=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,o=r.NB.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",(0,r.P1)(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[(0,r.x2)({find:i,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}})},3582:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l});var r=n(3845);const i=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,o=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,s=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,a=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,l=r.vc.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.Cf)({find:i,type:this.type}),(0,r.Cf)({find:s,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:o,type:this.type}),(0,r.K9)({find:a,type:this.type})]}})},6484:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ue});var r=n(3845);const i="aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",o="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5تصالات6رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",s=(e,t)=>{for(const n in t)e[n]=t[n];return e},a="numeric",l="ascii",c="alpha",u="asciinumeric",h="alphanumeric",f="domain",d="emoji",p="scheme",m="slashscheme",g="whitespace";function y(e,t){return e in t||(t[e]=[]),t[e]}function v(e,t,n){t[a]&&(t[u]=!0,t[h]=!0),t[l]&&(t[u]=!0,t[c]=!0),t[u]&&(t[h]=!0),t[c]&&(t[h]=!0),t[h]&&(t[f]=!0),t[d]&&(t[f]=!0);for(const r in t){const t=y(r,n);t.indexOf(e)<0&&t.push(e)}}function b(e){void 0===e&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}b.groups={},b.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){const r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t){return void 0===t&&(t=!1),t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||b.groups,t&&t.j?i=t:(i=new b(t),n&&r&&v(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this;const o=e.length;if(!o)return i;for(let t=0;t<o-1;t++)i=i.tt(e[t]);return i.tt(e[o-1],t,n,r)},tt(e,t,n,r){r=r||b.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const o=t;let a,l=i.go(e);if(l?(a=new b,s(a.j,l.j),a.jr.push.apply(a.jr,l.jr),a.jd=l.jd,a.t=l.t):a=new b,o){if(r)if(a.t&&"string"==typeof a.t){const e=s(function(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(a.t,r),n);v(o,e,r)}else n&&v(o,n,r);a.t=o}return i.j[e]=a,a}};const w=(e,t,n,r,i)=>e.ta(t,n,r,i),x=(e,t,n,r,i)=>e.tr(t,n,r,i),S=(e,t,n,r,i)=>e.ts(t,n,r,i),k=(e,t,n,r,i)=>e.tt(t,n,r,i),C="WORD",O="UWORD",M="LOCALHOST",E="TLD",A="UTLD",T="SCHEME",_="SLASH_SCHEME",R="NUM",D="WS",P="NL",N="OPENBRACE",I="OPENBRACKET",L="OPENANGLEBRACKET",j="OPENPAREN",F="CLOSEBRACE",B="CLOSEBRACKET",z="CLOSEANGLEBRACKET",$="CLOSEPAREN",H="AMPERSAND",V="APOSTROPHE",U="ASTERISK",W="AT",q="BACKSLASH",K="BACKTICK",G="CARET",J="COLON",Q="COMMA",Y="DOLLAR",X="DOT",Z="EQUALS",ee="EXCLAMATION",te="HYPHEN",ne="PERCENT",re="PIPE",ie="PLUS",oe="POUND",se="QUERY",ae="QUOTE",le="SEMI",ce="SLASH",ue="TILDE",he="UNDERSCORE",fe="EMOJI",de="SYM";var pe=Object.freeze({__proto__:null,WORD:C,UWORD:O,LOCALHOST:M,TLD:E,UTLD:A,SCHEME:T,SLASH_SCHEME:_,NUM:R,WS:D,NL:P,OPENBRACE:N,OPENBRACKET:I,OPENANGLEBRACKET:L,OPENPAREN:j,CLOSEBRACE:F,CLOSEBRACKET:B,CLOSEANGLEBRACKET:z,CLOSEPAREN:$,AMPERSAND:H,APOSTROPHE:V,ASTERISK:U,AT:W,BACKSLASH:q,BACKTICK:K,CARET:G,COLON:J,COMMA:Q,DOLLAR:Y,DOT:X,EQUALS:Z,EXCLAMATION:ee,HYPHEN:te,PERCENT:ne,PIPE:re,PLUS:ie,POUND:oe,QUERY:se,QUOTE:ae,SEMI:le,SLASH:ce,TILDE:ue,UNDERSCORE:he,EMOJI:fe,SYM:de});const me=/[a-z]/,ge=/\p{L}/u,ye=/\p{Emoji}/u,ve=/\d/,be=/\s/,we="\n",xe="️",Se="‍";let ke=null,Ce=null;function Oe(e,t,n,r,i){let o;const s=t.length;for(let n=0;n<s-1;n++){const s=t[n];e.j[s]?o=e.j[s]:(o=new b(r),o.jr=i.slice(),e.j[s]=o),e=o}return o=new b(n),o.jr=i.slice(),e.j[t[s-1]]=o,o}function Me(e){const t=[],n=[];let r=0;for(;r<e.length;){let i=0;for(;"0123456789".indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}const Ee={defaultProtocol:"http",events:null,format:Te,formatHref:Te,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ae(e,t){void 0===t&&(t=null);let n=s({},Ee);e&&(n=s(n,e instanceof Ae?e.o:e));const r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function Te(e){return e}function _e(e,t){this.t="token",this.v=e,this.tk=t}function Re(e,t){class n extends _e{constructor(t,n){super(t,n),this.t=e}}for(const e in t)n.prototype[e]=t[e];return n.t=e,n}Ae.prototype={o:Ee,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=null!=t;let i=this.o[e];return i?("object"==typeof i?(i=n.t in i?i[n.t]:Ee[e],"function"==typeof i&&r&&(i=i(t,n))):"function"==typeof i&&r&&(i=i(t,n.t,n)),i):i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},_e.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return void 0===e&&(e=Ee.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),a={},l=e.get("className",n,t),c=e.get("target",n,t),u=e.get("rel",n,t),h=e.getObj("attributes",n,t),f=e.getObj("events",n,t);return a.href=r,l&&(a.class=l),c&&(a.target=c),u&&(a.rel=u),h&&s(a,h),{tagName:i,attributes:a,content:o,eventListeners:f}}};const De=Re("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Pe=Re("text"),Ne=Re("nl"),Ie=Re("url",{isLink:!0,toHref(e){return void 0===e&&(e=Ee.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==M&&e[1].t===J}}),Le=e=>new b(e);function je(e,t,n){const r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}const Fe="undefined"!=typeof console&&console&&console.warn||(()=>{}),Be={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ze(e,t){if(void 0===t&&(t=!1),Be.initialized&&Fe(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error('linkifyjs: incorrect scheme format.\n 1. Must only contain digits, lowercase ASCII letters or "-"\n 2. Cannot start or end with "-"\n 3. "-" cannot repeat');Be.customSchemes.push([e,t])}function $e(e){return Be.initialized||function(){Be.scanner=function(e){void 0===e&&(e=[]);const t={};b.groups=t;const n=new b;null==ke&&(ke=Me(i)),null==Ce&&(Ce=Me(o)),k(n,"'",V),k(n,"{",N),k(n,"[",I),k(n,"<",L),k(n,"(",j),k(n,"}",F),k(n,"]",B),k(n,">",z),k(n,")",$),k(n,"&",H),k(n,"*",U),k(n,"@",W),k(n,"`",K),k(n,"^",G),k(n,":",J),k(n,",",Q),k(n,"$",Y),k(n,".",X),k(n,"=",Z),k(n,"!",ee),k(n,"-",te),k(n,"%",ne),k(n,"|",re),k(n,"+",ie),k(n,"#",oe),k(n,"?",se),k(n,'"',ae),k(n,"/",ce),k(n,";",le),k(n,"~",ue),k(n,"_",he),k(n,"\\",q);const r=x(n,ve,R,{[a]:!0});x(r,ve,r);const h=x(n,me,C,{[l]:!0});x(h,me,h);const y=x(n,ge,O,{[c]:!0});x(y,me),x(y,ge,y);const w=x(n,be,D,{[g]:!0});k(n,we,P,{[g]:!0}),k(w,we),x(w,be,w);const Ee=x(n,ye,fe,{[d]:!0});x(Ee,ye,Ee),k(Ee,xe,Ee);const Ae=k(Ee,Se);x(Ae,ye,Ee);const Te=[[me,h]],_e=[[me,null],[ge,y]];for(let e=0;e<ke.length;e++)Oe(n,ke[e],E,C,Te);for(let e=0;e<Ce.length;e++)Oe(n,Ce[e],A,O,_e);v(E,{tld:!0,ascii:!0},t),v(A,{utld:!0,alpha:!0},t),Oe(n,"file",T,C,Te),Oe(n,"mailto",T,C,Te),Oe(n,"http",_,C,Te),Oe(n,"https",_,C,Te),Oe(n,"ftp",_,C,Te),Oe(n,"ftps",_,C,Te),v(T,{scheme:!0,ascii:!0},t),v(_,{slashscheme:!0,ascii:!0},t),e=e.sort(((e,t)=>e[0]>t[0]?1:-1));for(let t=0;t<e.length;t++){const r=e[t][0],i=e[t][1]?{[p]:!0}:{[m]:!0};r.indexOf("-")>=0?i[f]=!0:me.test(r)?ve.test(r)?i[u]=!0:i[l]=!0:i[a]=!0,S(n,r,r,i)}return S(n,"localhost",M,{ascii:!0}),n.jd=new b(de),{start:n,tokens:s({groups:t},pe)}}(Be.customSchemes);for(let e=0;e<Be.tokenQueue.length;e++)Be.tokenQueue[e][1]({scanner:Be.scanner});Be.parser=function(e){let{groups:t}=e;const n=t.domain.concat([H,U,W,q,K,G,Y,Z,te,R,ne,re,ie,oe,ce,de,ue,he]),r=[V,z,F,B,$,J,Q,X,ee,L,N,I,j,se,ae,le],i=[H,V,U,q,K,G,F,Y,Z,te,N,ne,re,ie,oe,se,ce,de,ue,he],o=Le(),s=k(o,ue);w(s,i,s),w(s,t.domain,s);const a=Le(),l=Le(),c=Le();w(o,t.domain,a),w(o,t.scheme,l),w(o,t.slashscheme,c),w(a,i,s),w(a,t.domain,a);const u=k(a,W);k(s,W,u),k(l,W,u),k(c,W,u);const h=k(s,X);w(h,i,s),w(h,t.domain,s);const f=Le();w(u,t.domain,f),w(f,t.domain,f);const d=k(f,X);w(d,t.domain,f);const p=Le(De);w(d,t.tld,p),w(d,t.utld,p),k(u,M,p);const m=k(f,te);w(m,t.domain,f),w(p,t.domain,f),k(p,X,d),k(p,te,m);const g=k(p,J);w(g,t.numeric,De);const y=k(a,te),v=k(a,X);w(y,t.domain,a),w(v,i,s),w(v,t.domain,a);const b=Le(Ie);w(v,t.tld,b),w(v,t.utld,b),w(b,t.domain,a),w(b,i,s),k(b,X,v),k(b,te,y),k(b,W,u);const x=k(b,J),S=Le(Ie);w(x,t.numeric,S);const C=Le(Ie),O=Le();w(C,n,C),w(C,r,O),w(O,n,C),w(O,r,O),k(b,ce,C),k(S,ce,C);const E=k(l,J),A=k(c,J),T=k(A,ce),_=k(T,ce);w(l,t.domain,a),k(l,X,v),k(l,te,y),w(c,t.domain,a),k(c,X,v),k(c,te,y),w(E,t.domain,C),k(E,ce,C),w(_,t.domain,C),w(_,n,C),k(_,ce,C);const D=k(C,N),fe=k(C,I),me=k(C,L),ge=k(C,j);k(O,N,D),k(O,I,fe),k(O,L,me),k(O,j,ge),k(D,F,C),k(fe,B,C),k(me,z,C),k(ge,$,C),k(D,F,C);const ye=Le(Ie),ve=Le(Ie),be=Le(Ie),we=Le(Ie);w(D,n,ye),w(fe,n,ve),w(me,n,be),w(ge,n,we);const xe=Le(),Se=Le(),ke=Le(),Ce=Le();return w(D,r),w(fe,r),w(me,r),w(ge,r),w(ye,n,ye),w(ve,n,ve),w(be,n,be),w(we,n,we),w(ye,r,ye),w(ve,r,ve),w(be,r,be),w(we,r,we),w(xe,n,xe),w(Se,n,ve),w(ke,n,be),w(Ce,n,we),w(xe,r,xe),w(Se,r,Se),w(ke,r,ke),w(Ce,r,Ce),k(ve,B,C),k(be,z,C),k(we,$,C),k(ye,F,C),k(Se,B,C),k(ke,z,C),k(Ce,$,C),k(xe,$,C),k(o,M,b),k(o,P,Ne),{start:o,tokens:pe}}(Be.scanner.tokens);for(let e=0;e<Be.pluginQueue.length;e++)Be.pluginQueue[e][1]({scanner:Be.scanner,parser:Be.parser});Be.initialized=!0}(),function(e,t,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=e,l=null,c=null,u=0,h=null,f=-1;for(;i<r&&!(l=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||a.go(n[i].t));)l=null,a=c,a.accepts()?(f=0,h=a):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(je(Pe,t,s)),s=[]),i-=f,u-=f;const e=h.t,r=n.slice(i-u,i);o.push(je(e,t,r))}}return s.length>0&&o.push(je(Pe,t,s)),o}(Be.parser.start,e,function(e,t){const n=function(e){const t=[],n=e.length;let r=0;for(;r<n;){let i,o=e.charCodeAt(r),s=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,(e=>e.toLowerCase()))),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=e,l=null,c=0,u=null,h=-1,f=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(h=0,f=0,u=a):h>=0&&(h+=n[s].length,f++),c+=n[s].length,o+=n[s].length,s++;o-=h,s-=f,c-=h,i.push({t:u.t,v:t.slice(o-c,o),s:o-c,e:o})}return i}(Be.scanner.start,e))}function He(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new Ae(n),i=$e(e),o=[];for(let e=0;e<i.length;e++){const n=i[e];!n.isLink||t&&n.t!==t||o.push(n.toFormattedObject(r))}return o}var Ve=n(2376);const Ue=r.vc.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((e=>{"string"!=typeof e?ze(e.scheme,e.optionalSlashes):ze(e)}))},onDestroy(){b.groups={},Be.scanner=null,Be.parser=null,Be.tokenQueue=[],Be.pluginQueue=[],Be.customSchemes=[],Be.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.K9)({find:e=>He(e).filter((e=>!this.options.validate||this.options.validate(e.value))).filter((e=>e.isLink)).map((e=>({text:e.value,index:e.start,data:e}))),type:this.type,getAttributes:(e,t)=>{var n,r;const i=null===(n=null==t?void 0:t.clipboardData)||void 0===n?void 0:n.getData("text/html"),o=null==i?void 0:i.match(/href="([^"]*)"/);return o?{href:o[1]}:{href:null===(r=e.data)||void 0===r?void 0:r.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push((t={type:this.type,validate:this.options.validate},new Ve.Sy({key:new Ve.H$("autolink"),appendTransaction:(e,n,i)=>{const o=e.some((e=>e.docChanged))&&!n.doc.eq(i.doc),s=e.some((e=>e.getMeta("preventAutolink")));if(!o||s)return;const{tr:a}=i,l=(0,r.XP)(n.doc,[...e]);return(0,r.QC)(l).forEach((({newRange:e})=>{const n=(0,r.b5)(i.doc,e,(e=>e.isTextblock));let o,s;if(n.length>1?(o=n[0],s=i.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," ")):n.length&&i.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(o=n[0],s=i.doc.textBetween(o.pos,e.to,void 0," ")),o&&s){const e=s.split(" ").filter((e=>""!==e));if(e.length<=0)return!1;const n=e[e.length-1],l=o.pos+s.lastIndexOf(n);if(!n)return!1;He(n).filter((e=>e.isLink)).map((e=>({...e,from:l+e.start+1,to:l+e.end+1}))).filter((e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code))).filter((e=>!t.validate||t.validate(e.value))).forEach((e=>{(0,r.tI)(e.from,e.to,i.doc).some((e=>e.mark.type===t.type))||a.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),a.steps.length?a:void 0}}))),this.options.openOnClick&&e.push(function(e){return new Ve.Sy({key:new Ve.H$("handleClickLink"),props:{handleClick:(t,n,i)=>{var o,s;if(0!==i.button)return!1;if("A"!==i.target.nodeName)return!1;const a=(0,r.u9)(t.state,e.type.name),l=i.target,c=null!==(o=null==l?void 0:l.href)&&void 0!==o?o:a.href,u=null!==(s=null==l?void 0:l.target)&&void 0!==s?s:a.target;return!(!l||!c||(t.editable&&window.open(c,u),0))}}})}({type:this.type})),this.options.linkOnPaste&&e.push(function(e){return new Ve.Sy({key:new Ve.H$("handlePasteLink"),props:{handlePaste:(t,n,r)=>{var i;const{state:o}=t,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";r.content.forEach((e=>{l+=e.textContent}));const c=He(l).find((e=>e.isLink&&e.value===l));if(!l||!c)return!1;const u=null===(i=n.clipboardData)||void 0===i?void 0:i.getData("text/html"),h=null==u?void 0:u.match(/href="([^"]*)"/),f=h?h[1]:c.href;return e.editor.commands.setMark(e.type,{href:f}),!0}}})}({editor:this.editor,type:this.type})),e;var t}})},4565:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3845);const i=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.P1)(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}})},1575:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>a});var r=n(3845);const i=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.P1)(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),o=r.vc.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=(0,r.Jo)(e,this.type);return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),s=/^(\d+)\.\s$/,a=r.NB.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return 1===t?["ol",(0,r.P1)(this.options.HTMLAttributes,n),0]:["ol",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(i.name,this.editor.getAttributes(o.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=(0,r.S0)({find:s,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.S0)({find:s,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(o.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}})},6022:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3845);const i=r.NB.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})},658:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3845);const i=r.NB.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},3626:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3845);const i=r.NB.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},3991:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3845);const i=r.NB.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},1347:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>me});var r,i,o=n(3845),s=n(2376),a=n(7823),l=n(4348),c=n(2337),u=n(6560);if("undefined"!=typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),i=(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]},i=(r,i)=>(n==t&&(n=0),e[n++]=r,e[n++]=i)}var h=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,i=t/this.width|0;let o=r+1,s=i+1;for(let e=1;o<this.width&&this.map[t+e]==n;e++)o++;for(let e=1;s<this.height&&this.map[t+this.width*e]==n;e++)s++;return{left:r,top:i,right:o,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:i,top:o,bottom:s}=this.findCell(e);return"horiz"==t?(n<0?0==r:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?0==o:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(e,t){const{left:n,right:r,top:i,bottom:o}=this.findCell(e),{left:s,right:a,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,l),right:Math.max(r,a),bottom:Math.max(o,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){const o=r*this.width+i,s=this.map[o];n[s]||(n[s]=!0,i==e.left&&i&&this.map[o-1]==s||r==e.top&&r&&this.map[o-this.width]==s||t.push(s))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){const o=i+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]<i;)n++;return n==r?o-1:this.map[n]}i=o}}static get(e){return r(e)||i(e,function(e){if("table"!=e.type.spec.tableRole)throw 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 i=e.child(r);let o=0;if(n)for(let t=0;t<r;t++){const n=e.child(t);for(let e=0;e<n.childCount;e++){const i=n.child(e);t+i.attrs.rowspan>r&&(o+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){const t=i.child(e);o+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(e),n=e.childCount,r=[];let i=0,o=null;const s=[];for(let e=0,i=t*n;e<i;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(;i<r.length&&0!=r[i];)i++;if(e==c.childCount)break;const u=c.child(e),{colspan:h,rowspan:f,colwidth:d}=u.attrs;for(let e=0;e<f;e++){if(e+a>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:f-e});break}const c=i+e*t;for(let e=0;e<h;e++){0==r[c+e]?r[c+e]=l:(o||(o=[])).push({type:"collision",row:a,pos:l,n:h-e});const n=d&&d[e];if(n){const r=(c+e)%t*2,i=s[r];null==i||i!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):i==n&&s[r+1]++}}}i+=h,l+=u.nodeSize}const u=(a+1)*t;let h=0;for(;i<u;)0==r[i++]&&h++;h&&(o||(o=[])).push({type:"missing",row:a,n:h}),l++}const a=new h(t,n,r,o);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 i=0;i<e.map.length;i++){const o=e.map[i];if(r[o])continue;r[o]=!0;const s=n.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let a=null;const l=s.attrs;for(let n=0;n<l.colspan;n++){const r=t[(i+n)%e.width*2];null==r||l.colwidth&&l.colwidth[n]==r||((a||(a=f(l)))[n]=r)}a&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}(a,s,e),a}(e))}};function f(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function d(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var p=new s.H$("selectingCells");function m(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 g(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 y(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=m(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 v(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function b(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function w(e,t,n){const r=e.node(-1),i=h.get(r),o=e.start(-1),s=i.nextCell(e.pos-o,t,n);return null==s?null:e.node(0).resolve(o+s)}function x(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 S(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 k=class extends s.Y1{constructor(e,t=e){const n=e.node(-1),r=h.get(n),i=e.start(-1),o=r.rectBetween(e.pos-i,t.pos-i),a=e.node(0),l=r.cellsInRect(o).filter((e=>e!=t.pos-i));l.unshift(t.pos-i);const c=l.map((e=>{const t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);const r=i+e+1;return new s.xm(a.resolve(r),a.resolve(r+t.content.size))}));super(c[0].$from,c[0].$to,c),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(v(n)&&v(r)&&b(n,r)){const e=this.$anchorCell.node(-1)!=n.node(-1);return e&&this.isRowSelection()?k.rowSelection(n,r):e&&this.isColSelection()?k.colSelection(n,r):new k(n,r)}return s.Bs.between(n,r)}content(){const e=this.$anchorCell.node(-1),t=h.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},o=[];for(let n=r.top;n<r.bottom;n++){const s=[];for(let o=n*t.width+r.left,a=r.left;a<r.right;a++,o++){const n=t.map[o];if(i[n])continue;i[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=x(e,0,c)),u>0&&(e=x(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)}o.push(e.child(n).copy(a.HY.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?e:o;return new a.p2(a.HY.from(s),1,1)}replace(e,t=a.p2.empty){const n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){const{$from:o,$to:s}=r[i],l=e.mapping.slice(n);e.replace(l.map(o.pos),l.map(s.pos),i?a.p2.empty:t)}const i=s.Y1.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new a.p2(a.HY.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),n=h.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){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=h.get(n),i=e.start(-1),o=r.findCell(e.pos-i),s=r.findCell(t.pos-i),a=e.node(0);return o.top<=s.top?(o.top>0&&(e=a.resolve(i+r.map[o.left])),s.bottom<r.height&&(t=a.resolve(i+r.map[r.width*(r.height-1)+s.right-1]))):(s.top>0&&(t=a.resolve(i+r.map[s.left])),o.bottom<r.height&&(e=a.resolve(i+r.map[r.width*(r.height-1)+o.right-1]))),new k(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=h.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);if(Math.min(r,i)>0)return!1;const o=r+this.$anchorCell.nodeAfter.attrs.colspan,s=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,s)==t.width}eq(e){return e instanceof k&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),r=h.get(n),i=e.start(-1),o=r.findCell(e.pos-i),s=r.findCell(t.pos-i),a=e.node(0);return o.left<=s.left?(o.left>0&&(e=a.resolve(i+r.map[o.top*r.width])),s.right<r.width&&(t=a.resolve(i+r.map[r.width*(s.top+1)-1]))):(s.left>0&&(t=a.resolve(i+r.map[s.top*r.width])),o.right<r.width&&(e=a.resolve(i+r.map[r.width*(o.top+1)-1]))),new k(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new k(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new k(e.resolve(t),e.resolve(n))}getBookmark(){return new C(this.$anchorCell.pos,this.$headCell.pos)}};k.prototype.visible=!1,s.Y1.jsonID("cell",k);var C=class{constructor(e,t){this.anchor=e,this.head=t}map(e){return new C(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&&b(t,n)?new k(t,n):s.Y1.near(n,1)}};function O(e){if(!(e.selection instanceof k))return null;const t=[];return e.selection.forEachCell(((e,n)=>{t.push(l.p.node(n,n+e.nodeSize,{class:"selectedCell"}))})),l.EH.create(e.doc,t)}var M=new s.H$("fix-tables");function E(e,t,n,r){const i=e.childCount,o=t.childCount;e:for(let s=0,a=0;s<o;s++){const o=t.child(s);for(let t=a,r=Math.min(i,s+3);t<r;t++)if(e.child(t)==o){a=t+1,n+=o.nodeSize;continue e}r(o,n),a<i&&e.child(a).sameMarkup(o)?E(e.child(a),o,n+1,r):o.nodesBetween(0,o.content.size,r,n+1),n+=o.nodeSize}}function A(e,t){let n;const r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){const i=h.get(t);if(!i.problems)return r;r||(r=e.tr);const o=[];for(let e=0;e<i.height;e++)o.push(0);for(let e=0;e<i.problems.length;e++){const s=i.problems[e];if("collision"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;const i=e.attrs;for(let e=0;e<i.rowspan;e++)o[s.row+e]+=s.n;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,x(i,i.colspan-s.n,s.n))}else if("missing"==s.type)o[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<o.length;e++)o[e]&&(null==s&&(s=e),a=e);for(let l=0,c=n+1;l<i.height;l++){const n=t.child(l),i=c+n.nodeSize,u=o[l];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);const o=[];for(let n=0;n<u;n++){const n=d(e.schema)[t].createAndFill();n&&o.push(n)}const h=0!=l&&s!=l-1||a!=l?i-1:c+1;r.insert(r.mapping.map(h),o)}c=i}return r.setMeta(M,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&E(t.doc,e.doc,0,r):e.doc.descendants(r),n}function T(e,t){const n=e.createAndFill();return new u.wx(n).replace(0,n.content.size,t).doc}function _(e,t,n,r,i,o,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let c=i;c<o;c++){const i=s*t.width+c,o=t.map[i];if(t.map[i-t.width]==o){l=!0;const i=n.nodeAt(o),{top:u,left:h}=t.findCell(o);e.setNodeMarkup(e.mapping.slice(a).map(o+r),null,{...i.attrs,rowspan:s-u}),e.insert(e.mapping.slice(a).map(t.positionAt(s,h,n)),i.type.createAndFill({...i.attrs,rowspan:u+i.attrs.rowspan-s})),c+=i.attrs.colspan-1}}return l}function R(e,t,n,r,i,o,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let c=i;c<o;c++){const i=c*t.width+s,o=t.map[i];if(t.map[i-1]==o){l=!0;const i=n.nodeAt(o),u=t.colCount(o),h=e.mapping.slice(a).map(o+r);e.setNodeMarkup(h,null,x(i.attrs,s-u,i.attrs.colspan-(s-u))),e.insert(h+i.nodeSize,i.type.createAndFill(x(i.attrs,0,s-u))),c+=i.attrs.rowspan-1}}return l}function D(e,t,n,r,i){let o=n?e.doc.nodeAt(n-1):e.doc;if(!o)throw new Error("No table found");let s=h.get(o);const{top:l,left:c}=r,u=c+i.width,f=l+i.height,p=e.tr;let m=0;function g(){if(o=n?p.doc.nodeAt(n-1):p.doc,!o)throw new Error("No table found");s=h.get(o),m=p.mapping.maps.length}(function(e,t,n,r,i,o,s){const l=d(e.doc.type.schema);let c,u;if(i>t.width)for(let o=0,a=0;o<t.height;o++){const h=n.child(o);a+=h.nodeSize;const f=[];let d;d=null==h.lastChild||h.lastChild.type==l.cell?c||(c=l.cell.createAndFill()):u||(u=l.header_cell.createAndFill());for(let e=t.width;e<i;e++)f.push(d);e.insert(e.mapping.slice(s).map(a-1+r),f)}if(o>t.height){const h=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){const i=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==l.header_cell;h.push(i?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const f=l.row.create(null,a.HY.from(h)),d=[];for(let e=t.height;e<o;e++)d.push(f);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),d)}return!(!c&&!u)})(p,s,o,n,u,f,m)&&g(),_(p,s,o,n,c,u,l,m)&&g(),_(p,s,o,n,c,u,f,m)&&g(),R(p,s,o,n,l,f,c,m)&&g(),R(p,s,o,n,l,f,u,m)&&g();for(let e=l;e<f;e++){const t=s.positionAt(e,c,o),r=s.positionAt(e,u,o);p.replace(p.mapping.slice(m).map(t+n),p.mapping.slice(m).map(r+n),new a.p2(i.rows[e-l],0,0))}g(),p.setSelection(new k(p.doc.resolve(n+s.positionAt(l,c,o)),p.doc.resolve(n+s.positionAt(f-1,u-1,o)))),t(p)}var P=(0,c.$)({ArrowLeft:I("horiz",-1),ArrowRight:I("horiz",1),ArrowUp:I("vert",-1),ArrowDown:I("vert",1),"Shift-ArrowLeft":L("horiz",-1),"Shift-ArrowRight":L("horiz",1),"Shift-ArrowUp":L("vert",-1),"Shift-ArrowDown":L("vert",1),Backspace:j,"Mod-Backspace":j,Delete:j,"Mod-Delete":j});function N(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function I(e,t){return(n,r,i)=>{if(!i)return!1;const o=n.selection;if(o instanceof k)return N(n,r,s.Y1.near(o.$headCell,t));if("horiz"!=e&&!o.empty)return!1;const a=$(i,e,t);if(null==a)return!1;if("horiz"==e)return N(n,r,s.Y1.near(n.doc.resolve(o.head+t),t));{const i=n.doc.resolve(a),o=w(i,e,t);let l;return l=o?s.Y1.near(o,1):t<0?s.Y1.near(n.doc.resolve(i.before(-1)),-1):s.Y1.near(n.doc.resolve(i.after(-1)),1),N(n,r,l)}}}function L(e,t){return(n,r,i)=>{if(!i)return!1;const o=n.selection;let s;if(o instanceof k)s=o;else{const r=$(i,e,t);if(null==r)return!1;s=new k(n.doc.resolve(r))}const a=w(s.$headCell,e,t);return!!a&&N(n,r,new k(s.$anchorCell,a))}}function j(e,t){const n=e.selection;if(!(n instanceof k))return!1;if(t){const r=e.tr,i=d(e.schema).cell.createAndFill().content;n.forEachCell(((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new a.p2(i,0,0))})),r.docChanged&&t(r)}return!0}function F(e,t){const n=m(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new k(n))),!0)}function B(e,t,n){if(!g(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 i=t.child(0),o=i.type.spec.tableRole,s=i.type.schema,l=[];if("row"==o)for(let e=0;e<t.childCount;e++){let i=t.child(e).content;const o=e?0:Math.max(0,n-1),c=e<t.childCount-1?0:Math.max(0,r-1);(o||c)&&(i=T(d(s).row,new a.p2(i,o,c)).content),l.push(i)}else{if("cell"!=o&&"header_cell"!=o)return null;l.push(n||r?T(d(s).row,new a.p2(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:i,colspan:o}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+o}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(a.HY.empty),n[i]<r){const o=d(e).cell.createAndFill(),s=[];for(let e=n[i];e<r;e++)s.push(o);t[i]=t[i].append(a.HY.from(s))}return{height:t.length,width:r,rows:t}}(s,l)}(n);const i=e.state.selection;if(i instanceof k){r||(r={width:1,height:1,rows:[a.HY.from(T(d(e.state.schema).cell,n))]});const t=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=h.get(t).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=function({width:e,height:t,rows:n},r,i){if(e!=r){const t=[],i=[];for(let e=0;e<n.length;e++){const o=n[e],s=[];for(let n=t[e]||0,i=0;n<r;i++){let a=o.child(i%o.childCount);n+a.attrs.colspan>r&&(a=a.type.createChecked(x(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}i.push(a.HY.from(s))}n=i,e=r}if(t!=i){const e=[];for(let r=0,o=0;r<i;r++,o++){const s=[],l=n[o%t];for(let e=0;e<l.childCount;e++){let t=l.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),s.push(t)}e.push(a.HY.from(s))}n=e,t=i}return{width:e,height:t,rows:n}}(r,s.right-s.left,s.bottom-s.top),D(e.state,e.dispatch,o,s,r),!0}if(r){const t=y(e.state),n=t.start(-1);return D(e.state,e.dispatch,n,h.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function z(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=H(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof k)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(i=m(e.state.selection.$anchor))&&(null==(n=V(e,t))?void 0:n.pos)!=i.pos)o(i,t),t.preventDefault();else if(!r)return;function o(t,n){let r=V(e,n);const i=null==p.getState(e.state);if(!r||!b(t,r)){if(!i)return;r=t}const o=new k(t,r);if(i||!e.state.selection.eq(o)){const n=e.state.tr.setSelection(o);i&&n.setMeta(p,t.pos),e.dispatch(n)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),null!=p.getState(e.state)&&e.dispatch(e.state.tr.setMeta(p,-1))}function a(n){const i=n,a=p.getState(e.state);let l;if(null!=a)l=e.state.doc.resolve(a);else if(H(e,i.target)!=r&&(l=V(e,t),!l))return s();l&&o(l,i)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function $(e,t,n){if(!(e.state.selection instanceof s.Bs))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))return null;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){const o=r.before(i),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?o:null}}return null}function H(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function V(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?m(e.state.doc.resolve(n.pos)):null}var U=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")),W(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,W(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function W(e,t,n,r,i,o){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:h}=u.child(e).attrs;for(let e=0;e<s;e++,n++){const s=i==n?o:h&&h[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 q=new s.H$("tableColumnResizing");function K({handleWidth:e=5,cellMinWidth:t=25,View:n=U,lastColumnResizable:r=!0}={}){const i=new s.Sy({key:q,state:{init:(e,r)=>(i.spec.props.nodeViews[d(r.schema).table.name]=(e,r)=>new n(e,t,r),new G(-1,!1)),apply:(e,t)=>t.apply(e)},props:{attributes:e=>{const t=q.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r,i){const o=q.getState(e.state);if(o&&!o.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:i,right:o}=r.getBoundingClientRect();t.clientX-i<=n?s=J(e,t,"left",n):o-t.clientX<=n&&(s=J(e,t,"right",n))}if(s!=o.activeHandle){if(!i&&-1!==s){const t=e.state.doc.resolve(s),n=t.node(-1),r=h.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}Y(e,s)}}}(t,n,e,0,r)},mouseleave:e=>{!function(e){const t=q.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&Y(e,-1)}(e)},mousedown:(e,n)=>{!function(e,t,n){const r=q.getState(e.state);if(!r||-1==r.activeHandle||r.dragging)return!1;const i=e.state.doc.nodeAt(r.activeHandle),o=function(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const o=e.domAtPos(t);let s=o.node.childNodes[o.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,i.attrs);function s(t){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);const r=q.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){const r=e.state.doc.resolve(t),i=r.node(-1),o=h.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<o.height;e++){const t=e*o.width+a;if(e&&o.map[t]==o.map[t-o.width])continue;const r=o.map[t],u=i.nodeAt(r).attrs,h=1==u.colspan?0:a-o.colCount(r);if(u.colwidth&&u.colwidth[h]==n)continue;const f=u.colwidth?u.colwidth.slice():(c=u.colspan,Array(c).fill(0));f[h]=n,l.setNodeMarkup(s+r,null,{...u,colwidth:f})}var c;l.docChanged&&e.dispatch(l)}(e,r.activeHandle,Q(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(q,{setDragging:null})))}function a(t){if(!t.which)return s(t);const r=q.getState(e.state);if(r&&r.dragging){const i=Q(r.dragging,t,n);!function(e,t,n,r){const i=e.state.doc.resolve(t),o=i.node(-1),s=i.start(-1),a=h.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let l=e.domAtPos(i.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&W(o,l.firstChild,l,r,a,n)}(e,r.activeHandle,i,n)}}e.dispatch(e.state.tr.setMeta(q,{setDragging:{startX:t.clientX,startWidth:o}})),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault()}(e,n,t)}},decorations:e=>{const t=q.getState(e);if(t&&t.activeHandle>-1)return function(e,t){const n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return l.EH.empty;const o=h.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let e=0;e<o.height;e++){const t=a+e*o.width-1;if(!(a!=o.width&&o.map[t]==o.map[t+1]||0!=e&&o.map[t]==o.map[t-o.width])){const e=o.map[t],r=s+e+i.nodeAt(e).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(l.p.widget(r,a))}}return l.EH.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return i}var G=class{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(q);if(n&&null!=n.setHandle)return new G(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new G(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let n=e.mapping.map(t.activeHandle,-1);return v(e.doc.resolve(n))||(n=-1),new G(n,t.dragging)}return t}};function J(e,t,n,r){const i="right"==n?-r:r,o=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!o)return-1;const{pos:s}=o,a=m(e.state.doc.resolve(s));if(!a)return-1;if("right"==n)return a.pos;const l=h.get(a.node(-1)),c=a.start(-1),u=l.map.indexOf(a.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function Q(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Y(e,t){e.dispatch(e.state.tr.setMeta(q,{setHandle:t}))}function X(e){const t=e.selection,n=y(e),r=n.node(-1),i=n.start(-1),o=h.get(r);return{...t instanceof k?o.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):o.findCell(n.pos-i),tableStart:i,map:o,table:r}}function Z(e,{map:t,tableStart:n,table:r},i){let o=i>0?-1:0;(function(e,t,n){const r=d(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0})(t,r,i+o)&&(o=0==i||i==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){const o=t.map[a],l=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,S(l.attrs,i-t.colCount(o))),s+=l.attrs.rowspan-1}else{const l=null==o?d(r.type.schema).cell:r.nodeAt(t.map[a+o]).type,c=t.positionAt(s,i,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function ee(e,{map:t,table:n,tableStart:r},i){const o=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+i,l=t.map[a],c=n.nodeAt(l),u=c.attrs;if(i>0&&t.map[a-1]==l||i<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(o).map(r+l),null,x(u,i-t.colCount(l)));else{const t=e.mapping.slice(o).map(r+l);e.delete(t,t+c.nodeSize)}s+=u.rowspan}}function te(e,{map:t,tableStart:n,table:r},i){var o;let s=n;for(let e=0;e<i;e++)s+=r.child(e).nodeSize;const a=[];let l=i>0?-1:0;(function(e,t,n){var r;const i=d(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if((null==(r=t.nodeAt(e.map[o+n*e.width]))?void 0:r.type)!=i)return!1;return!0})(t,r,i+l)&&(l=0==i||i==t.height?null:0);for(let s=0,c=t.width*i;s<t.width;s++,c++)if(i>0&&i<t.height&&t.map[c]==t.map[c-t.width]){const i=t.map[c],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),s+=o.colspan-1}else{const e=null==l?d(r.type.schema).cell:null==(o=r.nodeAt(t.map[c+l*t.width]))?void 0:o.type,n=null==e?void 0:e.createAndFill();n&&a.push(n)}return e.insert(s,d(r.type.schema).row.create(null,a)),e}function ne(e,{map:t,table:n,tableStart:r},i){let o=0;for(let e=0;e<i;e++)o+=n.child(e).nodeSize;const s=o+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(o+r,s+r);for(let o=0,s=i*t.width;o<t.width;o++,s++){const l=t.map[s];if(i>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}),o+=t.colspan-1}else if(i<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),h=t.positionAt(i+1,o,n);e.insert(e.mapping.slice(a).map(r+h),u),o+=c.colspan-1}}}function re(e){const t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function ie(e,t){const n=e.selection;if(!(n instanceof k)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=X(e),{map:i}=r;if(function({width:e,height:t,map:n},r){let i=r.top*e+r.left,o=i,s=(r.bottom-1)*e+r.left,a=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[o]==n[o-1]||r.right<e&&n[a]==n[a+1])return!0;o+=e,a+=e}for(let o=r.left;o<r.right;o++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[s]==n[s+e])return!0;i++,s++}return!1}(i,r))return!1;if(t){const n=e.tr,o={};let s,l,c=a.HY.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){const a=i.map[e*i.width+t],u=r.table.nodeAt(a);if(!o[a]&&u)if(o[a]=!0,null==s)s=a,l=u;else{re(u)||(c=c.append(u.content));const e=n.mapping.map(a+r.tableStart);n.delete(e,e+u.nodeSize)}}if(null==s||null==l)return!0;if(n.setNodeMarkup(s+r.tableStart,null,{...S(l.attrs,l.attrs.colspan,r.right-r.left-l.attrs.colspan),rowspan:r.bottom-r.top}),c.size){const e=s+1+l.content.size,t=re(l)?s+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,c)}n.setSelection(new k(n.doc.resolve(s+r.tableStart))),t(n)}return!0}function oe(e,t){const n=d(e.schema);return(r=({node:e})=>n[e.type.spec.tableRole],(e,t)=>{var n;const i=e.selection;let o,s;if(i instanceof k){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;o=i.$anchorCell.nodeAfter,s=i.$anchorCell.pos}else{if(o=function(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from),!o)return!1;s=null==(n=m(i.$from))?void 0:n.pos}if(null==o||null==s)return!1;if(1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(t){let n=o.attrs;const a=[],l=n.colwidth;n.rowspan>1&&(n={...n,rowspan:1}),n.colspan>1&&(n={...n,colspan:1});const c=X(e),u=e.tr;for(let e=0;e<c.right-c.left;e++)a.push(l?{...n,colwidth:l&&l[e]?[l[e]]:null}:n);let h;for(let e=c.top;e<c.bottom;e++){let t=c.map.positionAt(e,c.left,c.table);e==c.top&&(t+=o.nodeSize);for(let n=c.left,i=0;n<c.right;n++,i++)n==c.left&&e==c.top||u.insert(h=u.mapping.map(t+c.tableStart,1),r({node:o,row:e,col:n}).createAndFill(a[i]))}u.setNodeMarkup(s,r({node:o,row:c.top,col:c.left}),a[0]),i instanceof k&&u.setSelection(new k(u.doc.resolve(i.$anchorCell.pos),h?u.doc.resolve(h):void 0)),t(u)}return!0})(e,t);var r}function se(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 i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function ae(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!g(t))return!1;if(n){const r=d(t.schema),i=X(t),o=t.tr,s=i.map.cellsInRect("column"==e?{left:i.left,top:0,right:i.right,bottom:i.map.height}:"row"==e?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map((e=>i.table.nodeAt(e)));for(let e=0;e<s.length;e++)a[e].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[e],r.cell,a[e].attrs);if(0==o.steps.length)for(let e=0;e<s.length;e++)o.setNodeMarkup(i.tableStart+s[e],r.header_cell,a[e].attrs);n(o)}return!0}}(e):function(t,n){if(!g(t))return!1;if(n){const r=d(t.schema),i=X(t),o=t.tr,s=se("row",i,r),a=se("column",i,r),l=("column"===e?s:"row"===e&&a)?1:0,c="column"==e?{left:0,top:l,right:1,bottom:i.map.height}:"row"==e?{left:l,top:0,right:i.map.width,bottom:1}:i,u="column"==e?a?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;i.map.cellsInRect(c).forEach((e=>{const t=e+i.tableStart,n=o.doc.nodeAt(t);n&&o.setNodeMarkup(t,u,n.attrs)})),n(o)}return!0}}ae("row",{useDeprecatedLogic:!0}),ae("column",{useDeprecatedLogic:!0});var le=ae("cell",{useDeprecatedLogic:!0});function ce(e){return function(t,n){if(!g(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),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;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}(y(t),e);if(null==r)return!1;if(n){const e=t.doc.resolve(r);n(t.tr.setSelection(s.Bs.between(e,(i=e,i.node(0).resolve(i.pos+i.nodeAfter.nodeSize)))).scrollIntoView())}var i;return!0}}function ue({allowTableNodeSelection:e=!1}={}){return new s.Sy({key:p,state:{init:()=>null,apply(e,t){const n=e.getMeta(p);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;const{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:O,handleDOMEvents:{mousedown:z},createSelectionBetween:e=>null!=p.getState(e.state)?e.state.selection:null,handleTripleClick:F,handleKeyDown:P,handlePaste:B},appendTransaction:(t,n,r)=>function(e,t,n){const r=(t||e).selection,i=(t||e).doc;let o,a;if(r instanceof s.qv&&(a=r.node.type.spec.tableRole)){if("cell"==a||"header_cell"==a)o=k.create(i,r.from);else if("row"==a){const e=i.resolve(r.from+1);o=k.rowSelection(e,e)}else if(!n){const e=h.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];o=k.create(i,t+1,n)}}else r instanceof s.Bs&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}(r)?o=s.Bs.create(i,r.from):r instanceof s.Bs&&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)&&(o=s.Bs.create(i,r.$from.start(),r.$from.end()));return o&&(t||(t=e.tr)).setSelection(o),t}(r,A(r,n),e)})}function he(e,t,n,r,i,o){let s=0,a=!0,l=t.firstChild;const c=e.firstChild;for(let e=0,n=0;e<c.childCount;e+=1){const{colspan:u,colwidth:h}=c.child(e).attrs;for(let e=0;e<u;e+=1,n+=1){const c=i===n?o:h&&h[e],u=c?`${c}px`:"";s+=c||r,c||(a=!1),l?(l.style.width!==u&&(l.style.width=u),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;l;){const e=l.nextSibling;l.parentNode.removeChild(l),l=e}a?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}class fe{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")),he(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,he(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"===e.type&&(e.target===this.table||this.colgroup.contains(e.target))}}function de(e,t){return t?e.createChecked(null,t):e.createAndFill()}const pe=({editor:e})=>{const{selection:t}=e.state;if(!(t instanceof k))return!1;let n=0;const r=(0,o.qv)(t.ranges[0].$from,(e=>"table"===e.type.name));return null==r||r.node.descendants((e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)})),n===t.ranges.length&&(e.commands.deleteTable(),!0)},me=o.NB.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:fe,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:e}){return["table",(0,o.P1)(this.options.HTMLAttributes,e),["tbody",0]]},addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:o})=>{const a=function(e,t,n,r,i){const o=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach((n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t}(e),s=[],a=[];for(let e=0;e<n;e+=1){const e=de(o.cell,i);if(e&&a.push(e),r){const e=de(o.header_cell,i);e&&s.push(e)}}const l=[];for(let e=0;e<t;e+=1)l.push(o.row.createChecked(null,r&&0===e?s:a));return o.table.createChecked(null,l)}(o.schema,e,t,n);if(i){const e=r.selection.anchor+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(s.Bs.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>function(e,t){if(!g(e))return!1;if(t){const n=X(e);t(Z(e.tr,n,n.left))}return!0}(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>function(e,t){if(!g(e))return!1;if(t){const n=X(e);t(Z(e.tr,n,n.right))}return!0}(e,t),deleteColumn:()=>({state:e,dispatch:t})=>function(e,t){if(!g(e))return!1;if(t){const n=X(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;ee(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=h.get(e)}t(r)}return!0}(e,t),addRowBefore:()=>({state:e,dispatch:t})=>function(e,t){if(!g(e))return!1;if(t){const n=X(e);t(te(e.tr,n,n.top))}return!0}(e,t),addRowAfter:()=>({state:e,dispatch:t})=>function(e,t){if(!g(e))return!1;if(t){const n=X(e);t(te(e.tr,n,n.bottom))}return!0}(e,t),deleteRow:()=>({state:e,dispatch:t})=>function(e,t){if(!g(e))return!1;if(t){const n=X(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;ne(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=h.get(n.table)}t(r)}return!0}(e,t),deleteTable:()=>({state:e,dispatch:t})=>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),mergeCells:()=>({state:e,dispatch:t})=>ie(e,t),splitCell:()=>({state:e,dispatch:t})=>oe(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>ae("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>ae("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>le(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>!!ie(e,t)||oe(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>function(e,t){return function(n,r){if(!g(n))return!1;const i=y(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){const o=n.tr;n.selection instanceof k?n.selection.forEachCell(((n,r)=>{n.attrs[e]!==t&&o.setNodeMarkup(r,null,{...n.attrs,[e]:t})})):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(o)}return!0}}(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>ce(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>ce(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&A(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const n=k.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:pe,"Mod-Backspace":pe,Delete:pe,"Mod-Delete":pe}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[K({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],ue({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:(0,o.nU)((0,o.Nl)(e,"tableRole",t))}}})},6279:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3845).hj.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${e.textAlign}`}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>!!this.options.alignments.includes(e)&&this.options.types.every((n=>t.updateAttributes(n,{textAlign:e}))),unsetTextAlign:()=>({commands:e})=>this.options.types.every((t=>e.resetAttributes(t,"textAlign")))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}})},3621:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3845);const i=r.vc.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=(0,r.Jo)(e,this.type);return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}})},2701:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3845).NB.create({name:"text",group:"inline"})},8510:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3845);const i=r.vc.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})},1284:(e,t,n)=>{"use strict";n.d(t,{T5:()=>f,fW:()=>m,jE:()=>u,kg:()=>l});var r=n(7294),i=n(3935),o=n(3845);const s=({renderers:e})=>r.createElement(r.Fragment,null,Object.entries(e).map((([e,t])=>i.createPortal(t.reactElement,t.element,e))));class a extends r.Component{constructor(e){super(e),this.editorContentRef=r.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:e}=this.props;if(e&&e.options.element){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=this,e.createNodeViews(),this.initialized=!0}}maybeFlushSync(e){this.initialized?(0,i.flushSync)(e):e()}setRenderer(e,t){this.maybeFlushSync((()=>{this.setState((({renderers:n})=>({renderers:{...n,[e]:t}})))}))}removeRenderer(e){this.maybeFlushSync((()=>{this.setState((({renderers:t})=>{const n={...t};return delete n[e],{renderers:n}}))}))}componentWillUnmount(){const{editor:e}=this.props;if(!e)return;if(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!e.options.element.firstChild)return;const t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){const{editor:e,...t}=this.props;return r.createElement(r.Fragment,null,r.createElement("div",{ref:this.editorContentRef,...t}),r.createElement(s,{renderers:this.state.renderers}))}}const l=r.memo((e=>{const t=r.useMemo((()=>Math.floor(4294967295*Math.random()).toString()),[e.editor]);return r.createElement(a,{key:t,...e})}));class c extends o.ML{constructor(){super(...arguments),this.contentComponent=null}}const u=(e={},t=[])=>{const[n,i]=(0,r.useState)(null),o=function(){const[,e]=(0,r.useState)(0);return()=>e((e=>e+1))}(),{onBeforeCreate:s,onBlur:a,onCreate:l,onDestroy:u,onFocus:h,onSelectionUpdate:f,onTransaction:d,onUpdate:p}=e,m=(0,r.useRef)(s),g=(0,r.useRef)(a),y=(0,r.useRef)(l),v=(0,r.useRef)(u),b=(0,r.useRef)(h),w=(0,r.useRef)(f),x=(0,r.useRef)(d),S=(0,r.useRef)(p);return(0,r.useEffect)((()=>{n&&(s&&(n.off("beforeCreate",m.current),n.on("beforeCreate",s),m.current=s),a&&(n.off("blur",g.current),n.on("blur",a),g.current=a),l&&(n.off("create",y.current),n.on("create",l),y.current=l),u&&(n.off("destroy",v.current),n.on("destroy",u),v.current=u),h&&(n.off("focus",b.current),n.on("focus",h),b.current=h),f&&(n.off("selectionUpdate",w.current),n.on("selectionUpdate",f),w.current=f),d&&(n.off("transaction",x.current),n.on("transaction",d),x.current=d),p&&(n.off("update",S.current),n.on("update",p),S.current=p))}),[s,a,l,u,h,f,d,p,n]),(0,r.useEffect)((()=>{let t=!0;const n=new c(e);return i(n),n.on("transaction",(()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t&&o()}))}))})),()=>{t=!1}}),t),(0,r.useEffect)((()=>()=>{null==n||n.destroy()}),[n]),n},h=((0,r.createContext)({editor:null}).Consumer,(0,r.createContext)({onDragStart:void 0})),f=r.forwardRef(((e,t)=>{const{onDragStart:n}=(0,r.useContext)(h),i=e.as||"div";return r.createElement(i,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})}));class d{constructor(e,{editor:t,props:n={},as:r="div",className:i="",attrs:o}){this.ref=null,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),o&&Object.keys(o).forEach((e=>{this.element.setAttribute(e,o[e])})),this.render()}render(){var e,t;const n=this.component,i=this.props;(function(e){return!("function"!=typeof e||!e.prototype||!e.prototype.isReactComponent)}(n)||function(e){var t;return!("object"!=typeof e||"Symbol(react.forward_ref)"!==(null===(t=e.$$typeof)||void 0===t?void 0:t.toString()))}(n))&&(i.ref=e=>{this.ref=e}),this.reactElement=r.createElement(n,{...i}),null===(t=null===(e=this.editor)||void 0===e?void 0:e.contentComponent)||void 0===t||t.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e,t;null===(t=null===(e=this.editor)||void 0===e?void 0:e.contentComponent)||void 0===t||t.removeRenderer(this.id)}}class p extends o.DK{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}const t=e=>{const t=this.component,n=this.onDragStart.bind(this);return r.createElement(r.Fragment,null,r.createElement(h.Provider,{value:{onDragStart:n,nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&e.appendChild(this.contentDOMElement)}}},r.createElement(t,{...e})))};t.displayName="ReactNodeView",this.contentDOMElement=this.node.isLeaf?null:document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit");let n=this.node.isInline?"span":"div";this.options.as&&(n=this.options.as);const{className:i=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new d(t,{editor:this.editor,props:e,as:n,className:`node-${this.node.type.name} ${i}`.trim(),attrs:this.options.attrs})}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null===(e=this.renderer.element.firstElementChild)||void 0===e?void 0:e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:e,to:t}=this.editor.state.selection;e<=this.getPos()&&t>=this.getPos()+this.node.nodeSize?this.selectNode():this.deselectNode()}update(e,t){const n=e=>{this.renderer.updateProps(e)};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){const r=this.node,i=this.decorations;return this.node=e,this.decorations=t,this.options.update({oldNode:r,oldDecorations:i,newNode:e,newDecorations:t,updateProps:()=>n({node:e,decorations:t})})}return e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,n({node:e,decorations:t})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}}function m(e,t){return n=>n.editor.contentComponent?new p(e,n,t):{}}},2861:(e,t,n)=>{"use strict";function r(e,t){return function(){return e.apply(t,arguments)}}n.d(t,{Z:()=>Le});const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,s=(a=Object.create(null),e=>{const t=i.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const l=e=>(e=e.toLowerCase(),t=>s(t)===e),c=e=>t=>typeof t===e,{isArray:u}=Array,h=c("undefined"),f=l("ArrayBuffer"),d=c("string"),p=c("function"),m=c("number"),g=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==s(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},v=l("Date"),b=l("File"),w=l("Blob"),x=l("FileList"),S=l("URLSearchParams");function k(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),u(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(r=0;r<o;r++)s=i[r],t.call(null,e[s],s,e)}}function C(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,M=e=>!h(e)&&e!==O,E=(A="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>A&&e instanceof A);var A;const T=l("HTMLFormElement"),_=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),R=l("RegExp"),D=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};k(n,((n,i)=>{!1!==t(n,i,e)&&(r[i]=n)})),Object.defineProperties(e,r)},P="abcdefghijklmnopqrstuvwxyz",N="0123456789",I={DIGIT:N,ALPHA:P,ALPHA_DIGIT:P+P.toUpperCase()+N},L={isArray:u,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||i.call(e)===t||p(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:d,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:y,isUndefined:h,isDate:v,isFile:b,isBlob:w,isRegExp:R,isFunction:p,isStream:e=>g(e)&&p(e.pipe),isURLSearchParams:S,isTypedArray:E,isFileList:x,forEach:k,merge:function e(){const{caseless:t}=M(this)&&this||{},n={},r=(r,i)=>{const o=t&&C(n,i)||i;y(n[o])&&y(r)?n[o]=e(n[o],r):y(r)?n[o]=e({},r):u(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&k(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:i}={})=>(k(t,((t,i)=>{n&&p(t)?e[i]=r(t,n):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,s,a;const l={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],r&&!r(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&o(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:l,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:T,hasOwnProperty:_,hasOwnProp:_,reduceDescriptors:D,freezeMethods:e=>{D(e,((t,n)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];p(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return u(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:C,global:O,isContextDefined:M,ALPHABET:I,generateString:(e=16,t=I.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=u(e)?[]:{};return k(e,((e,t)=>{const o=n(e,r+1);!h(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)}};function j(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}L.inherits(j,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const F=j.prototype,B={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{B[e]={value:e}})),Object.defineProperties(j,B),Object.defineProperty(F,"isAxiosError",{value:!0}),j.from=(e,t,n,r,i,o)=>{const s=Object.create(F);return L.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),j.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const z=j;function $(e){return L.isPlainObject(e)||L.isArray(e)}function H(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function V(e,t,n){return e?e.concat(t).map((function(e,t){return e=H(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const U=L.toFlatObject(L,{},null,(function(e){return/^is[A-Z]/.test(e)})),W=function(e,t,n){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!L.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(L.isDate(e))return e.toISOString();if(!a&&L.isBlob(e))throw new z("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(e)||L.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(L.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(L.isArray(e)&&function(e){return L.isArray(e)&&!e.some($)}(e)||(L.isFileList(e)||L.endsWith(n,"[]"))&&(a=L.toArray(e)))return n=H(n),a.forEach((function(e,r){!L.isUndefined(e)&&null!==e&&t.append(!0===s?V([n],r,o):null===s?n:n+"[]",l(e))})),!1;return!!$(e)||(t.append(V(i,n,o),l(e)),!1)}const u=[],h=Object.assign(U,{defaultVisitor:c,convertValue:l,isVisitable:$});if(!L.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!L.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),L.forEach(n,(function(n,o){!0===(!(L.isUndefined(n)||null===n)&&i.call(t,n,L.isString(o)?o.trim():o,r,h))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function q(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function K(e,t){this._pairs=[],e&&W(e,this,t)}const G=K.prototype;G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){const t=e?function(t){return e.call(this,t,q)}:q;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const J=K;function Q(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Y(e,t,n){if(!t)return e;const r=n&&n.encode||Q,i=n&&n.serialize;let o;if(o=i?i(t,n):L.isURLSearchParams(t)?t.toString():new J(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const X=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){L.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ee={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:J,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},te=function(e){function t(e,n,r,i){let o=e[i++];const s=Number.isFinite(+o),a=i>=e.length;return o=!o&&L.isArray(r)?r.length:o,a?(L.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s):(r[o]&&L.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&L.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}(r[o])),!s)}if(L.isFormData(e)&&L.isFunction(e.entries)){const n={};return L.forEachEntry(e,((e,r)=>{t(function(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},ne={"Content-Type":void 0},re={transitional:Z,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=L.isObject(e);if(i&&L.isHTMLForm(e)&&(e=new FormData(e)),L.isFormData(e))return r&&r?JSON.stringify(te(e)):e;if(L.isArrayBuffer(e)||L.isBuffer(e)||L.isStream(e)||L.isFile(e)||L.isBlob(e))return e;if(L.isArrayBufferView(e))return e.buffer;if(L.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return W(e,new ee.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ee.isNode&&L.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=L.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return W(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(L.isString(e))try{return(0,JSON.parse)(e),L.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||re.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&L.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw z.from(e,z.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ee.classes.FormData,Blob:ee.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};L.forEach(["delete","get","head"],(function(e){re.headers[e]={}})),L.forEach(["post","put","patch"],(function(e){re.headers[e]=L.merge(ne)}));const ie=re,oe=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),se=Symbol("internals");function ae(e){return e&&String(e).trim().toLowerCase()}function le(e){return!1===e||null==e?e:L.isArray(e)?e.map(le):String(e)}function ce(e,t,n,r,i){return L.isFunction(r)?r.call(this,t,n):(i&&(t=n),L.isString(t)?L.isString(r)?-1!==t.indexOf(r):L.isRegExp(r)?r.test(t):void 0:void 0)}class ue{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=ae(t);if(!i)throw new Error("header name must be a non-empty string");const o=L.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=le(e))}const o=(e,t)=>L.forEach(e,((e,n)=>i(e,n,t)));return L.isPlainObject(e)||e instanceof this.constructor?o(e,t):L.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&oe[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=ae(e)){const n=L.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(L.isFunction(t))return t.call(this,e,n);if(L.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ae(e)){const n=L.findKey(this,e);return!(!n||void 0===this[n]||t&&!ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=ae(e)){const i=L.findKey(n,e);!i||t&&!ce(0,n[i],i,t)||(delete n[i],r=!0)}}return L.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!ce(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return L.forEach(this,((r,i)=>{const o=L.findKey(n,i);if(o)return t[o]=le(r),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete t[i],t[s]=le(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return L.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&L.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[se]=this[se]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ae(e);t[r]||(function(e,t){const n=L.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return L.isArray(e)?e.forEach(r):r(e),this}}ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.freezeMethods(ue.prototype),L.freezeMethods(ue);const he=ue;function fe(e,t){const n=this||ie,r=t||n,i=he.from(r.headers);let o=r.data;return L.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function de(e){return!(!e||!e.__CANCEL__)}function pe(e,t,n){z.call(this,null==e?"canceled":e,z.ERR_CANCELED,t,n),this.name="CanceledError"}L.inherits(pe,z,{__CANCEL__:!0});const me=pe,ge=ee.isStandardBrowserEnv?{write:function(e,t,n,r,i,o){const s=[];s.push(e+"="+encodeURIComponent(t)),L.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),L.isString(r)&&s.push("path="+r),L.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ye(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ve=ee.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=L.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function be(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[s];i||(i=l),n[o]=a,r[o]=l;let u=s,h=0;for(;u!==o;)h+=n[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const f=c&&l-c;return f?Math.round(1e3*h/f):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a);n=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const we={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const i=he.from(e.headers).normalize(),o=e.responseType;let s;function a(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}L.isFormData(r)&&(ee.isStandardBrowserEnv||ee.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const c=ye(e.baseURL,e.url);function u(){if(!l)return;const r=he.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new z("Request failed with status code "+n.status,[z.ERR_BAD_REQUEST,z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),a()}),(function(e){n(e),a()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),Y(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=u:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(u)},l.onabort=function(){l&&(n(new z("Request aborted",z.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new z("Network Error",z.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Z;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new z(t,r.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,l)),l=null},ee.isStandardBrowserEnv){const t=(e.withCredentials||ve(c))&&e.xsrfCookieName&&ge.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===r&&i.setContentType(null),"setRequestHeader"in l&&L.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),L.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",be(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",be(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(n(!t||t.type?new me(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);h&&-1===ee.protocols.indexOf(h)?n(new z("Unsupported protocol "+h+":",z.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};L.forEach(we,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));function xe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new me(null,e)}function Se(e){return xe(e),e.headers=he.from(e.headers),e.data=fe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=L.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=L.isString(n)?we[n.toLowerCase()]:n));i++);if(!r){if(!1===r)throw new z(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(L.hasOwnProp(we,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!L.isFunction(r))throw new TypeError("adapter is not a function");return r})(e.adapter||ie.adapter)(e).then((function(t){return xe(e),t.data=fe.call(e,e.transformResponse,t),t.headers=he.from(t.headers),t}),(function(t){return de(t)||(xe(e),t&&t.response&&(t.response.data=fe.call(e,e.transformResponse,t.response),t.response.headers=he.from(t.response.headers))),Promise.reject(t)}))}const ke=e=>e instanceof he?e.toJSON():e;function Ce(e,t){t=t||{};const n={};function r(e,t,n){return L.isPlainObject(e)&&L.isPlainObject(t)?L.merge.call({caseless:n},e,t):L.isPlainObject(t)?L.merge({},t):L.isArray(t)?t.slice():t}function i(e,t,n){return L.isUndefined(t)?L.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!L.isUndefined(t))return r(void 0,t)}function s(e,t){return L.isUndefined(t)?L.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(ke(e),ke(t),!0)};return L.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const o=l[r]||i,s=o(e[r],t[r],r);L.isUndefined(s)&&o!==a||(n[r]=s)})),n}const Oe={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Oe[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Me={};Oe.transitional=function(e,t,n){function r(e,t){return"[Axios v1.3.5] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new z(r(i," has been removed"+(t?" in "+t:"")),z.ERR_DEPRECATED);return t&&!Me[i]&&(Me[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const Ee={assertOptions:function(e,t,n){if("object"!=typeof e)throw new z("options must be an object",z.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new z("option "+o+" must be "+n,z.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new z("Unknown option "+o,z.ERR_BAD_OPTION)}},validators:Oe},Ae=Ee.validators;class Te{constructor(e){this.defaults=e,this.interceptors={request:new X,response:new X}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ce(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;let o;void 0!==n&&Ee.assertOptions(n,{silentJSONParsing:Ae.transitional(Ae.boolean),forcedJSONParsing:Ae.transitional(Ae.boolean),clarifyTimeoutError:Ae.transitional(Ae.boolean)},!1),null!=r&&(L.isFunction(r)?t.paramsSerializer={serialize:r}:Ee.assertOptions(r,{encode:Ae.function,serialize:Ae.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),o=i&&L.merge(i.common,i[t.method]),o&&L.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=he.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,h=0;if(!a){const e=[Se.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);h<u;)c=c.then(e[h++],e[h++]);return c}u=s.length;let f=t;for(h=0;h<u;){const e=s[h++],t=s[h++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=Se.call(this,f)}catch(e){return Promise.reject(e)}for(h=0,u=l.length;h<u;)c=c.then(l[h++],l[h++]);return c}getUri(e){return Y(ye((e=Ce(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}L.forEach(["delete","get","head","options"],(function(e){Te.prototype[e]=function(t,n){return this.request(Ce(n||{},{method:e,url:t,data:(n||{}).data}))}})),L.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(Ce(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Te.prototype[e]=t(),Te.prototype[e+"Form"]=t(!0)}));const _e=Te;class Re{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new me(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Re((function(t){e=t})),cancel:e}}}const De=Re,Pe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pe).forEach((([e,t])=>{Pe[t]=e}));const Ne=Pe,Ie=function e(t){const n=new _e(t),i=r(_e.prototype.request,n);return L.extend(i,_e.prototype,n,{allOwnKeys:!0}),L.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(Ce(t,n))},i}(ie);Ie.Axios=_e,Ie.CanceledError=me,Ie.CancelToken=De,Ie.isCancel=de,Ie.VERSION="1.3.5",Ie.toFormData=W,Ie.AxiosError=z,Ie.Cancel=Ie.CanceledError,Ie.all=function(e){return Promise.all(e)},Ie.spread=function(e){return function(t){return e.apply(null,t)}},Ie.isAxiosError=function(e){return L.isObject(e)&&!0===e.isAxiosError},Ie.mergeConfig=Ce,Ie.AxiosHeaders=he,Ie.formToJSON=e=>te(L.isHTMLForm(e)?new FormData(e):e),Ie.HttpStatusCode=Ne,Ie.default=Ie;const Le=Ie},2902:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(e){return!!e&&!!e[U]}function o(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===W}(e)||Array.isArray(e)||!!e[V]||!!(null===(t=e.constructor)||void 0===t?void 0:t[V])||h(e)||f(e))}function s(e){return i(e)||r(23,e),e[U].t}function a(e,t,n){void 0===n&&(n=!1),0===l(e)?(n?Object.keys:q)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function l(e){var t=e[U];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:f(e)?3:0}function c(e,t){return 2===l(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t,n){var r=l(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function h(e){return B&&e instanceof Map}function f(e){return z&&e instanceof Set}function d(e){return e.o||e.t}function p(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=K(e);delete t[U];for(var n=q(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function m(e,t){return void 0===t&&(t=!1),y(e)||i(e)||!o(e)||(l(e)>1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&a(e,(function(e,t){return m(t,!0)}),!0)),e}function g(){r(2)}function y(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(e){var t=G[e];return t||r(18,e),t}function b(){return j}function w(e,t){t&&(v("Patches"),e.u=[],e.s=[],e.v=t)}function x(e){S(e),e.p.forEach(C),e.p=null}function S(e){e===j&&(j=e.l)}function k(e){return j={p:[],l:j,h:e,m:!0,_:0}}function C(e){var t=e[U];0===t.i||1===t.i?t.j():t.g=!0}function O(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.O||v("ES5").S(t,e,i),i?(n[U].P&&(x(t),r(4)),o(e)&&(e=M(t,e),t.l||A(t,e)),t.u&&v("Patches").M(n[U].t,e,t.u,t.s)):e=M(t,n,[]),x(t),t.u&&t.v(t.u,t.s),e!==H?e:void 0}function M(e,t,n){if(y(t))return t;var r=t[U];if(!r)return a(t,(function(i,o){return E(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return A(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=p(r.k):r.o,o=i,s=!1;3===r.i&&(o=new Set(i),i.clear(),s=!0),a(o,(function(t,o){return E(e,r,i,t,o,n,s)})),A(e,i,!1),n&&e.u&&v("Patches").N(r,n,e.u,e.s)}return r.o}function E(e,t,n,r,s,a,l){if(i(s)){var h=M(e,s,a&&t&&3!==t.i&&!c(t.R,r)?a.concat(r):void 0);if(u(n,r,h),!i(h))return;e.m=!1}else l&&n.add(s);if(o(s)&&!y(s)){if(!e.h.D&&e._<1)return;M(e,s),t&&t.A.l||A(e,s)}}function A(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&m(t,n)}function T(e,t){var n=e[U];return(n?d(n):e)[t]}function _(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function R(e){e.P||(e.P=!0,e.l&&R(e.l))}function D(e){e.o||(e.o=p(e.t))}function P(e,t,n){var r=h(t)?v("MapSet").F(t,n):f(t)?v("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:b(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=J;n&&(i=[r],o=Q);var s=Proxy.revocable(i,o),a=s.revoke,l=s.proxy;return r.k=l,r.j=a,l}(t,n):v("ES5").J(t,n);return(n?n.A:b()).p.push(r),r}function N(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[U],i=l(t);if(r){if(!r.P&&(r.i<4||!v("ES5").K(r)))return r.t;r.I=!0,n=I(t,i),r.I=!1}else n=I(t,i);return a(n,(function(t,i){r&&function(e,t){return 2===l(e)?e.get(t):e[t]}(r.t,t)===i||u(n,t,e(i))})),3===i?new Set(n):n}(e)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return p(e)}n.d(t,{Fl:()=>ee,Js:()=>s,Uy:()=>Z,ZP:()=>te,mv:()=>i});var L,j,F="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),B="undefined"!=typeof Map,z="undefined"!=typeof Set,$="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=F?Symbol.for("immer-nothing"):((L={})["immer-nothing"]=!0,L),V=F?Symbol.for("immer-draftable"):"__$immer_draftable",U=F?Symbol.for("immer-state"):"__$immer_state",W=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),q="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,K=Object.getOwnPropertyDescriptors||function(e){var t={};return q(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},G={},J={get:function(e,t){if(t===U)return e;var n=d(e);if(!c(n,t))return function(e,t,n){var r,i=_(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!o(r)?r:r===T(e.t,t)?(D(e),e.o[t]=P(e.A.h,r,e)):r},has:function(e,t){return t in d(e)},ownKeys:function(e){return Reflect.ownKeys(d(e))},set:function(e,t,n){var r=_(d(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=T(d(e),t),o=null==i?void 0:i[U];if(o&&o.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,i)&&(void 0!==n||c(e.t,t)))return!0;D(e),R(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==T(e.t,t)||t in e.t?(e.R[t]=!1,D(e),R(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=d(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},Q={};a(J,(function(e,t){Q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Q.deleteProperty=function(e,t){return Q.set.call(this,e,t,void 0)},Q.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var Y=function(){function e(e){var t=this;this.O=$,this.D=!0,this.produce=function(e,n,i){if("function"==typeof e&&"function"!=typeof n){var s=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=s);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(i))}))}}var l;if("function"!=typeof n&&r(6),void 0!==i&&"function"!=typeof i&&r(7),o(e)){var c=k(t),u=P(t,e,void 0),h=!0;try{l=n(u),h=!1}finally{h?x(c):S(c)}return"undefined"!=typeof Promise&&l instanceof Promise?l.then((function(e){return w(c,i),O(e,c)}),(function(e){throw x(c),e})):(w(c,i),O(l,c))}if(!e||"object"!=typeof e){if(void 0===(l=n(e))&&(l=e),l===H&&(l=void 0),t.D&&m(l,!0),i){var f=[],d=[];v("Patches").M(e,l,f,d),i(f,d)}return l}r(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,o=t.produce(e,n,(function(e,t){r=e,i=t}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return[e,r,i]})):[o,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){o(e)||r(8),i(e)&&(e=N(e));var t=k(this),n=P(this,e,void 0);return n[U].C=!0,S(t),n},t.finishDraft=function(e,t){var n=(e&&e[U]).A;return w(n,t),O(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!$&&r(20),this.O=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=v("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),X=new Y,Z=X.produce,ee=(X.produceWithPatches.bind(X),X.setAutoFreeze.bind(X));X.setUseProxies.bind(X),X.applyPatches.bind(X),X.createDraft.bind(X),X.finishDraft.bind(X);const te=Z},2337:(e,t,n)=>{"use strict";n.d(t,{$:()=>p,h:()=>d});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)r[48+a]=r[96+a]=String(a);for(a=1;a<=24;a++)r[a+111]="F"+a;for(a=65;a<=90;a++)r[a]=String.fromCharCode(a+32),i[a]=String.fromCharCode(a);for(var l in r)i.hasOwnProperty(l)||(i[l]=r[l]);var c=n(2376);const u="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function h(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e<o.length-1;e++){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!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);u?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function f(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 d(e){return new c.Sy({props:{handleKeyDown:p(e)}})}function p(e){let t=function(e){let t=Object.create(null);for(let n in e)t[h(n)]=e[n];return t}(e);return function(e,n){let a,l=function(e){var t=!(o&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||s&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?i: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[f(l,n)];if(c&&c(e.state,e.dispatch,e))return!0;if(1==l.length&&" "!=l){if(n.shiftKey){let r=t[f(l,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.shiftKey||n.altKey||n.metaKey||l.charCodeAt(0)>127)&&(a=r[n.keyCode])&&a!=l){let r=t[f(a,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},7823:(e,t,n)=>{"use strict";function r(e){this.content=e}n.d(t,{aw:()=>Y,PW:()=>ue,HY:()=>a,vc:()=>h,ZU:()=>G,NB:()=>R,Ts:()=>T,e4:()=>f,V_:()=>J,p2:()=>d}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,o=i.find(e),s=i.content.slice();return-1==o?s.push(n||e,t):(s[o+1]=t,n&&(s[o]=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 i=this.remove(t),o=i.content.slice(),s=i.find(e);return o.splice(-1==s?o.length:s,0,t,n),new r(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach((function(t,n){e[t]=n})),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};const i=r;function o(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),s=t.child(r);if(i!=s){if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let e=0;i.text[e]==s.text[e];e++)n++;return n}if(i.content.size||s.content.size){let e=o(i.content,s.content,n+1);if(null!=e)return e}n+=i.nodeSize}else n+=i.nodeSize}}function s(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let a=e.child(--i),l=t.child(--o),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,i){for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),n,r+i)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(i+=s.text.slice(Math.max(e,a)-a,t-a),o=!n):s.isLeaf?(r?i+="function"==typeof r?r(s):r:s.type.spec.leafText&&(i+=s.type.spec.leafText(s)),o=!n):!o&&s.isBlock&&(i+=n,o=!0)}),0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new 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 i=0,o=0;o<t;i++){let s=this.content[i],a=o+s.nodeSize;a>e&&((o<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),r+=s.nodeSize),o=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(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new a(r,i)}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 o(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 i=r+this.child(n).nodeSize;if(i>=e)return i==e||t>0?c(n+1,i):c(n,r);r=i}}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 i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new 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 h{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&u(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw 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 h.none;if(e instanceof h)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}h.none=[];class f extends Error{}class d{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 d(n,this.openStart,this.openEnd)}removeBetween(e,t){return new d(p(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 d.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 d(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 d(e,n,r)}}function p(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.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,o.copy(p(o.content,t-i-1,n-i-1)))}function m(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=m(s.content,t-o-1,n);return a&&e.replaceChild(i,s.copy(a))}function g(e,t,n){if(n.openStart>e.depth)throw new f("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new f("Inconsistent open depths");return y(e,t,n,0)}function y(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=y(e,t,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:i,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 S(o,k(e,i,s,t,r))}{let r=e.parent,i=r.content;return S(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}}return S(o,C(e,t,r))}function v(e,t){if(!t.type.compatibleContent(e.type))throw new f("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 x(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(w(e.nodeAfter,r),o++));for(let e=o;e<s;e++)w(i.child(e),r);t&&t.depth==n&&t.textOffset&&w(t.nodeBefore,r)}function S(e,t){return e.type.checkContent(t),e.copy(t)}function k(e,t,n,r,i){let o=e.depth>i&&b(e,t,i+1),s=r.depth>i&&b(n,r,i+1),l=[];return x(null,e,i,l),o&&s&&t.index(i)==n.index(i)?(v(o,s),w(S(o,k(e,t,n,r,i+1)),l)):(o&&w(S(o,C(e,t,i+1)),l),x(t,n,i,l),s&&w(S(s,C(n,r,i+1)),l)),x(r,null,i,l),new a(l)}function C(e,t,n){let r=[];return x(null,e,n,r),e.depth>n&&w(S(b(e,t,n+1),C(e,t,n+1)),r),x(t,null,n,r),new a(r)}d.empty=new d(a.empty,0,0);class O{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 h.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new T(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,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),s=i-o;if(n.push(t,e,r+o),!s)break;if(t=t.child(e),t.isText)break;i=s-1,r+=o+1}return new O(t,n,i)}static resolveCached(e,t){for(let n=0;n<M.length;n++){let r=M[n];if(r.pos==t&&r.doc==e)return r}let n=M[E]=O.resolve(e,t);return E=(E+1)%A,n}}let M=[],E=0,A=12;class T{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 _=Object.create(null);class R{constructor(e,t,n,r=h.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||_)&&h.sameSet(this.marks,n||h.none)}copy(e=null){return e==this.content?this:new R(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new R(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 d.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),s=r.start(o),a=r.node(o).content.cut(r.pos-s,i.pos-s);return new d(a,r.depth-o,i.depth-o)}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 O.resolveCached(this,e)}resolveNoCache(e){return O.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()+")"),P(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,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=h.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!h.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)}}R.prototype.text=void 0;class D extends R{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):P(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 D(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new D(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 P(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class N{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new I(e,t);if(null==n.next)return N.empty;let r=L(n);n.next&&n.err("Unexpected trailing text");let i=function(e){let t=Object.create(null);return function n(r){let i=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);H(e,n).forEach((e=>{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let o=t[r.join(",")]=new N(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort($);o.next.push({type:i[e][0],next:t[r.join(",")]||n(r)})}return o}(H(e,0))}(function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(e(n,o))),[]);if("seq"!=t.type){if("star"==t.type){let s=n();return r(o,s),i(e(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return i(e(t.expr,o),s),i(e(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(o)].concat(e(t.expr,o));if("range"==t.type){let s=o;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,s),r),s=r}if(-1==t.max)i(e(t.expr,s),s);else for(let o=t.min;o<t.max;o++){let o=n();r(s,o),i(e(t.expr,s),o),s=o}return[r(s)]}if("name"==t.type)return[r(o,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=e(t.exprs[r],o);if(r==t.exprs.length-1)return s;i(s,o=n())}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach((e=>e.to=t))}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];o.push(n.name),!i||n.isText||n.hasRequiredAttrs()||(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,n),i}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 i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(o,s){let l=o.matchFragment(e,n);if(l&&(!t||l.validEnd))return a.from(s.map((e=>e.createAndFill())));for(let e=0;e<o.next.length;e++){let{type:t,next:n}=o.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=i(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:s}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),t[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw 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")}}N.empty=new N(!0);class I{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(j(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function j(e){let t=[];do{t.push(F(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function F(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 i=[];for(let e in n){let r=n[e];r.groups.indexOf(t)>-1&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.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=z(e,t)}return t}function B(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function z(e,t){let n=B(e),r=n;return e.eat(",")&&(r="}"!=e.next?B(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function $(e,t){return t-e}function H(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:o}=i[e];r||-1!=n.indexOf(o)||t(o)}}(t),n.sort($)}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 i=t&&t[r];if(void 0===i){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=t.default}n[r]=i}return n}function W(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new K(e[n]);return t}class q{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==N.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 R(this,this.computeAttrs(e),a.from(t),h.setFrom(n))}createChecked(e=null,t,n){return t=a.from(t),this.checkContent(t),new R(this,this.computeAttrs(e),t,h.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),i=r&&r.fillBefore(a.empty,!0);return i?new R(this,e,t.append(i),h.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:h.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new q(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 K{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 i=V(this.attrs);this.instance=i?new h(this,i):null}create(e=null){return!e&&this.instance?this.instance:new h(this,U(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,i)=>n[e]=new G(e,r++,t,i))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class J{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=i.from(e.nodes),t.marks=i.from(e.marks||{}),this.nodes=q.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||"",i=t.spec.marks;t.contentMatch=n[r]||(n[r]=N.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.markSet="_"==i?null:i?Q(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:Q(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 q))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 D(n,n.defaultAttrs,e,h.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return R.fromJSON(this,e)}markFromJSON(e){return h.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Q(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class Y{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 se(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new se(this,t,!0);return n.addAll(e,t.from,t.to),d.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(ae(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 i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(!(0!=o.indexOf(e)||r.context&&!n.matchesContext(r.context)||o.length>e.length&&(61!=o.charCodeAt(e.length)||o.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach((e=>{n(e=le(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=le(e)),e.node||e.ignore||e.mark||(e.node=t)}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Y(e,Y.schemaRules(e)))}}const X={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},Z={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ee={ol:!0,ul:!0},te=1,ne=2,re=4;function ie(e,t,n){return null!=t?(t?te:0)|("full"===t?ne:0):e&&"pre"==e.whitespace?te|ne:n&~re}class oe{constructor(e,t,n,r,i,o,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=h.none,this.stashMarks=[],this.match=o||(s&re?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(!(this.options&te)){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):ce(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&&!X.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class se{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,i=t.topNode,o=ie(null,t.preserveWhitespace,0)|(n?re:0);r=i?new oe(i.type,i.attrs,h.none,h.none,!0,t.topMatch||i.type.contentMatch,o):new oe(n?null:e.schema.topNodeType,null,h.none,h.none,!0,null,o),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){3==e.nodeType?this.addTextNode(e):1==e.nodeType&&this.addElement(e)}withStyleRules(e,t){let n=e.getAttribute("style");if(!n)return t();let r=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}(n));if(!r)return;let[i,o]=r,s=this.top;for(let e=0;e<o.length;e++)this.removePendingMark(o[e],s);for(let e=0;e<i.length;e++)this.addPendingMark(i[e]);t();for(let e=0;e<i.length;e++)this.removePendingMark(i[e],s);for(let e=0;e<o.length;e++)this.addPendingMark(o[e])}addTextNode(e){let t=e.nodeValue,n=this.top;if(n.options&ne||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(n.options&te)t=n.options&ne?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],i=e.previousSibling;(!r||i&&"BR"==i.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 i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(i?i.ignore:Z.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let t,n=this.top,o=this.needsBlock;if(X.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);i&&i.skip?this.addAll(e):this.withStyleRules(e,(()=>this.addAll(e))),t&&this.sync(n),this.needsBlock=o}else this.withStyleRules(e,(()=>{this.addElementByRule(e,i,!1===i.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=h.none,n=h.none;for(let r=0;r<e.length;r+=2)for(let i;;){let o=this.parser.matchStyle(e[r],e[r+1],this,i);if(!o)break;if(o.ignore)return null;if(o.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach((e=>{o.clearMark(e)&&(n=e.addToSet(n))})):t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;i=o}return[t,n]}addElementByRule(e,t,n){let r,i,o;t.node?(i=this.parser.schema.nodes[t.node],i.isLeaf?this.insertNode(i.create(t.attrs))||this.leafFallback(e):r=this.enter(i,t.attrs||null,t.preserveWhitespace)):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));let s=this.top;if(i&&i.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--,o&&this.removePendingMark(o,s)}addAll(e,t,n){let r=t||0;for(let i=t?e.childNodes[t]:e.firstChild,o=null==n?null:e.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(i);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length))break;if(i.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 i=this.top;i.applyPending(e),i.match=i.match&&i.match.matchType(e);let o=ie(e,r,i.options);i.options&re&&0==i.content.length&&(o|=re),this.nodes.push(new oe(e,t,i.activeMarks,i.pendingMarks,n,null,o)),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),i=-(n?n.depth+1:0)+(r?0:1),o=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=i;s--)if(o(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];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 ae(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function le(e){let t={};for(let n in e)t[n]=e[n];return t}function ce(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=e=>{o.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t)return!0;if(o.indexOf(i)<0&&s(i))return!0}};if(s(i.contentMatch))return!0}}class ue{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=fe(t).createDocumentFragment());let r=n,i=[];return e.forEach((e=>{if(i.length||e.marks.length){let n=0,o=0;for(;n<i.length&&o<e.marks.length;){let t=e.marks[o];if(this.marks[t.type.name]){if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,o++}else o++}for(;n<i.length;)r=i.pop()[1];for(;o<e.marks.length;){let n=e.marks[o++],s=this.serializeMark(n,e.isInline,t);s&&(i.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}=ue.renderSpec(fe(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 i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&ue.renderSpec(fe(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,i=t[0],o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s=n?e.createElementNS(n,i):e.createElement(i),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 i=l;i<t.length;i++){let o=t[i];if(0===o){if(i<t.length-1||i>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:i}=ue.renderSpec(e,o,n);if(s.appendChild(t),i){if(r)throw new RangeError("Multiple content holes");r=i}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ue(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=he(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return he(e.marks)}}function he(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function fe(e){return e.document||window.document}},2376:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>u,C1:()=>p,H$:()=>A,Sy:()=>O,Y1:()=>s,qv:()=>f,xm:()=>a,yy:()=>k});var r=n(7823),i=n(6560);const o=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.p2.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=e.mapping.slice(o);e.replaceRange(u.map(l.pos),u.map(c.pos),a?r.p2.empty:t),0==a&&y(e,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=e.mapping.slice(n),l=a.map(o.pos),c=a.map(s.pos);i?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 i=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(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new p(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new p(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new p(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=o[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 o)throw new RangeError("Duplicate use of selection JSON ID "+e);return o[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.p2.empty){if(super.replace(e,t),t==r.p2.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof u&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new h(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 h{constructor(e,t){this.anchor=e,this.head=t}map(e){return new h(e.map(this.anchor),e.map(this.head))}resolve(e){return u.between(e.resolve(this.anchor),e.resolve(this.head))}}class f 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),i=e.resolve(r);return n?s.near(i):new f(i)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(e){return e instanceof f&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new d(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new f(e.resolve(t.anchor))}static create(e,t){return new f(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}f.prototype.visible=!1,s.jsonID("node",f);class d{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new h(n,n):new d(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&f.isSelectable(n)?new f(t):s.near(t)}}class p extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.p2.empty){if(t==r.p2.empty){e.delete(0,e.doc.content.size);let t=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 p(e)}map(e){return new p(e)}eq(e){return e instanceof p}getBookmark(){return m}}s.jsonID("all",p);const m={map(){return this},resolve:e=>new p(e)};function g(e,t,n,r,i,o=!1){if(t.inlineContent)return u.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let r=t.child(s);if(r.isAtom){if(!o&&f.isSelectable(r))return f.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function y(e,t,n){let r=e.steps.length-1;if(r<t)return;let o,a=e.steps[r];(a instanceof i.Pu||a instanceof i.FC)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==o&&(o=r)})),e.setSelection(s.near(e.doc.resolve(o),n)))}class v extends i.wx{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.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 x=[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 S{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw 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 k{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let a=r?r[o].n:0,l=r?r[o].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<o?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new k(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new v(this)}static create(e){let t=new S(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new k(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new S(this.schema,e.plugins),n=t.fields,r=new k(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((e=>e.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new S(e.schema,e.plugins),o=new k(i);return i.fields.forEach((i=>{if("doc"==i.name)o.doc=r.NB.fromJSON(e.schema,t.doc);else if("selection"==i.name)o.selection=s.fromJSON(o.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],a=s.spec.state;if(s.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r))return void(o[i.name]=a.fromJSON.call(s,e,t[r],o))}o[i.name]=i.init(e,o)}})),o}}function C(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=C(i,t,{})),n[r]=i}return n}class O{constructor(e){this.spec=e,this.props={},e.props&&C(e.props,this,this.props),this.key=e.key?e.key.key:E("plugin")}getState(e){return e[this.key]}}const M=Object.create(null);function E(e){return e in M?e+"$"+ ++M[e]:(M[e]=0,e+"$")}class A{constructor(e="key"){this.key=E(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},6560:(e,t,n)=>{"use strict";n.d(t,{Ax:()=>C,FC:()=>v,GJ:()=>E,Mn:()=>O,Pu:()=>y,dR:()=>T,k9:()=>x,nd:()=>S,nj:()=>A,vs:()=>l,wx:()=>H});var r=n(7823);const i=Math.pow(2,16);function o(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=o(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))/i}(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,o=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+o],h=this.ranges[l+a],f=c+u;if(e<=f){let o=c+r+((u?e==c?-1:e==f?1:t:t)<0?0:h);if(n)return o;let a=e==c?2:e==f?1:4;return(t<0?e!=c:e!=f)&&(a|=8),new s(o,a,e==(t<0?c:f)?null:l/3+(e-c)*i)}r+=h-u}return n?e+r:new s(e+r,0,null)}touches(e,t){let n=0,r=o(t),i=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let a=this.ranges[t+i];if(e<=o+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,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),i+=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 i=this.maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this.maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new 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 h{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new h(e,null)}static fail(e){return new h(null,e)}static fromReplace(e,t,n,i){try{return h.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.e4)return h.fail(e.message);throw e}}}function f(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);o.content.size&&(o=o.copy(f(o.content,t,o))),o.isInline&&(o=t(o,n,r)),i.push(o)}return r.HY.fromArray(i)}class d 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),i=n.node(n.sharedDepth(this.to)),o=new r.p2(f(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),i),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,o)}invert(){return new p(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new d(t.pos,n.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new d(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("addMark",d);class p 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.p2(f(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,n)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new p(t.pos,n.pos,this.mark)}merge(e){return e instanceof p&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new p(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new p(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("removeMark",p);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 h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new 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 h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new 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)?h.fail("Structure replace would overwrite content"):h.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.p2.empty:new r.p2(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.p2.empty:new r.p2(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.p2.fromJSON(e,t.slice),!!t.structure)}}u.jsonID("replace",y);class v extends u{constructor(e,t,n,r,i,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(e){if(this.structure&&(b(e,this.from,this.gapFrom)||b(e,this.gapTo,this.to)))return h.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return h.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?h.fromReplace(e,this.from,this.to,n):h.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),i=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new v(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new v(t.from,t.to,t.gapFrom,t.gapTo,r.p2.fromJSON(e,t.slice),t.insert,!!t.structure)}}function b(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let e=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function w(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function x(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,o,t))return n;if(0==n||r.type.spec.isolating||!w(r,i,o))break}return null}function S(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(r,i,s)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<i;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return o?i.map(k).concat({type:t,attrs:n}).concat(o.map(k)):null}function k(e){return{type:e,attrs:null}}function C(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>o;e--,t--){let n=i.node(e),o=i.index(e);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),a=r&&r[t+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[t]||n;if(!n.canReplace(o+1,n.childCount)||!l.type.validContent(s))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function O(e,t){let n=e.resolve(t),r=n.index();return M(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function M(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function E(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,o,s=r.index(e);if(e==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(e+1),s++,o=r.node(e).maybeChild(s)):(i=r.node(e).maybeChild(s-1),o=r.node(e+1)),i&&!i.isTextblock&&M(i,o)&&r.node(e).canReplace(s,s+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function A(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,o=r.index(t)+(n>0?1:0),s=r.node(t),a=!1;if(1==e)a=s.canReplace(o,o,i);else{let e=s.contentMatchAt(o).findWrapping(i.firstChild.type);a=e&&s.canReplaceWith(o,o,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function T(e,t,n=t,i=r.p2.empty){if(t==n&&!i.size)return null;let o=e.resolve(t),s=e.resolve(n);return _(o,s,i)?new y(t,n,i):new R(o,s,i).fit()}function _(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 R{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.HY.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let o=this.placed,s=n.depth,a=i.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new r.p2(o,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,i.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 i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e,i=null;n?(i=N(this.unplaced.content,n-1).firstChild,e=i.content):e=this.unplaced.content;let o=e.firstChild;for(let e=this.depth;e>=0;e--){let s,{type:a,match:l}=this.frontier[e],c=null;if(1==t&&(o?l.matchType(o.type)||(c=l.fillBefore(r.HY.from(o),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:e,parent:i,inject:c};if(2==t&&o&&(s=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:e,parent:i,wrap:s};if(i&&l.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=N(e,t);return!(!i.childCount||i.firstChild.isLeaf||(this.unplaced=new r.p2(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),0))}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=N(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new r.p2(D(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new r.p2(D(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let s=this.unplaced,a=n?n.content:s.content,l=s.openStart-e,c=0,u=[],{match:h,type:f}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)u.push(i.child(e));h=h.matchFragment(i)}let d=a.size+e-(s.content.size-s.openEnd);for(;c<a.childCount;){let e=a.child(c),t=h.matchType(e.type);if(!t)break;c++,(c>1||0==l||e.content.size)&&(h=t,u.push(I(e.mark(f.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?d:-1)))}let p=c==a.childCount;p||(d=-1),this.placed=P(this.placed,t,r.HY.from(u)),this.frontier[t].match=h,p&&d<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<d;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?0==e?r.p2.empty:new r.p2(D(s.content,e-1,1),e-1,d<0?s.openEnd:e-1):new r.p2(D(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||!L(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],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=L(e,t,r,n,i);if(o){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=L(e,n,r,t,!0);if(!i||i.childCount)continue e}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=P(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=P(this.placed,this.depth,r.HY.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.HY.empty,!0);e.childCount&&(this.placed=P(this.placed,this.frontier.length,e))}}function D(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(D(e.firstChild.content,t-1,n)))}function P(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(P(e.lastChild.content,t-1,n)))}function N(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function I(e,t,n){if(t<=0)return e;let i=e.content;return t>1&&(i=i.replaceChild(0,I(i.firstChild,t-1,1==i.childCount?n-1:0))),t>0&&(i=e.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(e.type.contentMatch.matchFragment(i).fillBefore(r.HY.empty,!0)))),e.copy(i)}function L(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.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,o.content,s)?a:null}function j(e,t,n,i,o){if(t<n){let r=e.firstChild;e=e.replaceChild(0,r.copy(j(r.content,t+1,n,i,r)))}if(t>i){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.HY.empty,!0))}return e}function F(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let i=e.start(r);if(i<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;(i==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==i-1)&&n.push(r)}return n}class B 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 h.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return h.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(i),0,t.isLeaf?0:1))}getMap(){return a.empty}invert(e){return new B(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 B(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 B(t.pos,t.attr,t.value)}}u.jsonID("attr",B);class z extends u{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return h.ok(n)}getMap(){return a.empty}invert(e){return new z(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new z(t.attr,t.value)}}u.jsonID("docAttr",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 H{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.p2.empty){let i=T(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.p2(r.HY.from(n),0,0))}delete(e,t){return this.replace(e,t,r.p2.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),s=e.doc.resolve(n);if(_(o,s,i))return e.step(new y(t,n,i));let a=F(o,e.doc.resolve(n));0==a[a.length-1]&&a.pop();let l=-(o.depth+1);a.unshift(l);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(e)>-1?l=e:o.before(e)==t&&a.splice(1,0,-e)}let c=a.indexOf(l),u=[],h=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(u.push(n),t==i.openStart)break;e=n.content}for(let e=h-1;e>=0;e--){let t=u[e],n=(f=t.type).spec.defining||f.spec.definingForContent;if(n&&!t.sameMarkup(o.node(Math.abs(l)-1)))h=e;else if(n||!t.type.isTextblock)break}var f;for(let t=i.openStart;t>=0;t--){let l=(t+h+1)%(i.openStart+1),f=u[l];if(f)for(let t=0;t<a.length;t++){let u=a[(t+c)%a.length],h=!0;u<0&&(h=!1,u=-u);let d=o.node(u-1),p=o.index(u-1);if(d.canReplaceWith(p,p,f.type,f.marks))return e.replace(o.before(u),h?s.after(u):n,new r.p2(j(i.content,0,i.openStart,l),l,i.openEnd))}}let d=e.steps.length;for(let r=a.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>d));r--){let e=a[r];e<0||(t=o.before(e),n=s.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,i){if(!i.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}(e.doc,t,i.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.p2(r.HY.from(i),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),o=F(r,i);for(let t=0;t<o.length;t++){let n=o[t],s=t==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(t-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o)return e.delete(r.before(o),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:i,$to:o,depth:s}=t,a=i.before(s+1),l=o.after(s+1),c=a,u=l,h=r.HY.empty,f=0;for(let e=s,t=!1;e>n;e--)t||i.index(e)>0?(t=!0,h=r.HY.from(i.node(e).copy(h)),f++):c--;let d=r.HY.empty,p=0;for(let e=s,t=!1;e>n;e--)t||o.after(e+1)<o.end(e)?(t=!0,d=r.HY.from(o.node(e).copy(d)),p++):u++;e.step(new v(c,u,a,l,new r.p2(h.append(d),f,p),h.size-f,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let i=new y(t-n,t+n,r.p2.empty,!0);e.step(i)}(this,e,t),this}wrap(e,t){return function(e,t,n){let i=r.HY.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.HY.from(n[e].type.create(n[e].attrs,i))}let o=t.start,s=t.end;e.step(new v(o,s,o,s,new r.p2(i,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,i=null){return function(e,t,n,i,o){if(!i.isTextblock)throw 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(i,o)&&function(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(e.doc,e.mapping.slice(s).map(n),i)){e.clearIncompatible(e.mapping.slice(s).map(n,1),i);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.p2(r.HY.from(i.create(o,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,i),this}setNodeMarkup(e,t,n=null,i){return function(e,t,n,i,o){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(i,null,o||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.p2(r.HY.from(a),0,0),1,!0))}(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new B(e,t,n)),this}setDocAttribute(e,t){return this.step(new z(e,t)),this}addNodeMark(e,t){return this.step(new m(e,t)),this}removeNodeMark(e,t){if(!(t instanceof r.vc)){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,i){let o=e.doc.resolve(t),s=r.HY.empty,a=r.HY.empty;for(let e=o.depth,t=o.depth-n,l=n-1;e>t;e--,l--){s=r.HY.from(o.node(e).copy(s));let t=i&&i[l];a=r.HY.from(t?t.type.create(t.attrs,a):o.node(e).copy(a))}e.step(new y(t,t,new r.p2(s.append(a),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let i,o,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),h=Math.min(l+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(i&&i.to==c&&i.mark.eq(u[e])?i.to=h:s.push(i=new p(c,h,u[e])));o&&o.to==c?o.to=h:a.push(o=new d(c,h,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,i){let o=[],s=0;e.doc.nodesBetween(t,n,((e,a)=>{if(!e.isInline)return;s++;let l=null;if(i instanceof r.ZU){let t,n=e.marks;for(;t=i.isInSet(n);)(l||(l=[])).push(t),n=t.removeFromSet(n)}else i?i.isInSet(e.marks)&&(l=[i]):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,i=l[e];for(let e=0;e<o.length;e++){let t=o[e];t.step==s-1&&i.eq(o[e].style)&&(n=t)}n?(n.to=r,n.step=s):o.push({style:i,from:Math.max(a,t),to:r,step:s})}}})),o.forEach((t=>e.step(new p(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,i=n.contentMatch){let o=e.doc.nodeAt(t),s=[],a=t+1;for(let t=0;t<o.childCount;t++){let l=o.child(t),c=a+l.nodeSize,u=i.matchType(l.type);if(u){i=u;for(let t=0;t<l.marks.length;t++)n.allowsMarkType(l.marks[t].type)||e.step(new p(a,c,l.marks[t]));if(l.isText&&!n.spec.code){let e,t,i=/\r?\n|\r/g;for(;e=i.exec(l.text);)t||(t=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(l.marks))),0,0)),s.push(new y(a+e.index,a+e.index+e[0].length,t))}}else s.push(new y(a,c,r.p2.empty));a=c}if(!i.validEnd){let t=i.fillBefore(r.HY.empty,!0);e.replace(a,a,new r.p2(t,0,0))}for(let t=s.length-1;t>=0;t--)e.step(s[t])}(this,e,t,n),this}}},4348:(e,t,n)=>{"use strict";n.d(t,{EH:()=>Bt,p:()=>Lt,tk:()=>an});var r=n(2376),i=n(7823),o=n(6560);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&&(f(e,t,n,r,-1)||f(e,t,n,r,1))},h=/^(img|br|input|textarea|hr)$/i;function f(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:d(e))){let n=e.parentNode;if(!n||1!=n.nodeType||p(e)||h.test(e.nodeName)||"false"==e.contentEditable)return!1;t=s(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?d(e):0}}}function d(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function p(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),x=/MSIE \d/.exec(b),S=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(b),k=!!(x||S||w),C=x?document.documentMode:S?+S[1]:w?+w[1]:0,O=!k&&/gecko\/(\d+)/i.test(b);O&&(/Firefox\/(\d+)/.exec(b)||[0,0])[1];const M=!k&&/Chrome\/(\d+)/.exec(b),E=!!M,A=M?+M[1]:0,T=!k&&!!y&&/Apple Computer/.test(y.vendor),_=T&&(/Mobile\/\w+/.test(b)||!!y&&y.maxTouchPoints>2),R=_||!!y&&/Mac/.test(y.platform),D=!!y&&/Win/.test(y.platform),P=/Android \d/.test(b),N=!!v&&"webkitFontSmoothing"in v.documentElement.style,I=N?+(/\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 j(e,t){return"number"==typeof e?e:e[t]}function F(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 B(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;s=a(s)){if(1!=s.nodeType)continue;let e=s,n=e==o.body,a=n?L(o):F(e),l=0,c=0;if(t.top<a.top+j(r,"top")?c=-(a.top-t.top+j(i,"top")):t.bottom>a.bottom-j(r,"bottom")&&(c=t.bottom-t.top>a.bottom-a.top?t.top+j(i,"top")-a.top:t.bottom-a.bottom+j(i,"bottom")),t.left<a.left+j(r,"left")?l=-(a.left-t.left+j(i,"left")):t.right>a.right-j(r,"right")&&(l=t.right-a.right+j(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}if(n||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function z(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 $(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let H=null;function V(e,t){let n,r,i,o,s=2e8,a=0,l=t.top,u=t.top;for(let h=e.firstChild,f=0;h;h=h.nextSibling,f++){let e;if(1==h.nodeType)e=h.getClientRects();else{if(3!=h.nodeType)continue;e=c(h).getClientRects()}for(let c=0;c<e.length;c++){let d=e[c];if(d.top<=l&&d.bottom>=u){l=Math.max(d.bottom,l),u=Math.min(d.top,u);let e=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(e<s){n=h,s=e,r=e&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==h.nodeType&&e&&(a=f+(t.left>=(d.left+d.right)/2?1:0));continue}}else d.top>t.top&&!i&&d.left<=t.left&&d.right>=t.left&&(i=h,o={left:Math.max(d.left,Math.min(d.right,t.left)),top:d.top});!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(a=f+1)}}return!n&&i&&(n=i,r=o,s=0),n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);let n=G(r,1);if(n.top!=n.bottom&&U(t,n))return{node:e,offset:i+(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 i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let n=e.childNodes[o];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(U(t,i))return W(n,t,i)}}if((o=(o+1)%r)==i)break}return e}function q(e,t){let n,r=e.dom.ownerDocument,i=0,o=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);o&&({node:n,offset:i}=o);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(T)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(O&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let e,r=n.childNodes[i];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&i++}let r;N&&i&&1==n.nodeType&&1==(r=n.childNodes[i-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=t.top&&i--,n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(s=function(e,t,n,r){let i=-1;for(let n=t,o=!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&&!o||!t.contentDOM)){let e=t.dom.getBoundingClientRect();if(t.node.isBlock&&t.parent&&!o&&(o=!0,e.left>r.left||e.top>r.top?i=t.posBefore:(e.right<r.left||e.bottom<r.top)&&(i=t.posAfter)),!t.contentDOM&&i<0&&!t.node.isText)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 i>-1?i:e.docView.posFromDOM(t,n,-1)}(e,n,i,t))}null==s&&(s=function(e,t,n){let{node:r,offset:i}=V(t,n),o=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();o=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}(e,l,t));let c=e.docView.nearestDesc(l,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function K(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(K(e))return e}return Array.prototype.find.call(n,K)||e.getBoundingClientRect()}const J=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Q(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=N||O;if(3==r.nodeType){if(!s||!J.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,Y(G(c(r,e,t),o),o<0)}{let e=G(c(r,i,i),n);if(O&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=G(c(r,i-1,i-1),-1);if(t.top==e.top){let n=G(c(r,i,i+1),-1);if(n.top!=e.top)return Y(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==d(r))){let e=r.childNodes[i-1];if(1==e.nodeType)return X(e.getBoundingClientRect(),!1)}if(null==o&&i<d(r)){let e=r.childNodes[i];if(1==e.nodeType)return X(e.getBoundingClientRect(),!0)}return X(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==d(r))){let e=r.childNodes[i-1],t=3==e.nodeType?c(e,d(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return Y(G(t,1),!1)}if(null==o&&i<d(r)){let e=r.childNodes[i];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 Y(G(t,-1),!0)}return Y(G(3==r.nodeType?c(r):r,-n),n>=0)}function Y(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 X(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 Z(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}const ee=/[\u0590-\u08ac]/;let te=null,ne=null,re=!1;class ie{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 i,o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;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 i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<i)return r.descAt(e-n-r.border);n=i}}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 i=this.children[n],o=t+i.size;if(o>e||i instanceof he){r=e-t;break}t=o}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 oe&&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,i=-1;for(let o=n,a=0;;a++){let n=this.children[a],l=o+n.size;if(-1==r&&e<=l){let i=o+n.border;if(e>=i&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=o;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)){i=s(n.dom);break}t+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}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 i=Math.min(e,t),o=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(i>a&&o<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let a=this.domFromPos(e,e?-1:1),l=t==e?a:this.domFromPos(t,t?-1:1),c=n.getSelection(),h=!1;if((O||T)&&e==t){let{node:e,offset:t}=a;if(3==e.nodeType){if(h=!(!t||"\n"!=e.nodeValue[t-1]),h&&t==e.nodeValue.length)for(let t,n=e;n;n=n.parentNode){if(t=n.nextSibling){"BR"==t.nodeName&&(a=l={node:t.parentNode,offset:s(t)+1});break}let e=n.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];h=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(O&&c.focusNode&&c.focusNode!=l.node&&1==c.focusNode.nodeType){let e=c.focusNode.childNodes[c.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||h&&T)&&u(a.node,a.offset,c.anchorNode,c.anchorOffset)&&u(l.node,l.offset,c.focusNode,c.focusOffset))return;let f=!1;if((c.extend||e==t)&&!h){c.collapse(a.node,a.offset);try{e!=t&&c.extend(l.node,l.offset),f=!0}catch(e){}}if(!f){if(e>t){let e=a;a=l,l=e}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(a.node,a.offset),c.removeAllRanges(),c.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 i=this.children[r],o=n+i.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let r=n+i.border,s=o-i.border;if(e>=r&&t<=s)return this.dirty=e==n||t==o?2:1,void(e!=r||t!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-r,t-r):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}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 oe extends ie{constructor(e,t,n,r){let i,o=t.type.toDOM;if("function"==typeof o&&(o=o(n,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r))),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=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 ie{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 ie{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let o=r.nodeViews[t.type.name],s=o&&o(t,r,n);return s&&s.dom||(s=i.PW.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}}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),i=this.children,o=this.size;t<o&&(i=Ce(i,t,o,n)),e>0&&(i=Ce(i,0,e,n));for(let e=0;e<i.length;e++)i[e].parent=r;return r.children=i,r}}class le extends ie{constructor(e,t,n,r,i,o,s,a,l){super(e,[],i,o),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(e,t,n,r,o,s){let a,l=o.nodeViews[t.type.name],c=l&&l(t,o,(()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s),n,r),u=c&&c.dom,h=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:h}=i.PW.renderSpec(document,t.type.spec.toDOM(t)));h||t.isText||"BR"==u.nodeName||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let f=u;return u=be(u,n,t),c?a=new fe(e,t,n,r,u,h||null,f,c,o,s+1):t.isText?new ue(e,t,n,r,u,f,o):new le(e,t,n,r,u,h||null,f,o,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=()=>i.HY.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,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new Se(this,s&&s.node,e);!function(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,i,t.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let u,h,f,d;for(;s<i.length&&i[s].to==o;){let e=i[s++];e.widget&&(u?(h||(h=[u])).push(e):u=e)}if(u)if(h){h.sort(ke);for(let e=0;e<h.length;e++)n(h[e],c,!!l)}else n(u,c,!!l);if(l)d=-1,f=l,l=null;else{if(!(c<e.childCount))break;d=c,f=e.child(c++)}for(let e=0;e<a.length;e++)a[e].to<=o&&a.splice(e--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let p=o+f.nodeSize;if(f.isText){let e=p;s<i.length&&i[s].from<e&&(e=i[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<p&&(l=f.cut(e-o),f=f.cut(0,e-o),p=e,d=-1)}r(f,f.isInline&&!f.isLeaf?a.filter((e=>!e.inline)):a.slice(),t.forChild(o,f),d),o=p}}(this.node,this.innerDeco,((t,o,s)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!s&&l.syncToMarks(o==this.node.childCount?i.vc.none:this.node.child(o).marks,n,e),l.placeWidget(t,e,r)}),((t,i,s,c)=>{let u;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,i,s,c)||a&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(t,i,s,u,e)||l.updateNextNode(t,i,s,e,c,r)||l.addNode(t,i,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),de(this.contentDOM,this.children,e),_&&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:i}=e.state.selection;if(!(e.state.selection instanceof r.Bs)||n<t||i>t+this.node.content.size)return null;let o=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=d(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(o.focusNode,o.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 i=0,o=0;i<e.childCount&&o<=r;){let s=e.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<e.childCount;){let t=e.child(i++);if(o+=t.nodeSize,!t.isText)break;l+=t.text}if(o>=n){if(o>=r&&l.slice(r-t.length-a,r-a)==t)return r-t.length;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,i-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 i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new se(this,i,t,r);e.input.compositionNodes.push(o),this.children=Ce(this.children,n,n+r.length,e,o)}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,i){be(r,t,e);let o=new le(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class ue extends le{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,null,o,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),i=document.createTextNode(r.text);return new ue(this.parent,r,this.outerDeco,this.innerDeco,i,i,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 he extends ie{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 fe extends le{constructor(e,t,n,r,i,o,s,a,l,c){super(e,t,n,r,i,o,s,l,c),this.spec=a}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}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 de(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=xe(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof ae){let t=r?r.previousSibling:e.lastChild;de(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=xe(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const pe=function(e){e&&(this.nodeName=e)};pe.prototype=Object.create(null);const me=[new pe];function ge(e,t,n){if(0==e.length)return me;let r=n?me[0]:new pe,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new pe(s.nodeName));for(let e in s){let o=s[e];null!=o&&(n&&1==i.length&&i.push(r=new pe(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+o:"style"==e?r.style=(r.style?r.style+";":"")+o:"nodeName"!=e&&(r[e]=o))}}}return i}function ye(e,t,n,r){if(n==me&&r==me)return t;let i=t;for(let t=0;t<r.length;t++){let o=r[t],s=n[t];if(t){let t;s&&s.nodeName==o.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==o.nodeName||(t=document.createElement(o.nodeName),t.pmIsDeco=!0,t.appendChild(i),s=me[0]),i=t}ve(i,s||me[0],o)}return i}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):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==i.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)-1==r.indexOf(i[t])&&e.classList.add(i[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 xe(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Se{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,i=e.childCount,o=new Map,s=[];e:for(;i>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(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,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,i=this.stack.length>>1,o=Math.min(i,e.length);for(;r<o&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<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[i])&&!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[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))o=this.top.children.indexOf(i,this.index);else for(let r=this.index,i=Math.min(this.top.children.length,r+5);r<i;r++){let i=this.top.children[r];if(i.matchesNode(e,t,n)&&!this.preMatch.matched.has(i)){o=r;break}}return!(o<0||(this.destroyBetween(this.index,o),this.index++,0))}updateNodeAt(e,t,n,r,i){let o=this.top.children[r];return 3==o.dirty&&o.dom==o.contentDOM&&(o.dirty=2),!!o.update(e,t,n,i)&&(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,i,o){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!=i)return!1;let c,u=a.dom,h=this.isLocked(u)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&we(t,a.outerDeco));if(!h&&a.update(e,t,n,r))return this.destroyBetween(this.index,s),a.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(c=this.recreateWrapper(a,e,t,n,r,o)))return this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(r,o+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,o){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,i,o);if(s.contentDOM){s.children=e.children,e.children=[];for(let e of s.children)e.parent=s}return e.destroy(),s}addNode(e,t,n,r,i){let o=le.create(this.top,e,t,n,r,i);o.contentDOM&&o.updateChildren(r,i+1),this.top.children.splice(this.index++,0,o),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 oe(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))&&((T||E)&&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 he(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 ke(e,t){return e.type.side-t.type.side}function Ce(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,r)))}return o}function Oe(e,t=null){let n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),a=o&&0==o.size,l=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c,u,h=i.resolve(l);if(m(n)){for(c=h;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&r.qv.isSelectable(e)&&o.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,i=t==d(e);r||i;){if(e==n)return!0;let t=s(e);if(!(e=e.parentNode))return!1;r=r&&0==t,i=i&&t==d(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;u=new r.qv(l==e?h:i.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;c=i.resolve(t)}return u||(u=Ne(e,c,h,"pointer"==t||e.state.selection.head<h.pos&&!a?1:-1)),u}function Me(e){return e.editable?e.hasFocus():Le(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ee(e,t=!1){let n=e.state.selection;if(De(e,n),Me(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&E){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,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,s(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&k&&C<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let i,o,{anchor:s,head:a}=n;!Ae||n instanceof r.Bs||(n.$from.parent.inlineContent||(i=Te(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=Te(e,n.to))),e.docView.setSelection(s,a,e.root,t),Ae&&(i&&Re(i),o&&Re(o)),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,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Me(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Ae=T||E&&A<63;function Te(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(T&&i&&"false"==i.contentEditable)return _e(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return _e(i);if(o)return _e(o)}}function _e(e){return e.contentEditable="true",T&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Re(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function De(e,t){if(t instanceof r.qv){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Pe(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Pe(e)}function Pe(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Ne(e,t,n,i){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||r.Bs.between(t,n,i)}function Ie(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 je(e,t){let{$anchor:n,$head:i}=e.selection,o=t>0?n.max(i):n.min(i),s=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return s&&r.Y1.findFrom(s,t)}function Fe(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Be(e,t,n){let i=e.state.selection;if(!(i instanceof r.Bs)){if(i instanceof r.qv&&i.node.isInline)return Fe(e,new r.Bs(t>0?i.$to:i.$from));{let n=je(e.state,t);return!!n&&Fe(e,n)}}if(n.indexOf("s")>-1){let{$head:n}=i,o=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=e.state.doc.resolve(n.pos+o.nodeSize*(t<0?-1:1));return Fe(e,new r.Bs(i.$anchor,s))}if(!i.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let n=je(e.state,t);return!!(n&&n instanceof r.qv)&&Fe(e,n)}if(!(R&&n.indexOf("m")>-1)){let n,o=i.$head,s=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=t<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(n=e.docView.descAt(a))&&!n.contentDOM)&&(r.qv.isSelectable(s)?Fe(e,new r.qv(t<0?e.state.doc.resolve(o.pos-s.nodeSize):o)):!!N&&Fe(e,new r.Bs(e.state.doc.resolve(t<0?a:a+s.nodeSize))))}}function ze(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function $e(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||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 i,o,a=!1;for(O&&1==n.nodeType&&r<ze(n)&&$e(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if($e(e,-1))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Ve(n))break;{let t=n.previousSibling;for(;t&&$e(t,-1);)i=n.parentNode,o=s(t),t=t.previousSibling;if(t)n=t,r=ze(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?Ue(e,n,r):i&&Ue(e,i,o)}(e):function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,a=ze(n);for(;;)if(r<a){if(1!=n.nodeType)break;if(!$e(n.childNodes[r],1))break;i=n,o=++r}else{if(Ve(n))break;{let t=n.nextSibling;for(;t&&$e(t,1);)i=t.parentNode,o=s(t)+1,t=t.nextSibling;if(t)n=t,r=0,a=ze(n);else{if(n=n.parentNode,n==e.dom)break;r=a=0}}}i&&Ue(e,i,o)}(e)}function Ve(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Ue(e,t,n){if(3!=t.nodeType){let e,r;(r=function(e,t){for(;e&&t==e.childNodes.length&&!p(e);)t=s(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=r,n=0):(e=function(e,t){for(;e&&!t&&!p(e);)t=s(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}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:i}=e;setTimeout((()=>{e.state==i&&Ee(e)}),50)}function We(e,t){let n=e.state.doc.resolve(t);if(!E&&!D&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<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),i=(n.top+n.bottom)/2;if(i>r.top&&i<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 i=e.state.selection;if(i instanceof r.Bs&&!i.empty||n.indexOf("s")>-1)return!1;if(R&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=i;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=je(e.state,t);if(n&&n instanceof r.qv)return Fe(e,n)}if(!o.parent.inlineContent){let n=t<0?o:s,a=i instanceof r.C1?r.Y1.near(n,t):r.Y1.findFrom(n,t);return!!a&&Fe(e,a)}return!1}function Ke(e,t){if(!(e.state.selection instanceof r.Bs))return!0;let{$head:n,$anchor:i,empty:o}=e.state.selection;if(!n.sameParent(i))return!0;if(!o)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 Ge(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:o,openEnd:s}=t;for(;o>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,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")||i.PW.fromSchema(e.state.schema),l=ot(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));let u,h=c.firstChild,f=0;for(;h&&1==h.nodeType&&(u=rt[h.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),f++}h=c.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",`${o} ${s}${f?` -${f}`:""} ${JSON.stringify(n)}`),{dom:c,text:e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n")}}function Qe(e,t,n,r,o){let s,a,l=o.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 i.p2(i.HY.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):i.p2.empty;let n=e.someProp("clipboardTextParser",(n=>n(t,o,r,e)));if(n)a=n;else{let n=o.marks(),{schema:r}=e.state,a=i.PW.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=ot().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);if((n=i&&rt[i[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),N&&function(e){let t=e.querySelectorAll(E?"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]"),h=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(h&&h[3])for(let e=+h[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")||i.aw.fromSchema(e.state.schema);a=t.parseSlice(s,{preserveWhitespace:!(!c&&!h),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Ye.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(h)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:o,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;o=i.HY.from(t.create(n[e+1],o)),s++,a++}return new i.p2(o,s,a)}(nt(a,+h[1],+h[2]),h[4]);else if(a=i.p2.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n).contentMatchAt(t.index(n)),s=[];if(e.forEach((e=>{if(!s)return;let t,n=o.findWrapping(e.type);if(!n)return s=null;if(t=s.length&&r.length&&Ze(n,r,e,s[s.length-1],0))s[s.length-1]=t;else{s.length&&(s[s.length-1]=et(s[s.length-1],r.length));let t=Xe(e,n);s.push(t),o=o.matchType(t.type),r=n}})),s)return i.HY.from(s)}return e}(a.content,o),!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=nt(a,e,t)}return e.someProp("transformPasted",(t=>{a=t(a,e)})),a}const Ye=/^(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 Xe(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,i.HY.from(e));return e}function Ze(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let s=Ze(e,t,n,r.lastChild,o+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(i.HY.from(Xe(n,e,o+1))))}}function et(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,et(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(i.HY.empty,!0);return e.copy(n.append(r))}function tt(e,t,n,r,o,s){let a=t<0?e.firstChild:e.lastChild,l=a.content;return e.childCount>1&&(s=0),o<r-1&&(l=tt(l,t,n,r,o+1,s)),o>=n&&(l=t<0?a.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(i.HY.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(l))}function nt(e,t,n){return t<e.openStart&&(e=new i.p2(tt(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new i.p2(tt(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const rt={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 ot(){return it||(it=document.implementation.createHTMLDocument("title"))}const st={},at={},lt={touchstart:!0,touchmove:!0};class ct{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.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function ut(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ht(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 dt(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 pt(e){return{left:e.clientX,top:e.clientY}}function mt(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,(t=>r>o.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1))))return!0;return!1}function gt(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function yt(e,t,n,r){return mt(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function vt(e,t,n,i){return mt(e,"handleTripleClickOn",t,n,i)||e.someProp("handleTripleClick",(n=>n(e,t,i)))||function(e,t,n){if(0!=n.button)return!1;let i=e.state.doc;if(-1==t)return!!i.inlineContent&&(gt(e,r.Bs.create(i,0,i.content.size),"pointer"),!0);let o=i.resolve(t);for(let t=o.depth+1;t>0;t--){let n=t>o.depth?o.nodeAfter:o.node(t),s=o.before(t);if(n.inlineContent)gt(e,r.Bs.create(i,s+1,s+1+n.content.size),"pointer");else{if(!r.qv.isSelectable(n))continue;gt(e,r.qv.create(i,s),"pointer")}return!0}}(e,n,i)}function bt(e){return Mt(e)}at.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!St(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!P||!E||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!_||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||R&&72==n&&"c"==r)return Ke(e,-1)||He(e,-1);if(46==n&&!t.shiftKey||R&&68==n&&"c"==r)return Ke(e,1)||He(e,1);if(13==n||27==n)return!0;if(37==n||R&&66==n&&"c"==r){let t=37==n?"ltr"==We(e,e.state.selection.from)?-1:1:-1;return Be(e,t,r)||He(e,t)}if(39==n||R&&70==n&&"c"==r){let t=39==n?"ltr"==We(e,e.state.selection.from)?1:-1:1;return Be(e,t,r)||He(e,t)}return 38==n||R&&80==n&&"c"==r?qe(e,-1,r)||He(e,-1):40==n||R&&78==n&&"c"==r?function(e){if(!T||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;Ge(e,n,"true"),setTimeout((()=>Ge(e,n,"false")),20)}return!1}(e)||qe(e,1,r)||He(e,1):r==(R?"m":"c")&&(66==n||73==n||89==n||90==n)}(e,n)?n.preventDefault():ut(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)}},at.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},at.keypress=(e,t)=>{let n=t;if(St(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||R&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let i=e.state.selection;if(!(i instanceof r.Bs&&i.$from.sameParent(i.$to))){let t=String.fromCharCode(n.charCode);/[\r\n]/.test(t)||e.someProp("handleTextInput",(n=>n(e,i.$from.pos,i.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const wt=R?"metaKey":"ctrlKey";st.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=bt(e),i=Date.now(),o="singleClick";i-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[wt]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(pt(n));s&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new xt(e,s,n,!!r)):("doubleClick"==o?yt:vt)(e,s.pos,s.inside,n)?n.preventDefault():ut(e,"pointer"))};class xt{constructor(e,t,n,i){let o,s;if(this.view=e,this.pos=t,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[wt],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,s=n.depth?n.before():0}const a=i?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&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof r.qv&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!O||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)),ut(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((()=>Ee(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(pt(e))),this.updateAllowDefault(e),this.allowDefault||!t?ut(this.view,"pointer"):function(e,t,n,i,o){return mt(e,"handleClickOn",t,n,i)||e.someProp("handleClick",(n=>n(e,t,i)))||(o?function(e,t){if(-1==t)return!1;let n,i,o=e.state.selection;o instanceof r.qv&&(n=o.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.qv.isSelectable(t)){i=n&&o.$from.depth>0&&e>=o.$from.depth&&s.before(o.$from.depth+1)==o.$from.pos?s.before(o.$from.depth):s.before(e);break}}return null!=i&&(gt(e,r.qv.create(e.state.doc,i),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return!!(i&&i.isAtom&&r.qv.isSelectable(i))&&(gt(e,new r.qv(n),"pointer"),!0)}(e,n))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||T&&this.mightDrag&&!this.mightDrag.node.isAtom||E&&!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)?(gt(this.view,r.Y1.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):ut(this.view,"pointer")}move(e){this.updateAllowDefault(e),ut(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 St(e,t){return!!e.composing||!!(T&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}st.touchstart=e=>{e.input.lastTouch=Date.now(),bt(e),ut(e,"pointer")},st.touchmove=e=>{e.input.lastTouch=Date.now(),ut(e,"pointer")},st.contextmenu=e=>bt(e);const kt=P?5e3:-1;function Ct(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>Mt(e)),t))}function Ot(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 Mt(e,t=!1){if(!(P&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ot(e),t||e.docView&&e.docView.dirty){let t=Oe(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}at.compositionstart=at.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(),Mt(e,!0),e.markCursor=null;else if(Mt(e),O&&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}Ct(e,kt)},at.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then((()=>e.domObserver.flush())),e.input.compositionID++,Ct(e,20))};const Et=k&&C<15||_&&I<604;function At(e,t,n,r,o){let s=Qe(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,o,s||i.p2.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,r):e.state.tr.replaceSelection(s);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Tt(e){let t=e.getData("text/html")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}st.copy=at.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=Et?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Je(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.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(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},at.paste=(e,t)=>{let n=t;if(e.composing&&!P)return;let r=Et?null:n.clipboardData,i=e.input.shiftKey&&45!=e.input.lastKeyCode;r&&At(e,Tt(r),r.getData("text/html"),i,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();let i=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?At(e,r.value,null,i,t):At(e,r.textContent,r.innerHTML,i,t)}),50)}(e,n)};class _t{constructor(e,t){this.slice=e,this.move=t}}const Rt=R?"altKey":"ctrlKey";st.dragstart=(e,t)=>{let n=t,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let o=e.state.selection,s=o.empty?null:e.posAtCoords(pt(n));if(s&&s.pos>=o.from&&s.pos<=(o instanceof r.qv?o.to-1:o.to));else if(i&&i.mightDrag)e.dispatch(e.state.tr.setSelection(r.qv.create(e.state.doc,i.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.qv.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(Et?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Et||n.dataTransfer.setData("text/plain",c),e.dragging=new _t(a,!n[Rt])},st.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},at.dragover=at.dragenter=(e,t)=>t.preventDefault(),at.drop=(e,t)=>{let n=t,s=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let a=e.posAtCoords(pt(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=Qe(e,Tt(n.dataTransfer),Et?null:n.dataTransfer.getData("text/html"),!1,l);let u=!(!s||n[Rt]);if(e.someProp("handleDrop",(t=>t(e,n,c||i.p2.empty,u))))return void n.preventDefault();if(!c)return;n.preventDefault();let h=c?(0,o.nj)(e.state.doc,l.pos,c):l.pos;null==h&&(h=l.pos);let f=e.state.tr;u&&f.deleteSelection();let d=f.mapping.map(h),p=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=f.doc;if(p?f.replaceRangeWith(d,d,c.content.firstChild):f.replaceRange(d,d,c),f.doc.eq(m))return;let g=f.doc.resolve(d);if(p&&r.qv.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))f.setSelection(new r.qv(g));else{let t=f.mapping.map(h);f.mapping.maps[f.mapping.maps.length-1].forEach(((e,n,r,i)=>t=i)),f.setSelection(Ne(e,g,f.doc.resolve(t)))}e.focus(),e.dispatch(f.setMeta("uiEvent","drop"))},st.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())&&Ee(e)}),20))},st.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)},st.beforeinput=(e,t)=>{if(E&&P&&"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 at)st[e]=at[e];function Dt(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 Pt{constructor(e,t){this.toDOM=e,this.spec=t||Ft,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new Lt(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Pt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Dt(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Nt{constructor(e,t){this.attrs=e,this.spec=t||Ft}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new Lt(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Nt&&Dt(this.attrs,e.attrs)&&Dt(this.spec,e.spec)}static is(e){return e.type instanceof Nt}destroy(){}}class It{constructor(e,t){this.attrs=e,this.spec=t||Ft}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new Lt(i.pos-n,o.pos-n,this)}valid(e,t){let n,{index:r,offset:i}=e.content.findIndex(t.from);return i==t.from&&!(n=e.child(r)).isText&&i+n.nodeSize==t.to}eq(e){return this==e||e instanceof It&&Dt(this.attrs,e.attrs)&&Dt(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 Pt(t,n))}static inline(e,t,n,r){return new Lt(e,t,new Nt(n,r))}static node(e,t,n,r){return new Lt(e,t,new It(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Nt}get widget(){return this.type instanceof Pt}}const jt=[],Ft={};class Bt{constructor(e,t){this.local=e.length?e:jt,this.children=t.length?t:jt}static create(e,t){return t.length?Wt(t,e,0,Ft):zt}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,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==zt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Ft)}mapInner(e,t,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,i,o,s){let a=e.slice();for(let e=0,t=o;e<n.maps.length;e++){let r=0;n.maps[e].forEach(((e,n,o,s)=>{let l=s-o-(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:o>=i&&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]+o),u=c-i;if(u<0||u>=r.content.size){l=!0;continue}let h=n.map(e[t+1]+o,-1)-i,{index:f,offset:d}=r.content.findIndex(u),p=r.maybeChild(f);if(p&&d==u&&d+p.nodeSize==h){let r=a[t+2].mapInner(n,p,c+1,e[t]+o+1,s);r!=zt?(a[t]=u,a[t+1]=h,a[t+2]=r):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=function(e,t,n,r,i,o,s){function a(e,t){for(let o=0;o<e.local.length;o++){let a=e.local[o].map(r,i,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[o].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]+o+1);return n}(a,e,t,n,i,o,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 Bt(t.sort(qt),a)}(this.children,o||[],e,t,n,r,i):o?new Bt(o.sort(qt),jt):zt}add(e,t){return t.length?this==zt?Bt.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach(((e,o)=>{let s,a=o+n;if(s=Vt(t,e,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,s,a+1):r.splice(i,0,o,o+e.nodeSize,Wt(s,e,a+1,Ft)),i+=3}}));let o=Ht(i?Ut(t):t,-n);for(let t=0;t<o.length;t++)o[t].type.valid(e,o[t])||o.splice(t--,1);return new Bt(o.length?this.local.concat(o).sort(qt):this.local,r||this.children)}remove(e){return 0==e.length||this==zt?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 i,o=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>o&&t.to<s&&(e[n]=null,(i||(i=[])).push(t));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=zt?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<e.length;i++)if(n=e[i])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 Bt(r,n):zt}forChild(e,t){if(this==zt)return this;if(t.isLeaf)return Bt.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 i=e+1,o=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>i&&t.type instanceof Nt){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new Bt(r.sort(qt),jt);return n?new $t([e,n]):e}return n||zt}eq(e){if(this==e)return!0;if(!(e instanceof Bt)||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 Kt(this.localsInner(e))}localsInner(e){if(this==zt)return jt;if(e.inlineContent||!this.local.some(Nt.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Nt||t.push(this.local[e]);return t}}Bt.empty=new Bt([],[]),Bt.removeOverlap=Kt;const zt=Bt.empty;class $t{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,Ft)));return $t.from(n)}forChild(e,t){if(t.isLeaf)return Bt.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=zt&&(i instanceof $t?n=n.concat(i.members):n.push(i))}return $t.from(n)}eq(e){if(!(e instanceof $t)||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 i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?Kt(n?t:t.sort(qt)):jt}static from(e){switch(e.length){case 0:return zt;case 1:return e[0];default:return new $t(e.every((e=>e instanceof Bt))?e:e.reduce(((e,t)=>e.concat(t instanceof Bt?t:t.members)),[]))}}}function Ht(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Lt(i.from+t,i.to+t,i.type))}return n}function Vt(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t,o=0;o<e.length;o++)(t=e[o])&&t.from>n&&t.to<r&&((i||(i=[])).push(t),e[o]=null);return i}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 i=[],o=!1;t.forEach(((t,s)=>{let a=Vt(e,t,s+n);if(a){o=!0;let e=Wt(a,t,n+s+1,r);e!=zt&&i.push(s,s+t.nodeSize,e)}}));let s=Ht(o?Ut(e):e,-n).sort(qt);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||i.length?new Bt(s,i):zt}function qt(e,t){return e.from-t.from||e.to-t.to}function Kt(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),Gt(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),Gt(t,i+1,o.copy(r.to,o.to)))}}return t}function Gt(e,t,n){for(;t<e.length&&qt(n,e[t])>0;)t++;e.splice(t,0,n)}function Jt(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=zt&&t.push(r)})),e.cursorWrapper&&t.push(Bt.create(e.state.doc,[e.cursorWrapper.deco])),$t.from(t)}const Qt={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Yt=k&&C<=11;class Xt{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 Zt{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Xt,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]);k&&C<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Yt&&(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,Qt)),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(Ie(this.view)){if(this.suppressingSelectionUpdates)return Ee(this.view);if(k&&C<=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}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Ie(e)&&!this.ignoreSelectionChange(n),o=-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&&(o=o<0?n.from:Math.min(n.from,o),s=s<0?n.to:Math.max(n.to,s),n.typeOver&&(a=!0))}if(O&&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;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&m(n)&&(c=Oe(e))&&c.eq(r.Y1.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ee(e),this.currentSelection.set(n),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),function(e){if(!en.has(e)&&(en.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))){if(e.requiresGeckoHackNode=O,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(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Ee(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,i=e.nextSibling;if(k&&C<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:o}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!o||Array.prototype.indexOf.call(e.addedNodes,o)<0)&&(i=o)}let o=r&&r.parentNode==e.target?s(r)+1:0,a=n.localPosFromDOM(e.target,o,-1),l=i&&i.parentNode==e.target?s(i):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(T&&/^(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||T&&/^(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:Ne(e,t.resolve(n.anchor),t.resolve(n.head))}function sn(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}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 ct,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(fn),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=hn(this),this.docView=ce(this.state.doc,ln(this),Jt(this),this.dom,this),this.domObserver=new Zt(this,((e,t,n,o)=>function(e,t,n,o,s){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Oe(e,t);if(n&&!e.state.selection.eq(n)){if(E&&P&&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(),a&&r.setMeta("composition",a),e.dispatch(r)}return}let l=e.state.doc.resolve(t),c=l.sharedDepth(n);t=l.before(c+1),n=e.state.doc.resolve(n).after(c+1);let u,h,f=e.state.selection,d=function(e,t,n){let r,{node:o,fromOffset:s,toOffset:a,from:l,to:c}=e.docView.parseRange(t,n),u=e.domSelectionRange(),h=u.anchorNode;if(h&&e.dom.contains(1==h.nodeType?h:h.parentNode)&&(r=[{node:h,offset:u.anchorOffset}],m(u)||r.push({node:u.focusNode,offset:u.focusOffset})),E&&8===e.input.lastKeyCode)for(let e=a;e>s;e--){let t=o.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){a=e;break}if(!n||n.size)break}let f=e.state.doc,d=e.someProp("domParser")||i.aw.fromSchema(e.state.schema),p=f.resolve(l),g=null,y=d.parse(o,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:s,to:a,preserveWhitespace:"pre"!=p.parent.type.whitespace||"full",findPositions:r,ruleFromNode:nn,context:p});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),p=e.state.doc,y=p.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(u=e.state.selection.to,h="end"):(u=e.state.selection.from,h="start"),e.input.lastKeyCode=null;let v=function(e,t,n,r,i){let o=e.findDiffStart(t,n);if(null==o)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);return"end"==i&&(r-=s+Math.max(0,o-Math.min(s,a))-o),s<o&&e.size<t.size?(o-=r<=o&&r>=s?o-r:0,a=o+(a-s),s=o):a<o&&(o-=r<=o&&r>=a?o-r:0,s=o+(s-a),a=o),{start:o,endA:s,endB:a}}(y.content,d.doc.content,d.from,u,h);if((_&&e.input.lastIOSEnter>Date.now()-225||P)&&s.some((e=>1==e.nodeType&&!rn.test(e.nodeName)))&&(!v||v.endA>=v.endB)&&e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!v){if(!(o&&f instanceof r.Bs&&!f.empty&&f.$head.sameParent(f.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let t=on(e,e.state.doc,d.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta("composition",a),e.dispatch(n)}}return}v={start:f.from,endA:f.to,endB:f.to}}if(E&&e.cursorWrapper&&d.sel&&d.sel.anchor==e.cursorWrapper.deco.from&&d.sel.head==d.sel.anchor){let e=v.endB-v.start;d.sel={anchor:d.sel.anchor+e,head:d.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&v.start==v.endB&&e.state.selection instanceof r.Bs&&(v.start>e.state.selection.from&&v.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?v.start=e.state.selection.from:v.endA<e.state.selection.to&&v.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(v.endB+=e.state.selection.to-v.endA,v.endA=e.state.selection.to)),k&&C<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>d.from&&"  "==d.doc.textBetween(v.start-d.from-1,v.start-d.from+1)&&(v.start--,v.endA--,v.endB--);let b,w=d.doc.resolveNoCache(v.start-d.from),x=d.doc.resolveNoCache(v.endB-d.from),S=p.resolve(v.start),O=w.sameParent(x)&&w.parent.inlineContent&&S.end()>=v.endA;if((_&&e.input.lastIOSEnter>Date.now()-225&&(!O||s.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!O&&w.pos<d.doc.content.size&&!w.sameParent(x)&&(b=r.Y1.findFrom(d.doc.resolve(w.pos+1),1,!0))&&b.head==x.pos)&&e.someProp("handleKeyDown",(t=>t(e,g(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>v.start&&function(e,t,n,r,i){if(!r.parent.isTextblock||n-t<=i.pos-r.pos||sn(r,!0,!1)<i.pos)return!1;let o=e.resolve(t);if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(sn(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||sn(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(p,v.start,v.endA,w,x)&&e.someProp("handleKeyDown",(t=>t(e,g(8,"Backspace")))))return void(P&&E&&e.domObserver.suppressSelectionUpdates());E&&P&&v.endB==v.start&&(e.input.lastAndroidDelete=Date.now()),P&&!O&&w.start()!=x.start()&&0==x.parentOffset&&w.depth==x.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==v.endA&&(v.endB-=2,x=d.doc.resolveNoCache(v.endB-d.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,g(13,"Enter"))}))}),20));let M,A,T,R=v.start,D=v.endA;if(O)if(w.pos==x.pos)k&&C<=11&&0==w.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Ee(e)),20)),M=e.state.tr.delete(R,D),A=p.resolve(v.start).marksAcross(p.resolve(v.endA));else if(v.endA==v.endB&&(T=function(e,t){let n,r,o,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",o=e=>e.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",o=e=>e.mark(r.removeFromSet(e.marks))}let u=[];for(let e=0;e<t.childCount;e++)u.push(o(t.child(e)));if(i.HY.from(u).eq(e))return{mark:r,type:n}}(w.parent.content.cut(w.parentOffset,x.parentOffset),S.parent.content.cut(S.parentOffset,v.endA-S.start()))))M=e.state.tr,"add"==T.type?M.addMark(R,D,T.mark):M.removeMark(R,D,T.mark);else if(w.parent.child(w.index()).isText&&w.index()==x.index()-(x.textOffset?0:1)){let t=w.parent.textBetween(w.parentOffset,x.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,R,D,t))))return;M=e.state.tr.insertText(t,R,D)}if(M||(M=e.state.tr.replace(R,D,d.doc.slice(v.start-d.from,v.endB-d.from))),d.sel){let t=on(e,M.doc,d.sel);t&&!(E&&P&&e.composing&&t.empty&&(v.start!=v.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==R||t.head==M.mapping.map(D)-1)||k&&t.empty&&t.head==R)&&M.setSelection(t)}A&&M.ensureMarks(A),a&&M.setMeta("composition",a),e.dispatch(M.scrollIntoView())}(this,e,t,n,o))),this.domObserver.start(),function(e){for(let t in st){let n=st[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!dt(e,t)||ft(e,t)||!e.editable&&t.type in at||n(e,t)},lt[t]?{passive:!0}:void 0)}T&&e.dom.addEventListener("input",(()=>null)),ht(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&&ht(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(fn),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,i=!1;e.storedMarks&&this.composing&&(Ot(this),i=!0),this.state=e;let o=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(o||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=hn(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)}(o||t.handleDOMEvents!=this._props.handleDOMEvents)&&ht(this),this.editable=un(this),cn(this);let s=Jt(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)||(i=!0);let h="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(o,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:z(e.dom)}}(this);if(i){this.domObserver.stop();let t=c&&(k||E)&&!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=E?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))?Ee(this,t):(De(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():h&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;$(n,0==r?0:r-t)}(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof r.qv){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&B(this,t.getBoundingClientRect(),e)}else B(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 i=this.directPlugins[r].props[e];if(null!=i&&(n=t?t(i):i))return n}let i=this.state.plugins;if(i)for(let r=0;r<i.length;r++){let o=i[r].props[e];if(null!=o&&(n=t?t(o):o))return n}}hasFocus(){if(k){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=z(e);e.focus(null==H?{get preventScroll(){return H={preventScroll:!0},!0}}:void 0),H||(H=!1,$(t,0))}(this.dom),Ee(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}updateRoot(){this._root=null}posAtCoords(e){return q(this,e)}coordsAtPos(e,t=1){return Q(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,i="up"==n?r.$from:r.$to;return Z(e,t,(()=>{let{node:t}=e.docView.domFromPos(i.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=Q(e,i.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 i=t[e];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=e.domSelection();return ee.test(r.parent.textContent)&&a.modify?Z(e,t,(()=>{let{focusNode:t,focusOffset:i,anchorNode:o,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:h}=e.domSelectionRange(),f=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&i==h;try{a.collapse(o,s),t&&(t!=o||i!=s)&&a.extend&&a.extend(t,i)}catch(e){}return null!=l&&(a.caretBidiLevel=l),f})):"left"==n||"backward"==n?o:s}(e,t,n))}(this,t||this.state,e)}pasteHTML(e,t){return At(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return At(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,[],Jt(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)||!st[t.type]||!e.editable&&t.type in at||st[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 T&&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,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return u(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,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 hn(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 fn(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")}},5651:(e,t,n)=>{"use strict";n.d(t,{Jg:()=>A});var r=n(7294);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function s(e){var t=(0,r.useRef)(e),n=(0,r.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var a=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},l=function(e){return"touches"in e},c=function(e){return e&&e.ownerDocument.defaultView||self},u=function(e,t,n){var r=e.getBoundingClientRect(),i=l(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:a((i.pageX-(r.left+c(e).pageXOffset))/r.width),top:a((i.pageY-(r.top+c(e).pageYOffset))/r.height)}},h=function(e){!l(e)&&e.preventDefault()},f=r.memo((function(e){var t=e.onMove,n=e.onKey,a=o(e,["onMove","onKey"]),f=(0,r.useRef)(null),d=s(t),p=s(n),m=(0,r.useRef)(null),g=(0,r.useRef)(!1),y=(0,r.useMemo)((function(){var e=function(e){h(e),(l(e)?e.touches.length>0:e.buttons>0)&&f.current?d(u(f.current,e,m.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=g.current,i=c(f.current),o=n?i.addEventListener:i.removeEventListener;o(r?"touchmove":"mousemove",e),o(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=f.current;if(r&&(h(t),!function(e,t){return t&&!l(e)}(t,g.current)&&r)){if(l(t)){g.current=!0;var i=t.changedTouches||[];i.length&&(m.current=i[0].identifier)}r.focus(),d(u(r,t,m.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),p({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[p,d]),v=y[0],b=y[1],w=y[2];return(0,r.useEffect)((function(){return w}),[w]),r.createElement("div",i({},a,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:f,onKeyDown:b,tabIndex:0,role:"slider"}))})),d=function(e){return e.filter(Boolean).join(" ")},p=function(e){var t=e.color,n=e.left,i=e.top,o=void 0===i?.5:i,s=d(["react-colorful__pointer",e.className]);return r.createElement("div",{className:s,style:{top:100*o+"%",left:100*n+"%"}},r.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},m=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},g=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:m(e.h),s:m(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:m(i/2),a:m(r,2)}}),y=function(e){var t=g(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},v=function(e){var t=g(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},b=r.memo((function(e){var t=e.hue,n=e.onChange,i=d(["react-colorful__hue",e.className]);return r.createElement("div",{className:i},r.createElement(f,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:a(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":m(t),"aria-valuemax":"360","aria-valuemin":"0"},r.createElement(p,{className:"react-colorful__hue-pointer",left:t/360,color:y({h:t,s:100,v:100,a:1})})))})),w=r.memo((function(e){var t=e.hsva,n=e.onChange,i={backgroundColor:y({h:t.h,s:100,v:100,a:1})};return r.createElement("div",{className:"react-colorful__saturation",style:i},r.createElement(f,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:a(t.s+100*e.left,0,100),v:a(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+m(t.s)+"%, Brightness "+m(t.v)+"%"},r.createElement(p,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:y(t)})))})),x=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function S(e,t,n){var i=s(n),o=(0,r.useState)((function(){return e.toHsva(t)})),a=o[0],l=o[1],c=(0,r.useRef)({color:t,hsva:a});(0,r.useEffect)((function(){if(!e.equal(t,c.current.color)){var n=e.toHsva(t);c.current={hsva:n,color:t},l(n)}}),[t,e]),(0,r.useEffect)((function(){var t;x(a,c.current.hsva)||e.equal(t=e.fromHsva(a),c.current.color)||(c.current={hsva:a,color:t},i(t))}),[a,e,i]);var u=(0,r.useCallback)((function(e){l((function(t){return Object.assign({},t,e)}))}),[]);return[a,u]}var k="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,C=new Map,O=function(e){var t=e.className,n=e.hsva,i=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+v(Object.assign({},n,{a:0}))+", "+v(Object.assign({},n,{a:1}))+")"},s=d(["react-colorful__alpha",t]),l=m(100*n.a);return r.createElement("div",{className:s},r.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),r.createElement(f,{onMove:function(e){i({a:e.left})},onKey:function(e){i({a:a(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":l+"%","aria-valuenow":l,"aria-valuemin":"0","aria-valuemax":"100"},r.createElement(p,{className:"react-colorful__alpha-pointer",left:n.a,color:v(n)})))},M=function(e){var t,s=e.className,a=e.colorModel,l=e.color,c=void 0===l?a.defaultColor:l,u=e.onChange,h=o(e,["className","colorModel","color","onChange"]),f=(0,r.useRef)(null);t=f,k((function(){var e=t.current?t.current.ownerDocument:document;if(void 0!==e&&!C.has(e)){var r=e.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',C.set(e,r);var i=n.nc;i&&r.setAttribute("nonce",i),e.head.appendChild(r)}}),[]);var p=S(a,c,u),m=p[0],g=p[1],y=d(["react-colorful",s]);return r.createElement("div",i({},h,{ref:f,className:y}),r.createElement(w,{hsva:m,onChange:g}),r.createElement(b,{hue:m.h,onChange:g}),r.createElement(O,{hsva:m,onChange:g,className:"react-colorful__last-control"}))},E={defaultColor:{r:0,g:0,b:0,a:1},toHsva:function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:m(60*(a<0?a+6:a)),s:m(o?s/o*100:0),v:m(o/255*100),a:i}},fromHsva:function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:m(255*[r,a,s,s,l,r][c]),g:m(255*[l,r,r,a,s,s][c]),b:m(255*[s,s,l,r,r,a][c]),a:m(i,2)}},equal:x},A=function(e){return r.createElement(M,i({},e,{colorModel:E}))}},7536:(e,t,n)=>{"use strict";n.d(t,{Dq:()=>pe,Gc:()=>S,Qr:()=>L,RV:()=>k,cI:()=>Ie,qo:()=>D});var r=n(7294),i=e=>"checkbox"===e.type,o=e=>e instanceof Date,s=e=>null==e;const a=e=>"object"==typeof e;var l=e=>!s(e)&&!Array.isArray(e)&&a(e)&&!o(e),c=e=>l(e)&&e.target?i(e.target)?e.target.checked:e.target.value:e,u=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),h=e=>{const t=e.constructor&&e.constructor.prototype;return l(t)&&t.hasOwnProperty("isPrototypeOf")},f="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function d(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(f&&(e instanceof Blob||e instanceof FileList)||!n&&!l(e))return e;if(t=n?[]:{},Array.isArray(e)||h(e))for(const n in e)t[n]=d(e[n]);else t=e}return t}var p=e=>Array.isArray(e)?e.filter(Boolean):[],m=e=>void 0===e,g=(e,t,n)=>{if(!t||!l(e))return n;const r=p(t.split(/[,[\].]+?/)).reduce(((e,t)=>s(e)?e:e[t]),e);return m(r)||r===e?m(e[t])?n:e[t]:r};const y={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},v={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},b="pattern",w="required",x=r.createContext(null),S=()=>r.useContext(x),k=e=>{const{children:t,...n}=e;return r.createElement(x.Provider,{value:n},t)};var C=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==v.all&&(t._proxyFormState[i]=!r||v.all),n&&(n[i]=!0),e[i]}});return i},O=e=>l(e)&&!Object.keys(e).length,M=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return O(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!r||v.all)))},E=e=>Array.isArray(e)?e:[e],A=(e,t,n)=>n&&t?e===t:!e||!t||e===t||E(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function T(e){const t=r.useRef(e);t.current=e,r.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var _=e=>"string"==typeof e,R=(e,t,n,r,i)=>_(e)?(r&&t.watch.add(e),g(n,e,i)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),g(n,e)))):(r&&(t.watchAll=!0),n);function D(e){const t=S(),{control:n=t.control,name:i,defaultValue:o,disabled:s,exact:a}=e||{},l=r.useRef(i);l.current=i,T({disabled:s,subject:n._subjects.values,next:e=>{A(l.current,e.name,a)&&u(d(R(l.current,n._names,e.values||n._formValues,!1,o)))}});const[c,u]=r.useState(n._getWatch(i,o));return r.useEffect((()=>n._removeUnmounted())),c}var P=e=>/^\w*$/.test(e),N=e=>p(e.replace(/["|']|\]/g,"").split(/\.|\[/));function I(e,t,n){let r=-1;const i=P(t)?[t]:N(t),o=i.length,s=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==s){const n=e[t];o=l(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}const L=e=>e.render(function(e){const t=S(),{name:n,control:i=t.control,shouldUnregister:o}=e,s=u(i._names.array,n),a=D({control:i,name:n,defaultValue:g(i._formValues,n,g(i._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=S(),{control:n=t.control,disabled:i,name:o,exact:s}=e||{},[a,l]=r.useState(n._formState),c=r.useRef(!0),u=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),h=r.useRef(o);return h.current=o,T({disabled:i,next:e=>c.current&&A(h.current,e.name,s)&&M(e,u.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),r.useEffect((()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1})),[n]),C(a,n,u.current,!1)}({control:i,name:n}),h=r.useRef(i.register(n,{...e.rules,value:a}));return r.useEffect((()=>{const e=i._options.shouldUnregister||o,t=(e,t)=>{const n=g(i._fields,e);n&&(n._f.mount=t)};if(t(n,!0),e){const e=d(g(i._options.defaultValues,n));I(i._defaultValues,n,e),m(g(i._formValues,n))&&I(i._formValues,n,e)}return()=>{(s?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}}),[n,i,s,o]),{field:{name:n,value:a,onChange:r.useCallback((e=>h.current.onChange({target:{value:c(e),name:n},type:y.CHANGE})),[n]),onBlur:r.useCallback((()=>h.current.onBlur({target:{value:g(i._formValues,n),name:n},type:y.BLUR})),[n,i]),ref:e=>{const t=g(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!g(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!g(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!g(l.touchedFields,n)},error:{enumerable:!0,get:()=>g(l.errors,n)}})}}(e));var j=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{};const F=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=g(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else l(r)&&F(r,t)}}};var B=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)}))},z=(e,t,n={})=>n.shouldFocus||m(n.shouldFocus)?n.focusName||`${e}.${m(n.focusIndex)?t:n.focusIndex}.`:"",$=e=>({isOnSubmit:!e||e===v.onSubmit,isOnBlur:e===v.onBlur,isOnChange:e===v.onChange,isOnAll:e===v.all,isOnTouch:e===v.onTouched}),H=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),V=(e,t,n)=>{const r=p(g(e,n));return I(r,"root",t[n]),I(e,n,r),e},U=e=>"boolean"==typeof e,W=e=>"file"===e.type,q=e=>"function"==typeof e,K=e=>{if(!f)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},G=e=>_(e),J=e=>"radio"===e.type,Q=e=>e instanceof RegExp;const Y={value:!1,isValid:!1},X={value:!0,isValid:!0};var Z=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!m(e[0].attributes.value)?m(e[0].value)||""===e[0].value?X:{value:e[0].value,isValid:!0}:X:Y}return Y};const ee={isValid:!1,value:null};var te=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),ee):ee;function ne(e,t,n="validate"){if(G(e)||Array.isArray(e)&&e.every(G)||U(e)&&!e)return{type:n,message:G(e)?e:"",ref:t}}var re=e=>l(e)&&!Q(e)?e:{value:e,message:""},ie=async(e,t,n,r,o)=>{const{ref:a,refs:c,required:u,maxLength:h,minLength:f,min:d,max:p,pattern:y,validate:v,name:x,valueAsNumber:S,mount:k,disabled:C}=e._f,M=g(t,x);if(!k||C)return{};const E=c?c[0]:a,A=e=>{r&&E.reportValidity&&(E.setCustomValidity(U(e)?"":e||""),E.reportValidity())},T={},R=J(a),D=i(a),P=R||D,N=(S||W(a))&&m(a.value)&&m(M)||K(a)&&""===a.value||""===M||Array.isArray(M)&&!M.length,I=j.bind(null,x,n,T),L=(e,t,n,r="maxLength",i="minLength")=>{const o=e?t:n;T[x]={type:e?r:i,message:o,ref:a,...I(e?r:i,o)}};if(o?!Array.isArray(M)||!M.length:u&&(!P&&(N||s(M))||U(M)&&!M||D&&!Z(c).isValid||R&&!te(c).isValid)){const{value:e,message:t}=G(u)?{value:!!u,message:u}:re(u);if(e&&(T[x]={type:w,message:t,ref:E,...I(w,t)},!n))return A(t),T}if(!(N||s(d)&&s(p))){let e,t;const r=re(p),i=re(d);if(s(M)||isNaN(M)){const n=a.valueAsDate||new Date(M),o=e=>new Date((new Date).toDateString()+" "+e),s="time"==a.type,l="week"==a.type;_(r.value)&&M&&(e=s?o(M)>o(r.value):l?M>r.value:n>new Date(r.value)),_(i.value)&&M&&(t=s?o(M)<o(i.value):l?M<i.value:n<new Date(i.value))}else{const n=a.valueAsNumber||(M?+M:M);s(r.value)||(e=n>r.value),s(i.value)||(t=n<i.value)}if((e||t)&&(L(!!e,r.message,i.message,"max","min"),!n))return A(T[x].message),T}if((h||f)&&!N&&(_(M)||o&&Array.isArray(M))){const e=re(h),t=re(f),r=!s(e.value)&&M.length>+e.value,i=!s(t.value)&&M.length<+t.value;if((r||i)&&(L(r,e.message,t.message),!n))return A(T[x].message),T}if(y&&!N&&_(M)){const{value:e,message:t}=re(y);if(Q(e)&&!M.match(e)&&(T[x]={type:b,message:t,ref:a,...I(b,t)},!n))return A(t),T}if(v)if(q(v)){const e=ne(await v(M,t),E);if(e&&(T[x]={...e,...I("validate",e.message)},!n))return A(e.message),T}else if(l(v)){let e={};for(const r in v){if(!O(e)&&!n)break;const i=ne(await v[r](M,t),E,r);i&&(e={...i,...I(r,i.message)},A(i.message),n&&(T[x]=e))}if(!O(e)&&(T[x]={ref:E,...e},!n))return T}return A(!0),T};function oe(e,t){return[...e,...E(t)]}var se=e=>Array.isArray(e)?e.map((()=>{})):void 0;function ae(e,t,n){return[...e.slice(0,t),...E(n),...e.slice(t)]}var le=(e,t,n)=>Array.isArray(e)?(m(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[];function ce(e,t){return[...E(t),...E(e)]}var ue=(e,t)=>m(t)?[]:function(e,t){let n=0;const r=[...e];for(const e of t)r.splice(e-n,1),n++;return p(r).length?r:[]}(e,E(t).sort(((e,t)=>e-t))),he=(e,t,n)=>{e[t]=[e[n],e[n]=e[t]][0]};function fe(e,t){const n=Array.isArray(t)?t:P(t)?[t]:N(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=m(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(l(r)&&O(r)||Array.isArray(r)&&function(e){for(const t in e)if(!m(e[t]))return!1;return!0}(r))&&fe(e,n.slice(0,-1)),e}var de=(e,t,n)=>(e[t]=n,e);function pe(e){const t=S(),{control:n=t.control,name:i,keyName:o="id",shouldUnregister:s}=e,[a,l]=r.useState(n._getFieldArray(i)),c=r.useRef(n._getFieldArray(i).map(B)),u=r.useRef(a),h=r.useRef(i),f=r.useRef(!1);h.current=i,u.current=a,n._names.array.add(i),e.rules&&n.register(i,e.rules),T({next:({values:e,name:t})=>{if(t===h.current||!t){const t=g(e,h.current);Array.isArray(t)&&(l(t),c.current=t.map(B))}},subject:n._subjects.array});const p=r.useCallback((e=>{f.current=!0,n._updateFieldArray(i,e)}),[n,i]);return r.useEffect((()=>{if(n._state.action=!1,H(i,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!$(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([i]).then((e=>{const t=g(e.errors,i),r=g(n._formState.errors,i);(r?!t&&r.type:t&&t.type)&&(t?I(n._formState.errors,i,t):fe(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=g(n._fields,i);e&&e._f&&ie(e,n._formValues,n._options.criteriaMode===v.all,n._options.shouldUseNativeValidation,!0).then((e=>!O(e)&&n._subjects.state.next({errors:V(n._formState.errors,e,i)})))}n._subjects.values.next({name:i,values:{...n._formValues}}),n._names.focus&&F(n._fields,(e=>!!e&&e.startsWith(n._names.focus||""))),n._names.focus="",n._updateValid()}),[a,i,n]),r.useEffect((()=>(!g(n._formValues,i)&&n._updateFieldArray(i),()=>{(n._options.shouldUnregister||s)&&n.unregister(i)})),[i,n,o,s]),{swap:r.useCallback(((e,t)=>{const r=n._getFieldArray(i);he(r,e,t),he(c.current,e,t),p(r),l(r),n._updateFieldArray(i,r,he,{argA:e,argB:t},!1)}),[p,i,n]),move:r.useCallback(((e,t)=>{const r=n._getFieldArray(i);le(r,e,t),le(c.current,e,t),p(r),l(r),n._updateFieldArray(i,r,le,{argA:e,argB:t},!1)}),[p,i,n]),prepend:r.useCallback(((e,t)=>{const r=E(d(e)),o=ce(n._getFieldArray(i),r);n._names.focus=z(i,0,t),c.current=ce(c.current,r.map(B)),p(o),l(o),n._updateFieldArray(i,o,ce,{argA:se(e)})}),[p,i,n]),append:r.useCallback(((e,t)=>{const r=E(d(e)),o=oe(n._getFieldArray(i),r);n._names.focus=z(i,o.length-1,t),c.current=oe(c.current,r.map(B)),p(o),l(o),n._updateFieldArray(i,o,oe,{argA:se(e)})}),[p,i,n]),remove:r.useCallback((e=>{const t=ue(n._getFieldArray(i),e);c.current=ue(c.current,e),p(t),l(t),n._updateFieldArray(i,t,ue,{argA:e})}),[p,i,n]),insert:r.useCallback(((e,t,r)=>{const o=E(d(t)),s=ae(n._getFieldArray(i),e,o);n._names.focus=z(i,e,r),c.current=ae(c.current,e,o.map(B)),p(s),l(s),n._updateFieldArray(i,s,ae,{argA:e,argB:se(t)})}),[p,i,n]),update:r.useCallback(((e,t)=>{const r=d(t),o=de(n._getFieldArray(i),e,r);c.current=[...o].map(((t,n)=>t&&n!==e?c.current[n]:B())),p(o),l([...o]),n._updateFieldArray(i,o,de,{argA:e,argB:r},!0,!1)}),[p,i,n]),replace:r.useCallback((e=>{const t=E(d(e));c.current=t.map(B),p([...t]),l([...t]),n._updateFieldArray(i,[...t],(e=>e),{},!0,!1)}),[p,i,n]),fields:r.useMemo((()=>a.map(((e,t)=>({...e,[o]:c.current[t]||B()})))),[a,o])}}function me(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var ge=e=>s(e)||!a(e);function ye(e,t){if(ge(e)||ge(t))return e===t;if(o(e)&&o(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(o(n)&&o(e)||l(n)&&l(e)||Array.isArray(n)&&Array.isArray(e)?!ye(n,e):n!==e)return!1}}return!0}var ve=e=>"select-multiple"===e.type,be=e=>J(e)||i(e),we=e=>K(e)&&e.isConnected,xe=e=>{for(const t in e)if(q(e[t]))return!0;return!1};function Se(e,t={}){const n=Array.isArray(e);if(l(e)||n)for(const n in e)Array.isArray(e[n])||l(e[n])&&!xe(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Se(e[n],t[n])):s(e[n])||(t[n]=!0);return t}function ke(e,t,n){const r=Array.isArray(e);if(l(e)||r)for(const r in e)Array.isArray(e[r])||l(e[r])&&!xe(e[r])?m(t)||ge(n[r])?n[r]=Array.isArray(e[r])?Se(e[r],[]):{...Se(e[r])}:ke(e[r],s(t)?{}:t[r],n[r]):n[r]=!ye(e[r],t[r]);return n}var Ce=(e,t)=>ke(e,t,Se(t)),Oe=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>m(e)?e:t?""===e?NaN:e?+e:e:n&&_(e)?new Date(e):r?r(e):e;function Me(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return W(t)?t.files:J(t)?te(e.refs).value:ve(t)?[...t.selectedOptions].map((({value:e})=>e)):i(t)?Z(e.refs).value:Oe(m(t.value)?e.ref.value:t.value,e)}var Ee=(e,t,n,r)=>{const i={};for(const n of e){const e=g(t,n);e&&I(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Ae=e=>m(e)?e:Q(e)?e.source:l(e)?Q(e.value)?e.value.source:e.value:e,Te=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function _e(e,t,n){const r=g(e,n);if(r||P(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=g(t,r),s=g(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}var Re=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e),De=(e,t)=>!p(g(e,t)).length&&fe(e,t);const Pe={mode:v.onSubmit,reValidateMode:v.onChange,shouldFocusError:!0};function Ne(e={},t){let n,r={...Pe,...e},a={submitCount:0,isDirty:!1,isLoading:q(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},h={},b=(l(r.defaultValues)||l(r.values))&&d(r.defaultValues||r.values)||{},w=r.shouldUnregister?{}:d(b),x={action:!1,mount:!1,watch:!1},S={mount:new Set,unMount:new Set,array:new Set,watch:new Set},k=0;const C={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},M={values:me(),array:me(),state:me()},A=e.resetOptions&&e.resetOptions.keepDirtyValues,T=$(r.mode),D=$(r.reValidateMode),P=r.criteriaMode===v.all,N=async e=>{if(C.isValid||e){const e=r.resolver?O((await z()).errors):await G(h,!0);e!==a.isValid&&M.state.next({isValid:e})}},L=e=>C.isValidating&&M.state.next({isValidating:e}),j=(e,t,n,r)=>{const i=g(h,e);if(i){const o=g(w,e,m(n)?g(b,e):n);m(o)||r&&r.defaultChecked||t?I(w,e,t?o:Me(i._f)):Y(e,o),x.mount&&N()}},B=(e,t,n,r,i)=>{let o=!1,s=!1;const l={name:e};if(!n||r){C.isDirty&&(s=a.isDirty,a.isDirty=l.isDirty=J(),o=s!==l.isDirty);const n=ye(g(b,e),t);s=g(a.dirtyFields,e),n?fe(a.dirtyFields,e):I(a.dirtyFields,e,!0),l.dirtyFields=a.dirtyFields,o=o||C.dirtyFields&&s!==!n}if(n){const t=g(a.touchedFields,e);t||(I(a.touchedFields,e,n),l.touchedFields=a.touchedFields,o=o||C.touchedFields&&t!==n)}return o&&i&&M.state.next(l),o?l:{}},z=async e=>r.resolver(w,r.context,Ee(e||S.mount,h,r.criteriaMode,r.shouldUseNativeValidation)),G=async(e,t,n={valid:!0})=>{for(const i in e){const o=e[i];if(o){const{_f:e,...i}=o;if(e){const i=S.array.has(e.name),s=await ie(o,w,P,r.shouldUseNativeValidation&&!t,i);if(s[e.name]&&(n.valid=!1,t))break;!t&&(g(s,e.name)?i?V(a.errors,s,e.name):I(a.errors,e.name,s[e.name]):fe(a.errors,e.name))}i&&await G(i,t,n)}}return n.valid},J=(e,t)=>(e&&t&&I(w,e,t),!ye(ne(),b)),Q=(e,t,n)=>R(e,S,{...x.mount?w:m(t)?b:_(e)?{[e]:t}:t},n,t),Y=(e,t,n={})=>{const r=g(h,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&I(w,e,Oe(t,n)),o=K(n.ref)&&s(t)?"":t,ve(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?i(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):W(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||M.values.next({name:e,values:{...w}})))}(n.shouldDirty||n.shouldTouch)&&B(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&te(e)},X=(e,t,n)=>{for(const r in t){const i=t[r],s=`${e}.${r}`,a=g(h,s);!S.array.has(e)&&ge(i)&&(!a||a._f)||o(i)?Y(s,i,n):X(s,i,n)}},Z=(e,n,r={})=>{const i=g(h,e),o=S.array.has(e),l=d(n);I(w,e,l),o?(M.array.next({name:e,values:{...w}}),(C.isDirty||C.dirtyFields)&&r.shouldDirty&&M.state.next({name:e,dirtyFields:Ce(b,w),isDirty:J(e,l)})):!i||i._f||s(l)?Y(e,l,r):X(e,l,r),H(e,S)&&M.state.next({...a}),M.values.next({name:e,values:{...w}}),!x.mount&&t()},ee=async t=>{const i=t.target;let o=i.name,s=!0;const l=g(h,o);if(l){let u,f;const d=i.type?Me(l._f):c(t),p=t.type===y.BLUR||t.type===y.FOCUS_OUT,m=!Te(l._f)&&!r.resolver&&!g(a.errors,o)&&!l._f.deps||Re(p,g(a.touchedFields,o),a.isSubmitted,D,T),v=H(o,S,p);I(w,o,d),p?(l._f.onBlur&&l._f.onBlur(t),n&&n(0)):l._f.onChange&&l._f.onChange(t);const b=B(o,d,p,!1),x=!O(b)||v;if(!p&&M.values.next({name:o,type:t.type,values:{...w}}),m)return C.isValid&&N(),x&&M.state.next({name:o,...v?{}:b});if(!p&&v&&M.state.next({...a}),L(!0),r.resolver){const{errors:e}=await z([o]),t=_e(a.errors,h,o),n=_e(e,h,t.name||o);u=n.error,o=n.name,f=O(e)}else u=(await ie(l,w,P,r.shouldUseNativeValidation))[o],s=isNaN(d)||d===g(w,o,d),s&&(u?f=!1:C.isValid&&(f=await G(h,!0)));s&&(l._f.deps&&te(l._f.deps),((t,r,i,o)=>{const s=g(a.errors,t),l=C.isValid&&U(r)&&a.isValid!==r;var c;if(e.delayError&&i?(c=()=>((e,t)=>{I(a.errors,e,t),M.state.next({errors:a.errors})})(t,i),n=e=>{clearTimeout(k),k=setTimeout(c,e)},n(e.delayError)):(clearTimeout(k),n=null,i?I(a.errors,t,i):fe(a.errors,t)),(i?!ye(s,i):s)||!O(o)||l){const e={...o,...l&&U(r)?{isValid:r}:{},errors:a.errors,name:t};a={...a,...e},M.state.next(e)}L(!1)})(o,f,u,b))}},te=async(e,t={})=>{let n,i;const o=E(e);if(L(!0),r.resolver){const t=await(async e=>{const{errors:t}=await z();if(e)for(const n of e){const e=g(t,n);e?I(a.errors,n,e):fe(a.errors,n)}else a.errors=t;return t})(m(e)?e:o);n=O(t),i=e?!o.some((e=>g(t,e))):n}else e?(i=(await Promise.all(o.map((async e=>{const t=g(h,e);return await G(t&&t._f?{[e]:t}:t)})))).every(Boolean),(i||a.isValid)&&N()):i=n=await G(h);return M.state.next({...!_(e)||C.isValid&&n!==a.isValid?{}:{name:e},...r.resolver||!e?{isValid:n}:{},errors:a.errors,isValidating:!1}),t.shouldFocus&&!i&&F(h,(e=>e&&g(a.errors,e)),e?o:S.mount),i},ne=e=>{const t={...b,...x.mount?w:{}};return m(e)?t:_(e)?g(t,e):e.map((e=>g(t,e)))},re=(e,t)=>({invalid:!!g((t||a).errors,e),isDirty:!!g((t||a).dirtyFields,e),isTouched:!!g((t||a).touchedFields,e),error:g((t||a).errors,e)}),oe=(e,t={})=>{for(const n of e?E(e):S.mount)S.mount.delete(n),S.array.delete(n),t.keepValue||(fe(h,n),fe(w,n)),!t.keepError&&fe(a.errors,n),!t.keepDirty&&fe(a.dirtyFields,n),!t.keepTouched&&fe(a.touchedFields,n),!r.shouldUnregister&&!t.keepDefaultValue&&fe(b,n);M.values.next({values:{...w}}),M.state.next({...a,...t.keepDirty?{isDirty:J()}:{}}),!t.keepIsValid&&N()},se=(e,t={})=>{let n=g(h,e);const i=U(t.disabled);return I(h,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),S.mount.add(e),n?i&&I(w,e,t.disabled?void 0:g(w,e,Me(n._f))):j(e,!0,t.value),{...i?{disabled:t.disabled}:{},...r.shouldUseNativeValidation?{required:!!t.required,min:Ae(t.min),max:Ae(t.max),minLength:Ae(t.minLength),maxLength:Ae(t.maxLength),pattern:Ae(t.pattern)}:{},name:e,onChange:ee,onBlur:ee,ref:i=>{if(i){se(e,t),n=g(h,e);const r=m(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,o=be(r),s=n._f.refs||[];if(o?s.find((e=>e===r)):r===n._f.ref)return;I(h,e,{_f:{...n._f,...o?{refs:[...s.filter(we),r,...Array.isArray(g(b,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),j(e,!1,void 0,r)}else n=g(h,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!u(S.array,e)||!x.action)&&S.unMount.add(e)}}},ae=()=>r.shouldFocusError&&F(h,(e=>e&&g(a.errors,e)),S.mount),le=(n,r={})=>{const i=n||b,o=d(i),s=n&&!O(n)?o:b;if(r.keepDefaultValues||(b=i),!r.keepValues){if(r.keepDirtyValues||A)for(const e of S.mount)g(a.dirtyFields,e)?I(s,e,g(w,e)):Z(e,g(s,e));else{if(f&&m(n))for(const e of S.mount){const t=g(h,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(K(e)){const t=e.closest("form");if(t){t.reset();break}}}}h={}}w=e.shouldUnregister?r.keepDefaultValues?d(b):{}:o,M.array.next({values:{...s}}),M.values.next({values:{...s}})}S={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!x.mount&&t(),x.mount=!C.isValid||!!r.keepIsValid,x.watch=!!e.shouldUnregister,M.state.next({submitCount:r.keepSubmitCount?a.submitCount:0,isDirty:r.keepDirty?a.isDirty:!(!r.keepDefaultValues||ye(n,b)),isSubmitted:!!r.keepIsSubmitted&&a.isSubmitted,dirtyFields:r.keepDirtyValues?a.dirtyFields:r.keepDefaultValues&&n?Ce(b,n):{},touchedFields:r.keepTouched?a.touchedFields:{},errors:r.keepErrors?a.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},ce=(e,t)=>le(q(e)?e(w):e,t);return{control:{register:se,unregister:oe,getFieldState:re,_executeSchema:z,_getWatch:Q,_getDirty:J,_updateValid:N,_removeUnmounted:()=>{for(const e of S.unMount){const t=g(h,e);t&&(t._f.refs?t._f.refs.every((e=>!we(e))):!we(t._f.ref))&&oe(e)}S.unMount=new Set},_updateFieldArray:(e,t=[],n,r,i=!0,o=!0)=>{if(r&&n){if(x.action=!0,o&&Array.isArray(g(h,e))){const t=n(g(h,e),r.argA,r.argB);i&&I(h,e,t)}if(o&&Array.isArray(g(a.errors,e))){const t=n(g(a.errors,e),r.argA,r.argB);i&&I(a.errors,e,t),De(a.errors,e)}if(C.touchedFields&&o&&Array.isArray(g(a.touchedFields,e))){const t=n(g(a.touchedFields,e),r.argA,r.argB);i&&I(a.touchedFields,e,t)}C.dirtyFields&&(a.dirtyFields=Ce(b,w)),M.state.next({name:e,isDirty:J(e,t),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else I(w,e,t)},_getFieldArray:t=>p(g(x.mount?w:b,t,e.shouldUnregister?g(b,t,[]):[])),_reset:le,_resetDefaultValues:()=>q(r.defaultValues)&&r.defaultValues().then((e=>{ce(e,r.resetOptions),M.state.next({isLoading:!1})})),_updateFormState:e=>{a={...a,...e}},_subjects:M,_proxyFormState:C,get _fields(){return h},get _formValues(){return w},get _state(){return x},set _state(e){x=e},get _defaultValues(){return b},get _names(){return S},set _names(e){S=e},get _formState(){return a},set _formState(e){a=e},get _options(){return r},set _options(e){r={...r,...e}}},trigger:te,register:se,handleSubmit:(e,t)=>async n=>{n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let i=d(w);if(M.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await z();a.errors=e,i=t}else await G(h);fe(a.errors,"root"),O(a.errors)?(M.state.next({errors:{}}),await e(i,n)):(t&&await t({...a.errors},n),ae(),setTimeout(ae)),M.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:O(a.errors),submitCount:a.submitCount+1,errors:a.errors})},watch:(e,t)=>q(e)?M.values.subscribe({next:n=>e(Q(void 0,t),n)}):Q(e,t,!0),setValue:Z,getValues:ne,reset:ce,resetField:(e,t={})=>{g(h,e)&&(m(t.defaultValue)?Z(e,g(b,e)):(Z(e,t.defaultValue),I(b,e,t.defaultValue)),t.keepTouched||fe(a.touchedFields,e),t.keepDirty||(fe(a.dirtyFields,e),a.isDirty=t.defaultValue?J(e,g(b,e)):J()),t.keepError||(fe(a.errors,e),C.isValid&&N()),M.state.next({...a}))},clearErrors:e=>{e&&E(e).forEach((e=>fe(a.errors,e))),M.state.next({errors:e?a.errors:{}})},unregister:oe,setError:(e,t,n)=>{const r=(g(h,e,{_f:{}})._f||{}).ref;I(a.errors,e,{...t,ref:r}),M.state.next({name:e,errors:a.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},setFocus:(e,t={})=>{const n=g(h,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:re}}function Ie(e={}){const t=r.useRef(),[n,i]=r.useState({isDirty:!1,isValidating:!1,isLoading:q(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:q(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Ne(e,(()=>i((e=>({...e}))))),formState:n});const o=t.current.control;return o._options=e,T({subject:o._subjects.state,next:e=>{M(e,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),r.useEffect((()=>{e.values&&!ye(e.values,o._defaultValues)?o._reset(e.values,o._options.resetOptions):o._resetDefaultValues()}),[e.values,o]),r.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),t.current.formState=C(n,o),t.current}},8699:(e,t,n)=>{"use strict";n.d(t,{V:()=>s});const r="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),i="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class s{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))i(n.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");i(r(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+s+";")}(a.length||c)&&o.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=o[r]||1;return o[r]=e+1,"ͼ"+e.toString(36)}static mount(e,t){(e[i]||new l(e)).mount(Array.isArray(t)?t:[t])}}let a=null;class l{constructor(e){if(!e.head&&e.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(a)return e.adoptedStyleSheets=[a.sheet,...e.adoptedStyleSheets],e[i]=a;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],a=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[i]=this}mount(e){let t=this.sheet,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i],s=this.modules.indexOf(o);if(s<r&&s>-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),t)for(let e=0;e<o.rules.length;e++)t.insertRule(o.rules[e],n++)}else{for(;r<s;)n+=this.modules[r++].rules.length;n+=o.rules.length,r++}}if(!t){let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e}}}},7563:(e,t,n)=>{"use strict";n.d(t,{Ab:()=>s,Fr:()=>a,G$:()=>o,K$:()=>u,MS:()=>r,QY:()=>h,h5:()=>l,iD:()=>c,lK:()=>f,uj:()=>i});var r="-ms-",i="-moz-",o="-webkit-",s="comm",a="rule",l="decl",c="@media",u="@import",h="@supports",f="@keyframes"},2190:(e,t,n)=>{"use strict";n.d(t,{MY:()=>s});var r=n(7563),i=n(6686),o=n(6411);function s(e){return(0,o.cE)(a("",null,null,null,[""],e=(0,o.un)(e),0,[0],e))}function a(e,t,n,r,s,h,f,d,p){for(var m=0,g=0,y=f,v=0,b=0,w=0,x=1,S=1,k=1,C=0,O="",M=s,E=h,A=r,T=O;S;)switch(w=C,C=(0,o.lp)()){case 40:if(108!=w&&58==(0,i.uO)(T,y-1)){-1!=(0,i.Cw)(T+=(0,i.gx)((0,o.iF)(C),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:T+=(0,o.iF)(C);break;case 9:case 10:case 13:case 32:T+=(0,o.Qb)(w);break;case 92:T+=(0,o.kq)((0,o.Ud)()-1,7);continue;case 47:switch((0,o.fj)()){case 42:case 47:(0,i.R3)(c((0,o.q6)((0,o.lp)(),(0,o.Ud)()),t,n),p);break;default:T+="/"}break;case 123*x:d[m++]=(0,i.to)(T)*k;case 125*x:case 59:case 0:switch(C){case 0:case 125:S=0;case 59+g:b>0&&(0,i.to)(T)-y&&(0,i.R3)(b>32?u(T+";",r,n,y-1):u((0,i.gx)(T," ","")+";",r,n,y-2),p);break;case 59:T+=";";default:if((0,i.R3)(A=l(T,t,n,m,g,s,d,O,M=[],E=[],y),h),123===C)if(0===g)a(T,t,A,A,M,h,y,d,E);else switch(99===v&&110===(0,i.uO)(T,3)?100:v){case 100:case 109:case 115:a(e,A,A,r&&(0,i.R3)(l(e,A,A,0,0,s,d,O,s,M=[],y),E),s,E,y,d,r?M:E);break;default:a(T,A,A,A,[""],E,0,d,E)}}m=g=b=0,x=k=1,O=T="",y=f;break;case 58:y=1+(0,i.to)(T),b=w;default:if(x<1)if(123==C)--x;else if(125==C&&0==x++&&125==(0,o.mp)())continue;switch(T+=(0,i.Dp)(C),C*x){case 38:k=g>0?1:(T+="\f",-1);break;case 44:d[m++]=((0,i.to)(T)-1)*k,k=1;break;case 64:45===(0,o.fj)()&&(T+=(0,o.iF)((0,o.lp)())),v=(0,o.fj)(),g=y=(0,i.to)(O=T+=(0,o.QU)((0,o.Ud)())),C++;break;case 45:45===w&&2==(0,i.to)(T)&&(x=0)}}return h}function l(e,t,n,s,a,l,c,u,h,f,d){for(var p=a-1,m=0===a?l:[""],g=(0,i.Ei)(m),y=0,v=0,b=0;y<s;++y)for(var w=0,x=(0,i.tb)(e,p+1,p=(0,i.Wn)(v=c[y])),S=e;w<g;++w)(S=(0,i.fy)(v>0?m[w]+" "+x:(0,i.gx)(x,/&\f/g,m[w])))&&(h[b++]=S);return(0,o.dH)(e,t,n,0===a?r.Fr:u,h,f,d)}function c(e,t,n){return(0,o.dH)(e,t,n,r.Ab,(0,i.Dp)((0,o.Tb)()),(0,i.tb)(e,2,-2),0)}function u(e,t,n,s){return(0,o.dH)(e,t,n,r.h5,(0,i.tb)(e,0,s),(0,i.tb)(e,s+1,-1),s)}},211:(e,t,n)=>{"use strict";n.d(t,{P:()=>s,q:()=>o});var r=n(7563),i=n(6686);function o(e,t){for(var n="",r=(0,i.Ei)(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function s(e,t,n,s){switch(e.type){case r.K$:case r.h5:return e.return=e.return||e.value;case r.Ab:return"";case r.lK:return e.return=e.value+"{"+o(e.children,s)+"}";case r.Fr:e.value=e.props.join(",")}return(0,i.to)(n=o(e.children,s))?e.return=e.value+"{"+n+"}":""}},6411:(e,t,n)=>{"use strict";n.d(t,{FK:()=>a,JG:()=>h,QU:()=>M,Qb:()=>S,Tb:()=>f,Ud:()=>g,cE:()=>w,dH:()=>u,fj:()=>m,iF:()=>x,kq:()=>k,lp:()=>p,mp:()=>d,q6:()=>O,r:()=>v,tP:()=>y,un:()=>b});var r=n(6686),i=1,o=1,s=0,a=0,l=0,c="";function u(e,t,n,r,s,a,l){return{value:e,root:t,parent:n,type:r,props:s,children:a,line:i,column:o,length:l,return:""}}function h(e,t){return(0,r.f0)(u("",null,null,"",null,null,0),e,{length:-e.length},t)}function f(){return l}function d(){return l=a>0?(0,r.uO)(c,--a):0,o--,10===l&&(o=1,i--),l}function p(){return l=a<s?(0,r.uO)(c,a++):0,o++,10===l&&(o=1,i++),l}function m(){return(0,r.uO)(c,a)}function g(){return a}function y(e,t){return(0,r.tb)(c,e,t)}function v(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 b(e){return i=o=1,s=(0,r.to)(c=e),a=0,[]}function w(e){return c="",e}function x(e){return(0,r.fy)(y(a-1,C(91===e?e+2:40===e?e+1:e)))}function S(e){for(;(l=m())&&l<33;)p();return v(e)>2||v(l)>3?"":" "}function k(e,t){for(;--t&&p()&&!(l<48||l>102||l>57&&l<65||l>70&&l<97););return y(e,g()+(t<6&&32==m()&&32==p()))}function C(e){for(;p();)switch(l){case e:return a;case 34:case 39:34!==e&&39!==e&&C(l);break;case 40:41===e&&C(e);break;case 92:p()}return a}function O(e,t){for(;p()&&e+l!==57&&(e+l!==84||47!==m()););return"/*"+y(t,a-1)+"*"+(0,r.Dp)(47===e?e:p())}function M(e){for(;!v(m());)p();return y(e,a)}},6686:(e,t,n)=>{"use strict";n.d(t,{$e:()=>g,Cw:()=>u,Dp:()=>i,EQ:()=>l,Ei:()=>p,R3:()=>m,Wn:()=>r,f0:()=>o,fy:()=>a,gx:()=>c,tb:()=>f,to:()=>d,uO:()=>h,vp:()=>s});var r=Math.abs,i=String.fromCharCode,o=Object.assign;function s(e,t){return 45^h(e,0)?(((t<<2^h(e,0))<<2^h(e,1))<<2^h(e,2))<<2^h(e,3):0}function a(e){return e.trim()}function l(e,t){return(e=t.exec(e))?e[0]:e}function c(e,t,n){return e.replace(t,n)}function u(e,t){return e.indexOf(t)}function h(e,t){return 0|e.charCodeAt(t)}function f(e,t,n){return e.slice(t,n)}function d(e){return e.length}function p(e){return e.length}function m(e,t){return t.push(e),e}function g(e,t){return e.map(t).join("")}},270:(e,t,n)=>{"use strict";n.d(t,{Ue:()=>l});const r=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=r?r:"object"!=typeof i)?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,o={setState:r,getState:i,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,o),o};var i=n(7294),o=n(2798);const{useSyncExternalStoreWithSelector:s}=o,a=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?r(e):r)(e):e,n=(e,n)=>function(e,t=e.getState,n){const r=s(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return(0,i.useDebugValue)(r),r}(t,e,n);return Object.assign(n,t),n},l=e=>e?a(e):a},782:(e,t,n)=>{"use strict";n.d(t,{mW:()=>o});const r=new Map,i=e=>{const t=r.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},o=(e,t={})=>(n,o,a)=>{const{enabled:l,anonymousActionType:c,store:u,...h}=t;let f;try{f=(null==l||l)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!f)return l&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,o,a);const{connection:d,...p}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const i=r.get(n.name);if(i)return{type:"tracked",store:e,...i};const o={connection:t.connect(n),stores:{}};return r.set(n.name,o),{type:"tracked",store:e,...o}})(u,f,h);let m=!0;a.setState=(e,t,r)=>{const s=n(e,t);if(!m)return s;const l=void 0===r?{type:c||"anonymous"}:"string"==typeof r?{type:r}:r;return void 0===u?(null==d||d.send(l,o()),s):(null==d||d.send({...l,type:`${u}/${l.type}`},{...i(h.name),[u]:a.getState()}),s)};const g=(...e)=>{const t=m;m=!1,n(...e),m=t},y=e(a.setState,o,a);if("untracked"===p.type?null==d||d.init(y):(p.stores[p.store]=a,null==d||d.init(Object.fromEntries(Object.entries(p.stores).map((([e,t])=>[e,e===p.store?y:t.getState()]))))),a.dispatchFromDevtools&&"function"==typeof a.dispatch){let e=!1;const t=a.dispatch;a.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return d.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):s(e.payload,(e=>{if("__setState"!==e.type)a.dispatchFromDevtools&&"function"==typeof a.dispatch&&a.dispatch(e);else{if(void 0===u)return void g(e.state);1!==Object.keys(e.state).length&&console.error('\n                    [zustand devtools middleware] Unsupported __setState action format. \n                    When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n                    and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n                    ');const t=e.state[u];if(null==t)return;JSON.stringify(a.getState())!==JSON.stringify(t)&&g(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return g(y),void 0===u?null==d?void 0:d.init(a.getState()):null==d?void 0:d.init(i(h.name));case"COMMIT":return void 0===u?void(null==d||d.init(a.getState())):null==d?void 0:d.init(i(h.name));case"ROLLBACK":return s(e.state,(e=>{if(void 0===u)return g(e),void(null==d||d.init(a.getState()));g(e[u]),null==d||d.init(i(h.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return s(e.state,(e=>{void 0!==u?JSON.stringify(a.getState())!==JSON.stringify(e[u])&&g(e[u]):g(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return g(void 0===u?r:r[u]),void(null==d||d.send(null,n))}case"PAUSE_RECORDING":return m=!m}return}})),y},s=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)}},8753:(e,t,n)=>{"use strict";n.d(t,{n:()=>i});var r=n(2902);const i=e=>(t,n,i)=>(i.setState=(e,n,...i)=>{const o="function"==typeof e?(0,r.Uy)(e):e;return t(o,n,...i)},e(i.setState,n,i))},6248:(e,t,n)=>{"use strict";function r(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}n.d(t,{X:()=>r})}}]);

Copyright © 2019 by b0y-101