/*! 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 o(e){return Math.min(1,Math.max(0,e))}function i(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 o=Math.max(e,t,n),i=Math.min(e,t,n),s=0,a=0,l=(o+i)/2;if(o===i)a=0,s=0;else{var c=o-i;switch(a=l>.5?c/(2-o-i):c/(o+i),o){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 o=Math.max(e,t,n),i=Math.min(e,t,n),s=0,a=o,l=o-i,c=0===o?0:l/o;if(o===i)s=0;else{switch(o){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 o=[a(Math.round(e).toString(16)),a(Math.round(t).toString(16)),a(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function d(e){return f(e)/255}function f(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 o;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,o,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:f(n[1]),g:f(n[2]),b:f(n[3]),a:d(n[4]),format:t?"name":"hex8"}:(n=v.hex6.exec(e))?{r:f(n[1]),g:f(n[2]),b:f(n[3]),format:t?"name":"hex"}:(n=v.hex4.exec(e))?{r:f(n[1]+n[1]),g:f(n[2]+n[2]),b:f(n[3]+n[3]),a:d(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=v.hex3.exec(e))&&{r:f(n[1]+n[1]),g:f(n[2]+n[2]),b:f(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,o=e.b,a={r:255*r(t,255),g:255*r(n,255),b:255*r(o,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 o=Math.floor(e),i=e-o,s=n*(1-t),a=n*(1-i*t),l=n*(1-(1-i)*t),c=o%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 o,i,s;if(e=r(e,360),t=r(t,100),n=r(n,100),0===t)i=n,s=n,o=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=c(l,a,e+1/3),i=c(l,a,e),s=c(l,a,e-1/3)}return{r:255*o,g:255*i,b:255*s}}(e.h,u,m),g=!0,y="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(l=e.a)),l=i(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!==(o=n.format)&&void 0!==o?o: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=i(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,o){var i,s=[a(Math.round(e).toString(16)),a(Math.round(t).toString(16)),a(Math.round(n).toString(16)),a((i=r,Math.round(255*parseFloat(i)).toString(16)))];return o&&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],o=r[0];if(e===r[1])return o}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=o(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=o(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=o(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=o(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(),o=new e(t).toRgb(),i=n/100;return new e({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,i=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(new e(r));return i},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,o=n.s,i=n.v,s=[],a=1/t;t--;)s.push(new e({h:r,s:o,v:i})),i=(i+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(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},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,o=[this],i=360/t,s=1;s<t;s++)o.push(new e({h:(r+s*i)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}()},9752:(e,t,n)=>{"use strict";n.d(t,{LB:()=>Ge,y9:()=>pt,g4:()=>ie,Lg:()=>ue,uN:()=>ke,MA:()=>ve,we:()=>me,pE:()=>E,ey:()=>A,Ai:()=>ut,VK:()=>F,_8:()=>M,hI:()=>z,j2:()=>R,Xo:()=>D,Cj:()=>et,IJ:()=>h,O1:()=>Ze,Zj:()=>rt,VT:()=>y,Dy:()=>v});var r=n(7294),o=n(3935),i=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 d={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 "},f={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=f,container:n,hiddenTextDescribedById:s,screenReaderInstructions:l=d}=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,i.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,o.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,i.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:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function M(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function O(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 o=O(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=w(O(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(S)},A=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=C(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=C(r),s=o.reduce(((e,t,r)=>e+w(n[r],t)),0),a=Number((s/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:a}})}}return i.sort(S)};function T(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-r,a=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=s*a;return Number((o/(n+r-o)).toFixed(4))}return 0}const D=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=T(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(k)};function _(e,t){const{top:n,left:r,bottom:o,right:i}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=i}const R=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const o=[];for(const e of t){const{id:t}=e,i=n.get(t);if(i&&_(r,i)){const n=C(i).reduce(((e,t)=>e+w(r,t)),0),s=Number((n/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:s}})}}return o.sort(S)};function N(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:b}function P(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];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=P(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,i.Jj)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=L(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:a}=r,l=e.left-s-(1-o)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,h=i?e.height/i:e.height;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l}}(n,t,r))}const{top:r,left:o,width:s,height:a,bottom:l,right:c}=n;return{top:r,left:o,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(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,i.qk)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,i.Re)(o)||(0,i.vZ)(o))return n;if(n.includes(o))return n;const s=(0,i.Jj)(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=(0,i.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)}))}(o,s)&&n.push(o),function(e,t){return void 0===t&&(t=(0,i.Jj)(e).getComputedStyle(e)),"fixed"===t.position}(o,s)?n:r(o.parentNode)}(e):n}function $(e){const[t]=z(e,1);return null!=t?t:null}function H(e){return i.Nq&&e?(0,i.FJ)(e)?e:(0,i.UG)(e)?(0,i.qk)(e)||e===(0,i.r3)(e).scrollingElement?window:(0,i.Re)(e)?e:null:null:null}function W(e){return(0,i.FJ)(e)?e.scrollX:e.scrollLeft}function U(e){return(0,i.FJ)(e)?e.scrollY:e.scrollTop}function V(e){return{x:W(e),y:U(e)}}var q;function K(e){return!(!i.Nq||!e)&&e===document.scrollingElement}function Y(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 G={x:.2,y:.2};function J(e,t,n,r,o){let{top:i,left:s,right:a,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=G);const{isTop:c,isBottom:u,isLeft:h,isRight:d}=Y(e),f={x:0,y:0},p={x:0,y:0},m=t.height*o.y,g=t.width*o.x;return!c&&i<=t.top+m?(f.y=q.Backward,p.y=r*Math.abs((t.top+m-i)/m)):!u&&l>=t.bottom-m&&(f.y=q.Forward,p.y=r*Math.abs((t.bottom-m-l)/m)),!d&&a>=t.right-g?(f.x=q.Forward,p.x=r*Math.abs((t.right-g-a)/g)):!h&&s<=t.left+g&&(f.x=q.Backward,p.x=r*Math.abs((t.left+g-s)/g)),{direction:f,speed:p}}function Q(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:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function X(e){return e.reduce(((e,t)=>(0,i.IH)(e,V(t))),b)}function Z(e,t){if(void 0===t&&(t=F),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);$(e)&&(o<=0||i<=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+W(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,o]of ee)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),s=r[e]-t;return this.rect[i]+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 oe,ie;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"}(oe||(oe={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(ie||(ie={}));const le={start:[ie.Space,ie.Enter],cancel:[ie.Esc],end:[ie.Space,ie.Enter]},ce=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ie.Right:return{...n,x:n.x+25};case ie.Left:return{...n,x:n.x-25};case ie.Down:return{...n,y:n.y+25};case ie.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,i.r3)(t)),this.windowListeners=new ne((0,i.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(oe.Resize,this.handleCancel),this.windowListeners.add(oe.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(oe.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Z(n),t(b)}handleKeyDown(e){if((0,i.vd)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=le,coordinateGetter:s=ce,scrollBehavior:a="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.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,i.$X)(h,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:s,isLeft:l,isBottom:c,maxScroll:u,minScroll:d}=Y(n),f=Q(n),p={x:Math.min(o===ie.Right?f.right-f.width/2:f.right,Math.max(o===ie.Right?f.left:f.left+f.width/2,h.x)),y:Math.min(o===ie.Down?f.bottom-f.height/2:f.bottom,Math.max(o===ie.Down?f.top:f.top+f.height/2,h.y))},m=o===ie.Right&&!s||o===ie.Left&&!l,g=o===ie.Down&&!c||o===ie.Up&&!i;if(m&&p.x!==h.x){const e=n.scrollLeft+t.x,i=o===ie.Right&&e<=u.x||o===ie.Left&&e>=d.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===ie.Right?n.scrollLeft-u.x:n.scrollLeft-d.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(g&&p.y!==h.y){const e=n.scrollTop+t.y,i=o===ie.Down&&e<=u.y||o===ie.Up&&e>=d.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===ie.Down?n.scrollTop-u.y:n.scrollTop-d.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,(0,i.IH)((0,i.$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 de(e){return Boolean(e&&"delay"in e)}ue.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=le,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class fe{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,i.Jj)(e);return e instanceof t?e:(0,i.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:o}=e,{target:s}=o;this.props=e,this.events=t,this.document=(0,i.r3)(s),this.documentListeners=new ne(this.document),this.listeners=new ne(n),this.windowListeners=new ne((0,i.Jj)(s)),this.initialCoordinates=null!=(r=(0,i.DC)(o))?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(oe.Resize,this.handleCancel),this.windowListeners.add(oe.DragStart,se),this.windowListeners.add(oe.VisibilityChange,this.handleCancel),this.windowListeners.add(oe.ContextMenu,se),this.documentListeners.add(oe.Keydown,this.handleKeydown),t){if(he(t))return;if(de(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(oe.Click,ae,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(oe.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!r)return;const l=null!=(t=(0,i.DC)(e))?t:b,c=(0,i.$X)(r,l);if(!n&&a){if(de(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===ie.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const pe={move:{name:"pointermove"},end:{name:"pointerup"}};class me extends fe{constructor(e){const{event:t}=e,n=(0,i.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 fe{constructor(e){super(e,ge,(0,i.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 fe{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:o}=n;return!(o.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 Me=new Map;function Oe(e,t){return(0,i.Gj)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ee(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),s=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[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[o,s]=(0,r.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),a=function(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),s=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,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,i.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]),o}const De=[];function _e(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,i.$X)(e,n.current):b}function Re(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 Ne=[];function Pe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,i.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 We(){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,o=new Fe(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case m.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new Fe(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case m.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Fe(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Ve(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:s}=(0,r.useContext)($e),a=(0,i.D9)(o),l=(0,i.D9)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&a&&null!=l){if(!(0,i.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,i.so)(e);if(t){t.focus();break}}}))}}),[o,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 Ye;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ye||(Ye={}));const Ge=(0,r.memo)((function(e){var t,n,s,a;let{id:l,accessibility:c,autoScroll:h=!0,children:d,sensors:f=Ie,collisionDetection:g=D,measuring:y,modifiers:v,...w}=e;const x=(0,r.useReducer)(Ue,void 0,We),[S,k]=x,[C,O]=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)(Ye.Uninitialized),T=E===Ye.Initialized,{draggable:{active:_,nodes:R,translate:P},droppable:{containers:L}}=S,j=_?R.get(_):null,B=(0,r.useRef)({initial:null,translated:null}),W=(0,r.useMemo)((()=>{var e;return null!=_?{id:_,data:null!=(e=null==j?void 0:j.data)?e:Le,rect:B}:null}),[_,j]),U=(0,r.useRef)(null),[Y,G]=(0,r.useState)(null),[Q,Z]=(0,r.useState)(null),ee=(0,i.Ey)(w,Object.values(w)),ne=(0,i.Ld)("DndDescribedBy",l),re=(0,r.useMemo)((()=>L.getEnabled()),[L]),oe=(ie=y,(0,r.useMemo)((()=>({draggable:{...je.draggable,...null==ie?void 0:ie.draggable},droppable:{...je.droppable,...null==ie?void 0:ie.droppable},dragOverlay:{...je.dragOverlay,...null==ie?void 0:ie.dragOverlay}})),[null==ie?void 0:ie.draggable,null==ie?void 0:ie.droppable,null==ie?void 0:ie.dragOverlay]));var ie;const{droppableRects:se,measureDroppableContainers:ae,measuringScheduled:le}=function(e,t){let{dragging:n,dependencies:o,config:s}=t;const[a,l]=(0,r.useState)(null),{frequency:c,measure:u,strategy:h}=s,d=(0,r.useRef)(e),f=function(){switch(h){case ke.Always:return!1;case ke.BeforeDragging:return n;default:return!n}}(),p=(0,i.Ey)(f),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,i.Gj)((t=>{if(f&&!n)return Me;if(!t||t===Me||d.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,f,u]);return(0,r.useEffect)((()=>{d.current=e}),[e]),(0,r.useEffect)((()=>{f||m()}),[n,f]),(0,r.useEffect)((()=>{a&&a.length>0&&l(null)}),[JSON.stringify(a)]),(0,r.useEffect)((()=>{f||"number"!=typeof c||null!==g.current||(g.current=setTimeout((()=>{m(),g.current=null}),c))}),[c,f,m,...o]),{droppableRects:y,measureDroppableContainers:m,measuringScheduled:null!=a}}(re,{dragging:T,dependencies:[P.x,P.y],config:oe.droppable}),ce=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,i.Gj)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(R,_),ue=(0,r.useMemo)((()=>Q?(0,i.DC)(Q):null),[Q]),he=function(){const e=!1===(null==Y?void 0:Y.autoScrollEnabled),t="object"==typeof h?!1===h.enabled:!1===h,n=T&&!e&&!t;return"object"==typeof h?{...h,enabled:n}:{enabled:n}}(),de=function(e,t){return Oe(e,t)}(ce,oe.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:s=!0}=e;const a=(0,r.useRef)(!1),{x:l,y:c}="boolean"==typeof s?{x:s,y:s}:s;(0,i.LI)((()=>{if(!l&&!c||!t)return void(a.current=!1);if(a.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=N(n(e),o);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,o,n])}({activeNode:_?R.get(_):null,config:he.layoutShiftCompensation,initialRect:de,measure:oe.draggable.measure});const fe=Te(ce,oe.draggable.measure,de),pe=Te(ce?ce.parentElement:null),me=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:R,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,o]=(0,r.useState)(null),s=Ee({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,i.Re)(n)){o((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),a=(0,r.useCallback)((e=>{const n=Pe(e);null==s||s.disconnect(),n&&(null==s||s.observe(n)),o(n?t(n):null)}),[t,s]),[l,c]=(0,i.wm)(a);return(0,r.useMemo)((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}({measure:oe.dragOverlay.measure}),ve=null!=(n=ye.nodeRef.current)?n:ce,be=T?null!=(s=ye.rect)?s:fe:null,Ce=Boolean(ye.nodeRef.current&&ye.rect),Ae=N(Fe=Ce?null:fe,Oe(Fe));var Fe;const Be=Re(ve?(0,i.Jj)(ve):null),ze=function(e){const t=(0,r.useRef)(e),n=(0,i.Gj)((n=>e?n&&n!==De&&e&&t.current&&e.parentNode===t.current.parentNode?n:z(e):De),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(T?null!=ge?ge:ce:null),Ge=function(e,t){void 0===t&&(t=F);const[n]=e,o=Re(n?(0,i.Jj)(n):null),[s,a]=(0,r.useReducer)((function(){return e.length?e.map((e=>K(e)?o:new te(t(e),e))):Ne}),Ne),l=Ee({callback:a});return e.length>0&&s===Ne&&a(),(0,i.LI)((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),a())}),[e]),s}(ze),Je=qe(v,{transform:{x:P.x-Ae.x,y:P.y-Ae.y,scaleX:1,scaleY:1},activatorEvent:Q,active:W,activeNodeRect:fe,containerNodeRect:pe,draggingNodeRect:be,over:me.current.over,overlayNodeRect:ye.rect,scrollableAncestors:ze,scrollableAncestorRects:Ge,windowRect:Be}),Qe=ue?(0,i.IH)(ue,P):null,Xe=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),s=(0,r.useCallback)((e=>{const t=H(e.target);t&&n((e=>e?(e.set(t,V(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=o.current;if(e!==t){r(t);const i=e.map((e=>{const t=H(e);return t?(t.addEventListener("scroll",s,{passive:!0}),[t,V(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),o.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,i.IH)(e,t)),b):X(e):b),[e,t])}(ze),Ze=_e(Xe),et=_e(Xe,[fe]),tt=(0,i.IH)(Je,Ze),nt=be?I(be,Je):null,rt=W&&nt?g({active:W,collisionRect:nt,droppableRects:se,droppableContainers:re,pointerCoordinates:Qe}):null,ot=M(rt,"id"),[it,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?Je:(0,i.IH)(Je,et),null!=(a=null==it?void 0:it.rect)?a:null,fe),lt=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==U.current)return;const i=R.get(U.current);if(!i)return;const s=e.nativeEvent,a=new n({active:U.current,activeNode:i,event:s,options:r,context:me,onStart(e){const t=U.current;if(null==t)return;const n=R.get(t);if(!n)return;const{onDragStart:r}=ee.current,i={active:{id:t,data:n.data,rect:B}};(0,o.unstable_batchedUpdates)((()=>{null==r||r(i),A(Ye.Initializing),k({type:m.DragStart,initialCoordinates:e,active:t}),C({type:"onDragStart",event:i})}))},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:i}=me.current;let a=null;if(t&&i){const{cancelDrop:o}=ee.current;a={activatorEvent:s,active:t,collisions:n,delta:i,over:r},e===m.DragEnd&&"function"==typeof o&&await Promise.resolve(o(a))&&(e=m.DragCancel)}U.current=null,(0,o.unstable_batchedUpdates)((()=>{k({type:e}),A(Ye.Uninitialized),st(null),G(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,o.unstable_batchedUpdates)((()=>{G(a),Z(e.nativeEvent)}))}),[R]),ct=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=R.get(r);if(null!==U.current||!i||o.dndKit||o.defaultPrevented)return;const s={active:i};!0===e(n,t.options,s)&&(o.dndKit={capturedBy:t.sensor},U.current=r,lt(n,t))}),[R,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])}(f,ct);!function(e){(0,r.useEffect)((()=>{if(!i.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})))}(f),(0,i.LI)((()=>{fe&&E===Ye.Initializing&&A(Ye.Initialized)}),[fe,E]),(0,r.useEffect)((()=>{const{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:i}=me.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:r,delta:{x:tt.x,y:tt.y},over:i};(0,o.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:i}=me.current;if(!e||null==U.current||!t||!i)return;const{onDragOver:s}=ee.current,a=r.get(ot),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:i.x,y:i.y},over:l};(0,o.unstable_batchedUpdates)((()=>{st(l),null==s||s(c),C({type:"onDragOver",event:c})}))}),[ot]),(0,i.LI)((()=>{me.current={activatorEvent:Q,active:W,activeNode:ce,collisionRect:nt,collisions:rt,droppableRects:se,draggableNodes:R,draggingNode:ve,draggingNodeRect:be,droppableContainers:L,over:it,scrollableAncestors:ze,scrollAdjustedTranslate:tt},B.current={initial:be,translated:nt}}),[W,ce,rt,nt,R,ve,be,se,L,it,ze,tt]),function(e){let{acceleration:t,activator:n=we.Pointer,canScroll:o,draggingRect:s,enabled:a,interval:l=5,order:c=xe.TreeOrder,pointerCoordinates:u,scrollableAncestors:h,scrollableAncestorRects:d,delta:f,threshold:p}=e;const m=function(e){let{delta:t,disabled:n}=e;const r=(0,i.D9)(t);return(0,i.Gj)((e=>{if(n||!r||!e)return Se;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[q.Backward]:e.x[q.Backward]||-1===o,[q.Forward]:e.x[q.Forward]||1===o},y:{[q.Backward]:e.y[q.Backward]||-1===i,[q.Forward]:e.y[q.Forward]||1===i}}}),[n,t,r])}({delta:f,disabled:!a}),[g,y]=(0,i.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==o?void 0:o(e)))continue;const n=h.indexOf(e),r=d[n];if(!r)continue;const{direction:i,speed:s}=J(e,r,w,t,p);for(const e of["x","y"])m[e][i[e]]||(s[e]=0,i[e]=0);if(s.x>0||s.y>0)return y(),x.current=e,g(S,l),v.current=s,void(b.current=i)}v.current={x:0,y:0},b.current={x:0,y:0},y()}else y()}),[t,S,o,y,a,l,JSON.stringify(w),JSON.stringify(m),g,h,k,d,JSON.stringify(p)])}({...he,delta:P,draggingRect:nt,pointerCoordinates:Qe,scrollableAncestors:ze,scrollableAncestorRects:Ge});const ht=(0,r.useMemo)((()=>({active:W,activeNode:ce,activeNodeRect:fe,activatorEvent:Q,collisions:rt,containerNodeRect:pe,dragOverlay:ye,draggableNodes:R,droppableContainers:L,droppableRects:se,over:it,measureDroppableContainers:ae,scrollableAncestors:ze,scrollableAncestorRects:Ge,measuringConfiguration:oe,measuringScheduled:le,windowRect:Be})),[W,ce,fe,Q,rt,pe,ye,R,L,se,it,ae,ze,Ge,oe,le,Be]),dt=(0,r.useMemo)((()=>({activatorEvent:Q,activators:ut,active:W,activeNodeRect:fe,ariaDescribedById:{draggable:ne},dispatch:k,draggableNodes:R,over:it,measureDroppableContainers:ae})),[Q,ut,W,fe,k,ne,R,it,ae]);return r.createElement(u.Provider,{value:O},r.createElement($e.Provider,{value:dt},r.createElement(He.Provider,{value:ht},r.createElement(Ke.Provider,{value:at},d)),r.createElement(Ve,{disabled:!1===(null==c?void 0:c.restoreFocus)})),r.createElement(p,{...c,hiddenTextDescribedById:ne}))})),Je=(0,r.createContext)(null),Qe="button",Xe="Droppable";function Ze(e){let{id:t,data:n,disabled:o=!1,attributes:s}=e;const a=(0,i.Ld)(Xe),{activators:l,activatorEvent:c,active:u,activeNodeRect:h,ariaDescribedById:d,draggableNodes:f,over:p}=(0,r.useContext)($e),{role:m=Qe,roleDescription:g="draggable",tabIndex:y=0}=null!=s?s:{},v=(null==u?void 0:u.id)===t,b=(0,r.useContext)(v?Ke:Je),[w,x]=(0,i.wm)(),[S,k]=(0,i.wm)(),C=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(l,t),M=(0,i.Ey)(n);return(0,i.LI)((()=>(f.set(t,{id:t,key:a,node:w,activatorNode:S,data:M}),()=>{const e=f.get(t);e&&e.key===a&&f.delete(t)})),[f,t]),{active:u,activatorEvent:c,activeNodeRect:h,attributes:(0,r.useMemo)((()=>({role:m,tabIndex:y,"aria-disabled":o,"aria-pressed":!(!v||m!==Qe)||void 0,"aria-roledescription":g,"aria-describedby":d.draggable})),[o,m,y,v,g,d.draggable]),isDragging:v,listeners:o?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:o,resizeObserverConfig:s}=e;const a=(0,i.Ld)(tt),{active:l,dispatch:c,over:u,measureDroppableContainers:h}=(0,r.useContext)($e),d=(0,r.useRef)({disabled:n}),f=(0,r.useRef)(!1),p=(0,r.useRef)(null),g=(0,r.useRef)(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...nt,...s},w=(0,i.Ey)(null!=v?v:o),x=Ee({callback:(0,r.useCallback)((()=>{f.current?(null!=g.current&&clearTimeout(g.current),g.current=setTimeout((()=>{h(Array.isArray(w.current)?w.current:[w.current]),g.current=null}),b)):f.current=!0}),[b]),disabled:y||!l}),S=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),f.current=!1),e&&x.observe(e))}),[x]),[k,C]=(0,i.wm)(S),M=(0,i.Ey)(t);return(0,r.useEffect)((()=>{x&&k.current&&(x.disconnect(),f.current=!1,x.observe(k.current))}),[k,x]),(0,i.LI)((()=>(c({type:m.RegisterDroppable,element:{id:o,key:a,disabled:n,node:k,rect:p,data:M}}),()=>c({type:m.UnregisterDroppable,key:a,id:o}))),[o]),(0,r.useEffect)((()=>{n!==d.current.disabled&&(c({type:m.SetDroppableDisabled,id:o,key:a,disabled:n}),d.current.disabled=n)}),[o,a,n,c]),{active:l,rect:p,isOver:(null==u?void 0:u.id)===o,node:k,over:u,setNodeRef:C}}function ot(e){let{animation:t,children:n}=e;const[o,s]=(0,r.useState)(null),[a,l]=(0,r.useState)(null),c=(0,i.D9)(n);return n||o||!c||s(c),(0,i.LI)((()=>{if(!a)return;const e=null==o?void 0:o.key,n=null==o?void 0:o.props.id;null!=e&&null!=n?Promise.resolve(t(n,a)).then((()=>{s(null)})):s(null)}),[t,o,a]),r.createElement(r.Fragment,null,n,o?(0,r.cloneElement)(o,{ref:l}):null)}const it={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:it},t))}const at={position:"fixed",touchAction:"none"},lt=e=>(0,i.vd)(e)?"transform 250ms ease":void 0,ct=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:o,adjustScale:s,children:a,className:l,rect:c,style:u,transform:h,transition:d=lt}=e;if(!c)return null;const f=s?h:{...h,scaleX:1,scaleY:1},p={...at,width:c.width,height:c.height,top:c.top,left:c.left,transform:i.ux.Transform.toString(f),transformOrigin:s&&o?x(o,c):void 0,transition:"function"==typeof d?d(o):d,...u};return r.createElement(n,{className:l,style:p,ref:t},a)})),ut=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:s}=e;if(null!=i&&i.active)for(const[e,t]of Object.entries(i.active))void 0!==t&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.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(o))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:i.ux.Transform.toString(t)},{transform:i.ux.Transform.toString(n)}]},sideEffects:ut({styles:{active:{opacity:"0"}}})};let dt=0;function ft(e){return(0,r.useMemo)((()=>{if(null!=e)return dt++,dt}),[e])}const pt=r.memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:s,transition:a,modifiers:l,wrapperElement:c="div",className:u,zIndex:h=999}=e;const{activatorEvent:d,active:f,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),M=ft(null==f?void 0:f.id),O=qe(l,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:m,draggingNodeRect:v.rect,over:b,overlayNodeRect:v.rect,scrollableAncestors:x,scrollableAncestorRects:S,transform:C,windowRect:k}),E=Oe(p),A=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,i.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=Pe(s);if(!c)return;const{transform:u}=(0,i.Jj)(s).getComputedStyle(s),h=L(u);if(!h)return;const d="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...ht,...e};return e=>{let{active:i,dragOverlay:s,transform:a,...l}=e;if(!t)return;const c=s.rect.left-i.rect.left,u=s.rect.top-i.rect.top,h={scaleX:1!==a.scaleX?i.rect.width*a.scaleX/s.rect.width:1,scaleY:1!==a.scaleY?i.rect.height*a.scaleY/s.rect.height:1},d={x:a.x-c,y:a.y-u,...h},f=o({...l,active:i,dragOverlay:s,transform:{initial:a,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;const g=null==r?void 0:r({active:i,dragOverlay:s,...l}),y=s.node.animate(f,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{y.onfinish=()=>{null==g||g(),e()}}))}}(t);return Z(l,o.draggable.measure),d({active:{id:e,data:a.data,node:l,rect:o.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:s,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:h})}))}({config:o,draggableNodes:g,droppableContainers:y,measuringConfiguration:w}),T=E?v.setRef:void 0;return r.createElement(st,null,r.createElement(ot,{animation:A},f&&M?r.createElement(ct,{key:M,id:f.id,ref:T,as:c,activatorEvent:d,adjustScale:t,className:u,transition:a,rect:E,style:{zIndex:h,...s},transform:O},n):null))}))},5587:(e,t,n)=>{"use strict";n.d(t,{Fo:()=>g,PG:()=>u,Rp:()=>s,U2:()=>h,is:()=>O,nB:()=>k,qw:()=>f});var r=n(7294),o=n(9752),i=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 o=t.get(n);return o&&(e[r]=o),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:o,overIndex:i,index:s}=e;const a=null!=(t=n[o])?t:r;if(!a)return null;const l=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r&&(o||i)?n<t?o?r.left-(o.left+o.width):i.left-(r.left+r.width):i?i.left-(r.left+r.width):r.left-(o.left+o.width):0}(n,s,o);if(s===o){const e=n[i];return e?{x:o<i?e.left+e.width-(a.left+a.width):e.left-a.left,y:0,...c}:null}return s>o&&s<=i?{x:-a.width-l,y:0,...c}:s<o&&s>=i?{x:a.width+l,y:0,...c}:{x:0,y:0,...c}},h=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=s(t,r,n),a=t[o],l=i[o];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},d={scaleX:1,scaleY:1},f=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:s}=e;const a=null!=(t=i[n])?t:r;if(!a)return null;if(o===n){const e=i[s];return e?{x:0,y:n<s?e.top+e.height-(a.top+a.height):e.top-a.top,...d}:null}const l=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}(i,o,n);return o>n&&o<=s?{x:0,y:-a.height-l,...d}:o<n&&o>=s?{x:0,y:a.height+l,...d}:{x:0,y:0,...d}},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:d,droppableRects:f,over:g,measureDroppableContainers:y}=(0,o.Cj)(),v=(0,i.Ld)(p,n),b=Boolean(null!==d.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),M=!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),O=-1!==k&&-1===S||M,E=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);(0,i.LI)((()=>{M&&x&&y(w)}),[M,w,x,y]),(0,r.useEffect)((()=>{C.current=w}),[w]);const A=(0,r.useMemo)((()=>({activeIndex:S,containerId:v,disabled:E,disableTransforms:O,items:w,overIndex:k,useDragOverlay:b,sortedRects:a(w,f),strategy:l})),[S,v,E.draggable,E.droppable,O,w,k,f,b,l]);return r.createElement(m.Provider,{value:A},t)}const y=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return s(n,r,o).indexOf(t)},v=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!(!c||!r||a!==i&&o===s||!n&&(s===o||t!==l))},b={duration:200,easing:"ease"},w="transform",x=i.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:d,transition:f=b}=e;const{items:p,containerId:g,activeIndex:k,disabled:C,disableTransforms:M,sortedRects:O,overIndex:E,useDragOverlay:A,strategy:T}=(0,r.useContext)(m),D=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),_=p.indexOf(u),R=(0,r.useMemo)((()=>({sortable:{containerId:g,index:_,items:p},...a})),[g,a,_,p]),N=(0,r.useMemo)((()=>p.slice(p.indexOf(u))),[p,u]),{rect:P,node:I,isOver:L,setNodeRef:j}=(0,o.Zj)({id:u,data:R,disabled:D.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...d}}),{active:F,activatorEvent:B,activeNodeRect:z,attributes:$,setNodeRef:H,listeners:W,isDragging:U,over:V,setActivatorNodeRef:q,transform:K}=(0,o.O1)({id:u,data:R,attributes:{...S,...n},disabled:D.draggable}),Y=(0,i.HB)(j,H),G=Boolean(F),J=G&&!M&&l(k)&&l(E),Q=!A&&U,X=Q&&J?K:null,Z=J?null!=X?X:(null!=h?h:T)({rects:O,activeNodeRect:z,activeIndex:k,overIndex:E,index:_}):null,ee=l(k)&&l(E)?c({id:u,items:p,activeIndex:k,overIndex:E}):_,te=null==F?void 0:F.id,ne=(0,r.useRef)({activeId:te,items:p,newIndex:ee,containerId:g}),re=p!==ne.current.items,oe=t({active:F,containerId:g,isDragging:U,isSorting:G,id:u,index:_,items:p,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:f,wasDragging:null!=ne.current.activeId}),ie=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,i.LI)((()=>{if(!t&&n!==u.current&&s.current){const e=a.current;if(e){const t=(0,o.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:!oe,index:_,node:I,rect:P});return(0,r.useEffect)((()=>{G&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),g!==ne.current.containerId&&(ne.current.containerId=g),p!==ne.current.items&&(ne.current.items=p)}),[G,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:R,rect:P,index:_,newIndex:ee,items:p,isOver:L,isSorting:G,isDragging:U,listeners:W,node:I,overIndex:E,over:V,setNodeRef:Y,setActivatorNodeRef:q,setDroppableNodeRef:j,setDraggableNodeRef:H,transform:null!=ie?ie:Z,transition:ie||re&&ne.current.newIndex===_?x:Q&&!(0,i.vd)(B)||!f?void 0:G||oe?i.ux.Transition.toString({...f,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 M=[o.g4.Down,o.g4.Right,o.g4.Up,o.g4.Left],O=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:a,over:l,scrollableAncestors:c}}=t;if(M.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];a.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const i=s.get(n.id);if(i)switch(e.code){case o.g4.Down:r.top<i.top&&t.push(n);break;case o.g4.Up:r.top>i.top&&t.push(n);break;case o.g4.Left:r.left>i.left&&t.push(n);break;case o.g4.Right:r.left<i.left&&t.push(n)}}));const d=(0,o.ey)({active:n,collisionRect:r,droppableRects:s,droppableContainers:t,pointerCoordinates:null});let f=(0,o._8)(d,"id");if(f===(null==l?void 0:l.id)&&d.length>1&&(f=d[1].id),null!=f){const e=a.get(n.id),t=a.get(f),l=t?s.get(t.id):null,d=null==t?void 0:t.node.current;if(d&&l&&e&&t){const n=(0,o.hI)(d).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),f=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 f.x&&f.y?p:(0,i.$X)(p,f)}}}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:()=>O,Ey:()=>g,FJ:()=>s,Gj:()=>y,HB:()=>o,IH:()=>k,Jj:()=>l,LI:()=>f,Ld:()=>x,Nq:()=>i,Re:()=>u,UG:()=>a,Yz:()=>m,qk:()=>c,r3:()=>d,so:()=>T,ux:()=>E,vZ:()=>h,vd:()=>M,wm:()=>v,zX:()=>p});var r=n(7294);function o(){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 i="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 d(e){return e?s(e)?e.document:a(e)?c(e)?e:u(e)?e.ownerDocument:document:document:document}const f=i?r.useLayoutEffect:r.useEffect;function p(e){const t=(0,r.useRef)(e);return f((()=>{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 f((()=>{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),o=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}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),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const k=S(1),C=S(-1);function M(e){if(!e)return!1;const{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function O(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}(),o=n(6411),i=n(6686),s=n(7563),a=n(211),l=n(2190),c=function(e,t,n){for(var r=0,i=0;r=i,i=(0,o.fj)(),38===r&&12===i&&(t[n]=1),!(0,o.r)(i);)(0,o.lp)();return(0,o.tP)(e,o.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,o.cE)(function(e,t){var n=-1,r=44;do{switch((0,o.r)(r)){case 0:38===r&&12===(0,o.fj)()&&(t[n]=1),e[n]+=c(o.FK-1,t,n);break;case 2:e[n]+=(0,o.iF)(r);break;case 4:if(44===r){e[++n]=58===(0,o.fj)()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=(0,i.Dp)(r)}}while(r=(0,o.lp)());return e}((0,o.un)(e),t))}(t,s),l=n.props,h=0,d=0;h<a.length;h++)for(var f=0;f<l.length;f++,d++)e.props[d]=s[h]?a[h].replace(/&\f/g,l[f]):l[f]+" "+a[h]}}},d=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function f(e,t){switch((0,i.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,i.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,i.gx)(e,/flex-|-self/,"")+e;case 4675:return s.G$+e+s.MS+"flex-line-pack"+(0,i.gx)(e,/align-content|flex-|-self/,"")+e;case 5548:return s.G$+e+s.MS+(0,i.gx)(e,"shrink","negative")+e;case 5292:return s.G$+e+s.MS+(0,i.gx)(e,"basis","preferred-size")+e;case 6060:return s.G$+"box-"+(0,i.gx)(e,"-grow","")+s.G$+e+s.MS+(0,i.gx)(e,"grow","positive")+e;case 4554:return s.G$+(0,i.gx)(e,/([^-])(transform)/g,"$1"+s.G$+"$2")+e;case 6187:return(0,i.gx)((0,i.gx)((0,i.gx)(e,/(zoom-|grab)/,s.G$+"$1"),/(image-set)/,s.G$+"$1"),e,"")+e;case 5495:case 3959:return(0,i.gx)(e,/(image-set\([^]*)/,s.G$+"$1$`$1");case 4968:return(0,i.gx)((0,i.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,i.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,i.to)(e)-1-t>6)switch((0,i.uO)(e,t+1)){case 109:if(45!==(0,i.uO)(e,t+4))break;case 102:return(0,i.gx)(e,/(.+:)(.+)-([^]+)/,"$1"+s.G$+"$2-$3$1"+s.uj+(108==(0,i.uO)(e,t+3)?"$3":"$2-$3"))+e;case 115:return~(0,i.Cw)(e,"stretch")?f((0,i.gx)(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==(0,i.uO)(e,t+1))break;case 6444:switch((0,i.uO)(e,(0,i.to)(e)-3-(~(0,i.Cw)(e,"!important")&&10))){case 107:return(0,i.gx)(e,":",":"+s.G$)+e;case 101:return(0,i.gx)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+s.G$+(45===(0,i.uO)(e,14)?"inline-":"")+"box$3$1"+s.G$+"$2$3$1"+s.MS+"$2box$3")+e}break;case 5936:switch((0,i.uO)(e,t+11)){case 114:return s.G$+e+s.MS+(0,i.gx)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return s.G$+e+s.MS+(0,i.gx)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return s.G$+e+s.MS+(0,i.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=f(e.value,e.length);break;case s.lK:return(0,a.q)([(0,o.JG)(e,{value:(0,i.gx)(e.value,"@","@"+s.G$)})],r);case s.Fr:if(e.length)return(0,i.$e)(e.props,(function(t){switch((0,i.EQ)(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,a.q)([(0,o.JG)(e,{props:[(0,i.gx)(t,/:(read-\w+)/,":"+s.uj+"$1")]})],r);case"::placeholder":return(0,a.q)([(0,o.JG)(e,{props:[(0,i.gx)(t,/:(plac\w+)/,":"+s.G$+"input-$1")]}),(0,o.JG)(e,{props:[(0,i.gx)(t,/:(plac\w+)/,":"+s.uj+"$1")]}),(0,o.JG)(e,{props:[(0,i.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 o,s,c=e.stylisPlugins||p,u={},f=[];o=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;f.push(e)}));var m,g,y,v,b=[h,d],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,i.Ei)(g),function(e,t,n,r){for(var o="",i=0;i<y;i++)o+=g[i](e,t,n,r)||"";return o});s=function(e,t,n,r){var o;m=n,o=e?e+"{"+t.styles+"}":t.styles,(0,a.q)((0,l.MY)(o),x),r&&(S.inserted[t.name]=!0)};var S={key:t,sheet:new r({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:u,registered:{},insert:s};return S.sheet.hydrate(f),S}},2443:(e,t,n)=>{"use strict";n.d(t,{C:()=>u,E:()=>g,T:()=>d,c:()=>p,h:()=>l,w:()=>h});var r=n(7294),o=n(6194),i=n(444),s=n(8947),a=n(7278),l={}.hasOwnProperty,c=(0,r.createContext)("undefined"!=typeof HTMLElement?(0,o.Z)({key:"css"}):null),u=c.Provider,h=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(c);return e(t,o,n)}))},d=(0,r.createContext)({}),f="__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[f]=e,n},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,i.hC)(t,n,r),(0,a.L)((function(){return(0,i.My)(t,n,r)})),null},g=h((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var a=e[f],c=[o],u="";"string"==typeof e.className?u=(0,i.fp)(t.registered,c,e.className):null!=e.className&&(u=e.className+" ");var h=(0,s.O)(c,void 0,(0,r.useContext)(d));u+=t.key+"-"+h.name;var p={};for(var g in e)l.call(e,g)&&"css"!==g&&g!==f&&(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),o=(n(6194),n(2443)),i=(n(8679),n(444)),s=n(8947),a=n(7278),l=function(e,t){var n=arguments;if(null==t||!o.h.call(t,"css"))return r.createElement.apply(void 0,n);var i=n.length,s=new Array(i);s[0]=o.E,s[1]=(0,o.c)(e,t);for(var a=2;a<i;a++)s[a]=n[a];return r.createElement.apply(null,s)},c=(0,o.w)((function(e,t){var n=e.styles,l=(0,s.O)([n],void 0,(0,r.useContext)(o.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,o=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(r=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),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,i.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:()=>i,tZ:()=>s}),n(7294),n(6194);var r=n(2443),o=(n(8679),n(8947),n(7278),n(5893)),i=o.Fragment;function s(e,t,n){return r.h.call(t,"css")?(0,o.jsx)(r.E,(0,r.c)(e,t),n):(0,o.jsx)(e,t,n)}function a(e,t,n){return r.h.call(t,"css")?(0,o.jsxs)(r.E,(0,r.c)(e,t),n):(0,o.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,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o={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 i=/[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(i,"-$&").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 d={name:t,styles:n,next:d},t}))}return 1===o[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 d={name:n.name,styles:n.styles,next:d},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)d={name:r.name,styles:r.styles,next:d},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=h(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":l(s)&&(r+=c(i)+":"+u(i,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=h(e,t,s);switch(i){case"animation":case"animationName":r+=c(i)+":"+a+";";break;default:r+=i+"{"+a+"}"}}else for(var d=0;d<s.length;d++)l(s[d])&&(r+=c(i)+":"+u(i,s[d])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=d,i=n(e);return d=o,h(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var d,f=/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 o=!0,i="";d=void 0;var s=e[0];null==s||void 0===s.raw?(o=!1,i+=h(n,t,s)):i+=s[0];for(var a=1;a<e.length;a++)i+=h(n,t,e[a]),o&&(i+=s[a]);f.lastIndex=0;for(var l,c="";null!==(l=f.exec(i));)c+="-"+l[1];return{name:r(i)+c,styles:i,next:d}}},7278:(e,t,n)=>{"use strict";var r;n.d(t,{L:()=>s,j:()=>a});var o=n(7294),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,s=i||function(e){return e()},a=i||o.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:()=>i,fp:()=>r,hC:()=>o});var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},8144:(e,t,n)=>{"use strict";n.d(t,{q:()=>zn,Z5:()=>be,q_:()=>bn,Yz:()=>wn});var r=b(),o=e=>m(e,r),i=b();o.write=e=>m(e,i);var s=b();o.onStart=e=>m(e,s);var a=b();o.onFrame=e=>m(e,a);var l=b();o.onFinish=e=>m(e,l);var c=[];o.setTimeout=(e,t)=>{let n=o.now()+t,r=()=>{let e=c.findIndex((e=>e.cancel==r));~e&&c.splice(e,1),f-=~e?1:0},i={time:n,handler:e,cancel:r};return c.splice(u(n),0,i),f+=1,g(),i};var u=e=>~(~c.findIndex((t=>t.time>e))||~c.length);o.cancel=e=>{s.delete(e),a.delete(e),l.delete(e),r.delete(e),i.delete(e)},o.sync=e=>{p=!0,o.batchedUpdates(e),p=!1},o.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,o.onStart(n)}return r.handler=e,r.cancel=()=>{s.delete(n),t=null},r};var h=typeof window<"u"?window.requestAnimationFrame:()=>{};o.use=e=>h=e,o.now=typeof performance<"u"?()=>performance.now():Date.now,o.batchedUpdates=e=>e(),o.catch=console.error,o.frameLoop="always",o.advance=()=>{"demand"!==o.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):v()};var d=-1,f=0,p=!1;function m(e,t){p?(t.delete(e),e(0)):(t.add(e),g())}function g(){d<0&&(d=0,"demand"!==o.frameLoop&&h(y))}function y(){~d&&(h(y),o.batchedUpdates(v))}function v(){let e=d;d=o.now();let t=u(d);t&&(w(c.splice(0,t),(e=>e.handler())),f-=t),f?(s.flush(),r.flush(e?Math.min(64,d-e):16.667),a.flush(),i.flush(),l.flush()):d=-1}function b(){let e=new Set,t=e;return{add(n){f+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(f-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,f-=t.size,w(t,(t=>t(n)&&e.add(t))),f+=e.size,t=e)}}}function w(e,t){e.forEach((e=>{try{t(e)}catch(e){o.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:()=>_,skipAnimation:()=>L,to:()=>R,willAdvance:()=>j});var M={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 O(e,t){if(M.arr(e)){if(!M.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(M.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=>M.und(e)?[]:M.arr(e)?e:[e];function D(e,t){if(e.size){let n=Array.from(e);e.clear(),E(n,t)}}var _,R,N=(e,...t)=>D(e,(e=>e(...t))),P=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),I=null,L=!1,j=C,F=e=>{e.to&&(R=e.to),e.now&&(o.now=e.now),void 0!==e.colors&&(I=e.colors),null!=e.skipAnimation&&(L=e.skipAnimation),e.createStringInterpolator&&(_=e.createStringInterpolator),e.requestAnimationFrame&&o.use(e.requestAnimationFrame),e.batchedUpdates&&(o.batchedUpdates=e.batchedUpdates),e.willAdvance&&(j=e.willAdvance),e.frameLoop&&(o.frameLoop=e.frameLoop)},B=new Set,z=[],$=[],H=0,W={get idle(){return!B.size&&!z.length},start(e){H>e.priority?(B.add(e),o.onStart(U)):(V(e),o(K))},advance:K,sort(e){if(H)o.onFrame((()=>W.sort(e)));else{let t=z.indexOf(e);~t&&(z.splice(t,1),q(e))}},clear(){z=[],B.clear()}};function U(){B.forEach(V),B.clear(),o(K)}function V(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 Y="[-+]?\\d*\\.?\\d+",G=Y+"%";function J(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Q=new RegExp("rgb"+J(Y,Y,Y)),X=new RegExp("rgba"+J(Y,Y,Y,Y)),Z=new RegExp("hsl"+J(Y,G,G)),ee=new RegExp("hsla"+J(Y,G,G,Y)),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})$/,oe=/^#([0-9a-fA-F]{8})$/;function ie(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,o=2*n-r,i=ie(o,r,e+1/3),s=ie(o,r,e),a=ie(o,r,e-1/3);return Math.round(255*i)<<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=Q.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=oe.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 de=(e,t,n)=>{if(M.fun(e))return e;if(M.arr(e))return de({range:e,output:t,extrapolate:n});if(M.str(e.output[0]))return _(e);let r=e,o=r.output,i=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,i);return function(e,t,n,r,o,i,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===o?r:t===n?e<=t?r:o:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r,c)}(e,i[t],i[t+1],o[t],o[t+1],l,s,a,r.map)}},fe=1.70158,pe=1.525*fe,me=fe+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-fe*e*e,easeOutBack:e=>1+me*Math.pow(e-1,3)+fe*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 Me(e,t){let n=e[xe];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Oe=class{[we];[xe];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Ee(this,e)}},Ee=(e,t)=>_e(e,we,t);function Ae(e,t){if(e[we]){let n=e[xe];n||_e(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 De,_e=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Re=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ne=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Pe=new RegExp(`(${Re.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||P())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,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,ze=e=>{De||(De=I?new RegExp(`(${Object.keys(I).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>ke(e).replace(Le,je).replace(Ne,he).replace(De,he))),n=t.map((e=>e.match(Re).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=>de({...e,output:t})));return e=>{let n=!Pe.test(t[0])&&t.find((e=>Pe.test(e)))?.replace(Re,""),o=0;return t[0].replace(Re,(()=>`${r[o++](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)}},We=He(console.warn),Ue=He(console.warn);function Ve(e){return M.str(e)&&("#"==e[0]||/\d/.test(e)||!P()&&Le.test(e)||e in(I||{}))}new WeakMap,new Set,new WeakMap,new WeakMap,new WeakMap;var qe=P()?x.useEffect:x.useLayoutEffect,Ke=()=>{let e=(0,x.useRef)(!1);return qe((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function Ye(){let e=(0,x.useState)()[1],t=Ke();return()=>{t.current&&e(Math.random())}}var Ge=e=>(0,x.useEffect)(e,Je),Je=[];function Qe(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,M.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 M.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,M.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ot=class extends rt{_string=null;_toString;constructor(e){super(0),this._toString=de({output:[e,e]})}static create(e){return new ot(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(M.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=de({output:[this.getValue(),e]})),this._value=0,super.reset()}},it={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 o;(o=n)&&o[Xe]===o?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){it.dependencies&&Se(e)&&it.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(Ve(e)?ot:rt).create(e)}function ct(e){let t=Ze(e);return t?t.constructor:M.arr(e)?at:Ve(e)?ot:rt}var ut=(e,t)=>{let n=!M.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,x.forwardRef)(((r,i)=>{let s=(0,x.useRef)(null),a=n&&(0,x.useCallback)((e=>{s.current=function(e,t){return e&&(M.fun(e)?e(t):e.current=t),t}(i,e)}),[i]),[l,c]=function(e,t){let n=new Set;return it.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new st(e),it.dependencies=null,[e,n]}(r,t),u=Ye(),h=()=>{let e=s.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&u()},d=new ht(h,c),f=(0,x.useRef)();qe((()=>(f.current=d,E(c,(e=>Ae(e,d))),()=>{f.current&&(E(f.current.deps,(e=>Te(e,f.current))),o.cancel(f.current.update))}))),(0,x.useEffect)(h,[]),Ge((()=>()=>{let e=f.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&&o.write(this.update)}},dt=Symbol.for("AnimatedComponent"),ft=e=>M.str(e)?e:e&&M.str(e.displayName)?e.displayName:M.fun(e)&&e.name||null;function pt(e,...t){return M.fun(e)?e(...t):e}var mt=(e,t)=>!0===e||!!(t&&e&&(M.fun(e)?e(t):T(e).includes(t))),gt=(e,t)=>M.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 o of n){let n=t(e[o],o);M.und(n)||(r[o]=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),M.arr(e)?e.map(kt):Ve(e)?k.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ct(e){for(let t in e)return!0;return!1}function Mt(e){return M.fun(e)||M.arr(e)&&M.obj(e[0])}function Ot(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(M.und(t.decay)){let n=!M.und(t.tension)||!M.und(t.friction);(n||!M.und(t.frequency)||!M.und(t.damping)||!M.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Dt=[];function _t(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise(((a,l)=>{let c,u,h=mt(n.cancel??r?.cancel,t);if(h)p();else{M.und(n.pause)||(i.paused=mt(n.pause,t));let e=r?.pause;!0!==e&&(e=i.paused||mt(e,t)),c=pt(n.delay||0,t),e?(i.resumeQueue.add(f),s.pause()):(s.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(u),u.cancel(),c=u.time-o.now()}function f(){c>0&&!k.skipAnimation?(i.delayed=!0,u=o.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(u)):p()}function p(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(u),e<=(i.cancelId||0)&&(h=!0);try{s.start({...n,callId:e,cancel:h},a)}catch(e){l(e)}}}))}var Rt=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?It(e.get()):t.every((e=>e.noop))?Nt(e.get()):Pt(e.get(),t.every((e=>e.finished))),Nt=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Pt=(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:i,parentId:s,onRest:a}=t,{asyncTo:l,promise:c}=n;return s||e!==l||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let u,h,d,f=bt(t,((e,t)=>"onRest"===t?void 0:e)),p=new Promise(((e,t)=>(u=e,h=t))),m=e=>{let t=i<=(n.cancelId||0)&&It(r)||i!==n.asyncId&&Pt(r,!1);if(t)throw e.result=t,h(e),e},g=(e,t)=>{let o=new Ft,s=new Bt;return(async()=>{if(k.skipAnimation)throw jt(n),s.result=Pt(r,!1),h(s),s;m(o);let a=M.obj(e)?{...e}:{...t,to:e};a.parentId=i,A(f,((e,t)=>{M.und(a[t])&&(a[t]=e)}));let l=await r.start(a);return m(o),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};if(k.skipAnimation)return jt(n),Pt(r,!1);try{let t;t=M.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]),d=Pt(r.get(),!0,!1)}catch(e){if(e instanceof Ft)d=e.result;else{if(!(e instanceof Bt))throw e;d=e.result}}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?l:void 0,n.promise=s?c:void 0)}return M.fun(a)&&o.batchedUpdates((()=>{a(d,r,r.item)})),d})():c}function jt(e,t){D(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 Oe{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 We(`${$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){Me(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||W.sort(this),Me(this,{type:"priority",parent:this,priority:e})}},Wt=Symbol.for("SpringPhase"),Ut=e=>(1&e[Wt])>0,Vt=e=>(2&e[Wt])>0,qt=e=>(4&e[Wt])>0,Kt=(e,t)=>t?e[Wt]|=3:e[Wt]&=-3,Yt=(e,t)=>t?e[Wt]|=4:e[Wt]&=-5,Gt=class extends Ht{key;animation=new class{changed=!1;values=Dt;toValues=null;fromValues=Dt;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(),!M.und(e)||!M.und(t)){let n=M.obj(e)?{...e}:{...t,from:e};M.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Vt(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 Vt(this)}get isPaused(){return qt(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:o}=r,{config:i}=r,s=tt(r.to);!s&&Se(r.to)&&(o=T(ke(r.to))),r.values.forEach(((a,l)=>{if(a.done)return;let c=a.constructor==ot?1:s?s[l].lastPosition:o[l],u=r.immediate,h=c;if(!u){if(h=a.lastPosition,i.tension<=0)return void(a.done=!0);let t,n=a.elapsedTime+=e,o=r.fromValues[l],s=null!=a.v0?a.v0:a.v0=M.arr(i.velocity)?i.velocity[l]:i.velocity,d=i.precision||(o==c?.005:Math.min(1,.001*Math.abs(c-o)));if(M.und(i.duration))if(i.decay){let e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*n);h=o+s/(1-e)*(1-r),u=Math.abs(a.lastPosition-h)<=d,t=s*r}else{t=null==a.lastVelocity?s:a.lastVelocity;let n,r=i.restVelocity||d/10,l=i.clamp?0:i.bounce,f=!M.und(l),p=o==c?a.v0>0:o<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)<=d,!u));++e)f&&(m=h==c||h>c==p,m&&(t=-t*l,h=c)),t+=(1e-6*-i.tension*(h-c)+.001*-i.friction*t)/i.mass*g,h+=t*g}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,a.durationProgress>0&&(a.elapsedTime=i.duration*a.durationProgress,n=a.elapsedTime+=e)),r=(i.progress||0)+n/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),h=o+i.easing(r)*(c-o),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,i.round)&&(n=!0)}));let a=Ze(this),l=a.getValue();if(t){let e=ke(r.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return o.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Vt(this)){let{to:e,config:t}=this.animation;o.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 M.und(e)?(n=this.queue||[],this.queue=[]):n=[M.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Rt(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),jt(this._state,e&&this._lastCallId),o.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=M.obj(n)?n[t]:n,(null==n||Mt(n))&&(n=void 0),r=M.obj(r)?r[t]:r,null==r&&(r=void 0);let o={to:n,from:r};return Ut(this)||(e.reverse&&([n,r]=[r,n]),r=ke(r),M.und(r)?Ze(this)||this._set(n):this._set(r)),o}_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 o=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 i=this._state;return _t(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{qt(this)||(Yt(this,!0),N(i.pauseQueue),rn(this,"onPause",Pt(this,Jt(this,this.animation.to)),this))},resume:()=>{qt(this)&&(Yt(this,!1),Vt(this)&&this._resume(),N(i.resumeQueue),rn(this,"onResume",Pt(this,Jt(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=Qt(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=!M.und(e.to),i=!M.und(e.from);if(r||i){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:d=u}=e;i&&!r&&(!t.default||M.und(h))&&(h=d),t.reverse&&([h,d]=[d,h]);let f=!O(d,u);f&&(l.from=d),d=ke(d);let p=!O(h,c);p&&this._focus(h);let m=Mt(t.to),{config:g}=l,{decay:y,velocity:v}=g;(r||i)&&(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:o}=e,{mass:i}=e;M.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(g,pt(t.config,s),t.config!==a.config?pt(a.config,s):void 0);let b=Ze(this);if(!b||M.und(h))return n(Pt(this,!0));let w=M.und(t.reset)?i&&!t.default:!M.und(d)&&mt(t.reset,s),x=w?d:this.get(),S=kt(h),k=M.num(S)||M.arr(S)||Ve(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,D=Se(h),_=!1;if(!D){let e=w||!Ut(this)&&f;(p||e)&&(_=O(kt(x),S),D=!_),(!O(l.immediate,C)&&!C||!O(g.decay,y)||!O(g.velocity,v))&&(D=!0)}if(_&&Vt(this)&&(l.changed&&!w?D=!0:D||this._stop(c)),!m&&((D||Se(c))&&(l.values=b.getPayload(),l.toValues=Se(h)?null:A==ot?[1]:T(S)),l.immediate!=C&&(l.immediate=C,!C&&!w&&this._set(c)),D)){let{onRest:e}=l;E(tn,(e=>nn(this,t,e)));let r=Pt(this,Jt(this,c));N(this._pendingCalls,r),this._pendingCalls.add(n),l.changed&&o.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)):D?this._start():Vt(this)&&!p?this._pendingCalls.add(n):n(Nt(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(!M.und(n)){let e=Ze(this);if(!e||!O(n,e.getValue())){let r=ct(n);e&&e.constructor==r?e.setValue(n):et(this,r.create(n)),e&&o.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ze(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,rn(this,"onStart",Pt(this,Jt(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))),Vt(this)||(Kt(this,!0),qt(this)||this._resume())}_resume(){k.skipAnimation?this.finish():W.start(this)}_stop(e,t){if(Vt(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),Me(this,{type:"idle",parent:this});let r=t?It(this.get()):Pt(this.get(),Jt(this,e??n.to));N(this._pendingCalls,r),n.changed&&(n.changed=!1,rn(this,"onRest",r,this))}}};function Jt(e,t){let n=kt(t);return O(kt(e.get()),n)}function Qt(e,t=e.loop,n=e.to){let r=pt(t);if(r){let o=!0!==r&&St(r),i=(o||e).reverse,s=!o||o.reset;return Xt({...e,loop:t,default:!1,pause:void 0,to:!i||Mt(n)?n:void 0,from:s?e.from:void 0,reset:s,...o})}}function Xt(e){let{to:t,from:n}=e=St(e),r=new Set;return M.obj(t)&&en(t,r),M.obj(n)&&en(n,r),e.keys=r.size?Array.from(r):null,e}function Zt(e){let t=Xt(e);return M.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];M.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(M.und(e))this.start({pause:!0});else{let t=this.springs;E(T(e),(e=>t[e].pause()))}return this}resume(e){if(M.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,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,D(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let i=!r&&this._started,s=o||i&&n.size?this.get():null;o&&t.size&&D(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),i&&(this._started=!1,D(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)}o.onFrame(this._onFrame)}};function ln(e,t){return Promise.all(t.map((t=>cn(e,t)))).then((t=>Rt(e,t)))}async function cn(e,t,n){let{keys:r,to:i,from:s,loop:a,onRest:l,onResolve:c}=t,u=M.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===s&&(t.from=null);let h=M.arr(i)||M.fun(i)?i:void 0;h?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):E(on,(n=>{let r=t[n];if(M.fun(r)){let o=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},u&&(u[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,N(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let f=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===yt(t,"cancel");(h||p&&d.asyncId)&&f.push(_t(++e._lastAsyncId,{props:t,state:d,actions:{pause:C,resume:C,start(t,n){p?(jt(d,e._lastAsyncId),n(It(e))):(t.onRest=l,n(Lt(h,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let m=Rt(e,await Promise.all(f));if(a&&m.finished&&(!n||!m.noop)){let n=Qt(t,a,i);if(n)return pn(e,[n]),cn(e,n,!0)}return c&&o.batchedUpdates((()=>c(m,e,e.item))),m}function un(e,t){let n={...e.springs};return t&&E(T(t),(e=>{M.und(e.keys)&&(e=Xt(e)),M.obj(e.to)||(e={...e,to:void 0}),fn(n,e,(e=>dn(e)))})),hn(e,n),n}function hn(e,t){A(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Ae(t,e))}))}function dn(e,t){let n=new Gt;return n.key=e,t&&Ae(n,t),n}function fn(e,t,n){t.keys&&E(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function pn(e,t){E(t,(t=>{fn(e.springs,t,(t=>dn(t,e)))}))}var mn,gn=({children:e,...t})=>{let n=(0,x.useContext)(yn),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,x.useState)((()=>({inputs:t,result:e()}))),r=(0,x.useRef)(),o=r.current,i=o;return i?t&&i.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,i.inputs)||(i={inputs:t,result:e()}):i=n,(0,x.useEffect)((()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);let{Provider:i}=yn;return x.createElement(i,{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,o)=>{if(M.und(t))r.push(e.start());else{let i=n(t,e,o);i&&r.push(e.start(i))}})),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=M.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){let n=[];return E(e,((e,r)=>{if(M.und(t))n.push(e.start());else{let o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),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 M.fun(e)?e(n,t):e};return t._getProps=n,t};function bn(e,t){let n=M.fun(e),[[r],o]=function(e,t,n){let r=M.fun(t)&&t;r&&!n&&(n=[]);let o=(0,x.useMemo)((()=>r||3==arguments.length?vn():void 0),[]),i=(0,x.useRef)(0),s=Ye(),a=(0,x.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){let n=un(e,t);return i.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=Qe(e)||0;function h(e,n){for(let o=e;o<n;o++){let e=l.current[o]||(l.current[o]=new an(null,a.flush)),n=r?r(o,e):t[o];n&&(c[o]=Zt(n))}}(0,x.useMemo)((()=>{E(l.current.slice(e,u),(e=>{Ot(e,o),e.stop(!0)})),l.current.length=e,h(u,e)}),[e]),(0,x.useMemo)((()=>{h(0,Math.min(u,e))}),n);let d=l.current.map(((e,t)=>un(e,c[t]))),f=(0,x.useContext)(gn),p=Qe(f),m=f!==p&&Ct(f);qe((()=>{i.current++,a.ctrls=l.current;let{queue:e}=a;e.length&&(a.queue=[],E(e,(e=>e()))),E(l.current,((e,t)=>{o?.add(e),m&&e.start({default:f});let n=c[t];n&&(Et(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Ge((()=>()=>{E(a.ctrls,(e=>e.stop(!0)))}));let g=d.map((e=>({...e})));return o?[g,o]:g}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}function wn(e,t,n){let r=M.fun(t)&&t,{reset:o,sort:i,trail:s=0,expires:a=!0,exitBeforeEnter:l=!1,onDestroyed:c,ref:u,config:h}=r?r():t,d=(0,x.useMemo)((()=>r||3==arguments.length?vn():void 0),[]),f=T(e),p=[],m=(0,x.useRef)(null),g=o?null:m.current;qe((()=>{m.current=p})),Ge((()=>(E(p,(e=>{d?.add(e.ctrl),e.ctrl.ref=d})),()=>{E(m.current,(e=>{e.expired&&clearTimeout(e.expirationId),Ot(e.ctrl,d),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 M.und(n)?e:M.fun(n)?e.map(n):T(n)}(f,r?r():t,g),v=o&&m.current||[];qe((()=>E(v,(({ctrl:e,item:t,key:n})=>{Ot(e,d),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(f,((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 o=g[r];~t?(e=p.indexOf(o),p[e]={...o,item:f[t]}):n&&p.splice(++e,0,o)}))}M.fun(i)&&p.sort(((e,t)=>i(e.item,t.item)));let w=-s,S=Ye(),k=bt(t),C=new Map,O=(0,x.useRef)(new Map),A=(0,x.useRef)(!1);E(p,((e,n)=>{let o,i,c=e.key,d=e.phase,f=r?r():t,p=pt(f.delay||0,c);if("mount"==d)o=f.enter,i="enter";else{let e=y.indexOf(c)<0;if("leave"!=d)if(e)o=f.leave,i="leave";else{if(!(o=f.update))return;i="update"}else{if(e)return;o=f.enter,i="enter"}}if(o=pt(o,e.item,n),o=M.obj(o)?St(o):{to:o},!o.config){let t=h||k.config;o.config=pt(t,e.item,n,i)}w+=s;let v={...k,delay:p+w,ref:u,immediate:f.immediate,reset:!1,...o};if("enter"==i&&M.und(v.from)){let o=r?r():t,i=M.und(o.initial)||g?o.from:o.initial;v.from=pt(i,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))&&(O.current.delete(n),l&&(A.current=!0),S())}};let x=un(e.ctrl,v);"leave"===i&&l?O.current.set(e,{phase:i,springs:x,payload:v}):C.set(e,{phase:i,springs:x,payload:v})}));let D=(0,x.useContext)(gn),_=Qe(D),R=D!==_&&Ct(D);qe((()=>{R&&E(p,(e=>{e.ctrl.start({default:D})}))}),[D]),E(C,((e,t)=>{if(O.current.size){let e=p.findIndex((e=>e.key===t.key));p.splice(e,1)}})),qe((()=>{E(O.current.size?O.current:C,(({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,d?.add(r),R&&"enter"==e&&r.start({default:D}),t&&(Et(r,t.ref),!r.ref&&!d||A.current?(r.start(t),A.current&&(A.current=!1)):r.update(t))}))}),o?void 0:n);let N=e=>x.createElement(x.Fragment,null,p.map(((t,n)=>{let{springs:r}=C.get(t)||t.ctrl,o=e({...r},t.item,t,n);return o&&o.type?x.createElement(o.type,{...o.props,key:M.str(t.key)||M.num(t.key)?t.key:t.ctrl.id,ref:o.ref}):o})));return d?[N,d]:N}var xn=1,Sn=class extends Ht{constructor(e,t){super(),this.source=e,this.calc=de(...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();O(t,this.get())||(Ze(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Cn(this._active)&&Mn(this)}_get(){let e=M.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?(o.batchedUpdates((()=>this.advance())),Mn(this)):W.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(),Mn(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 Mn(e){e.idle||(e.idle=!0,E(tt(e),(e=>{e.done=!0})),Me(e,{type:"idle",parent:e}))}k.assign({createStringInterpolator:ze,to:(e,t)=>new Sn(e,t)}),W.advance;var On=n(3935),En=/^--/;function An(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||En.test(e)||Dn.hasOwnProperty(e)&&Dn[e]?(""+t).trim():t+"px"}var Tn={},Dn={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},_n=["Webkit","Ms","Moz","O"];Dn=Object.keys(Dn).reduce(((e,t)=>(_n.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Dn);var Rn=/^(matrix|translate|scale|rotate|skew)/,Nn=/^(translate)/,Pn=/^(rotate|skew)/,In=(e,t)=>M.num(e)&&0!==e?e+t:e,Ln=(e,t)=>M.arr(e)?e.every((e=>Ln(e,t))):M.num(e)?e===t:parseFloat(e)===t,jn=class extends st{constructor({x:e,y:t,z:n,...r}){let o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>In(e,"px"))).join(",")})`,Ln(e,0)]))),A(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(Rn.test(t)){if(delete r[t],M.und(e))return;let n=Nn.test(t)?"px":Pn.test(t)?"deg":"";o.push(T(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${In(o,n)})`,Ln(o,0)]:e=>[`${t}(${e.map((e=>In(e,n))).join(",")})`,Ln(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new Fn(o,i)),super(r)}},Fn=class extends Oe{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 o=ke(n[0]),[i,s]=this.transforms[r](M.arr(o)?o:n.map(ke));e+=" "+i,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),Me(this,e)}};k.assign({batchedUpdates:On.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 o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{let t=ft(e)||"Anonymous";return(e=M.str(e)?i[e]||(i[e]=ut(e,o)):e[dt]||(e[dt]=ut(e,o))).displayName=`Animated(${t})`,e};return A(e,((t,n)=>{M.arr(e)&&(n=ft(t)),i[n]=i(t)})),{animated:i}})(["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:o,scrollTop:i,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!==o&&(e.textContent=o);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!==i&&(e.scrollTop=i),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 o;n.d(t,{Ep:()=>h,J0:()=>a,RQ:()=>R,WK:()=>j,Zn:()=>A,Zq:()=>D,aU:()=>o,cP:()=>d,fp:()=>p,pC:()=>_,q_:()=>s}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const i="popstate";function s(e){return void 0===e&&(e={}),function(e,t,n,s){void 0===s&&(s={});let{window:l=document.defaultView,v5Compat:d=!1}=s,f=l.history,p=o.Pop,m=null,g=y();function y(){return(f.state||{idx:null}).idx}function v(){p=o.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,f.replaceState(r({},f.state,{idx:g}),""));let w={get action(){return p},get location(){return e(l,f)},listen(e){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(i,v),m=e,()=>{l.removeEventListener(i,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=o.Push;let r=u(w.location,e,t);n&&n(r,e),g=y()+1;let i=c(r,g),s=w.createHref(r);try{f.pushState(i,"",s)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;l.location.assign(s)}d&&m&&m({action:p,location:w.location,delta:1})},replace:function(e,t){p=o.Replace;let r=u(w.location,e,t);n&&n(r,e),g=y();let i=c(r,g),s=w.createHref(r);f.replaceState(i,"",s),d&&m&&m({action:p,location:w.location,delta:0})},go:e=>f.go(e)};return w}((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=d(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),u("",{pathname:n,search:r,hash:o},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,o){return void 0===n&&(n=null),r({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?d(t):t,{state:n,key:t&&t.key||o||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 d(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 f;function p(e,t,n){void 0===n&&(n="/");let r=A(("string"==typeof t?d(t):t).pathname||"/",n);if(null==r)return null;let o=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)))))}(o);let i=null;for(let e=0;null==i&&e<o.length;++e)i=M(o[e],E(r));return i}function m(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,i)=>{let s={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,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=R([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))o(e,t,n);else o(e,t)})),t}function g(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let s=g(r.join("/")),a=[];return a.push(...s.map((e=>""===e?i:[i,e].join("/")))),o&&a.push(...s),a.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(f||(f={})),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 M(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let e=0;e<n.length;++e){let s=n[e],a=e===n.length-1,l="/"===o?t:t.slice(o.length)||"/",c=O({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},l);if(!c)return null;Object.assign(r,c.params);let u=s.route;i.push({params:r,pathname:R([o,c.pathname]),pathnameBase:N(R([o,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(o=R([o,c.pathnameBase]))}return i}function O(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(r.push(t),"/([^\\/]+)")));return e.endsWith("*")?(r.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=a[n]||"";s=i.slice(0,i.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:i,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 D(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function _(e,t,n,o){let i;void 0===o&&(o=!1),"string"==typeof e?i=d(e):(i=r({},e),a(!i.pathname||!i.pathname.includes("?"),T("?","pathname","search",i)),a(!i.pathname||!i.pathname.includes("#"),T("#","pathname","hash",i)),a(!i.search||!i.search.includes("#"),T("#","search","hash",i)));let s,l=""===e||""===i.pathname,c=l?"/":i.pathname;if(o||null==c)s=n;else{let e=t.length-1;if(c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}s=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?d(e):e,i=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:i,search:P(r),hash:I(o)}}(i,s),h=c&&"/"!==c&&c.endsWith("/"),f=(l||"."===c)&&n.endsWith("/");return u.pathname.endsWith("/")||!h&&!f||(u.pathname+="/"),u}const R=e=>e.join("/").replace(/\/\/+/g,"/"),N=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P=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 o(e){return e instanceof r(e).Element||e instanceof Element}function i(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 d(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var s=e.getBoundingClientRect(),a=1,l=1;t&&i(e)&&(a=e.offsetWidth>0&&c(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&c(s.height)/e.offsetHeight||1);var u=(o(e)?r(e):window).visualViewport,d=!h()&&n,f=(s.left+(d&&u?u.offsetLeft:0))/a,p=(s.top+(d&&u?u.offsetTop:0))/l,m=s.width/a,g=s.height/l;return{width:m,height:g,top:p,right:f+m,bottom:p+g,left:f,x:f,y:p}}function f(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((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function g(e){return d(m(e)).left+f(e).scrollLeft}function y(e){return r(e).getComputedStyle(e)}function v(e){var t=y(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function b(e,t,n){void 0===n&&(n=!1);var o,s,a=i(t),l=i(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=d(e,l,n),y={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(a||!a&&!n)&&(("body"!==p(t)||v(u))&&(y=(o=t)!==r(o)&&i(o)?{scrollLeft:(s=o).scrollLeft,scrollTop:s.scrollTop}:f(o)),i(t)?((b=d(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=d(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:i(e)&&v(e)?e:S(x(e))}function k(e,t){var n;void 0===t&&(t=[]);var o=S(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),s=r(o),a=i?[s].concat(s.visualViewport||[],v(o)?o:[]):o,l=t.concat(a);return i?l:l.concat(k(x(a)))}function C(e){return["table","td","th"].indexOf(p(e))>=0}function M(e){return i(e)&&"fixed"!==y(e).position?e.offsetParent:null}function O(e){for(var t=r(e),n=M(e);n&&C(n)&&"static"===y(n).position;)n=M(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())&&i(e)&&"fixed"===y(e).position)return null;var n=x(e);for(s(n)&&(n=n.host);i(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",D="left",_="auto",R=[E,A,T,D],N="start",P="end",I="viewport",L="popper",j=R.reduce((function(e,t){return e.concat([t+"-"+N,t+"-"+P])}),[]),F=[].concat(R,[_]).reduce((function(e,t){return e.concat([t,t+"-"+N,t+"-"+P])}),[]),B=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function z(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(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 W(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,s=void 0===i?$:i;return function(e,t,n){void 0===n&&(n=s);var i,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 i="function"==typeof n?n(l.options):n;d(),l.options=Object.assign({},s,l.options,i),l.scrollParents={reference:o(e)?k(e):e.contextElement?k(e.contextElement):[],popper:k(t)};var a,u,f=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=f.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:l,name:t,instance:h,options:r});c.push(i||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,O(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 o=l.orderedModifiers[r],i=o.fn,s=o.options,a=void 0===s?{}:s,c=o.name;"function"==typeof i&&(l=i({state:l,options:a,name:c,instance:h})||l)}else l.reset=!1,r=-1}}},update:(i=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(i())}))}))),a}),destroy:function(){d(),u=!0}};if(!H(e,t))return h;function d(){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 V(e){return e.split("-")[0]}function q(e){return e.split("-")[1]}function K(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Y(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?V(o):null,s=o?q(o):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){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 D:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?K(i):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case N:t[c]=t[c]-(n[u]/2-r[u]/2);break;case P:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var G={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var t,n=e.popper,o=e.popperRect,i=e.placement,s=e.variation,a=e.offsets,l=e.position,u=e.gpuAcceleration,h=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=a.x,g=void 0===p?0:p,v=a.y,b=void 0===v?0:v,w="function"==typeof d?d({x:g,y:b}):{x:g,y:b};g=w.x,b=w.y;var x=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),k=D,C=E,M=window;if(h){var _=O(n),R="clientHeight",N="clientWidth";_===r(n)&&"static"!==y(_=m(n)).position&&"absolute"===l&&(R="scrollHeight",N="scrollWidth"),(i===E||(i===D||i===T)&&s===P)&&(C=A,b-=(f&&_===M&&M.visualViewport?M.visualViewport.height:_[R])-o.height,b*=u?1:-1),i!==D&&(i!==E&&i!==A||s!==P)||(k=T,g-=(f&&_===M&&M.visualViewport?M.visualViewport.width:_[N])-o.width,g*=u?1:-1)}var I,L=Object.assign({position:l},h&&G),j=!0===d?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:c(n*o)/o||0,y:c(r*o)/o||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=(M.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 Q={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]||{},o=t.elements[e];i(o)&&p(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.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],o=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});i(r)&&p(r)&&(Object.assign(r.style,s),Object.keys(o).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 oe(e,t,n){return t===I?re(function(e,t){var n=r(e),o=m(e),i=n.visualViewport,s=o.clientWidth,a=o.clientHeight,l=0,c=0;if(i){s=i.width,a=i.height;var u=h();(u||!u&&"fixed"===t)&&(l=i.offsetLeft,c=i.offsetTop)}return{width:s,height:a,x:l+g(e),y:c}}(e,n)):o(t)?function(e,t){var n=d(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=f(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=a(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=a(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+g(e),c=-r.scrollTop;return"rtl"===y(o||n).direction&&(l+=a(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:l,y:c}}(m(e)))}function ie(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,f=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,M=n.padding,D=void 0===M?0:M,_=ie("number"!=typeof D?D:se(D,R)),N=w===L?"reference":L,P=e.rects.popper,j=e.elements[C?N: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&&i(e)?O(e):e;return o(n)?t.filter((function(e){return o(e)&&ne(e,n)&&"body"!==p(e)})):[]}(e):[].concat(t),c=[].concat(s,[n]),u=c[0],h=c.reduce((function(t,n){var o=oe(e,n,r);return t.top=a(o.top,t.top),t.right=l(o.right,t.right),t.bottom=l(o.bottom,t.bottom),t.left=a(o.left,t.left),t}),oe(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}(o(j)?j:j.contextElement||m(e.elements.popper),f,v,u),B=d(e.elements.reference),z=Y({reference:B,element:P,strategy:"absolute",placement:s}),$=re(Object.assign({},P,z)),H=w===L?$:B,W={top:F.top-H.top+_.top,bottom:H.bottom-F.bottom+_.bottom,left:F.left-H.left+_.left,right:H.right-F.right+_.right},U=e.modifiersData.offset;if(w===L&&U){var V=U[s];Object.keys(W).forEach((function(e){var t=[T,A].indexOf(e)>=0?1:-1,n=[E,A].indexOf(e)>=0?"y":"x";W[e]+=V[n]*t}))}return W}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,D].some((function(t){return e[t]>=0}))}var he=W({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,i=o.scroll,s=void 0===i||i,a=o.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]=Y({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,o=void 0===r||r,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,l=void 0===a||a,c={placement:V(t.placement),variation:q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(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,J(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:{}},Q,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,s=F.reduce((function(e,n){return e[n]=function(e,t,n){var r=V(e),o=[D,E].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[D,T].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,i),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 o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,d=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,y=V(g),v=l||(y!==g&&p?function(e){if(V(e)===_)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(V(n)===_?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=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})):R,d=h.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=h);var f=d.reduce((function(t,n){return t[n]=ae(e,{placement:n,boundary:o,rootBoundary:i,padding:s})[V(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[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],M=0;M<b.length;M++){var O=b[M],P=V(O),I=q(O)===N,L=[E,A].indexOf(P)>=0,B=L?"width":"height",z=ae(t,{placement:O,boundary:u,rootBoundary:h,altBoundary:d,padding:c}),$=L?I?T:D:I?A:E;w[B]>x[B]&&($=Z($));var H=Z($),W=[];if(i&&W.push(z[P]<=0),a&&W.push(z[$]<=0,z[H]<=0),W.every((function(e){return e}))){C=O,k=!1;break}S.set(O,W)}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,o=n.mainAxis,i=void 0===o||o,s=n.altAxis,c=void 0!==s&&s,u=n.boundary,h=n.rootBoundary,d=n.altBoundary,f=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:f,altBoundary:d}),b=V(t.placement),x=q(t.placement),S=!x,k=K(b),C="x"===k?"y":"x",M=t.modifiersData.popperOffsets,_=t.rects.reference,R=t.rects.popper,P="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,I="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(M){if(i){var F,B="y"===k?E:D,z="y"===k?A:T,$="y"===k?"height":"width",H=M[k],W=H+v[B],U=H-v[z],Y=m?-R[$]/2:0,G=x===N?_[$]:R[$],J=x===N?-R[$]:-_[$],Q=t.elements.arrow,X=m&&Q?w(Q):{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,_[$],X[$]),re=S?_[$]/2-Y-ne-ee-I.mainAxis:G-ne-ee-I.mainAxis,oe=S?-_[$]/2+Y+ne+te+I.mainAxis:J+ne+te+I.mainAxis,ie=t.elements.arrow&&O(t.elements.arrow),se=ie?"y"===k?ie.clientTop||0:ie.clientLeft||0:0,ce=null!=(F=null==L?void 0:L[k])?F:0,ue=H+oe-ce,he=le(m?l(W,H+re-ce-se):W,H,m?a(U,ue):U);M[k]=he,j[k]=he-H}if(c){var de,fe="x"===k?E:D,pe="x"===k?A:T,me=M[C],ge="y"===C?"height":"width",ye=me+v[fe],ve=me-v[pe],be=-1!==[E,D].indexOf(b),we=null!=(de=null==L?void 0:L[C])?de:0,xe=be?ye:me-_[ge]-R[ge]-we+I.altAxis,Se=be?me+_[ge]+R[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);M[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,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=V(n.placement),l=K(a),c=[D,T].indexOf(a)>=0?"height":"width";if(i&&s){var u=function(e,t){return ie("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:se(e,R))}(o.padding,n),h=w(i),d="y"===l?E:D,f="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=O(i),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=p/2-m/2,b=u[d],x=y-h[c]-u[f],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,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=ae(t,{elementContext:"reference"}),a=ae(t,{altBoundary:!0}),l=ce(s,r),c=ce(a,o,i),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})}}]}),de="tippy-content",fe="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 Me(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Oe(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 De(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 _e={isTouch:!1},Re=0;function Ne(){_e.isTouch||(_e.isTouch=!0,window.performance&&document.addEventListener("mousemove",Pe))}function Pe(){var e=performance.now();e-Re<20&&(_e.isTouch=!1,document.removeEventListener("mousemove",Pe)),Re=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,o=n.name,i=n.defaultValue;return o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=je[o])?r:i),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(de)})),arrow:n.find((function(e){return e.classList.contains(pe)||e.classList.contains(me)})),backdrop:n.find((function(e){return e.classList.contains(fe)}))}}var He=1,We=[],Ue=[];function Ve(e,t){var n,r,o,i,s,a,l,c,u=ze(e,Object.assign({},je,Be(Me(t)))),h=!1,d=!1,f=!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(o)},setProps:function(t){if(!b.state.isDestroyed){N("onBeforeUpdate",[b,t]),V();var n=b.props,r=ze(e,Object.assign({},n,Me(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(),R(),S&&S(n,r),b.popperInstance&&(Q(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}))),N("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=_e.isTouch&&!b.props.touch,o=ve(b.props.duration,0,je.duration);if(!(e||t||n||r||A().hasAttribute("disabled")||(N("onShow",[b],!1),!1===b.props.onShow(b)))){if(b.state.isVisible=!0,E()&&(x.style.visibility="visible"),R(),z(),b.state.isMounted||(x.style.transition="none"),E()){var i=D();Ee([i.box,i.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=D(),n=t.box,r=t.content;Ee([n,r],o),Ae([n,r],"visible")}P(),I(),ke(Ue,b),null==(e=b.popperInstance)||e.forceUpdate(),N("onMount",[b]),b.props.animation&&E()&&function(e,t){H(e,(function(){b.state.isShown=!0,N("onShown",[b])}))}(o)}},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,Q()}},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)&&(N("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(),$(),R(!0),E()){var o=D(),i=o.box,s=o.content;b.props.animation&&(Ee([i,s],r),Ae([i,s],"hidden"))}P(),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(We,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,N("onHidden",[b]))},destroy:function(){b.state.isDestroyed||(b.clearDelayTimeouts(),b.unmount(),V(),delete e._tippy,b.state.isDestroyed=!0,N("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(),R(),N("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 M(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function O(){return"hold"===M()[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 D(){return $e(x)}function _(e){return b.state.isMounted&&!b.state.isVisible||_e.isTouch||i&&"focus"===i.type?0:ve(b.props.delay,e?0:1,je.delay)}function R(e){void 0===e&&(e=!1),x.style.pointerEvents=b.props.interactive&&!e?"":"none",x.style.zIndex=""+b.props.zIndex}function N(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 P(){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 o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):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),We=We.filter((function(e){return e!==g}))}function j(t){if(!_e.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!De(x,n)){if(Se(b.props.triggerTarget||e).some((function(e){return De(e,n)}))){if(_e.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else N("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout((function(){d=!1})),b.state.isMounted||$())}}}function F(){f=!0}function B(){f=!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=D().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 W(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;O()&&(W("touchstart",q,{passive:!0}),W("touchend",Y,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(W(e,q),e){case"mouseenter":W("mouseleave",Y);break;case"focus":W(Le?"focusout":"blur",G);break;case"focusin":W("focusout",G)}}))}function V(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),m=[]}function q(e){var t,n=!1;if(b.state.isEnabled&&!J(e)&&!d){var r="focus"===(null==(t=i)?void 0:t.type);i=e,l=e.currentTarget,I(),!b.state.isVisible&&be(e,"MouseEvent")&&We.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,o=e.popperState,i=e.props.interactiveBorder,s=o.placement.split("-")[0],a=o.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,d=t.top-r+l>i,f=r-t.bottom-c>i,p=t.left-n+u>i,m=n-t.right-h>i;return d||f||p||m}))})(r,e)&&(L(),te(e))}}function Y(e){J(e)||b.props.trigger.indexOf("click")>=0&&h||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function G(e){b.props.trigger.indexOf("focusin")<0&&e.target!==A()||b.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||te(e)}function J(e){return!!_e.isTouch&&O()!==e.type.indexOf("touch")>=0}function Q(){X();var t=b.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,s=t.moveTransition,l=E()?$e(x).arrow:null,c=i?{getBoundingClientRect:i,contextElement:i.contextElement||A()}:e,u=[{name:"offset",options:{offset:o}},{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=D().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&&N("onTrigger",[b,e]),z();var t=_(!0),r=M(),o=r[0],i=r[1];_e.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),N("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=_(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else $()}}function qe(e,t){void 0===t&&(t={});var n=je.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Ne,ge),window.addEventListener("blur",Ie);var r,o=Object.assign({},t,{plugins:n}),i=(r=e,Oe(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&&Ve(t,o);return n&&e.push(n),e}),[]);return Oe(e)?i[0]:i}qe.defaultProps=je,qe.setDefaultProps=function(e){Object.keys(e).forEach((function(t){je[t]=e[t]}))},qe.currentInput=_e,Object.assign({},Q,{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 Ye=n(7294),Ge=n(3935);function Je(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Qe="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 Qe&&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=Qe?Ye.useLayoutEffect:Ye.useEffect;function rt(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var ot={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 it(e){return function(t){var n,r,o=t.children,i=t.content,s=t.visible,a=t.singleton,l=t.render,c=t.reference,u=t.disabled,h=void 0!==u&&u,d=t.ignoreAttributes,f=void 0===d||d,p=(t.__source,t.__self,Je(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),m=void 0!==s,g=void 0!==a,y=(0,Ye.useState)(!1),v=y[0],b=y[1],w=(0,Ye.useState)({}),x=w[0],S=w[1],k=(0,Ye.useState)(),C=k[0],M=k[1],O=(n=function(){return{container:Ze(),renders:1}},(r=(0,Ye.useRef)()).current||(r.current="function"==typeof n?n():n),r.current),E=Object.assign({ignoreAttributes:f},p,{content:O.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,M(n.content)}}}}]):T,render:function(){return{popper:O.container}}}));var D=[c].concat(o?[o.type]:[]);return nt((function(){var t=c;c&&c.hasOwnProperty("current")&&(t=c.current);var n=e(t||O.ref||Ze(),Object.assign({},A,{plugins:[ot].concat(E.plugins||[])}));return O.instance=n,h&&n.disable(),s&&n.show(),g&&a.hook({instance:n,content:i,props:A,setSingletonContent:M}),b(!0),function(){n.destroy(),null==a||a.cleanup(n)}}),D),nt((function(){var e,t,n,r,o;if(1!==O.renders){var l=O.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==(o=n.popperOptions)?void 0:o.modifiers)||[]))})}))),null==(e=l.popperInstance)||e.forceUpdate(),h?l.disable():l.enable(),m&&(s?l.show():l.hide()),g&&a.hook({instance:l,content:i,props:A,setSingletonContent:M})}else O.renders++})),nt((function(){var e;if(l){var t=O.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(D)),Ye.createElement(Ye.Fragment,null,o?(0,Ye.cloneElement)(o,{ref:function(e){O.ref=e,Xe(o.ref,e)}}):null,v&&(0,Ge.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,O.instance):i,O.container))}}var st=function(e,t){return(0,Ye.forwardRef)((function(n,r){var o=n.children,i=Je(n,["children"]);return Ye.createElement(e,Object.assign({},t,i),o?(0,Ye.cloneElement)(o,{ref:function(e){Xe(r,e),Xe(o.ref,e)}}):null)}))};const at=st(it(Ke),{render:function(){return""}})},8307:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>qi});var r=n(7462),o=n(3366),i=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=f.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 d=Object.create(null);class f{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):d,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new f(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 o=t[r<0?e.name:n[r]];if(o)return o}}}}f.none=new f("",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,o){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,o&&o.length){this.props=Object.create(null);for(let[e,t]of o)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,o=new A(r);return o.moveTo(e,t),p.set(this,o._tree),o}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:o=this.length}=e;for(let i=this.cursor((e.mode||0)|g.IncludeAnonymous);;){let e=!1;if(i.from<=o&&i.to>=r&&(i.type.isAnonymous||!1!==t(i))){if(i.firstChild())continue;e=!0}for(;e&&n&&!i.type.isAnonymous&&n(i),!i.nextSibling();){if(!i.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:R(f.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(f.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:o=l,reused:i=[],minRepeatType:s=r.types.length}=e,a=Array.isArray(n)?new v(n,n.length):n,c=r.types,u=0,d=0;function f(e,t,n,l,v){let{id:w,start:x,end:S,size:k}=a,C=d;for(;k<0;){if(a.next(),-1==k){let t=i[w];return n.push(t),void l.push(x-e)}if(-3==k)return void(u=w);if(-4==k)return void(d=w);throw new RangeError(`Unrecognized record size: ${k}`)}let M,O,E=c[w],A=x-e;if(S-x<=o&&(O=function(e,t){let n=a.fork(),r=0,i=0,l=0,c=n.end-o,u={size:0,start:0,skip:0};e:for(let o=n.pos-e;n.pos>o;){let e=n.size;if(n.id==t&&e>=0){u.size=r,u.start=i,u.skip=l,l+=4,r+=4,n.next();continue}let a=n.pos-e;if(e<0||a<o||n.start<c)break;let h=n.id>=s?4:0,d=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()}i=d,r+=e,l+=h}return(t<0||r==e)&&(u.size=r,u.start=i,u.skip=l),u.size>4?u:void 0}(a.pos-t,v))){let t=new Uint16Array(O.size-O.skip),n=a.pos-O.size,o=t.length;for(;a.pos>n;)o=g(O.start,t,o);M=new b(t,S-O.start,r),A=O.start-e}else{let e=a.pos-k;a.next();let t=[],n=[],r=w>=s?w:-1,i=0,l=S;for(;a.pos>e;)r>=0&&a.id==r&&a.size>=0?(a.end<=l-o&&(p(t,n,x,i,a.end,l,r,C),i=t.length,l=a.end),a.next()):f(x,e,t,n,r);if(r>=0&&i>0&&i<t.length&&p(t,n,x,i,x,l,r,C),t.reverse(),n.reverse(),r>-1&&i>0){let e=function(e){return(t,n,r)=>{let o,i,s=0,a=t.length-1;if(a>=0&&(o=t[a])instanceof y){if(!a&&o.type==e&&o.length==r)return o;(i=o.prop(h.lookAhead))&&(s=n[a]+o.length+i)}return m(e,t,n,r,s)}}(E);M=R(E,t,n,0,t.length,0,S-x,e,e)}else M=m(E,t,n,S-x,C-S)}n.push(M),l.push(A)}function p(e,t,n,o,i,s,a,l){let c=[],u=[];for(;e.length>o;)c.push(e.pop()),u.push(t.pop()+n-i);e.push(m(r.types[a],c,u,s-i,l-s)),t.push(i-n)}function m(e,t,n,r,o=0,i){if(u){let e=[h.contextHash,u];i=i?[e].concat(i):[e]}if(o>25){let e=[h.lookAhead,o];i=i?[e].concat(i):[e]}return new y(e,t,n,r,i)}function g(e,t,n){let{id:r,start:o,end:i,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]=i-e,t[--n]=o-e,t[--n]=r}else-3==l?u=r:-4==l&&(d=r);return n}let w=[],x=[];for(;a.pos>0;)f(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(f.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 f.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],o=r.name;if(/\W/.test(o)&&!r.isError&&(o=JSON.stringify(o)),n==(e+=4))return o;let i=[];for(;e<n;)i.push(this.childString(e)),e=this.buffer[e+3];return o+"("+i.join(",")+")"}findChild(e,t,n,r,o){let{buffer:i}=this,s=-1;for(let a=e;a!=t&&!(w(o,r,i[a+1],i[a+2])&&(s=a,n>0));a=i[a+3]);return s}slice(e,t,n){let r=this.buffer,o=new Uint16Array(t-e),i=0;for(let s=e,a=0;s<t;){o[a++]=r[s++],o[a++]=r[s++]-n;let t=o[a++]=r[s++]-n;o[a++]=r[s++]-e,i=Math.max(i,t)}return new b(o,i,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 o;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 i=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===(o=s.enter(t,n,i))||void 0===o?void 0:o.from)!=r.from&&(e=s);for(;;){let r=e.enter(t,n,i);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,o=0){for(let i=this;;){for(let{children:s,positions:a}=i._tree,l=t>0?s.length:-1;e!=l;e+=t){let l=s[e],c=a[e]+i.from;if(w(r,n,c,c+l.length))if(l instanceof b){if(o&g.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,t,n-c,r);if(s>-1)return new E(new O(i,l,e,c),null,s)}else if(o&g.IncludeAnonymous||!l.type.isAnonymous||T(l)){let s;if(!(o&g.IgnoreMounts)&&l.props&&(s=l.prop(h.mounted))&&!s.overlay)return new k(s.tree,c,e,i);let a=new k(l,c,e,i);return o&g.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,n,r)}}if(o&g.IncludeAnonymous||!i.type.isAnonymous)return null;if(e=i.index>=0?i.index+t:t<0?-1:i._parent._tree.children.length,i=i._parent,!i)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:o}of r.overlay)if((t>0?e<=n:e<n)&&(t<0?o>=n:o>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 M(this,e)}}function C(e,t,n,r){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(null!=n)for(;!o.type.is(n);)if(!o.nextSibling())return i;for(;;){if(null!=r&&o.type.is(r))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return null==r?i:[]}}function M(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 O{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,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new E(this.context,this,o)}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,o=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new E(this.context,this,o)}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,o=n.buffer[this.index+3];if(o>r){let i=n.buffer[this.index+1];e.push(n.slice(r,o,i)),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 M(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,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}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,o=e<0?-1:n._tree.children.length;r!=o;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,o=this.stack.length;o>=0;){for(let i=e;i;i=i._parent)if(i.index==r){if(r==this.index)return i;t=i,n=o+1;break e}r=this.stack[--o]}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 M(this.node,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,o=this.stack.length-1;r>=0;o--){if(o<0)return M(this.node,e,r);let i=n[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[r]&&e[r]!=i.name)return!1;r--}}return!0}}function T(e){return e.children.some((e=>e instanceof b||!e.type.isAnonymous||T(e)))}const D=new WeakMap;function _(e,t){if(!e.isAnonymous||t instanceof b||t.type!=e)return 1;let n=D.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof y)){n=1;break}n+=_(e,r)}D.set(t,n)}return n}function R(e,t,n,r,o,i,s,a,l){let c=0;for(let n=r;n<o;n++)c+=_(e,t[n]);let u=Math.ceil(1.5*c/8),h=[],d=[];return function t(n,r,o,s,a){for(let c=o;c<s;){let o=c,f=r[c],p=_(e,n[c]);for(c++;c<s;c++){let t=_(e,n[c]);if(p+t>=u)break;p+=t}if(c==o+1){if(p>u){let e=n[o];t(e.children,e.positions,0,e.children.length,r[o]+a);continue}h.push(n[o])}else{let t=r[c-1]+n[c-1].length-f;h.push(R(e,n,r,o,c,f,t,null,l))}d.push(f+a-i)}}(t,n,r,o,0),(a||l)(h,d,s)}class N{constructor(e,t,n,r,o=!1,i=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(o?1:0)|(i?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 N(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=[],o=1,i=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(;i&&i.from<u;){let t=i;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 N(e,n,t.tree,t.offset+l,s>0,!!c)}if(t&&r.push(t),i.to>u)break;i=o<e.length?e[o++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return r}}class P{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,o=n.modified,r.length==o.length&&r.every(((e,t)=>e==o[t])));var r,o}));if(n)return n;let r=[],o=new j(r,e,t);for(let e of t)e.instances.push(o);let i=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,o=t.length;r<o;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 i)r.push(B.get(t,e));return o}}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=[],o=2,i=e;for(let t=0;;){if("..."==i&&t>0&&t+3==e.length){o=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(i);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){o=0;break}if("/"!=s)throw new RangeError("Invalid path: "+e);i=e.slice(t)}let s=n.length-1,a=n[s];if(!a)throw new RangeError("Invalid path: "+e);let l=new H(r,o,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 W(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:o=null}=t||{};return{style:e=>{let t=o;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,o=e.length){let i=new V(r,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),r,o,"",i.highlighters),i.flush(o)}H.empty=new H([],2,null);class V{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,o){let{type:i,from:s,to:a}=e;if(s>=n||a<=t)return;i.isTop&&(o=this.highlighters.filter((e=>!e.scope||e.scope(i))));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}(o,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(r+=(r?" ":"")+u)),this.startSpan(e.from,l),c.opaque)return;let d=e.tree&&e.tree.prop(h.mounted);if(d&&d.overlay){let i=e.node.enter(d.overlay[0].from+s,1),c=this.highlighters.filter((e=>!e.scope||e.scope(d.tree.type))),u=e.firstChild();for(let h=0,f=s;;h++){let p=h<d.overlay.length?d.overlay[h]:null,m=p?p.from+s:a,g=Math.max(t,f),y=Math.min(n,m);if(g<y&&u)for(;e.from<y&&(this.highlightRange(e,g,y,r,o),this.startSpan(Math.min(y,e.to),l),!(e.to>=m)&&e.nextSibling()););if(!p||m>n)break;f=p.to+s,f>t&&(this.highlightRange(i.cursor(),Math.max(t,p.from+s),Math.min(n,f),r,c),this.startSpan(f,l))}u&&e.parent()}else if(e.firstChild()){do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,o),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const q=j.define,K=q(),Y=q(),G=q(Y),J=q(Y),Q=q(),X=q(Q),Z=q(Q),ee=q(),te=q(ee),ne=q(),re=q(),oe=q(),ie=q(oe),se=q(),ae={comment:K,lineComment:q(K),blockComment:q(K),docComment:q(K),name:Y,variableName:q(Y),typeName:G,tagName:q(G),propertyName:J,attributeName:q(J),className:q(Y),labelName:q(Y),namespace:q(Y),macroName:q(Y),literal:Q,string:X,docString:q(X),character:q(X),attributeValue:q(X),number:Z,integer:q(Z),float:q(Z),bool:q(Q),regexp:q(Q),escape:q(Q),color:q(Q),url:q(Q),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:oe,separator:q(oe),bracket:ie,angleBracket:q(ie),squareBracket:q(ie),paren:q(ie),brace:q(ie),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()};W([{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 de{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=fe(e,t,n),o=r.type.prop(ue);if(!o)return[];let i=e.facet(o),s=r.type.prop(he);if(s){let o=r.resolve(t-r.from,n);for(let t of s)if(t.test(o,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(i)}}return i}))].concat(n)}isActiveAt(e,t,n=-1){return fe(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 o=e.prop(h.mounted);if(o){if(o.tree.prop(ue)==this.data){if(o.overlay)for(let e of o.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(o.overlay){let e=n.length;if(r(o.tree,o.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let o=e.children[n];o instanceof y&&r(o,e.positions[n]+t)}};return r(pe(e),0),n}get allowsNesting(){return!0}}function fe(e,t,n){let r=e.facet(ke),o=pe(e).topNode;if(!r||r.allowsNesting)for(let e=o;e;e=e.enter(t,n,g.ExcludeBuffers))e.type.isTop&&(o=e);return o}function pe(e){let t=e.field(de.state,!1);return t?t.tree:y.empty}de.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,o,i,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=o,this.viewport=i,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(N.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(N.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:o,viewport:i,skipped:s}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,r,o)=>t.push({fromA:e,toA:n,fromB:r,toB:o}))),n=N.applyChanges(n,t),r=y.empty,o=0,i={from:e.mapPos(i.from,-1),to:e.mapPos(i.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,o,i,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 P{createParse(t,n,r){let o=r[0].from,i=r[r.length-1].to;return{parsedPos:o,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=i,new y(f.none,[],[],i-o)},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 N.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)}}de.state=s.QQ.define({create:be.init,update(e,t){for(let e of t.effects)if(e.is(de.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(de.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(de.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,o=n.field(de.state);if(o.tree==o.context.tree&&o.context.isDone(r+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,e&&!xe?Math.max(25,e.timeRemaining()-5):1e9),s=o.context.treeLen<r&&n.doc.length>r+1e3,a=o.context.work((()=>xe&&xe()||Date.now()>i),r+(s?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:de.setState.of(new be(o.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(o.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=>[de.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(),Me=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 Oe(e){let t=e.facet(Me);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function Ee(e,t){let n="",r=e.tabSize,o=e.facet(Me)[0];if("\t"==o){for(;t>=r;)n+="\t",t-=r;o=" "}for(let e=0;e<t;e++)n+=o;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 Re(t.resolveInner(n).enterUnfinishedNodesBefore(n),n,e)}(e,n,t):null}class Te{constructor(e,t={}){this.state=e,this.options=t,this.unit=Oe(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return null!=r&&r>=n.from&&r<=n.to?o&&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),o=this.countColumn(n,e-r),i=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return i>-1&&(o+=i-this.countColumn(n,n.search(/\S|$/))),o}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),o=this.options.overrideIndentation;if(o){let e=o(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const De=new h;function _e(e){let t=e.type.prop(De);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,o){let i=e.textAfter,s=i.match(/^\s*/)[0].length,a=r&&i.slice(s,s+r.length)==r||o==e.pos+s,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let o=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),s=null==o||o<=i.from?i.to:Math.min(i.to,o);for(let e=n.to;;){let o=t.childAfter(e);if(!o||o==r)return null;if(!o.type.isSkipped)return o.from<s?n:null;e=o.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?Ne:null}function Re(e,t,n){for(;e;e=e.parent){let r=_e(e);if(r)return r(Pe.create(n,t,e))}return null}function Ne(){return 0}class Pe 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 Pe(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?Re(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 o=r(e,t,n);if(o)return o}return function(e,t,n){let r=pe(e);if(r.length<n)return null;let o=null;for(let i=r.resolveInner(n,1);i;i=i.parent){if(i.to<=n||i.from>n)continue;if(o&&i.from<t)break;let s=i.type.prop(je);if(s&&(i.to<r.length-50||r.length==e.doc.length||!Fe(i))){let r=s(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(o=r)}}return o}(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 We(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++],o=e[n++];if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid JSON for fold state");t.push(Ze.range(r,o))}return a.p.set(t,!0)}});function Ve(e,t,n){var r;let o=null;return null===(r=e.field(Ue,!1))||void 0===r||r.between(t,n,((e,t)=>{(!o||o.from>e)&&(o={from:e,to:t})})),o}function qe(e,t,n){let r=!1;return e.between(t,t,((e,o)=>{e==t&&o==n&&(r=!0)})),r}function Ke(e,t){return e.field(Ue,!1)?t:t.concat(s.Py.appendConfig.of(Xe()))}function Ye(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,o=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")} ${o}.`)}const Ge=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of We(e)){let n=Be(e.state,t.from,t.to);if(n)return e.dispatch({effects:Ke(e.state,[$e.of(n),Ye(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 We(e)){let r=Ve(e.state,n.from,n.to);r&&t.push(He.of(r),Ye(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 o=e.lineBlockAt(r),i=Be(t,o.from,o.to);i&&n.push($e.of(i)),r=(i?e.lineBlockAt(i.to):o).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}}],Je={placeholderDOM:null,placeholderText:"…"},Qe=s.r$.define({combine:e=>(0,s.BO)(e,Je)});function Xe(e){let t=[Ue,nt];return e&&t.push(Qe.of(e)),t}const Ze=a.p.replace({widget:new class extends a.l9{toDOM(e){let{state:t}=e,n=t.facet(Qe),r=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=Ve(e.state,n.from,n.to);r&&e.dispatch({effects:He.of(r)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,r);let o=document.createElement("span");return o.textContent=n.placeholderText,o.setAttribute("aria-label",t.phrase("folded code")),o.title=t.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}}}),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 o="string"==typeof t.all?t.all:t.all?r(t.all):void 0,i=t.scope;this.scope=i instanceof de?e=>e.prop(ue)==i.data:i?e=>e==i:void 0,this.style=W(e.map((e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))}))),{all:o}).style,this.module=n?new ce.V(n):null,this.themeType=t.themeType}static define(e,t){return new rt(e,t||{})}}const ot=s.r$.define(),it=s.r$.define({combine:e=>e.length?[e[0]]:null});function st(e){let t=e.facet(ot);return t.length?t:e.facet(it)}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(it.of(e)):n?r.push(ot.computeN([a.tk.darkTheme],(t=>t.facet(a.tk.darkTheme)==("dark"==n)?[e]:[]))):r.push(ot.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:o}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,o);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"}}),dt=1e4,ft="()[]{}",pt=s.r$.define({combine:e=>(0,s.BO)(e,{afterCursor:!0,brackets:ft,maxScanDistance:dt,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 o=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));o&&(n=n.concat(r.renderMatch(o,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 o=r.maxScanDistance||dt,i=r.brackets||ft,s=pe(e),a=s.resolveInner(t,n);for(let e=a;e;e=e.parent){let r=xt(e.type,n,i);if(r&&e.from<e.to){let o=St(e);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return Ct(0,0,n,e,o,r,i)}}return function(e,t,n,r,o,i,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<=i;){let i=u.value;n<0&&(e+=i.length);let a=t+e*n;for(let e=n>0?0:i.length-1,t=n>0?i.length:-1;e!=t;e+=n){let t=s.indexOf(i[e]);if(!(t<0||r.resolveInner(a+e,1).type!=o))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+=i.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,s,a.type,o,i)}function Ct(e,t,n,r,o,i,s){let a=r.parent,l={from:o.from,to:o.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&&i.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 Mt=Object.create(null),Ot=[f.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]=Dt(Mt,t);function Tt(e,t){Et.indexOf(e)>-1||(Et.push(e),console.warn(t))}function Dt(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,"_"),o=f.define({id:Ot.length,name:r,props:[z({[r]:n})]});return Ot.push(o),o.id}function _t(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=e(t,n);return!!o&&(r(n.update(o)),!0)}}const Rt=_t(Ft,0),Nt=_t(jt,0),Pt=_t(((e,t)=>jt(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),o=n.to<=r.to?r:e.doc.lineAt(n.to),i=t.length-1;i>=0&&t[i].to>r.from?t[i].to=o.to:t.push({from:r.from,to:o.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 o=n.map(((e,n)=>function(e,{open:t,close:n},r,o){let i,s,a=e.sliceDoc(r-Lt,r),l=e.sliceDoc(o,o+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:o+u,margin:u&&1}};o-r<=2*Lt?i=s=e.sliceDoc(r,o):(i=e.sliceDoc(r,r+Lt),s=e.sliceDoc(o-Lt,o));let d=/^\s*/.exec(i)[0].length,f=/\s*$/.exec(s)[0].length,p=s.length-f-n.length;return i.slice(d,d+t.length)==t&&s.slice(p,p+n.length)==n?{open:{pos:r+d+t.length,margin:/\s/.test(i.charAt(d+t.length))?1:0},close:{pos:o-f-n.length,margin:/\s/.test(s.charAt(p-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!o.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>o[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&o.some((e=>e))){let e=[];for(let t,n=0;n<o.length;n++)if(t=o[n]){let o=r[n],{open:i,close:s}=t;e.push({from:i.pos-o.open.length,to:i.pos+i.margin},{from:s.pos-s.margin,to:s.pos+o.close.length})}return{changes:e}}return null}function Ft(e,t,n=t.selection.ranges){let r=[],o=-1;for(let{from:e,to:i}of n){let n=r.length,s=1e9,a=It(t,e).line;if(a){for(let n=e;n<=i;){let l=t.doc.lineAt(n);if(l.from>o&&(e==i||i>l.from)){o=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:o,empty:i,single:s}of r)!s&&i||e.push({from:t.from+o,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:o}of r)if(n>=0){let r=t.from+n,i=r+o.length;" "==t.text[i-t.from]&&i++,e.push({from:r,to:i})}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)})}),Wt=s.QQ.define({create:()=>sn.empty,update(e,t){let n=t.state.facet(Ht),r=t.annotation(Bt);if(r){let o=t.docChanged?s.jT.single(function(e){let t=0;return e.iterChangedRanges(((e,n)=>t=n)),t}(t.changes)):void 0,i=Gt.fromTransaction(t,o),a=r.side,l=0==a?e.undone:e.done;return l=i?Jt(l,l.length,n.minDepth,i):en(l,t.startState.selection),new sn(0==a?r.rest:l,0==a?l:r.rest)}let o=t.annotation(zt);if("full"!=o&&"before"!=o||(e=e.isolate()),!1===t.annotation(s.YW.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let i=Gt.fromTransaction(t),a=t.annotation(s.YW.time),l=t.annotation(s.YW.userEvent);return i?e=e.addChanges(i,a,l,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,l,n.newGroupDelay)),"full"!=o&&"after"!=o||(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(Gt.fromJSON),e.undone.map(Gt.fromJSON))});function Ut(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let o=n.field(Wt,!1);if(!o)return!1;let i=o.pop(e,n,t);return!!i&&(r(i),!0)}}const Vt=Ut(0,!1),qt=Ut(1,!1),Kt=Ut(0,!0),Yt=Ut(1,!0);class Gt{constructor(e,t,n,r,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new Gt(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 Gt(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 Gt(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Xt)}static selection(e){return new Gt(void 0,Xt,void 0,void 0,e)}}function Jt(e,t,n,r){let o=t+1>n+20?t-n-1:0,i=e.slice(o,t);return i.push(r),i}function Qt(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),Jt(e,e.length-1,1e9,n.setSelAfter(r)))}return[Gt.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 o=rn(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,r=o.selectionsAfter}return r.length?[Gt.selection(r)]:Xt}function rn(e,t,n){let r=Qt(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):Xt,n);if(!e.changes)return Gt.selection(r);let o=e.changes.map(t),i=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(i):i;return new Gt(o,s.Py.mapEffects(e.effects,t),a,e.startSelection.map(i),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,o){let i=this.done,s=i[i.length-1];return i=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||on.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(o,function(e,t){let n=[],r=!1;return e.iterChangedRanges(((e,t)=>n.push(e,t))),t.iterChangedRanges(((e,t,o,i)=>{for(let e=0;e<n.length;){let t=n[e++],s=n[e++];i>=t&&o<=s&&(r=!0)}})),r}(s.changes,e.changes))||"input.type.compose"==n)?Jt(i,i.length-1,r.minDepth,new Gt(e.changes.compose(s.changes),Qt(e.effects,s.effects),s.mapped,s.startSelection,Xt)):Jt(i,i.length,r.minDepth,e),new sn(i,Xt,t,n)}addSelection(e,t,n,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Xt;return o.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=o[o.length-1],s=e,i.ranges.length==s.ranges.length&&0===i.ranges.filter(((e,t)=>e.empty!=s.ranges[t].empty)).length)?this:new sn(en(this.done,e),this.undone,t,n);var i,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 o=r[r.length-1];if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:Bt.of({side:e,rest:tn(r)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let n=1==r.length?Xt:r.slice(0,r.length-1);return o.mapped&&(n=nn(n,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.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:Vt,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:Yt,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 dn(e,t){return un(e,(n=>n.empty?e.moveByChar(n,t):hn(n,t)))}function fn(e){return e.textDirectionAt(e.state.selection.main.head)==a.Nm.LTR}const pn=e=>dn(e,!fn(e)),mn=e=>dn(e,fn(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,o,i=pe(e).resolveInner(t.head),a=n?h.closedBy:h.openedBy;for(let r=t.head;;){let t=n?i.childAfter(r):i.childBefore(r);if(!t)break;yn(e,t,a)?i=t:r=n?t.to:t.from}return o=i.type.prop(a)&&(r=n?kt(e,i.from,1):kt(e,i.to,-1))&&r.matched?n?r.end.to:r.end.from:n?i.to:i.from,s.jT.cursor(o,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,o=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)&&(o=Math.max(null==n?void 0:n.bottom,o))}t=e.scrollDOM.clientHeight-r-o}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:o,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function kn(e,t){let n,r=Sn(e),{state:o}=e,i=ln(o.selection,(n=>n.empty?e.moveVertically(n,t,r.height):hn(n,t)));if(i.eq(o.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(o.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(i.main.head,{y:"start",yMargin:t.top-l}))}return e.dispatch(cn(o,i),{effects:n}),!0}const Cn=e=>kn(e,!1),Mn=e=>kn(e,!0);function On(e,t,n){let r=e.lineBlockAt(t.head),o=e.moveToLineBoundary(t,n);if(o.head==t.head&&o.head!=(n?r.to:r.from)&&(o=e.moveToLineBoundary(t,n,!1)),!n&&o.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&&(o=s.jT.cursor(r.from+n))}return o}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,!fn(e)),Dn=e=>An(e,fn(e));function _n(e,t){return En(e,(n=>e.moveByGroup(n,t)))}function Rn(e,t){return En(e,(n=>e.moveVertically(n,t)))}const Nn=e=>Rn(e,!1),Pn=e=>Rn(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,o=r.changeByRange((r=>{let{from:o,to:i}=r;if(o==i){let r=t(o);r<o?(n="delete.backward",r=Wn(e,r,!1)):r>o&&(n="delete.forward",r=Wn(e,r,!0)),o=Math.min(o,r),i=Math.max(i,r)}else o=Wn(e,o,!1),i=Wn(e,i,!0);return o==i?{range:r}:{changes:{from:o,to:i},range:s.jT.cursor(o)}}));return!o.changes.empty&&(e.dispatch(r.update(o,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?a.tk.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Wn(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,o,{state:i}=e,a=i.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,i.tabSize)%Oe(i)||Oe(i);for(let t=0;t<e&&" "==r[r.length-1-t];t++)n--;o=n}else o=(0,s.cp)(a.text,n-a.from,t,t)+a.from,o==n&&a.number!=(t?i.doc.lines:1)&&(o+=t?1:-1);return o})),Vn=e=>Un(e,!1),qn=e=>Un(e,!0),Kn=(e,t)=>Hn(e,(n=>{let r=n,{state:o}=e,i=o.doc.lineAt(r),a=o.charCategorizer(r);for(let e=null;;){if(r==(t?i.to:i.from)){r==n&&i.number!=(t?o.doc.lines:1)&&(r+=t?1:-1);break}let l=(0,s.cp)(i.text,r-i.from,t)+i.from,c=i.text.slice(Math.min(r,l)-i.from,Math.max(r,l)-i.from),u=a(c);if(null!=e&&u!=e)break;" "==c&&r==n||(e=u),r=l}return r})),Yn=e=>Kn(e,!1),Gn=e=>Hn(e,(t=>{let n=e.lineBlockAt(t).to;return t<n?n:Math.min(e.state.doc.length,t+1)}));function Jn(e){let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.from),i=e.doc.lineAt(r.to);if(r.empty||r.to!=i.from||(i=e.doc.lineAt(r.to-1)),n>=o.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(r)}else t.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return t}function Qn(e,t,n){if(e.readOnly)return!1;let r=[],o=[];for(let t of Jn(e)){if(n?t.to==e.doc.length:0==t.from)continue;let i=e.doc.lineAt(n?t.to+1:t.from-1),a=i.length+1;if(n){r.push({from:t.to,to:i.to},{from:t.from,insert:i.text+e.lineBreak});for(let n of t.ranges)o.push(s.jT.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)))}else{r.push({from:i.from,to:t.from},{from:t.to,insert:e.lineBreak+i.text});for(let e of t.ranges)o.push(s.jT.range(e.anchor-a,e.head-a))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:s.jT.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function Xn(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of Jn(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:o}=n,i=t.doc.lineAt(r),a=!e&&r==o&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=pe(e).resolveInner(t),o=r.childBefore(t),i=r.childAfter(t);return o&&i&&o.to<=t&&i.from>=t&&(n=o.type.prop(h.closedBy))&&n.indexOf(i.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(i.from).from?{from:o.to,to:i.from}:null}(t,r);e&&(r=o=(o<=i.to?i:t.doc.lineAt(o)).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);o<i.to&&/\s/.test(i.text[o-i.from]);)o++;a?({from:r,to:o}=a):r>i.from&&r<i.from+100&&!/\S/.test(i.text.slice(0,r))&&(r=i.from);let u=["",Ee(t,c)];return a&&u.push(Ee(t,l.lineIndent(i.from,-1))),{changes:{from:r,to:o,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 o=[];for(let i=r.from;i<=r.to;){let s=e.doc.lineAt(i);s.number>n&&(r.empty||r.to>s.from)&&(t(s,o,r),n=s.number),i=s.to+1}let i=e.changes(o);return{changes:o,range:s.jT.range(i.mapPos(r.anchor,1),i.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(Me)})})),{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 o=(0,s.IS)(r,e.tabSize),i=0,a=Ee(e,Math.max(0,o-Oe(e)));for(;i<r.length&&i<a.length&&r.charCodeAt(i)==a.charCodeAt(i);)i++;n.push({from:t.from+i,to:t.from+r.length,insert:a.slice(i)})})),{userEvent:"delete.dedent"})),!0),or=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>un(e,(t=>vn(e.state,t,!fn(e)))),shift:e=>En(e,(t=>vn(e.state,t,!fn(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>un(e,(t=>vn(e.state,t,fn(e)))),shift:e=>En(e,(t=>vn(e.state,t,fn(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Qn(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>Xn(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Qn(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=Jn(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}}),o=tr(e,((t,o,i)=>{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||i.from<t.from+a.length)&&(n[t.from]=s,o.push({from:t.from,to:t.from+a.length,insert:l}))}));return o.changes.empty||t(e.update(o,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Jn(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,o=ln(e.selection,(t=>{let o=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(!o||!o.end)return t;r=!0;let i=o.start.from==t.head?o.end.to:o.end.from;return n?s.jT.range(t.anchor,i):s.jT.cursor(i)}));return!!r&&(t(cn(e,o)),!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?Rt(e):!!r.block&&Pt(e)}},{key:"Alt-A",run:Nt}].concat([{key:"ArrowLeft",run:pn,shift:Tn,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>gn(e,!fn(e)),shift:e=>_n(e,!fn(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>un(e,(t=>On(e,t,!fn(e)))),shift:e=>En(e,(t=>On(e,t,!fn(e)))),preventDefault:!0},{key:"ArrowRight",run:mn,shift:Dn,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>gn(e,fn(e)),shift:e=>_n(e,fn(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>un(e,(t=>On(e,t,fn(e)))),shift:e=>En(e,(t=>On(e,t,fn(e)))),preventDefault:!0},{key:"ArrowUp",run:wn,shift:Nn,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Fn,shift:zn},{mac:"Ctrl-ArrowUp",run:Cn,shift:Ln},{key:"ArrowDown",run:xn,shift:Pn,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Bn,shift:$n},{mac:"Ctrl-ArrowDown",run:Mn,shift:jn},{key:"PageUp",run:Cn,shift:Ln},{key:"PageDown",run:Mn,shift:jn},{key:"Home",run:e=>un(e,(t=>On(e,t,!1))),shift:e=>En(e,(t=>On(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:Fn,shift:zn},{key:"End",run:e=>un(e,(t=>On(e,t,!0))),shift:e=>En(e,(t=>On(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:Vn,shift:Vn},{key:"Delete",run:qn},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Yn},{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:Gn}].concat([{key:"Ctrl-b",run:pn,shift:Tn,preventDefault:!0},{key:"Ctrl-f",run:mn,shift:Dn},{key:"Ctrl-p",run:wn,shift:Nn},{key:"Ctrl-n",run:xn,shift:Pn},{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:Vn},{key:"Ctrl-k",run:Gn},{key:"Ctrl-Alt-h",run:Yn},{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),o=n==r.from?n-1:(0,s.cp)(r.text,n-r.from,!1)+r.from,i=n==r.to?n+1:(0,s.cp)(r.text,n-r.from,!0)+r.from;return{changes:{from:o,to:i,insert:e.doc.slice(n,i).append(e.doc.slice(o,n))},range:s.jT.cursor(i)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Mn}].map((e=>({mac:e.key,run:e.run,shift:e.shift}))))),ir={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 o=n[r];"string"==typeof o?e.setAttribute(r,o):null!=o&&(e[r]=o)}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,o,i){this.test=i,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=o?e=>o(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,o=n;;e++){let i=r.charCodeAt(e),s=this.match(i,o);if(s)return this.value=s,this;if(e==r.length-1)break;o==n&&e<t.length&&t.charCodeAt(e)==i&&o++}}}match(e,t){let n=null;for(let r=0;r<this.matches.length;r+=2){let o=this.matches[r],i=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?n={from:this.matches[r+1],to:t+1}:(this.matches[r]++,i=!0)),i||(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 dr{constructor(e,t,n,r=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=ur,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new mr(e,t,n,r,o);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 i=e.lineAt(r);this.curLineStart=i.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 fr=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=fr.get(e);if(!r||r.from>=n||r.to<=t){let r=new pr(t,e.sliceString(t,n));return fr.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:o,from:i}=r;return i>t&&(o=e.sliceString(t,i)+o,i=t),r.to<n&&(o+=e.sliceString(r.to,n)),fr.set(e,new pr(i,o)),new pr(t,o.slice(t-i,n-i))}}class mr{constructor(e,t,n,r,o){this.text=e,this.to=o,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,o=r.doc.lineAt(r.selection.main.head),[,i,a,l,c]=n,u=l?+l.slice(1):0,h=a?+a:o.number;if(a&&c){let e=h/100;i&&(e=e*("-"==i?-1:1)+o.number/r.doc.lines),h=Math.round(r.doc.lines*e)}else a&&i&&(h=h*("-"==i?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));e.dispatch({effects:vr.of(!1),selection:s.jT.cursor(d.from+Math.max(0,Math.min(u,d.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&&(dr.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 Mr(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 Or=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 o,i=r.main,l=null;if(i.empty){if(!t.highlightWordAroundCursor)return a.p.none;let e=n.wordAt(i.head);if(!e)return a.p.none;l=n.charCategorizer(i.head),o=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return a.p.none;if(t.wholeWords){if(o=n.sliceDoc(i.from,i.to),l=n.charCategorizer(i.head),!Mr(l,n,i.from,i.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,i.from,i.to))return a.p.none}else if(o=n.sliceDoc(i.from,i.to).trim(),!o)return a.p.none}let c=[];for(let r of e.visibleRanges){let e=new cr(n.doc,o,r.from,r.to);for(;!e.next().done;){let{from:r,to:o}=e.value;if((!l||Mr(l,n,r,o))&&(i.empty&&r<=i.from&&o>=i.to?c.push(Cr.range(r,o)):(r>=i.to||o<=i.from)&&c.push(kr.range(r,o)),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 to(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 Rr(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?Nr(this,r,t,n):_r(this,r,t,n)}}class Dr{constructor(e){this.spec=e}}function _r(e,t,n,r){return new cr(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(o=t.doc,i=t.charCategorizer(t.selection.main.head),(e,t,n,r)=>((r>e||r+n.length<t)&&(r=Math.max(0,e-2),n=o.sliceString(r,Math.min(o.length,t+2))),!(i(Pr(n,e-r))==s.D0.Word&&i(Ir(n,e-r))==s.D0.Word||i(Ir(n,t-r))==s.D0.Word&&i(Pr(n,t-r))==s.D0.Word))):void 0);var o,i}class Rr extends Dr{constructor(e){super(e)}nextMatch(e,t,n){let r=_r(this.spec,e,n,e.doc.length).nextOverlapping();return r.done&&(r=_r(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),o=_r(this.spec,e,n,r),i=null;for(;!o.nextOverlapping().done;)i=o.value;if(i)return i;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=_r(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 o=_r(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function Nr(e,t,n,r){return new dr(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(o(Pr(n.input,n.index))!=s.D0.Word||o(Ir(n.input,n.index))!=s.D0.Word)&&(o(Ir(n.input,n.index+n[0].length))!=s.D0.Word||o(Pr(n.input,n.index+n[0].length))!=s.D0.Word)):void 0},n,r);var o}function Pr(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 Dr{nextMatch(e,t,n){let r=Nr(this.spec,e,n,e.doc.length).next();return r.done&&(r=Nr(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let o=Math.max(t,n-1e4*r),i=Nr(this.spec,e,o,n),s=null;for(;!i.next().done;)s=i.value;if(s&&(o==t||s.from>o+10))return s;if(o==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=Nr(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 o=Nr(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const jr=s.Py.define(),Fr=s.Py.define(),Br=s.QQ.define({create:e=>new zr(Qr(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?Jr: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"}),Wr=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,o=n.visibleRanges,i=o.length;t<i;t++){let{from:s,to:a}=o[t];for(;t<i-1&&a>o[t+1].from-500;)a=o[++t].to;e.highlight(n.state,s,a,((e,t)=>{let o=n.state.selection.ranges.some((n=>n.from==e&&n.to==t));r.add(e,t,o?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 Vr=Ur(((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let o=s.jT.single(r.from,r.to),i=e.state.facet(Ar);return e.dispatch({selection:o,effects:[io(e,r),i.scrollToMatch(o.main)],userEvent:"select.search"}),!0})),qr=Ur(((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,o=t.prevMatch(n,r,r);if(!o)return!1;let i=s.jT.single(o.from,o.to),a=e.state.facet(Ar);return e.dispatch({selection:i,effects:[io(e,o),a.scrollToMatch(i.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))})),Yr=Ur(((e,{query:t})=>{let{state:n}=e,{from:r,to:o}=n.selection.main;if(n.readOnly)return!1;let i=t.nextMatch(n,r,r);if(!i)return!1;let l,c,u=[],h=[];if(i.from==r&&i.to==o&&(c=n.toText(t.getReplacement(i)),u.push({from:i.from,to:i.to,insert:c}),i=t.nextMatch(n,i.from,i.to),h.push(a.tk.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),i){let t=0==u.length||u[0].from>=i.to?0:i.to-i.from-c.length;l=s.jT.single(i.from-t,i.to-t),h.push(io(e,i)),h.push(n.facet(Ar).scrollToMatch(l.main))}return e.dispatch({changes:u,selection:l,effects:h,userEvent:"input.replace"}),!0})),Gr=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 Jr(e){return e.state.facet(Ar).createPanel(e)}function Qr(e,t){var n,r,o,i;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!==(o=null==t?void 0:t.literal)&&void 0!==o?o:l.literal,wholeWord:null!==(i=null==t?void 0:t.wholeWord)&&void 0!==i?i:l.wholeWord})}const Xr=e=>{let t=e.state.field(Br,!1);if(t&&t.panel){let n=(0,a.Sd)(e,Jr);if(!n)return!1;let r=n.dom.querySelector("[main-field]");if(r&&r!=e.root.activeElement){let n=Qr(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(Qr(e.state,t.query.spec)):s.Py.appendConfig.of(ao)]});return!0},Zr=e=>{let t=e.state.field(Br,!1);if(!t||!t.panel)return!1;let n=(0,a.Sd)(e,Jr);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Fr.of(!1)}),!0},eo=[{key:"Mod-f",run:Xr,scope:"editor search-panel"},{key:"F3",run:Vr,shift:qr,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Vr,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:o}=n.main,i=[],a=0;for(let t=new cr(e.doc,e.sliceDoc(r,o));!t.next().done;){if(i.length>1e3)return!1;t.value.from==r&&(a=i.length),i.push(s.jT.range(t.value.from,t.value.to))}return t(e.update({selection:s.jT.create(i,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 o=function(e,t){let{main:n,ranges:r}=e.selection,o=e.wordAt(n.head),i=o&&o.from==n.from&&o.to==n.to;for(let n=!1,o=new cr(e.doc,t,r[r.length-1].to);;){if(o.next(),!o.done){if(n&&r.some((e=>e.from==o.value.from)))continue;if(i){let t=e.wordAt(o.value.from);if(!t||t.from!=o.value.from||t.to!=o.value.to)continue}return o.value}if(n)return null;o=new cr(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!o&&(t(e.update({selection:e.selection.addRange(s.jT.range(o.from,o.to),!1),effects:a.tk.scrollIntoView(o.to)})),!0)},preventDefault:!0}];class to{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:no(e,"Find"),"aria-label":no(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:no(e,"Replace"),"aria-label":no(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",(()=>Vr(e)),[no(e,"next")]),n("prev",(()=>qr(e)),[no(e,"previous")]),n("select",(()=>Kr(e)),[no(e,"all")]),sr("label",null,[this.caseField,no(e,"match case")]),sr("label",null,[this.reField,no(e,"regexp")]),sr("label",null,[this.wordField,no(e,"by word")]),...e.state.readOnly?[]:[sr("br"),this.replaceField,n("replace",(()=>Yr(e)),[no(e,"replace")]),n("replaceAll",(()=>Gr(e)),[no(e,"replace all")])],sr("button",{name:"close",onclick:()=>Zr(e),"aria-label":no(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:Vr)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),Yr(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 no(e,t){return e.state.phrase(t)}const ro=30,oo=/[\s\.,:;?!]/;function io(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),o=e.state.doc.lineAt(n).to,i=Math.max(r.from,t-ro),s=Math.min(o,n+ro),l=e.state.sliceDoc(i,s);if(i!=r.from)for(let e=0;e<ro;e++)if(!oo.test(l[e+1])&&oo.test(l[e])){l=l.slice(e);break}if(s!=o)for(let e=l.length-1;e>l.length-ro;e--)if(!oo.test(l[e-1])&&oo.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 so=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"}}),ao=[Br,s.Wl.lowest(Wr),so];class lo{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),o=r.search(fo(e,!1));return o<0?null:{from:n+o,to:this.pos,text:r.slice(o)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function co(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 uo{constructor(e,t,n){this.completion=e,this.source=t,this.match=n}}function ho(e){return e.selection.main.head}function fo(e,t){var n;let{source:r}=e,o=t&&"^"!=r[0],i="$"!=r[r.length-1];return o||i?new RegExp(`${o?"^":""}(?:${r})${i?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const po=s.q6.define();function mo(e,t){const n=t.completion.apply||t.completion.label;let r=t.source;var o,i,a,l;"string"==typeof n?e.dispatch(Object.assign(Object.assign({},(o=e.state,i=n,a=r.from,l=r.to,Object.assign(Object.assign({},o.changeByRange((e=>{if(e==o.selection.main)return{changes:{from:a,to:l,insert:i},range:s.jT.cursor(a+i.length)};let t=l-a;return!e.empty||t&&o.sliceDoc(e.from-t,e.from)!=o.sliceDoc(a,l)?{range:e}:{changes:{from:e.from-t,to:e.from,insert:i},range:s.jT.cursor(e.from-t+i.length)}}))),{userEvent:"input.complete"}))),{annotations:po.of(t.completion)})):n(e,t.completion,r.from,r.to)}const go=new WeakMap;function yo(e){if(!Array.isArray(e))return e;let t=go.get(e);return t||go.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=co(t)+co(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(t);return e=>{let o=e.matchBefore(r);return o||e.explicit?{from:o?o.from:e.pos,options:t,validFor:n}:null}}(e)),t}class vo{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 o=e.slice(t,t+r),i=o.toUpperCase();this.folded.push((0,s.gm)(i==o?o.toLowerCase():i,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:o,byWord:i}=this;if(1==t.length){let r=(0,s.gm)(e,0),o=(0,s.nZ)(r),i=o==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;i+=-200}return[i,0,o]}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 o=0,i=Math.min(e.length,200);o<i&&c<l;){let i=(0,s.gm)(e,o);i!=t[c]&&i!=n[c]||(r[c++]=o),o+=(0,s.nZ)(i)}if(c<l)return null}let u=0,h=0,d=!1,f=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]&&(o[u++]=r),f<l&&(c==t[f]||c==n[f]?(0==f&&(p=r),m=r+1,f++):f=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&&(d=!0)?i[h++]=r:i.length&&(y=!1)),v=w,r+=(0,s.nZ)(c)}return h==l&&0==i[0]&&y?this.result((d?-200:0)-100,i,e):f==l&&0==p?[-200-e.length+(m==e.length?0:-100),0,m]:a>-1?[-700-e.length,a,a+this.pattern.length]:f==l?[-900-e.length,p,m]:h==l?this.result((d?-200:0)-100-700+(y?0:-1100),i,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[e-n.length],o=1;for(let e of t){let t=e+(this.astral?(0,s.nZ)((0,s.gm)(n,e)):1);o>1&&r[o-1]==e?r[o-1]=t:(r[o++]=e,r[o++]=t)}return r}}const bo=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=>wo(e(n),t(n)),optionClass:(e,t)=>n=>wo(e(n),t(n)),addToOptions:(e,t)=>e.concat(t)})});function wo(e,t){return e?t?e+" "+t:e:t}function xo(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 So{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:o}=n.open,i=e.state.facet(bo);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:o}=e,i=0;for(let e=1;e<n.length;){let t=n[e++],s=n[e++];t>i&&r.appendChild(document.createTextNode(o.slice(i,t)));let a=r.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(o.slice(t,s))),a.className="cm-completionMatchedText",i=s}return i<o.length&&r.appendChild(document.createTextNode(o.slice(i))),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))}(i),this.optionClass=i.optionClass,this.tooltipClass=i.tooltipClass,this.range=xo(r.length,o,i.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(t=>{for(let n,o=t.target;o&&o!=this.dom;o=o.parentNode)if("LI"==o.nodeName&&(n=/-(\d+)$/.exec(o.id))&&+n[1]<r.length)return mo(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 o=e.state.field(this.stateField),i=e.startState.field(this.stateField);this.updateTooltipClass(e.state),o!=i&&(this.updateSel(),(null===(t=o.open)||void 0===t?void 0:t.disabled)!=(null===(n=i.open)||void 0===n?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(r=o.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=xo(t.options.length,t.selected,this.view.state.facet(bo).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 o="string"==typeof r?document.createTextNode(r):r(n);if(!o)return;"then"in o?o.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(o)}}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(),o=this.space;if(!o){let e=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}if(r.top>Math.min(o.bottom,t.bottom)-10||r.bottom<Math.max(o.top,t.top)+10)return null;let i,s=this.view.textDirection==a.Nm.RTL,l=s,c=!1,u="",h="",d=t.left-o.left,f=o.right-t.right;if(l&&d<Math.min(n.width,f)?l=!1:!l&&f<Math.min(n.width,d)&&(l=!0),n.width<=(l?d:f))u=Math.max(o.top,Math.min(r.top,o.bottom-n.height))-t.top+"px",i=Math.min(400,l?d:f)+"px";else{c=!0,i=Math.min(400,(s?t.right:o.right-t.left)-30)+"px";let e=o.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:i,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 o=n.from;o<n.to;o++){let{completion:n,match:i}=e[o];const s=r.appendChild(document.createElement("li"));s.id=t+"-"+o,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,i);t&&s.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}}function ko(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class Co{constructor(e,t,n,r,o,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=o,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Co(this.options,Eo(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,o){let i=function(e,t){let n=[],r=0;for(let o of e)if(o.hasResult())if(!1===o.result.filter){let e=o.result.getMatch;for(let t of o.result.options){let i=[1e9-r++];if(e)for(let n of e(t))i.push(n);n.push(new uo(t,o,i))}}else{let e,r=new vo(t.sliceDoc(o.from,o.to));for(let t of o.result.options)(e=r.match(t.label))&&(null!=t.boost&&(e[0]+=t.boost),n.push(new uo(t,o,e)))}let o=[],i=null,s=t.facet(bo).compareCompletions;for(let e of n.sort(((e,t)=>t.match[0]-e.match[0]||s(e.completion,t.completion))))!i||i.label!=e.completion.label||i.detail!=e.completion.detail||null!=i.type&&null!=e.completion.type&&i.type!=e.completion.type||i.apply!=e.completion.apply?o.push(e):ko(e.completion)>ko(i)&&(o[o.length-1]=e),i=e.completion;return o}(e,t);if(!i.length)return r&&e.some((e=>1==e.state))?new Co(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=t.facet(bo).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;t<i.length;t++)if(i[t].completion==e){s=t;break}}return new Co(i,Eo(n,s),{pos:e.reduce(((e,t)=>t.hasResult()?Math.min(e,t.from):e),1e8),create:(a=Lo,e=>new So(e,a)),above:o.aboveCursor},r?r.timestamp:Date.now(),s,!1);var a}map(e){return new Co(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Mo{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Mo(Ao,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(bo),r=(n.override||t.languageDataAt("autocomplete",ho(t)).map(yo)).map((t=>(this.active.find((e=>e.source==t))||new Do(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 o=this.open;o&&e.docChanged&&(o=o.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 o=n==e.length,i=r==t.length;if(o||i)return o==i;if(e[n++].result!=t[r++].result)return!1}}(r,this.active)?o=Co.build(r,t,this.id,o,n):o&&o.disabled&&!r.some((e=>1==e.state))&&(o=null),!o&&r.every((e=>1!=e.state))&&r.some((e=>e.hasResult()))&&(r=r.map((e=>e.hasResult()?new Do(e.source,0):e)));for(let t of e.effects)t.is(Io)&&(o=o&&o.setSelected(t.value,this.id));return r==this.active&&o==this.open?this:new Mo(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Oo}}const Oo={"aria-autocomplete":"list"};function Eo(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const Ao=[];function To(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class Do{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=To(e),r=this;n?r=r.handleUserEvent(e,n,t):e.docChanged?r=r.handleChange(e):e.selection&&0!=r.state&&(r=new Do(r.source,0));for(let t of e.effects)if(t.is(Ro))r=new Do(r.source,1,t.value?ho(e.state):-1);else if(t.is(No))r=new Do(r.source,0);else if(t.is(Po))for(let e of t.value)e.source==r.source&&(r=e);return r}handleUserEvent(e,t,n){return"delete"!=t&&n.activateOnTyping?new Do(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(ho(e.startState))?new Do(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Do(this.source,this.state,e.mapPos(this.explicitPos))}}class _o extends Do{constructor(e,t,n,r,o){super(e,2,t),this.result=n,this.from=r,this.to=o}hasResult(){return!0}handleUserEvent(e,t,n){var r;let o=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),s=ho(e.state);if((this.explicitPos<0?s<=o:s<this.from)||s>i||"delete"==t&&ho(e.startState)==this.from)return new Do(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 o=t.sliceDoc(n,r);return"function"==typeof e?e(o,n,r,t):fo(e,!0).test(o)}(this.result.validFor,e.state,o,i)?new _o(this.source,l,this.result,o,i):this.result.update&&(a=this.result.update(this.result,o,i,new lo(e.state,s,l>=0)))?new _o(this.source,l,a,a.from,null!==(r=a.to)&&void 0!==r?r:ho(e.state)):new Do(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Do(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new _o(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const Ro=s.Py.define(),No=s.Py.define(),Po=s.Py.define({map:(e,t)=>e.map((e=>e.map(t)))}),Io=s.Py.define(),Lo=s.QQ.define({create:()=>Mo.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 jo(e,t="option"){return n=>{let r=n.state.field(Lo,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(bo).interactionDelay)return!1;let o,i=1;"page"==t&&(o=(0,a.gB)(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,l=r.open.selected>-1?r.open.selected+i*(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:Io.of(l)}),!0}}class Fo{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const Bo=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(Lo).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(Lo);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Lo)==t)return;let n=e.transactions.some((e=>(e.selection||e.docChanged)&&!To(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"==To(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(Lo);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=ho(t),r=new lo(t,n,e.explicitPos==n),o=new Fo(e,r);this.running.push(o),Promise.resolve(e.source(r)).then((e=>{o.context.aborted||(o.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:No.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(bo);for(let r=0;r<this.running.length;r++){let o=this.running[r];if(void 0===o.done)continue;if(this.running.splice(r--,1),o.done){let r=new _o(o.active.source,o.active.explicitPos,o.done,o.done.from,null!==(e=o.done.to)&&void 0!==e?e:ho(o.updates.length?o.updates[0].startState:this.view.state));for(let e of o.updates)r=r.update(e,n);if(r.hasResult()){t.push(r);continue}}let i=this.view.state.field(Lo).active.find((e=>e.source==o.active.source));if(i&&1==i.state)if(null==o.done){let e=new Do(o.active.source,0);for(let t of o.updates)e=e.update(t,n);1!=e.state&&t.push(e)}else this.startQuery(i)}t.length&&this.view.dispatch({effects:Po.of(t)})}},{eventHandlers:{blur(){let e=this.view.state.field(Lo,!1);e&&e.tooltip&&this.view.state.facet(bo).closeOnBlur&&this.view.dispatch({effects:No.of(null)})},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Ro.of(!1)})),20),this.composing=0}}}),zo=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"}}}),$o={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Ho=s.Py.define({map(e,t){let n=t.mapPos(e,-1,s.gc.TrackAfter);return null==n?void 0:n}}),Wo=s.Py.define({map:(e,t)=>t.mapPos(e)}),Uo=new class extends s.uU{};Uo.startSide=1,Uo.endSide=-1;const Vo=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(Ho)?e=e.update({add:[Uo.range(n.value,n.value+1)]}):n.is(Wo)&&(e=e.update({filter:e=>e!=n.value}));return e}}),qo="()[]{}<>";function Ko(e){for(let t=0;t<qo.length;t+=2)if(qo.charCodeAt(t)==e)return qo.charAt(t+1);return(0,s.bg)(e<128?e:e+1)}function Yo(e,t){return e.languageDataAt("closeBrackets",t)[0]||$o}const Go="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Jo=a.tk.inputHandler.of(((e,t,n,r)=>{if((Go?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(r.length>2||2==r.length&&1==(0,s.nZ)((0,s.gm)(r,0))||t!=o.from||n!=o.to)return!1;let i=function(e,t){let n=Yo(e,e.selection.main.head),r=n.brackets||$o.brackets;for(let o of r){let i=Ko((0,s.gm)(o,0));if(t==o)return i==o?ni(e,o,r.indexOf(o+o+o)>-1,n):ei(e,o,i,n.before||$o.before);if(t==i&&Xo(e,e.selection.main.from))return ti(e,0,i)}return null}(e.state,r);return!!i&&(e.dispatch(i),!0)})),Qo=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Yo(e,e.selection.main.head).brackets||$o.brackets,r=null,o=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 o of n)if(o==r&&Zo(e.doc,t.head)==Ko((0,s.gm)(o,0)))return{changes:{from:t.head-o.length,to:t.head+o.length},range:s.jT.cursor(t.head-o.length)}}return{range:r=t}}));return r||t(e.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function Xo(e,t){let n=!1;return e.field(Vo).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function Zo(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,s.nZ)((0,s.gm)(n,0)))}function ei(e,t,n,r){let o=null,i=e.changeByRange((i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:n,from:i.to}],effects:Ho.of(i.to+t.length),range:s.jT.range(i.anchor+t.length,i.head+t.length)};let a=Zo(e.doc,i.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:i.head},effects:Ho.of(i.head+t.length),range:s.jT.cursor(i.head+t.length)}:{range:o=i}}));return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function ti(e,t,n){let r=null,o=e.selection.ranges.map((t=>t.empty&&Zo(e.doc,t.head)==n?s.jT.cursor(t.head+n.length):r=t));return r?null:e.update({selection:s.jT.create(o,e.selection.mainIndex),scrollIntoView:!0,effects:e.selection.ranges.map((({from:e})=>Wo.of(e)))})}function ni(e,t,n,r){let o=r.stringPrefixes||$o.stringPrefixes,i=null,a=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Ho.of(r.to+t.length),range:s.jT.range(r.anchor+t.length,r.head+t.length)};let a,l=r.head,c=Zo(e.doc,l);if(c==t){if(ri(e,l))return{changes:{insert:t+t,from:l},effects:Ho.of(l+t.length),range:s.jT.cursor(l+t.length)};if(Xo(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:Wo.of(l)}}}else{if(n&&e.sliceDoc(l-2*t.length,l)==t+t&&(a=oi(e,l-2*t.length,o))>-1&&ri(e,a))return{changes:{insert:t+t+t+t,from:l},effects:Ho.of(l+t.length),range:s.jT.cursor(l+t.length)};if(e.charCategorizer(l)(c)!=s.D0.Word&&oi(e,l,o)>-1&&!function(e,t,n,r){let o=pe(e).resolveInner(t,-1),i=r.reduce(((e,t)=>Math.max(e,t.length)),0);for(let s=0;s<5;s++){let s=e.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),a=s.indexOf(n);if(!a||a>-1&&r.indexOf(s.slice(0,a))>-1){let t=o.firstChild;for(;t&&t.from==o.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=o.to==t&&o.parent;if(!l)break;o=l}return!1}(e,l,t,o))return{changes:{insert:t+t,from:l},effects:Ho.of(l+t.length),range:s.jT.cursor(l+t.length)}}return{range:i=r}}));return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function ri(e,t){let n=pe(e).resolveInner(t+1);return n.parent&&n.from==t}function oi(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=s.D0.Word)return t;for(let o of n){let n=t-o.length;if(e.sliceDoc(n,t)==o&&r(e.sliceDoc(n-1,n))!=s.D0.Word)return n}return-1}const ii=[{key:"Ctrl-Space",run:e=>!!e.state.field(Lo,!1)&&(e.dispatch({effects:Ro.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(Lo,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:No.of(null)}),0))}},{key:"ArrowDown",run:jo(!0)},{key:"ArrowUp",run:jo(!1)},{key:"PageDown",run:jo(!0,"page")},{key:"PageUp",run:jo(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(Lo,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||Date.now()-t.open.timestamp<e.state.facet(bo).interactionDelay||(t.open.disabled||mo(e,t.open.options[t.open.selected]),0))}}],si=s.Wl.highest(a.$f.computeN([bo],(e=>e.facet(bo).defaultKeymap?[ii]:[])));class ai{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class li{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,o=n.facet(Si).markerFilter;o&&(r=o(r));let i=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 Mi(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 li(i,t,ci(i))}}function ci(e,t=null,n=0){let r=null;return e.between(n,1e9,((e,n,{spec:o})=>{if(!t||o.diagnostic==t)return r=new ai(e,n,o.diagnostic),!1})),r}function ui(e,t){return!(!e.effects.some((e=>e.is(di)))&&!e.changes.touchesRange(t.pos))}function hi(e,t){return e.field(mi,!1)?t:t.concat(s.Py.appendConfig.of([mi,a.tk.decorations.compute([mi],(e=>{let{selected:t,panel:n}=e.field(mi);return t&&n&&t.from!=t.to?a.p.set([gi.range(t.from,t.to)]):a.p.none})),(0,a.bF)(yi,{hideOn:ui}),Ti]))}const di=s.Py.define(),fi=s.Py.define(),pi=s.Py.define(),mi=s.QQ.define({create:()=>new li(a.p.none,null,null),update(e,t){if(t.docChanged){let n=e.diagnostics.map(t.changes),r=null;if(e.selected){let o=t.changes.mapPos(e.selected.from,1);r=ci(n,e.selected.diagnostic,o)||ci(n,null,o)}e=new li(n,e.panel,r)}for(let n of t.effects)n.is(di)?e=li.init(n.value,e.panel,t.state):n.is(fi)?e=new li(e.diagnostics,n.value?Ei.open:null,e.selected):n.is(pi)&&(e=new li(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))]}),gi=a.p.mark({class:"cm-lintRange cm-lintRange-active"});function yi(e,t,n){let{diagnostics:r}=e.state.field(mi),o=[],i=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))&&(o.push(a.diagnostic),i=Math.min(e,i),s=Math.max(r,s))}));let a=e.state.facet(Si).tooltipFilter;return a&&(o=a(o)),o.length?{pos:i,end:s,above:e.state.doc.lineAt(i).to<s,create:()=>({dom:vi(e,o)})}:null}function vi(e,t){return sr("ul",{class:"cm-tooltip-lint"},t.map((t=>Ci(e,t,!1))))}const bi=e=>{let t=e.state.field(mi,!1);return!(!t||!t.panel||(e.dispatch({effects:fi.of(!1)}),0))},wi=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(mi,!1);t&&t.panel||e.dispatch({effects:hi(e.state,[fi.of(!0)])});let n=(0,a.Sd)(e,Ei.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(mi,!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))}}],xi=a.lg.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(Si);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(Si);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:hi(e,[di.of(t)])}}(this.view.state,n))}),(e=>{(0,a.OO)(this.view.state,e)}))}}update(e){let t=e.state.facet(Si);(e.docChanged||t!=e.startState.facet(Si)||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)}}),Si=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:xi});function ki(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 Ci(e,t,n){var r;let o=n?ki(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 i=!1,s=r=>{if(r.preventDefault(),i)return;i=!0;let o=ci(e.state.field(mi).diagnostics,t);o&&n.apply(e,o.from,o.to)},{name:a}=n,l=o[r]?a.indexOf(o[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 "${o[r]})"`}.`},c)})),t.source&&sr("div",{class:"cm-diagnosticSource"},t.source))}class Mi 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 Oi{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Ci(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ei{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)bi(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=ki(n.actions);for(let o=0;o<r.length;o++)if(r[o].toUpperCase().charCodeAt(0)==t.keyCode){let t=ci(this.view.state.field(mi).diagnostics,n);t&&n.actions[o].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:()=>bi(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(mi).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(mi),n=0,r=!1,o=null;for(e.between(0,this.view.state.doc.length,((e,i,{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 Oi(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"),o=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 Oi(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.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=ci(this.view.state.field(mi).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:pi.of(t)})}static open(e){return new Ei(e)}}function Ai(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 Ti=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:Ai("#d11")},".cm-lintRange-warning":{backgroundImage:Ai("orange")},".cm-lintRange-info":{backgroundImage:Ai("#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 Di 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:vi(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,function(e,t){let n=r=>{let o=t.getBoundingClientRect();if(!(r.clientX>o.left-10&&r.clientX<o.right+10&&r.clientY>o.top-10&&r.clientY<o.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:o}=e.state.facet(lintGutterConfig),i=setTimeout(r,o);t.onmouseout=()=>{clearTimeout(i),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(i),setTimeout(r,o)}}(e,t,n)),t}}var _i=function(e){void 0===e&&(e={});var t=[];!1!==e.closeBracketsKeymap&&(t=t.concat(Qo)),!1!==e.defaultKeymap&&(t=t.concat(or)),!1!==e.searchKeymap&&(t=t.concat(eo)),!1!==e.historyKeymap&&(t=t.concat(an)),!1!==e.foldKeymap&&(t=t.concat(Ge)),!1!==e.completionKeymap&&(t=t.concat(ii)),!1!==e.lintKeymap&&(t=t.concat(wi));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[Wt,Ht.of(e),a.tk.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?Vt:"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),o=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 o of e.viewportLineBlocks){let i=Ve(e.state,o.from,o.to)?r:Be(e.state,o.from,o.to)?n:null;i&&t.add(o.from,o.from,i)}return t.finish()}}),{domEventHandlers:i}=t;return[o,(0,a.v5)({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(o))||void 0===t?void 0:t.markers)||s.Xs.empty},initialSpacer:()=>new tt(t,!1),domEventHandlers:Object.assign(Object.assign({},i),{click:(e,t,n)=>{if(i.click&&i.click(e,t,n))return!0;let r=Ve(e.state,t.from,t.to);if(r)return e.dispatch({effects:He.of(r)}),!0;let o=Be(e.state,t.from,t.to);return!!o&&(e.dispatch({effects:$e.of(o)}),!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,o=n.lineAt(r);if(r>o.from+200)return e;let i=n.sliceString(o.from,r);if(!t.some((e=>e.test(i))))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],o=Ee(s,n);r!=o&&l.push({from:t.from,to:t.from+r.length,insert:o})}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([Jo,Vo]),!1!==e.autocompletion&&n.push(function(e={}){return[Lo,bo.of(e),Bo,si,zo]}()),!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,Or];return t}()),e.tabSize&&"number"==typeof e.tabSize&&n.push(Me.of(" ".repeat(e.tabSize))),n.concat([a.$f.of(t.flat())]).filter(Boolean)};const Ri="#e06c75",Ni="#abb2bf",Pi="#7d8799",Ii="#d19a66",Li="#2c313a",ji="#282c34",Fi="#353a42",Bi="#528bff",zi=[a.tk.theme({"&":{color:Ni,backgroundColor:ji},".cm-content":{caretColor:Bi},".cm-cursor, .cm-dropCursor":{borderLeftColor:Bi},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:Ni},".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:ji,color:Pi,border:"none"},".cm-activeLineGutter":{backgroundColor:Li},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Fi},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Fi,borderBottomColor:Fi},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Li,color:Ni}}},{dark:!0}),at(rt.define([{tag:ae.keyword,color:"#c678dd"},{tag:[ae.name,ae.deleted,ae.character,ae.propertyName,ae.macroName],color:Ri},{tag:[ae.function(ae.variableName),ae.labelName],color:"#61afef"},{tag:[ae.color,ae.constant(ae.name),ae.standard(ae.name)],color:Ii},{tag:[ae.definition(ae.name),ae.separator],color:Ni},{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:Pi},{tag:ae.strong,fontWeight:"bold"},{tag:ae.emphasis,fontStyle:"italic"},{tag:ae.strikethrough,textDecoration:"line-through"},{tag:ae.link,color:Pi,textDecoration:"underline"},{tag:ae.heading,fontWeight:"bold",color:Ri},{tag:[ae.atom,ae.bool,ae.special(ae.variableName)],color:Ii},{tag:[ae.processingInstruction,ae.string,ae.inserted],color:"#98c379"},{tag:ae.invalid,color:"#ffffff"}]))];var $i=s.q6.define();function Hi(e){var{value:t,selection:n,onChange:r,onStatistics:o,onCreateEditor:l,onUpdate:c,extensions:u=[],autoFocus:h,theme:d="light",height:f="",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:M}=e,[O,E]=(0,i.useState)(),[A,T]=(0,i.useState)(),[D,_]=(0,i.useState)(),R=a.tk.theme({"&":{height:f,minHeight:p,maxHeight:m,width:y,minWidth:v,maxWidth:b}}),N=a.tk.updateListener.of((e=>{if(e.docChanged&&"function"==typeof r&&!e.transactions.some((e=>e.annotation($i)))){var t=e.state.doc.toString();r(t,e)}o&&o((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))})),P=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:o="light",placeholder:i="",basicSetup:l=!0}=e,c=[],u=a.tk.theme({"&":{backgroundColor:"#fff"}},{dark:!1});switch(t&&c.unshift(a.$f.of([ir])),l&&("boolean"==typeof l?c.unshift(_i()):c.unshift(_i(l))),i&&c.unshift((0,a.W$)(i)),o){case"light":c.push(u);break;case"dark":c.push(zi);break;case"none":break;default:c.push(o)}return!1===n&&c.push(a.tk.editable.of(!1)),r&&c.push(s.yy.readOnly.of(!0)),[...c]}({theme:d,editable:w,readOnly:x,placeholder:g,indentWithTab:S,basicSetup:k}),I=[N,R,...P];return c&&"function"==typeof c&&I.push(a.tk.updateListener.of(c)),I=I.concat(u),(0,i.useEffect)((()=>{if(O&&!D){var e={doc:t,selection:n,extensions:I},r=M?s.yy.fromJSON(M.json,e,M.fields):s.yy.create(e);if(_(r),!A){var o=new a.tk({state:r,parent:O,root:C});T(o),l&&l(o,r)}}return()=>{A&&(_(void 0),T(void 0))}}),[O,D]),(0,i.useEffect)((()=>E(e.container)),[e.container]),(0,i.useEffect)((()=>()=>{A&&(A.destroy(),T(void 0))}),[A]),(0,i.useEffect)((()=>{h&&A&&A.focus()}),[h,A]),(0,i.useEffect)((()=>{A&&A.dispatch({effects:s.Py.reconfigure.of(I)})}),[d,u,f,p,m,y,v,b,g,w,x,S,k,r,c]),(0,i.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:[$i.of(!0)]})}}),[t,A]),{state:D,setState:_,view:A,setView:T,container:O,setContainer:E}}var Wi=n(5893),Ui=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Vi=(0,i.forwardRef)(((e,t)=>{var{className:n,value:s="",selection:a,extensions:l=[],onChange:c,onStatistics:u,onCreateEditor:h,onUpdate:d,autoFocus:f,theme:p="light",height:m,minHeight:g,maxHeight:y,width:v,minWidth:b,maxWidth:w,basicSetup:x,placeholder:S,indentWithTab:k,editable:C,readOnly:M,root:O,initialState:E}=e,A=(0,o.Z)(e,Ui),T=(0,i.useRef)(null),{state:D,view:_,container:R}=Hi({container:T.current,root:O,value:s,autoFocus:f,theme:p,height:m,minHeight:g,maxHeight:y,width:v,minWidth:b,maxWidth:w,basicSetup:x,placeholder:S,indentWithTab:k,editable:C,readOnly:M,selection:a,onChange:c,onStatistics:u,onCreateEditor:h,onUpdate:d,extensions:l,initialState:E});if((0,i.useImperativeHandle)(t,(()=>({editor:T.current,state:D,view:_})),[T,R,D,_]),"string"!=typeof s)throw new Error("value must be typeof string but got "+typeof s);var N="string"==typeof p?"cm-theme-"+p:"cm-theme";return(0,Wi.jsx)("div",(0,r.Z)({ref:T,className:N+(n?" "+n:"")},A))}));Vi.displayName="CodeMirror";const qi=Vi},8363:(e,t)=>{"use strict";t.Z=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0}},1924:(e,t,n)=>{"use strict";var r=n(210),o=n(5559),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},5559:(e,t,n)=>{"use strict";var r=n(8612),o=n(210),i=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),a=o("%Reflect.apply%",!0)||r.call(s,i),l=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),u=o("%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,i,arguments)};c?c(e.exports,"apply",{value:h}):e.exports.apply=h},4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var s=o.apply(null,n);s&&e.push(s)}}else if("object"===i){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?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},8687:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(8081),o=n.n(r),i=n(3645),s=n.n(i)()(o());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},7584:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(8081),o=n.n(r),i=n(3645),s=n.n(i)()(o());s.push([e.id,'/* Variables declaration */\n/* prettier-ignore */\n.rdp-root {\n --rdp-accent-color: blue; /* The accent color used for selected days and UI elements. */\n --rdp-accent-background-color: #f0f0ff; /* The accent background color used for selected days and UI elements. */\n --rdp-font-family: system-ui; /* The font family used by the calendar. Note that `inherit`does not work here. */\n\n --rdp-day-font: inherit; /* The font used for the day cells. */\n --rdp-day-height: 2.75rem; /* The height of the day cells. */\n --rdp-day-width: 2.75rem; /* The width of the day cells. */\n \n --rdp-day_button-border-radius: 100%; /* The border radius of the day cells. */\n --rdp-day_button-border: 2px solid transparent; /* The border of the day cells. */\n --rdp-day_button-height: var(--rdp-day-height); /* The height of the day cells. */\n --rdp-day_button-width: var(--rdp-day-width); /* The width of the day cells. */\n \n --rdp-selected-border: 2px solid var(--rdp-accent-color); /* The border of the selected days. */\n --rdp-selected-font: bold large var(--rdp-font-family); /* The font of the selected days. */\n --rdp-disabled-opacity: 0.5; /* The opacity of the disabled days. */\n --rdp-outside-opacity: 0.75; /* The opacity of the days outside the current month. */\n --rdp-today-color: var(--rdp-accent-color); /* The color of the today\'s date. */\n \n --rdp-dropdown-gap: 0.5rem;/* The gap between the dropdowns used in the month captons. */\n \n --rdp-month_caption-font: bold larger var(--rdp-font-family); /* The font of the month caption. */\n --rdp-months-gap: 2rem; /* The gap between the months in the multi-month view. */\n \n --rdp-nav_button-disabled-opacity: 0.5; /* The opacity of the disabled navigation buttons. */\n --rdp-nav_button-height: 2.25rem; /* The height of the navigation buttons. */\n --rdp-nav_button-width: 2.25rem; /* The width of the navigation buttons. */\n --rdp-nav-height: 2.75rem; /* The height of the navigation bar. */\n \n --rdp-range_middle-background-color: var(--rdp-accent-background-color); /* The color of the background for days in the middle of a range. */\n --rdp-range_middle-font: normal medium var(--rdp-font-family); /* The font for days in the middle of a range. */\n --rdp-range_middle-foreground-color: white; /* The font for days in the middle of a range. */\n --rdp-range_middle-color: inherit;/* The color of the range text. */\n \n --rdp-range_start-color: white; /* The color of the range text. */\n --rdp-range_start-background: linear-gradient(var(--rdp-gradient-direction), transparent 50%, var(--rdp-range_middle-background-color) 50%); /* Used for the background of the start of the selected range. */\n --rdp-range_start-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the start of the selected range. */\n \n --rdp-range_end-background: linear-gradient(var(--rdp-gradient-direction), var(--rdp-range_middle-background-color) 50%, transparent 50%); /* Used for the background of the end of the selected range. */\n --rdp-range_end-color: white;/* The color of the range text. */\n --rdp-range_end-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the end of the selected range. */\n \n --rdp-week_number-border-radius: 100%; /* The border radius of the week number. */\n --rdp-week_number-border: 2px solid transparent; /* The border of the week number. */\n --rdp-week_number-font: 400 small var(--rdp-font-family); /* The font of the week number cells. */\n --rdp-week_number-height: var(--rdp-day-height); /* The height of the week number cells. */\n --rdp-week_number-opacity: 0.75; /* The opacity of the week number. */\n --rdp-week_number-width: var(--rdp-day-width); /* The width of the week number cells. */\n --rdp-weeknumber-text-align: center; /* The text alignment of the weekday cells. */\n\n --rdp-weekday-font: 500 smaller var(--rdp-font-family); /* The font of the weekday. */\n --rdp-weekday-opacity: 0.75; /* The opacity of the weekday. */\n --rdp-weekday-padding: 0.5rem 0rem; /* The padding of the weekday. */\n --rdp-weekday-text-align: center; /* The text alignment of the weekday cells. */\n\n --rdp-gradient-direction: 90deg;\n}\n\n.rdp-root[dir="rtl"] {\n --rdp-gradient-direction: -90deg;\n}\n\n/* Root of the component. */\n.rdp-root {\n position: relative; /* Required to position the navigation toolbar. */\n box-sizing: border-box;\n}\n\n.rdp-root * {\n box-sizing: border-box;\n}\n\n.rdp-day {\n width: var(--rdp-day-width);\n height: var(--rdp-day-height);\n font: var(--rdp-day-font);\n text-align: center;\n}\n\n.rdp-day_button {\n background: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n font: inherit;\n color: inherit;\n justify-content: center;\n align-items: center;\n display: flex;\n\n width: var(--rdp-day_button-width);\n height: var(--rdp-day_button-height);\n border: var(--rdp-day_button-border);\n border-radius: var(--rdp-day_button-border-radius);\n}\n\n.rdp-day_button:disabled {\n cursor: revert;\n}\n\n.rdp-caption_label {\n z-index: 1;\n\n position: relative;\n display: inline-flex;\n align-items: center;\n\n white-space: nowrap;\n border: 0;\n}\n\n.rdp-button_next,\n.rdp-button_previous {\n border: none;\n background: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n font: inherit;\n color: inherit;\n -moz-appearance: none;\n -webkit-appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n appearance: none;\n\n width: var(--rdp-nav_button-width);\n height: var(--rdp-nav_button-height);\n}\n\n.rdp-button_next:disabled,\n.rdp-button_previous:disabled {\n cursor: revert;\n\n opacity: var(--rdp-nav_button-disabled-opacity);\n}\n\n.rdp-chevron {\n display: inline-block;\n fill: var(--rdp-accent-color);\n}\n\n.rdp-root[dir="rtl"] .rdp-nav .rdp-chevron {\n transform: rotate(180deg);\n}\n\n.rdp-root[dir="rtl"] .rdp-nav .rdp-chevron {\n transform: rotate(180deg);\n transform-origin: 50%;\n}\n\n.rdp-dropdowns {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: var(--rdp-dropdown-gap);\n}\n.rdp-dropdown {\n z-index: 2;\n\n /* Reset */\n opacity: 0;\n appearance: none;\n position: absolute;\n inset-block-start: 0;\n inset-block-end: 0;\n inset-inline-start: 0;\n width: 100%;\n margin: 0;\n padding: 0;\n cursor: inherit;\n border: none;\n line-height: inherit;\n}\n\n.rdp-dropdown_root {\n position: relative;\n display: inline-flex;\n align-items: center;\n}\n\n.rdp-dropdown_root[data-disabled="true"] .rdp-chevron {\n opacity: var(--rdp-disabled-opacity);\n}\n\n.rdp-month_caption {\n display: flex;\n align-content: center;\n height: var(--rdp-nav-height);\n font: var(--rdp-month_caption-font);\n}\n\n.rdp-months {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: var(--rdp-months-gap);\n max-width: fit-content;\n}\n\n.rdp-month_grid {\n border-collapse: collapse;\n}\n\n.rdp-nav {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n\n display: flex;\n align-items: center;\n\n height: var(--rdp-nav-height);\n}\n\n.rdp-weekday {\n opacity: var(--rdp-weekday-opacity);\n padding: var(--rdp-weekday-padding);\n font: var(--rdp-weekday-font);\n text-align: var(--rdp-weekday-text-align);\n text-transform: var(--rdp-weekday-text-transform);\n}\n\n.rdp-week_number {\n opacity: var(--rdp-week_number-opacity);\n font: var(--rdp-week_number-font);\n height: var(--rdp-week_number-height);\n width: var(--rdp-week_number-width);\n border: var(--rdp-week_number-border);\n border-radius: var(--rdp-week_number-border-radius);\n text-align: var(--rdp-weeknumber-text-align);\n}\n\n/* DAY MODIFIERS */\n.rdp-today:not(.rdp-outside) {\n color: var(--rdp-today-color);\n}\n\n.rdp-selected {\n font: var(--rdp-selected-font);\n}\n\n.rdp-selected .rdp-day_button {\n border: var(--rdp-selected-border);\n}\n\n.rdp-outside {\n opacity: var(--rdp-outside-opacity);\n}\n\n.rdp-disabled {\n opacity: var(--rdp-disabled-opacity);\n}\n\n.rdp-hidden {\n visibility: hidden;\n color: var(--rdp-range_start-color);\n}\n\n.rdp-range_start {\n background: var(--rdp-range_start-background);\n}\n\n.rdp-range_start .rdp-day_button {\n background-color: var(--rdp-range_start-date-background-color);\n color: var(--rdp-range_start-color);\n}\n\n.rdp-range_middle {\n background-color: var(--rdp-range_middle-background-color);\n font: var(--rdp-range_middle-font);\n}\n\n.rdp-range_middle .rdp-day_button {\n border-color: transparent;\n border: unset;\n border-radius: unset;\n color: var(--rdp-range_middle-color);\n}\n\n.rdp-range_end {\n background: var(--rdp-range_end-background);\n color: var(--rdp-range_end-color);\n}\n\n.rdp-range_end .rdp-day_button {\n color: var(--rdp-range_start-color);\n background-color: var(--rdp-range_end-date-background-color);\n}\n\n.rdp-range_start.rdp-range_end {\n background: revert;\n}\n\n.rdp-focusable {\n cursor: pointer;\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,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},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 o(e){return n.push(e),t}function i(){return n[r++]}return{tokenize:function(t){return t.replace(e,o)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),i)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",o="(?:[0-9]*\\.[0-9]+|[0-9]+)",i="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=o+"(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|-?(?:[_a-z]|"+n+"|"+c+")"+u+"*)?",d="((?:-?"+h+")|(?:inherit|auto))",f="(#?"+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("("+i+")ltr","gi"),M=new RegExp("("+i+")rtl","gi"),O=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"),D=new RegExp(a+"(ltr)"+v,"gi"),_=new RegExp(a+"(rtl)"+v,"gi"),R=new RegExp(a+"([ns]?)e-resize","gi"),N=new RegExp(a+"([ns]?)w-resize","gi"),P=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+d+"(\\s+)"+d+"(\\s+)"+d+"(\\s+)"+d+b,"gi"),I=new RegExp("((?:-color|border-style)\\s*:\\s*)"+f+"(\\s+)"+f+"(\\s+)"+f+"(\\s+)"+f+b,"gi"),L=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+h+")","gi"),j=new RegExp("(background-position-x\\s*:\\s*)(-?"+o+"%)","gi"),F=new RegExp("(border-radius\\s*:\\s*)"+d+"(?:(?:\\s+"+d+")(?:\\s+"+d+")?(?:\\s+"+d+")?)?(?:(?:(?:\\s*\\/\\s*)"+d+")(?:\\s+"+d+")?(?:\\s+"+d+")?(?:\\s+"+d+")?)?"+b,"gi"),B=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+d,"gi"),z=new RegExp("(text-shadow\\s*:\\s*)"+d+"(\\s*)"+f,"gi"),$=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+d,"gi"),H=new RegExp("(text-shadow\\s*:\\s*)"+d,"gi"),W=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+d+"(\\s*\\))","gi"),U=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+d+"((?:\\s*,\\s*"+d+"){0,2}\\s*\\))","gi");function V(e,t,n){var r,o;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(o=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(o)+"%"):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})),o=n.slice(6,10).filter((function(e){return e})),i=n[10]||"";return t+(o.length?q(r)+" / "+q(o):q(r))+i}function Y(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function G(e,t,n){return t+Y(n)}function J(e,t,n,r,o){return t+n+Y(r)+o}function Q(e,t,n,r,o){return t+n+r+Y(o)}return{transform:function(n,o){var i=new r(S,"`NOFLIP_SINGLE`"),s=new r(k,"`NOFLIP_CLASS`"),a=new r(x,t);return n=a.tokenize(s.tokenize(i.tokenize(n.replace("`","%60")))),o.transformDirInUrl&&(n=n.replace(D,"$1"+e).replace(_,"$1ltr").replace(w,"rtl")),o.transformEdgeInUrl&&(n=n.replace(A,"$1"+e).replace(T,"$1left").replace(w,"right")),n=n.replace(C,"$1"+e).replace(M,"$1ltr").replace(w,"rtl").replace(O,"$1"+e).replace(E,"$1left").replace(w,"right").replace(R,"$1$2"+e).replace(N,"$1$2e-resize").replace(w,"w-resize").replace(F,K).replace(B,G).replace(z,Q).replace($,Q).replace(H,G).replace(W,J).replace(U,J).replace(P,"$1$2$3$8$5$6$7$4$9").replace(I,"$1$2$3$8$5$6$7$4$9").replace(L,V).replace(j,V),i.detokenize(s.detokenize(a.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var o;return"object"==typeof t?o=t:(o={},"boolean"==typeof t&&(o.transformDirInUrl=t),"boolean"==typeof r&&(o.transformEdgeInUrl=r)),n.transform(e,o)}:"undefined"!=typeof window&&(window.cssjanus=n)},6695:(e,t,n)=>{"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function o(e){return o="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},o(e)}function i(e){return i="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},i(e)}function s(e){r(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===i(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function a(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function l(e){r(1,arguments);var t=s(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t}function c(e){r(1,arguments);var t=s(e),n=t.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(n+1,0,4),o.setUTCHours(0,0,0,0);var i=l(o),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var c=l(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}n.d(t,{Z:()=>Y});var u={};function h(){return u}function d(e,t){var n,o,i,l,c,u,d,f;r(1,arguments);var p=h(),m=a(null!==(n=null!==(o=null!==(i=null!==(l=null==t?void 0:t.weekStartsOn)&&void 0!==l?l:null==t||null===(c=t.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:p.weekStartsOn)&&void 0!==o?o:null===(d=p.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=s(e),y=g.getUTCDay(),v=(y<m?7:0)+y-m;return g.setUTCDate(g.getUTCDate()-v),g.setUTCHours(0,0,0,0),g}function f(e,t){var n,o,i,l,c,u,f,p;r(1,arguments);var m=s(e),g=m.getUTCFullYear(),y=h(),v=a(null!==(n=null!==(o=null!==(i=null!==(l=null==t?void 0:t.firstWeekContainsDate)&&void 0!==l?l:null==t||null===(c=t.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==i?i:y.firstWeekContainsDate)&&void 0!==o?o:null===(f=y.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(g+1,0,v),b.setUTCHours(0,0,0,0);var w=d(b,t),x=new Date(0);x.setUTCFullYear(g,0,v),x.setUTCHours(0,0,0,0);var S=d(x,t);return m.getTime()>=w.getTime()?g+1:m.getTime()>=S.getTime()?g:g-1}function p(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}const m=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return p("yy"===t?r%100:r,t.length)},g=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):p(n+1,2)},y=function(e,t){return p(e.getUTCDate(),t.length)},v=function(e,t){return p(e.getUTCHours()%12||12,t.length)},b=function(e,t){return p(e.getUTCHours(),t.length)},w=function(e,t){return p(e.getUTCMinutes(),t.length)},x=function(e,t){return p(e.getUTCSeconds(),t.length)},S=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return p(Math.floor(r*Math.pow(10,n-3)),t.length)};var k={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return m(e,t)},Y:function(e,t,n,r){var o=f(e,r),i=o>0?o:1-o;return"YY"===t?p(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):p(i,t.length)},R:function(e,t){return p(c(e),t.length)},u:function(e,t){return p(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return p(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return p(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return g(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return p(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){var i=function(e,t){r(1,arguments);var n=s(e),o=d(n,t).getTime()-function(e,t){var n,o,i,s,l,c,u,p;r(1,arguments);var m=h(),g=a(null!==(n=null!==(o=null!==(i=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t||null===(l=t.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==i?i:m.firstWeekContainsDate)&&void 0!==o?o:null===(u=m.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1),y=f(e,t),v=new Date(0);return v.setUTCFullYear(y,0,g),v.setUTCHours(0,0,0,0),d(v,t)}(n,t).getTime();return Math.round(o/6048e5)+1}(e,o);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):p(i,t.length)},I:function(e,t,n){var o=function(e){r(1,arguments);var t=s(e),n=l(t).getTime()-function(e){r(1,arguments);var t=c(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),l(n)}(t).getTime();return Math.round(n/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(o,{unit:"week"}):p(o,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):y(e,t)},D:function(e,t,n){var o=function(e){r(1,arguments);var t=s(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=n-t.getTime();return Math.floor(o/864e5)+1}(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):p(o,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return p(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return p(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return p(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return v(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):b(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):p(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):p(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):w(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):x(e,t)},S:function(e,t){return S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return M(o);case"XXXX":case"XX":return O(o);default:return O(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return M(o);case"xxxx":case"xx":return O(o);default:return O(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+C(o,":");default:return"GMT"+O(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+C(o,":");default:return"GMT"+O(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return p(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return p((r._originalDate||e).getTime(),t.length)}};function C(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var s=t||"";return n+String(o)+s+p(i,2)}function M(e,t){return e%60==0?(e>0?"-":"+")+p(Math.abs(e)/60,2):O(e,t)}function O(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+p(Math.floor(o/60),2)+n+p(o%60,2)}const E=k;var A=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},T=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},D={p:T,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return A(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",A(o,t)).replace("{{time}}",T(i,t))}};const _=D;var R=["D","DD"],N=["YY","YYYY"];function P(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var I={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function L(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var j,F={date:L({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:L({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:L({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},B={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function z(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var s=e.defaultWidth,a=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function $(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var s,a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].test(a))return n}(l):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&e[n].test(a))return n}(l);return s=e.valueCallback?e.valueCallback(c):c,{value:s=n.valueCallback?n.valueCallback(s):s,rest:t.slice(a.length)}}}const H={code:"en-US",formatDistance:function(e,t,n){var r,o=I[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:F,formatRelative:function(e,t,n,r){return B[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:z({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:z({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:z({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:z({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:z({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(j={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(j.matchPattern);if(!n)return null;var r=n[0],o=e.match(j.parsePattern);if(!o)return null;var i=j.valueCallback?j.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:$({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:$({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:$({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:$({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:$({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var W=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,U=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,V=/^'([^]*?)'?$/,q=/''/g,K=/[a-zA-Z]/;function Y(e,t,n){var i,l,c,u,d,f,p,m,g,y,v,b,w,x,S,k,C,M;r(2,arguments);var O=String(t),A=h(),T=null!==(i=null!==(l=null==n?void 0:n.locale)&&void 0!==l?l:A.locale)&&void 0!==i?i:H,D=a(null!==(c=null!==(u=null!==(d=null!==(f=null==n?void 0:n.firstWeekContainsDate)&&void 0!==f?f:null==n||null===(p=n.locale)||void 0===p||null===(m=p.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==d?d:A.firstWeekContainsDate)&&void 0!==u?u:null===(g=A.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.firstWeekContainsDate)&&void 0!==c?c:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var I=a(null!==(v=null!==(b=null!==(w=null!==(x=null==n?void 0:n.weekStartsOn)&&void 0!==x?x:null==n||null===(S=n.locale)||void 0===S||null===(k=S.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:A.weekStartsOn)&&void 0!==b?b:null===(C=A.locale)||void 0===C||null===(M=C.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==v?v:0);if(!(I>=0&&I<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var L=s(e);if(!function(e){if(r(1,arguments),!function(e){return r(1,arguments),e instanceof Date||"object"===o(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=s(e);return!isNaN(Number(t))}(L))throw new RangeError("Invalid time value");var j=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(L),F=function(e,t){return r(2,arguments),function(e,t){r(2,arguments);var n=s(e).getTime(),o=a(t);return new Date(n+o)}(e,-a(t))}(L,j),B={firstWeekContainsDate:D,weekStartsOn:I,locale:T,_originalDate:L};return O.match(U).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,_[t])(e,T.formatLong):e})).join("").match(W).map((function(r){if("''"===r)return"'";var o,i,s=r[0];if("'"===s)return(i=(o=r).match(V))?i[1].replace(q,"'"):o;var a,l=E[s];if(l)return null!=n&&n.useAdditionalWeekYearTokens||(a=r,-1===N.indexOf(a))||P(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==R.indexOf(e)}(r)||P(r,t,String(e)),l(F,r,T.localize,B);if(s.match(K))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return r})).join("")}},296:e=>{function t(e,t,n){var r,o,i,s,a;function l(){var c=Date.now()-s;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(a=e.apply(i,o),i=o=null))}null==t&&(t=100);var c=function(){i=this,o=arguments,s=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(a=e.apply(i,o),i=o=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(i,o),i=o=null,clearTimeout(r),r=null)},c}t.debounce=t,e.exports=t},251:(e,t,n)=>{"use strict";var r=n(3533),o=n(1924),i=n(3290),s=n(210),a=n(3216),l=n(7478),c=n(609),u=n(2584),h=n(5826),d=n(635),f=n(8923),p=n(8420),m=n(2579),g=n(2215),y=n(3679),v=n(3483),b=n(6430),w=o("ArrayBuffer.prototype.byteLength",!0)||function(e){return e.byteLength},x=o("SharedArrayBuffer.prototype.byteLength",!0),S=o("Date.prototype.getTime"),k=Object.getPrototypeOf,C=o("Object.prototype.toString"),M=s("%Set%",!0),O=o("Map.prototype.has",!0),E=o("Map.prototype.get",!0),A=o("Map.prototype.size",!0),T=o("Set.prototype.add",!0),D=o("Set.prototype.delete",!0),_=o("Set.prototype.has",!0),R=o("Set.prototype.size",!0);function N(e,t,n,r){for(var o,i=a(e);(o=i.next())&&!o.done;)if(F(t,o.value,n,r))return D(e,o.value),!0;return!1}function P(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,o,i,s){var a=P(n);if(null!=a)return a;var l=E(t,a),c=r({},i,{strict:!1});return!(void 0===l&&!O(t,a)||!F(o,l,c,s))&&!O(e,a)&&F(o,l,c,s)}function L(e,t,n){var r=P(n);return null!=r?r:_(t,r)&&!_(e,r)}function j(e,t,n,r,o,i){for(var s,l,c=a(e);(s=c.next())&&!s.done;)if(F(n,l=s.value,o,i)&&F(r,E(t,l),o,i))return D(e,l),!0;return!1}function F(e,t,n,o){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,D=o.has(e),P=o.has(t);if(D&&P){if(o.get(e)===o.get(t))return!0}else l={};return D||o.set(e,l),P||o.set(t,l),function(e,t,n,o){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 D=p(e),P=p(t);if(D!==P)return!1;if((D||P)&&(e.source!==t.source||i(e)!==i(t)))return!1;var z=f(e),$=f(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),W=b(t);if((H||W)&&H!==W)return!1;var U=B(e),V=B(t);if(U!==V)return!1;if(U||V){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=d(e),K=d(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,o);var Y=m(e),G=m(t);if(Y!==G)return!1;if(Y||G)return x(e)===x(t)&&"function"==typeof Uint8Array&&F(new Uint8Array(e),new Uint8Array(t),n,o);if(typeof e!=typeof t)return!1;var J=g(e),Q=g(t);if(J.length!==Q.length)return!1;for(J.sort(),Q.sort(),s=J.length-1;s>=0;s--)if(J[s]!=Q[s])return!1;for(s=J.length-1;s>=0;s--)if(!F(e[l=J[s]],t[l],n,o))return!1;var X=v(e),Z=v(t);return X===Z&&("Set"===X||"Set"===Z?function(e,t,n,r){if(R(e)!==R(t))return!1;for(var o,i,s,l=a(e),c=a(t);(o=l.next())&&!o.done;)if(o.value&&"object"==typeof o.value)s||(s=new M),T(s,o.value);else if(!_(t,o.value)){if(n.strict)return!1;if(!L(e,t,o.value))return!1;s||(s=new M),T(s,o.value)}if(s){for(;(i=c.next())&&!i.done;)if(i.value&&"object"==typeof i.value){if(!N(s,i.value,n.strict,r))return!1}else if(!n.strict&&!_(e,i.value)&&!N(s,i.value,n.strict,r))return!1;return 0===R(s)}return!0}(e,t,n,o):"Map"!==X||function(e,t,n,o){if(A(e)!==A(t))return!1;for(var i,s,l,c,u,h,d=a(e),f=a(t);(i=d.next())&&!i.done;)if(c=i.value[0],u=i.value[1],c&&"object"==typeof c)l||(l=new M),T(l,c);else if(void 0===(h=E(t,c))&&!O(t,c)||!F(u,h,n,o)){if(n.strict)return!1;if(!I(e,t,c,u,n,o))return!1;l||(l=new M),T(l,c)}if(l){for(;(s=f.next())&&!s.done;)if(c=s.value[0],h=s.value[1],c&&"object"==typeof c){if(!j(l,e,c,h,n,o))return!1}else if(!(n.strict||e.has(c)&&F(E(e,c),h,n,o)||j(l,e,c,h,r({},n,{strict:!1}),o)))return!1;return 0===R(l)}return!0}(e,t,n,o))}(e,t,s,o)}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,o="undefined"!=typeof Map,i="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=i&&"function"==typeof Set.prototype.entries,d=o&&"function"==typeof Map.prototype.entries,f=h&&Object.getPrototypeOf((new Set).entries()),p=d&&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":i&&h===Set.prototype?"Set":o&&h===Map.prototype?"Map":a&&h===WeakSet.prototype?"WeakSet":s&&h===WeakMap.prototype?"WeakMap":l&&h===DataView.prototype?"DataView":o&&h===p?"Map Iterator":i&&h===f?"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,o=r&&void 0!==Buffer.from,i=r?function(e){return Buffer.isBuffer(e)}:function(){return!1},s=o?function(e){return Buffer.from(e)}:r?function(e){return new Buffer(e)}:function(e){return e};function a(e){return i(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 d="undefined"!=typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis,f=void 0!==n.g&&null!==n.g&&n.g.Object===Object&&n.g,p="undefined"!=typeof self&&null!==self&&self.Object===Object&&self,m=d||f||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),o=b.get(r);if("Object"===r){const t=n(e,r);if(void 0!==t)return t}return o?o(e,r):e}function S(e,t,n,r,o){const i=a(e),s=x(e,i);if(!u(i))return s;let l;switch(i){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 o of l){const s=c(e,o,i);if(r.has(s))h(t,o,n.get(s),i);else{const e=a(s),l=x(s,e);u(e)&&(n.set(s,l),r.add(s)),h(t,o,S(s,l,n,r),i)}}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 o=x(e,r,n);return S(e,o,new WeakMap([[e,o]]),new WeakSet([e]))}}()},4289:(e,t,n)=>{"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=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(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;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]:{},i=r(t);o&&(i=s.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)u(e,i[a],t[i[a]],n[i[a]])};h.supportsDescriptors=!!c,e.exports=h},9180:function(e,t,n){var r,o,i;!function(s,a){"use strict";o=[n(9829)],void 0===(i="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 o=this.extractLocation(r?r[1]:n),i=r&&n||void 0,s=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new e({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[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),o=r&&r[1]?r[1]:void 0,i=this.extractLocation(t.replace(n,""));return new e({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[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"),o=[],i=2,s=r.length;i<s;i+=2){var a=n.exec(r[i]);a&&o.push(new e({fileName:a[2],lineNumber:a[1],source:r[i]}))}return o},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),o=[],i=0,s=r.length;i<s;i+=2){var a=n.exec(r[i]);a&&o.push(new e({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:r[i]}))}return o},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("@"),o=this.extractLocation(r.pop()),i=r.shift()||"",s=i.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(n=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new e({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})}),this)}}})?r.apply(t,o):r)||(e.exports=i)}()},4029:(e,t,n)=>{"use strict";var r=n(5320),o=Object.prototype.toString,i=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]"===o.call(e)?function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.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,o=e.length;r<o;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)i.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 o,i=t.call(arguments,1),s=Math.max(0,r.length-i.length),a=[],l=0;l<s;l++)a.push("$"+l);if(o=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var n=r.apply(this,i.concat(t.call(arguments)));return Object(n)===n?n:this}return r.apply(e,i.concat(t.call(arguments)))})),r.prototype){var c=function(){};c.prototype=r.prototype,o.prototype=new c,c.prototype=null}return o}},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,o=SyntaxError,i=Function,s=TypeError,a=function(e){try{return i('"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)(),d=Object.getPrototypeOf||function(e){return e.__proto__},f={},p="undefined"==typeof Uint8Array?r:d(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":h?d([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%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%":i,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?d(d([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h?d((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?d((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?d(""[Symbol.iterator]()):r,"%Symbol%":h?Symbol:r,"%SyntaxError%":o,"%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=d(d(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 o=e("%AsyncGenerator%");o&&(n=d(o.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),M=b.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\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 i=m[r];if(i===f&&(i=y(r)),void 0===i&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("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===M(/^%?[^%]*%?$/,e))throw new o("`%` 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 o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return k(e,O,(function(e,t,n,o){r[r.length]=n?k(o,E,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=A("%"+r+"%",t),a=i.name,c=i.value,u=!1,h=i.alias;h&&(r=h[0],S(n,x([0,1],h)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],g=C(p,0,1),y=C(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new o("property names with quotes must have matching quotes");if("constructor"!==p&&f||(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&&d+1>=n.length){var v=l(c,p);c=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[p]}else f=w(c,p),c=c[p];f&&!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),o=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5419);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},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 o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.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),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={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]||o}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,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var o=f(n);o&&o!==p&&e(t,o,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(!(i[y]||r&&r[y]||m&&m[y]||a&&a[y])){var v=d(n,y);try{c(t,y,v)}catch(e){}}}}return t}},9496:(e,t,n)=>{"use strict";var r=n(210),o=n(7642),i=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(i.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=i.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=i.get(e);return!!n&&o(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=i.get(e);r||(r={},i.set(e,r)),r["$"+t]=n}};Object.freeze&&Object.freeze(a),e.exports=a},2584:(e,t,n)=>{"use strict";var r=n(6410)(),o=n(1924)("Object.prototype.toString"),i=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},a=function(){return i(arguments)}();i.isLegacyArguments=s,e.exports=a?i:s},635:(e,t,n)=>{"use strict";var r=n(5559),o=n(1924),i=n(210),s=n(5692),a=i("ArrayBuffer",!0),l=i("Float32Array",!0),c=o("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),o=r("Boolean.prototype.toString"),i=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 o(e),!0}catch(e){return!1}}(e):"[object Boolean]"===i(e))}},5320:e=>{"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,s=function(e){try{var t=r.call(e);return i.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 d=document.all;l.call(d)===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=o?function(e){if(h(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(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,o=Object.prototype.toString,i=n(6410)();e.exports=function(e){return"object"==typeof e&&null!==e&&(i?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Date]"===o.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 o=n?Map.prototype.has:null,i=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 n}catch(e){}return!1}},4578:(e,t,n)=>{"use strict";var r=Number.prototype.toString,o=Object.prototype.toString,i=n(6410)();e.exports=function(e){return"number"==typeof e||"object"==typeof e&&(i?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Number]"===o.call(e))}},8420:(e,t,n)=>{"use strict";var r,o,i,s,a=n(1924),l=n(6410)();if(l){r=a("Object.prototype.hasOwnProperty"),o=a("RegExp.prototype.exec"),i={};var c=function(){throw i};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{o(e,s)}catch(e){return e===i}}: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 o=n?Map.prototype.has:null,i=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 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,o=Object.prototype.toString,i=n(6410)();e.exports=function(e){return"string"==typeof e||"object"==typeof e&&(i?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object String]"===o.call(e))}},2636:(e,t,n)=>{"use strict";var r=Object.prototype.toString;if(n(1405)()){var o=Symbol.prototype.toString,i=/^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()&&i.test(o.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},5692:(e,t,n)=>{"use strict";var r=n(4029),o=n(3083),i=n(1924),s=i("Object.prototype.toString"),a=n(6410)(),l=n(7296),c="undefined"==typeof globalThis?n.g:globalThis,u=o(),h=i("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},d=i("String.prototype.slice"),f={},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 o=p(n);r=l(o,Symbol.toStringTag)}f[e]=r.get}})),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a||!(Symbol.toStringTag in e)){var t=d(s(e),8,-1);return h(u,t)>-1}return!!l&&function(e){var t=!1;return r(f,(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 o=n?n.prototype.has:null,i=r?r.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,o),i)try{i.call(e,i)}catch(e){return!0}return e instanceof n}catch(e){}return!1}},5899:(e,t,n)=>{"use strict";var r=n(210),o=n(1924),i=r("%WeakSet%",!0),s=o("WeakSet.prototype.has",!0);if(s){var a=o("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 i}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 o,i="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",l=32,c=128,u=1/0,h=9007199254740991,d=NaN,f=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]",M="[object Promise]",O="[object RegExp]",E="[object Set]",A="[object String]",T="[object Symbol]",D="[object WeakMap]",_="[object ArrayBuffer]",R="[object DataView]",N="[object Float32Array]",P="[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,W=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,K=RegExp(V.source),Y=RegExp(q.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\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,de=/\w*$/,fe=/^[-+]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",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\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+"]",De="["+Se+"]",_e="\\d+",Re="["+ke+"]",Ne="["+Ce+"]",Pe="[^"+xe+Ee+_e+ke+Ce+Me+"]",Ie="\\ud83c[\\udffb-\\udfff]",Le="[^"+xe+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Me+"]",ze="\\u200d",$e="(?:"+Ne+"|"+Pe+")",He="(?:"+Be+"|"+Pe+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ue="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+De+"|"+Ie+")?",qe="["+Oe+"]?",Ke=qe+Ve+"(?:"+ze+"(?:"+[Le,je,Fe].join("|")+")"+qe+Ve+")*",Ye="(?:"+[Re,je,Fe].join("|")+")"+Ke,Ge="(?:"+[Le+De+"?",De,je,Fe,Ae].join("|")+")",Je=RegExp("['’]","g"),Qe=RegExp(De,"g"),Xe=RegExp(Ie+"(?="+Ie+")|"+Ge+Ke,"g"),Ze=RegExp([Be+"?"+Ne+"+"+We+"(?="+[Te,Be,"$"].join("|")+")",He+"+"+Ue+"(?="+[Te,Be+$e,"$"].join("|")+")",Be+"?"+$e+"+"+We,Be+"+"+Ue,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_e,Ye].join("|"),"g"),et=RegExp("["+ze+xe+Se+Oe+"]"),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,ot={};ot[N]=ot[P]=ot[I]=ot[L]=ot[j]=ot[F]=ot[B]=ot[z]=ot[$]=!0,ot[m]=ot[g]=ot[_]=ot[y]=ot[R]=ot[v]=ot[b]=ot[w]=ot[S]=ot[k]=ot[C]=ot[O]=ot[E]=ot[A]=ot[D]=!1;var it={};it[m]=it[g]=it[_]=it[R]=it[y]=it[v]=it[N]=it[P]=it[I]=it[L]=it[j]=it[S]=it[k]=it[C]=it[O]=it[E]=it[A]=it[T]=it[F]=it[B]=it[z]=it[$]=!0,it[b]=it[w]=it[D]=!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")(),dt=t&&!t.nodeType&&t,ft=dt&&e&&!e.nodeType&&e,pt=ft&&ft.exports===dt,mt=pt&&ct.process,gt=function(){try{return ft&&ft.require&&ft.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=gt&>.isArrayBuffer,vt=gt&>.isDate,bt=gt&>.isMap,wt=gt&>.isRegExp,xt=gt&>.isSet,St=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 o=-1,i=null==e?0:e.length;++o<i;){var s=e[o];t(r,s,n(s),e)}return r}function Mt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ot(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,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}function Tt(e,t){return!(null==e||!e.length)&&Bt(e,t,0)>-1}function Dt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function _t(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Rt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Nt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Pt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,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=Wt("length");function jt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Ft(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Bt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Ft(e,$t,n)}function zt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;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:d}function Wt(e){return function(t){return null==t?o:t[e]}}function Ut(e){return function(t){return null==e?o:e[t]}}function Vt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function qt(e,t){for(var n,r=-1,i=e.length;++r<i;){var s=t(e[r]);s!==o&&(n=n===o?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 Yt(e){return e?e.slice(0,dn(e)+1).replace(re,""):e}function Gt(e){return function(t){return e(t)}}function Jt(e,t){return _t(t,(function(t){return e[t]}))}function Qt(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({"&":"&","<":"<",">":">",'"':""","'":"'"});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,o=0,i=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,i[o++]=n)}return i}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 dn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var fn=Ut({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pn=function e(t){var n,r=(t=null==t?ht:pn.defaults(ht.Object(),t,pn.pick(ht,nt))).Array,oe=t.Date,xe=t.Error,Se=t.Function,ke=t.Math,Ce=t.Object,Me=t.RegExp,Oe=t.String,Ee=t.TypeError,Ae=r.prototype,Te=Se.prototype,De=Ce.prototype,_e=t["__core-js_shared__"],Re=Te.toString,Ne=De.hasOwnProperty,Pe=0,Ie=(n=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Le=De.toString,je=Re.call(Ce),Fe=ht._,Be=Me("^"+Re.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=pt?t.Buffer:o,$e=t.Symbol,He=t.Uint8Array,We=ze?ze.allocUnsafe:o,Ue=sn(Ce.getPrototypeOf,Ce),Ve=Ce.create,qe=De.propertyIsEnumerable,Ke=Ae.splice,Ye=$e?$e.isConcatSpreadable:o,Ge=$e?$e.iterator:o,Xe=$e?$e.toStringTag:o,et=function(){try{var e=ci(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==ht.Date.now&&oe.now,ut=t.setTimeout!==ht.setTimeout&&t.setTimeout,dt=ke.ceil,ft=ke.floor,mt=Ce.getOwnPropertySymbols,gt=ze?ze.isBuffer:o,Lt=t.isFinite,Ut=Ae.join,mn=sn(Ce.keys,Ce),gn=ke.max,yn=ke.min,vn=oe.now,bn=t.parseInt,wn=ke.random,xn=Ae.reverse,Sn=ci(t,"DataView"),kn=ci(t,"Map"),Cn=ci(t,"Promise"),Mn=ci(t,"Set"),On=ci(t,"WeakMap"),En=ci(Ce,"create"),An=On&&new On,Tn={},Dn=ji(Sn),_n=ji(kn),Rn=ji(Cn),Nn=ji(Mn),Pn=ji(On),In=$e?$e.prototype:o,Ln=In?In.valueOf:o,jn=In?In.toString:o;function Fn(e){if(ea(e)&&!Ws(e)&&!(e instanceof Hn)){if(e instanceof $n)return e;if(Ne.call(e,"__wrapped__"))return Fi(e)}return new $n(e)}var Bn=function(){function e(){}return function(t){if(!Zs(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function zn(){}function $n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}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 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 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 qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Un(e);this.size=t.size}function Yn(e,t){var n=Ws(e),r=!n&&Hs(e),o=!n&&!r&&Ks(e),i=!n&&!r&&!o&&la(e),s=n||r||o||i,a=s?Kt(e.length,Oe):[],l=a.length;for(var c in e)!t&&!Ne.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gi(c,l))||a.push(c);return a}function Gn(e){var t=e.length;return t?e[Vr(0,t-1)]:o}function Jn(e,t){return Ri(Eo(e),ir(t,0,e.length))}function Qn(e){return Ri(Eo(e))}function Xn(e,t,n){(n!==o&&!Bs(e[t],n)||n===o&&!(t in e))&&rr(e,t,n)}function Zn(e,t,n){var r=e[t];Ne.call(e,t)&&Bs(r,n)&&(n!==o||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,o,i){t(r,e,n(e),i)})),r}function nr(e,t){return e&&Ao(t,Da(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 or(e,t){for(var n=-1,i=t.length,s=r(i),a=null==e;++n<i;)s[n]=a?o:Ma(e,t[n]);return s}function ir(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function sr(e,t,n,r,i,s){var a,l=1&t,c=2&t,u=4&t;if(n&&(a=i?n(e,r,i,s):n(e)),a!==o)return a;if(!Zs(e))return e;var h=Ws(e);if(h){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Eo(e,a)}else{var d=di(e),f=d==w||d==x;if(Ks(e))return xo(e,l);if(d==C||d==m||f&&!i){if(a=c||f?{}:pi(e),!l)return c?function(e,t){return Ao(e,hi(e),t)}(e,function(e,t){return e&&Ao(t,_a(t),e)}(a,e)):function(e,t){return Ao(e,ui(e),t)}(e,nr(a,e))}else{if(!it[d])return i?e:{};a=function(e,t,n){var r,o=e.constructor;switch(t){case _:return So(e);case y:case v:return new o(+e);case R:return function(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case P:case I:case L:case j:case F:case B:case z:case $:return ko(e,n);case S:return new o;case k:case A:return new o(e);case O:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new o;case T:return r=e,Ln?Ce(Ln.call(r)):{}}}(e,d,l)}}s||(s=new Kn);var p=s.get(e);if(p)return p;s.set(e,a),ia(e)?e.forEach((function(r){a.add(sr(r,t,n,r,e,s))})):ta(e)&&e.forEach((function(r,o){a.set(o,sr(r,t,n,o,e,s))}));var g=h?o:(u?c?ni:ti:c?_a:Da)(e);return Mt(g||e,(function(r,o){g&&(r=e[o=r]),Zn(a,o,sr(r,t,n,o,e,s))})),a}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var i=n[r],s=t[i],a=e[i];if(a===o&&!(i in e)||!s(a))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Ee(i);return Ai((function(){e.apply(o,n)}),t)}function cr(e,t,n,r){var o=-1,i=Tt,s=!0,a=e.length,l=[],c=t.length;if(!a)return l;n&&(t=_t(t,Gt(n))),r?(i=Dt,s=!1):t.length>=200&&(i=Qt,s=!1,t=new qn(t));e:for(;++o<a;){var u=e[o],h=null==n?u:n(u);if(u=r||0!==u?u:0,s&&h==h){for(var d=c;d--;)if(t[d]===h)continue e;l.push(u)}else i(t,h,r)||l.push(u)}return l}Fn.templateSettings={escape:G,evaluate:J,interpolate:Q,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,Wn.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(En){var n=t[e];return n===s?o:n}return Ne.call(t,e)?t[e]:o},Wn.prototype.has=function(e){var t=this.__data__;return En?t[e]!==o:Ne.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=En&&t===o?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?o: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},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(kn||Un),string:new Wn}},Vn.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ai(this,e).get(e)},Vn.prototype.has=function(e){return ai(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ai(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 Vn(r)}return n.set(e,t),this.size=n.size,this};var ur=_o(vr),hr=_o(br,!0);function dr(e,t){var n=!0;return ur(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function fr(e,t,n){for(var r=-1,i=e.length;++r<i;){var s=e[r],a=t(s);if(null!=a&&(l===o?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,o){t(e,r,o)&&n.push(e)})),n}function mr(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=mi),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?mr(a,t-1,n,r,o):Rt(o,a):r||(o[o.length]=a)}return o}var gr=Ro(),yr=Ro(!0);function vr(e,t){return e&&gr(e,t,Da)}function br(e,t){return e&&yr(e,t,Da)}function wr(e,t){return At(t,(function(t){return Js(e[t])}))}function xr(e,t){for(var n=0,r=(t=yo(t,e)).length;null!=e&&n<r;)e=e[Li(t[n++])];return n&&n==r?e:o}function Sr(e,t,n){var r=t(e);return Ws(e)?r:Rt(r,n(e))}function kr(e){return null==e?e===o?"[object Undefined]":"[object Null]":Xe&&Xe in Ce(e)?function(e){var t=Ne.call(e,Xe),n=e[Xe];try{e[Xe]=o;var r=!0}catch(e){}var i=Le.call(e);return r&&(t?e[Xe]=n:delete e[Xe]),i}(e):function(e){return Le.call(e)}(e)}function Cr(e,t){return e>t}function Mr(e,t){return null!=e&&Ne.call(e,t)}function Or(e,t){return null!=e&&t in Ce(e)}function Er(e,t,n){for(var i=n?Dt:Tt,s=e[0].length,a=e.length,l=a,c=r(a),u=1/0,h=[];l--;){var d=e[l];l&&t&&(d=_t(d,Gt(t))),u=yn(d.length,u),c[l]=!n&&(t||s>=120&&d.length>=120)?new qn(l&&d):o}d=e[0];var f=-1,p=c[0];e:for(;++f<s&&h.length<u;){var m=d[f],g=t?t(m):m;if(m=n||0!==m?m:0,!(p?Qt(p,g):i(h,g,n))){for(l=a;--l;){var y=c[l];if(!(y?Qt(y,g):i(e[l],g,n)))continue e}p&&p.push(g),h.push(m)}}return h}function Ar(e,t,n){var r=null==(e=Mi(e,t=yo(t,e)))?e:e[Li(Gi(t))];return null==r?o:kt(r,e,n)}function Tr(e){return ea(e)&&kr(e)==m}function Dr(e,t,n,r,i){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,n,r,i,s){var a=Ws(e),l=Ws(t),c=a?g:di(e),u=l?g:di(t),h=(c=c==m?C:c)==C,d=(u=u==m?C:u)==C,f=c==u;if(f&&Ks(e)){if(!Ks(t))return!1;a=!0,h=!1}if(f&&!h)return s||(s=new Kn),a||la(e)?Zo(e,t,n,r,i,s):function(e,t,n,r,o,i,s){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!i(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 O: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=Zo(a(e),a(t),r,o,i,s);return s.delete(e),u;case T:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,n,r,i,s);if(!(1&n)){var p=h&&Ne.call(e,"__wrapped__"),w=d&&Ne.call(t,"__wrapped__");if(p||w){var x=p?e.value():e,M=w?t.value():t;return s||(s=new Kn),i(x,M,n,r,s)}}return!!f&&(s||(s=new Kn),function(e,t,n,r,i,s){var a=1&n,l=ti(e),c=l.length;if(c!=ti(t).length&&!a)return!1;for(var u=c;u--;){var h=l[u];if(!(a?h in t:Ne.call(t,h)))return!1}var d=s.get(e),f=s.get(t);if(d&&f)return d==t&&f==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===o?g===y||i(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,i,s))}(e,t,n,r,Dr,i))}function _r(e,t,n,r){var i=n.length,s=i,a=!r;if(null==e)return!s;for(e=Ce(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var c=(l=n[i])[0],u=e[c],h=l[1];if(a&&l[2]){if(u===o&&!(c in e))return!1}else{var d=new Kn;if(r)var f=r(u,h,c,e,t,d);if(!(f===o?Dr(h,u,3,r,d):f))return!1}}return!0}function Rr(e){return!(!Zs(e)||(t=e,Ie&&Ie in t))&&(Js(e)?Be:me).test(ji(e));var t}function Nr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?Ws(e)?Fr(e[0],e[1]):jr(e):hl(e)}function Pr(e){if(!xi(e))return mn(e);var t=[];for(var n in Ce(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ir(e,t){return e<t}function Lr(e,t){var n=-1,o=Vs(e)?r(e.length):[];return ur(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function jr(e){var t=li(e);return 1==t.length&&t[0][2]?ki(t[0][0],t[0][1]):function(n){return n===e||_r(n,e,t)}}function Fr(e,t){return vi(e)&&Si(t)?ki(Li(e),t):function(n){var r=Ma(n,e);return r===o&&r===t?Oa(n,e):Dr(t,r,3)}}function Br(e,t,n,r,i){e!==t&&gr(t,(function(s,a){if(i||(i=new Kn),Zs(s))!function(e,t,n,r,i,s,a){var l=Oi(e,n),c=Oi(t,n),u=a.get(c);if(u)Xn(e,n,u);else{var h=s?s(l,c,n+"",e,t,a):o,d=h===o;if(d){var f=Ws(c),p=!f&&Ks(c),m=!f&&!p&&la(c);h=c,f||p||m?Ws(l)?h=l:qs(l)?h=Eo(l):p?(d=!1,h=xo(c,!0)):m?(d=!1,h=ko(c,!0)):h=[]:ra(c)||Hs(c)?(h=l,Hs(l)?h=ga(l):Zs(l)&&!Js(l)||(h=pi(c))):d=!1}d&&(a.set(c,h),i(h,c,r,s,a),a.delete(c)),Xn(e,n,h)}}(e,t,a,n,Br,r,i);else{var l=r?r(Oi(e,a),s,a+"",e,t,i):o;l===o&&(l=s),Xn(e,a,l)}}),_a)}function zr(e,t){var n=e.length;if(n)return gi(t+=t<0?n:0,n)?e[t]:o}function $r(e,t,n){t=t.length?_t(t,(function(e){return Ws(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[nl];var r=-1;t=_t(t,Gt(si()));var o=Lr(e,(function(e,n,o){var i=_t(t,(function(t){return t(e)}));return{criteria:i,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,o=e.criteria,i=t.criteria,s=o.length,a=n.length;++r<s;){var l=Co(o[r],i[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}(o)}function Hr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var s=t[r],a=xr(e,s);n(a,s)&&Jr(i,yo(s,e),a)}return i}function Wr(e,t,n,r){var o=r?zt:Bt,i=-1,s=t.length,a=e;for(e===t&&(t=Eo(t)),n&&(a=_t(e,Gt(n)));++i<s;)for(var l=0,c=t[i],u=n?n(c):c;(l=o(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 o=t[n];if(n==r||o!==i){var i=o;gi(o)?Ke.call(e,o,1):lo(e,o)}}return e}function Vr(e,t){return e+ft(wn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Ti(Ci(e,t,nl),e+"")}function Yr(e){return Gn(Ba(e))}function Gr(e,t){var n=Ba(e);return Ri(n,ir(t,0,n.length))}function Jr(e,t,n,r){if(!Zs(e))return e;for(var i=-1,s=(t=yo(t,e)).length,a=s-1,l=e;null!=l&&++i<s;){var c=Li(t[i]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var h=l[c];(u=r?r(h,c,l):o)===o&&(u=Zs(h)?h:gi(t[i+1])?[]:{})}Zn(l,c,u),l=l[c]}return e}var Qr=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 Ri(Ba(e))}function eo(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=r(i);++o<i;)s[o]=e[o+t];return s}function to(e,t){var n;return ur(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function no(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=e[i];null!==s&&!aa(s)&&(n?s<=t:s<t)?r=i+1:o=i}return o}return ro(e,t,nl,n)}function ro(e,t,n,r){var i=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===o;i<s;){var h=ft((i+s)/2),d=n(e[h]),f=d!==o,p=null===d,m=d==d,g=aa(d);if(a)var y=r||m;else y=u?m&&(r||f):l?m&&f&&(r||!p):c?m&&f&&!p&&(r||!g):!p&&!g&&(r?d<=t:d<t);y?i=h+1:s=h}return yn(s,4294967294)}function oo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Bs(a,l)){var l=a;i[o++]=0===s?0:s}}return i}function io(e){return"number"==typeof e?e:aa(e)?d:+e}function so(e){if("string"==typeof e)return e;if(Ws(e))return _t(e,so)+"";if(aa(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ao(e,t,n){var r=-1,o=Tt,i=e.length,s=!0,a=[],l=a;if(n)s=!1,o=Dt;else if(i>=200){var c=t?null:Ko(e);if(c)return ln(c);s=!1,o=Qt,l=new qn}else l=t?[]:a;e:for(;++r<i;){var u=e[r],h=t?t(u):u;if(u=n||0!==u?u:0,s&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),a.push(u)}else o(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}function lo(e,t){return null==(e=Mi(e,t=yo(t,e)))||delete e[Li(Gi(t))]}function co(e,t,n,r){return Jr(e,t,n(xr(e,t)),r)}function uo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?eo(e,r?0:i,r?i+1:o):eo(e,r?i+1:0,r?o:i)}function ho(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,Rt([e],t.args))}),n)}function fo(e,t,n){var o=e.length;if(o<2)return o?ao(e[0]):[];for(var i=-1,s=r(o);++i<o;)for(var a=e[i],l=-1;++l<o;)l!=i&&(s[i]=cr(s[i]||a,e[l],t,n));return ao(mr(s,1),t,n)}function po(e,t,n){for(var r=-1,i=e.length,s=t.length,a={};++r<i;){var l=r<s?t[r]:o;n(a,e[r],l)}return a}function mo(e){return qs(e)?e:[]}function go(e){return"function"==typeof e?e:nl}function yo(e,t){return Ws(e)?e:vi(e,t)?[e]:Ii(ya(e))}var vo=Kr;function bo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:eo(e,t,n)}var wo=st||function(e){return ht.clearTimeout(e)};function xo(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function So(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function ko(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Co(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,s=aa(e),a=t!==o,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||!i)return 1;if(!r&&!s&&!u&&e<t||u&&n&&i&&!r&&!s||l&&n&&i||!a&&i||!c)return-1}return 0}function Mo(e,t,n,o){for(var i=-1,s=e.length,a=n.length,l=-1,c=t.length,u=gn(s-a,0),h=r(c+u),d=!o;++l<c;)h[l]=t[l];for(;++i<a;)(d||i<s)&&(h[n[i]]=e[i]);for(;u--;)h[l++]=e[i++];return h}function Oo(e,t,n,o){for(var i=-1,s=e.length,a=-1,l=n.length,c=-1,u=t.length,h=gn(s-l,0),d=r(h+u),f=!o;++i<h;)d[i]=e[i];for(var p=i;++c<u;)d[p+c]=t[c];for(;++a<l;)(f||i<s)&&(d[p+n[a]]=e[i++]);return d}function Eo(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function Ao(e,t,n,r){var i=!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):o;c===o&&(c=e[l]),i?rr(n,l,c):Zn(n,l,c)}return n}function To(e,t){return function(n,r){var o=Ws(n)?Ct:tr,i=t?t():{};return o(n,e,si(r,2),i)}}function Do(e){return Kr((function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:o,a=i>2?n[2]:o;for(s=e.length>3&&"function"==typeof s?(i--,s):o,a&&yi(n[0],n[1],a)&&(s=i<3?o:s,i=1),t=Ce(t);++r<i;){var l=n[r];l&&e(t,l,r,s)}return t}))}function _o(e,t){return function(n,r){if(null==n)return n;if(!Vs(n))return e(n,r);for(var o=n.length,i=t?o:-1,s=Ce(n);(t?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Ro(e){return function(t,n,r){for(var o=-1,i=Ce(t),s=r(t),a=s.length;a--;){var l=s[e?a:++o];if(!1===n(i[l],l,i))break}return t}}function No(e){return function(t){var n=rn(t=ya(t))?hn(t):o,r=n?n[0]:t.charAt(0),i=n?bo(n,1).join(""):t.slice(1);return r[e]()+i}}function Po(e){return function(t){return Nt(Ja(Ha(t).replace(Je,"")),e,"")}}function Io(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 Lo(e){return function(t,n,r){var i=Ce(t);if(!Vs(t)){var s=si(n,3);t=Da(t),n=function(e){return s(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[s?t[a]:a]:o}}function jo(e){return ei((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(i);if(s&&!l&&"wrapper"==oi(a))var l=new $n([],!0)}for(r=l?r:n;++r<n;){var c=oi(a=t[r]),u="wrapper"==c?ri(a):o;l=u&&bi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[oi(u[0])].apply(l,u[3]):1==a.length&&bi(a)?l[c]():l.thru(a)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&Ws(r))return l.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Fo(e,t,n,i,s,a,l,u,h,d){var f=t&c,p=1&t,m=2&t,g=24&t,y=512&t,v=m?o:Io(e);return function c(){for(var b=arguments.length,w=r(b),x=b;x--;)w[x]=arguments[x];if(g)var S=ii(c),k=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,S);if(i&&(w=Mo(w,i,s,g)),a&&(w=Oo(w,a,l,g)),b-=k,g&&b<d){var C=an(w,S);return Vo(e,t,Fo,c.placeholder,n,w,C,u,h,d-b)}var M=p?n:this,O=m?M[e]:e;return b=w.length,u?w=function(e,t){for(var n=e.length,r=yn(t.length,n),i=Eo(e);r--;){var s=t[r];e[r]=gi(s,n)?i[s]:o}return e}(w,u):y&&b>1&&w.reverse(),f&&h<b&&(w.length=h),this&&this!==ht&&this instanceof c&&(O=v||Io(O)),O.apply(M,w)}}function Bo(e,t){return function(n,r){return function(e,t,n,r){return vr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function zo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=so(n),r=so(r)):(n=io(n),r=io(r)),i=e(n,r)}return i}}function $o(e){return ei((function(t){return t=_t(t,Gt(si())),Kr((function(n){var r=this;return e(t,(function(e){return kt(e,r,n)}))}))}))}function Ho(e,t){var n=(t=t===o?" ":so(t)).length;if(n<2)return n?qr(t,e):t;var r=qr(t,dt(e/un(t)));return rn(t)?bo(hn(r),0,e).join(""):r.slice(0,e)}function Wo(e){return function(t,n,i){return i&&"number"!=typeof i&&yi(t,n,i)&&(n=i=o),t=da(t),n===o?(n=t,t=0):n=da(n),function(e,t,n,o){for(var i=-1,s=gn(dt((t-e)/(n||1)),0),a=r(s);s--;)a[o?s:++i]=e,e+=n;return a}(t,n,i=i===o?t<n?1:-1:da(i),e)}}function Uo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ma(t),n=ma(n)),e(t,n)}}function Vo(e,t,n,r,i,s,a,c,u,h){var d=8&t;t|=d?l:64,4&(t&=~(d?64:l))||(t&=-4);var f=[e,t,i,d?s:o,d?a:o,d?o:s,d?o:a,c,u,h],p=n.apply(o,f);return bi(e)&&Ei(p,f),p.placeholder=r,Di(p,e,t)}function qo(e){var t=ke[e];return function(e,n){if(e=ma(e),(n=null==n?0:yn(fa(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 Ko=Mn&&1/ln(new Mn([,-0]))[1]==u?function(e){return new Mn(e)}:al;function Yo(e){return function(t){var n=di(t);return n==S?on(t):n==E?cn(t):function(e,t){return _t(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Go(e,t,n,s,u,h,d,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Ee(i);var m=s?s.length:0;if(m||(t&=-97,s=u=o),d=d===o?d:gn(fa(d),0),f=f===o?f:fa(f),m-=u?u.length:0,64&t){var g=s,y=u;s=u=o}var v=p?o:ri(e),b=[e,t,n,s,u,g,y,h,d,f];if(v&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<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(!i&&!s)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?Mo(u,l,t[4]):l,e[4]=u?an(e[3],a):t[4]}(l=t[5])&&(u=e[5],e[5]=u?Oo(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]=o}(b,v),e=b[0],t=b[1],n=b[2],s=b[3],u=b[4],!(f=b[9]=b[9]===o?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 i=Io(e);return function s(){for(var a=arguments.length,l=r(a),c=a,u=ii(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?Vo(e,t,Fo,s.placeholder,o,l,h,o,o,n-a):kt(this&&this!==ht&&this instanceof s?i:e,this,l)}}(e,t,f):t!=l&&33!=t||u.length?Fo.apply(o,b):function(e,t,n,o){var i=1&t,s=Io(e);return function t(){for(var a=-1,l=arguments.length,c=-1,u=o.length,h=r(u+l),d=this&&this!==ht&&this instanceof t?s:e;++c<u;)h[c]=o[c];for(;l--;)h[c++]=arguments[++a];return kt(d,i?n:this,h)}}(e,t,n,s);else var w=function(e,t,n){var r=1&t,o=Io(e);return function t(){return(this&&this!==ht&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Di((v?Qr:Ei)(w,b),e,t)}function Jo(e,t,n,r){return e===o||Bs(e,De[n])&&!Ne.call(r,n)?t:e}function Qo(e,t,n,r,i,s){return Zs(e)&&Zs(t)&&(s.set(t,e),Br(e,t,o,Qo,s),s.delete(t)),e}function Xo(e){return ra(e)?o:e}function Zo(e,t,n,r,i,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 d=-1,f=!0,p=2&n?new qn:o;for(s.set(e,t),s.set(t,e);++d<l;){var m=e[d],g=t[d];if(r)var y=a?r(g,m,d,t,e,s):r(m,g,d,e,t,s);if(y!==o){if(y)continue;f=!1;break}if(p){if(!It(t,(function(e,t){if(!Qt(p,t)&&(m===e||i(m,e,n,r,s)))return p.push(t)}))){f=!1;break}}else if(m!==g&&!i(m,g,n,r,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function ei(e){return Ti(Ci(e,o,Ui),e+"")}function ti(e){return Sr(e,Da,ui)}function ni(e){return Sr(e,_a,hi)}var ri=An?function(e){return An.get(e)}:al;function oi(e){for(var t=e.name+"",n=Tn[t],r=Ne.call(Tn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(Ne.call(Fn,"placeholder")?Fn:e).placeholder}function si(){var e=Fn.iteratee||rl;return e=e===rl?Nr:e,arguments.length?e(arguments[0],arguments[1]):e}function ai(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function li(e){for(var t=Da(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Si(o)]}return t}function ci(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Rr(n)?n:o}var ui=mt?function(e){return null==e?[]:(e=Ce(e),At(mt(e),(function(t){return qe.call(e,t)})))}:pl,hi=mt?function(e){for(var t=[];e;)Rt(t,ui(e)),e=Ue(e);return t}:pl,di=kr;function fi(e,t,n){for(var r=-1,o=(t=yo(t,e)).length,i=!1;++r<o;){var s=Li(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Xs(o)&&gi(s,o)&&(Ws(e)||Hs(e))}function pi(e){return"function"!=typeof e.constructor||xi(e)?{}:Bn(Ue(e))}function mi(e){return Ws(e)||Hs(e)||!!(Ye&&e&&e[Ye])}function gi(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 yi(e,t,n){if(!Zs(n))return!1;var r=typeof t;return!!("number"==r?Vs(n)&&gi(t,n.length):"string"==r&&t in n)&&Bs(n[t],e)}function vi(e,t){if(Ws(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 bi(e){var t=oi(e),n=Fn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=ri(n);return!!r&&e===r[0]}(Sn&&di(new Sn(new ArrayBuffer(1)))!=R||kn&&di(new kn)!=S||Cn&&di(Cn.resolve())!=M||Mn&&di(new Mn)!=E||On&&di(new On)!=D)&&(di=function(e){var t=kr(e),n=t==C?e.constructor:o,r=n?ji(n):"";if(r)switch(r){case Dn:return R;case _n:return S;case Rn:return M;case Nn:return E;case Pn:return D}return t});var wi=_e?Js:ml;function xi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||De)}function Si(e){return e==e&&!Zs(e)}function ki(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Ce(n))}}function Ci(e,t,n){return t=gn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=gn(o.length-t,0),a=r(s);++i<s;)a[i]=o[t+i];i=-1;for(var l=r(t+1);++i<t;)l[i]=o[i];return l[t]=n(a),kt(e,this,l)}}function Mi(e,t){return t.length<2?e:xr(e,eo(t,0,-1))}function Oi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ei=_i(Qr),Ai=ut||function(e,t){return ht.setTimeout(e,t)},Ti=_i(Xr);function Di(e,t,n){var r=t+"";return Ti(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(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Mt(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 _i(e){var t=0,n=0;return function(){var r=vn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var s=Vr(n,i),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Ni,Pi,Ii=(Ni=Ns((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,o){t.push(r?o.replace(ue,"$1"):n||e)})),t}),(function(e){return 500===Pi.size&&Pi.clear(),e})),Pi=Ni.cache,Ni);function Li(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ji(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fi(e){if(e instanceof Hn)return e.clone();var t=new $n(e.__wrapped__,e.__chain__);return t.__actions__=Eo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bi=Kr((function(e,t){return qs(e)?cr(e,mr(t,1,qs,!0)):[]})),zi=Kr((function(e,t){var n=Gi(t);return qs(n)&&(n=o),qs(e)?cr(e,mr(t,1,qs,!0),si(n,2)):[]})),$i=Kr((function(e,t){var n=Gi(t);return qs(n)&&(n=o),qs(e)?cr(e,mr(t,1,qs,!0),o,n):[]}));function Hi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:fa(n);return o<0&&(o=gn(r+o,0)),Ft(e,si(t,3),o)}function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=fa(n),i=n<0?gn(r+i,0):yn(i,r-1)),Ft(e,si(t,3),i,!0)}function Ui(e){return null!=e&&e.length?mr(e,1):[]}function Vi(e){return e&&e.length?e[0]:o}var qi=Kr((function(e){var t=_t(e,mo);return t.length&&t[0]===e[0]?Er(t):[]})),Ki=Kr((function(e){var t=Gi(e),n=_t(e,mo);return t===Gi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Er(n,si(t,2)):[]})),Yi=Kr((function(e){var t=Gi(e),n=_t(e,mo);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Er(n,o,t):[]}));function Gi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ji=Kr(Qi);function Qi(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var Xi=ei((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Ur(e,_t(t,(function(e){return gi(e,n)?+e:e})).sort(Co)),r}));function Zi(e){return null==e?e:xn.call(e)}var es=Kr((function(e){return ao(mr(e,1,qs,!0))})),ts=Kr((function(e){var t=Gi(e);return qs(t)&&(t=o),ao(mr(e,1,qs,!0),si(t,2))})),ns=Kr((function(e){var t=Gi(e);return t="function"==typeof t?t:o,ao(mr(e,1,qs,!0),o,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 _t(e,Wt(t))}))}function os(e,t){if(!e||!e.length)return[];var n=rs(e);return null==t?n:_t(n,(function(e){return kt(t,o,e)}))}var is=Kr((function(e,t){return qs(e)?cr(e,t):[]})),ss=Kr((function(e){return fo(At(e,qs))})),as=Kr((function(e){var t=Gi(e);return qs(t)&&(t=o),fo(At(e,qs),si(t,2))})),ls=Kr((function(e){var t=Gi(e);return t="function"==typeof t?t:o,fo(At(e,qs),o,t)})),cs=Kr(rs),us=Kr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,os(e,n)}));function hs(e){var t=Fn(e);return t.__chain__=!0,t}function ds(e,t){return t(e)}var fs=ei((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Hn&&gi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ds,args:[i],thisArg:o}),new $n(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),ps=To((function(e,t,n){Ne.call(e,n)?++e[n]:rr(e,n,1)})),ms=Lo(Hi),gs=Lo(Wi);function ys(e,t){return(Ws(e)?Mt:ur)(e,si(t,3))}function vs(e,t){return(Ws(e)?Ot:hr)(e,si(t,3))}var bs=To((function(e,t,n){Ne.call(e,n)?e[n].push(t):rr(e,n,[t])})),ws=Kr((function(e,t,n){var o=-1,i="function"==typeof t,s=Vs(e)?r(e.length):[];return ur(e,(function(e){s[++o]=i?kt(t,e,n):Ar(e,t,n)})),s})),xs=To((function(e,t,n){rr(e,n,t)}));function Ss(e,t){return(Ws(e)?_t:Lr)(e,si(t,3))}var ks=To((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&&yi(e,t[0],t[1])?t=[]:n>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),$r(e,mr(t,1),[])})),Ms=ct||function(){return ht.Date.now()};function Os(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Go(e,c,o,o,o,o,t)}function Es(e,t){var n;if("function"!=typeof t)throw new Ee(i);return e=fa(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var As=Kr((function(e,t,n){var r=1;if(n.length){var o=an(n,ii(As));r|=l}return Go(e,r,t,n,o)})),Ts=Kr((function(e,t,n){var r=3;if(n.length){var o=an(n,ii(Ts));r|=l}return Go(t,r,e,n,o)}));function Ds(e,t,n){var r,s,a,l,c,u,h=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ee(i);function m(t){var n=r,i=s;return r=s=o,h=t,l=e.apply(i,n)}function g(e){var n=e-u;return u===o||n>=t||n<0||f&&e-h>=a}function y(){var e=Ms();if(g(e))return v(e);c=Ai(y,function(e){var n=t-(e-u);return f?yn(n,a-(e-h)):n}(e))}function v(e){return c=o,p&&r?m(e):(r=s=o,l)}function b(){var e=Ms(),n=g(e);if(r=arguments,s=this,u=e,n){if(c===o)return function(e){return h=e,c=Ai(y,t),d?m(e):l}(u);if(f)return wo(c),c=Ai(y,t),m(u)}return c===o&&(c=Ai(y,t)),l}return t=ma(t)||0,Zs(n)&&(d=!!n.leading,a=(f="maxWait"in n)?gn(ma(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==o&&wo(c),h=0,r=u=s=c=o},b.flush=function(){return c===o?l:v(Ms())},b}var _s=Kr((function(e,t){return lr(e,1,t)})),Rs=Kr((function(e,t,n){return lr(e,ma(t)||0,n)}));function Ns(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Ns.Cache||Vn),n}function Ps(e){if("function"!=typeof e)throw new Ee(i);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)}}Ns.Cache=Vn;var Is=vo((function(e,t){var n=(t=1==t.length&&Ws(t[0])?_t(t[0],Gt(si())):_t(mr(t,1),Gt(si()))).length;return Kr((function(r){for(var o=-1,i=yn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return kt(e,this,r)}))})),Ls=Kr((function(e,t){var n=an(t,ii(Ls));return Go(e,l,o,t,n)})),js=Kr((function(e,t){var n=an(t,ii(js));return Go(e,64,o,t,n)})),Fs=ei((function(e,t){return Go(e,256,o,o,o,t)}));function Bs(e,t){return e===t||e!=e&&t!=t}var zs=Uo(Cr),$s=Uo((function(e,t){return e>=t})),Hs=Tr(function(){return arguments}())?Tr:function(e){return ea(e)&&Ne.call(e,"callee")&&!qe.call(e,"callee")},Ws=r.isArray,Us=yt?Gt(yt):function(e){return ea(e)&&kr(e)==_};function Vs(e){return null!=e&&Xs(e.length)&&!Js(e)}function qs(e){return ea(e)&&Vs(e)}var Ks=gt||ml,Ys=vt?Gt(vt):function(e){return ea(e)&&kr(e)==v};function Gs(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 Js(e){if(!Zs(e))return!1;var t=kr(e);return t==w||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qs(e){return"number"==typeof e&&e==fa(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?Gt(bt):function(e){return ea(e)&&di(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=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==je}var oa=wt?Gt(wt):function(e){return ea(e)&&kr(e)==O},ia=xt?Gt(xt):function(e){return ea(e)&&di(e)==E};function sa(e){return"string"==typeof e||!Ws(e)&&ea(e)&&kr(e)==A}function aa(e){return"symbol"==typeof e||ea(e)&&kr(e)==T}var la=St?Gt(St):function(e){return ea(e)&&Xs(e.length)&&!!ot[kr(e)]},ca=Uo(Ir),ua=Uo((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(Vs(e))return sa(e)?hn(e):Eo(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=di(e);return(t==S?on:t==E?ln:Ba)(e)}function da(e){return e?(e=ma(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fa(e){var t=da(e),n=t%1;return t==t?n?t-n:t:0}function pa(e){return e?ir(fa(e),0,f):0}function ma(e){if("number"==typeof e)return e;if(aa(e))return d;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=Yt(e);var n=pe.test(e);return n||ge.test(e)?lt(e.slice(2),n?2:8):fe.test(e)?d:+e}function ga(e){return Ao(e,_a(e))}function ya(e){return null==e?"":so(e)}var va=Do((function(e,t){if(xi(t)||Vs(t))Ao(t,Da(t),e);else for(var n in t)Ne.call(t,n)&&Zn(e,n,t[n])})),ba=Do((function(e,t){Ao(t,_a(t),e)})),wa=Do((function(e,t,n,r){Ao(t,_a(t),e,r)})),xa=Do((function(e,t,n,r){Ao(t,Da(t),e,r)})),Sa=ei(or),ka=Kr((function(e,t){e=Ce(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(r=1);++n<r;)for(var s=t[n],a=_a(s),l=-1,c=a.length;++l<c;){var u=a[l],h=e[u];(h===o||Bs(h,De[u])&&!Ne.call(e,u))&&(e[u]=s[u])}return e})),Ca=Kr((function(e){return e.push(o,Qo),kt(Na,o,e)}));function Ma(e,t,n){var r=null==e?o:xr(e,t);return r===o?n:r}function Oa(e,t){return null!=e&&fi(e,t,Or)}var Ea=Bo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n}),Za(nl)),Aa=Bo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),si),Ta=Kr(Ar);function Da(e){return Vs(e)?Yn(e):Pr(e)}function _a(e){return Vs(e)?Yn(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=xi(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}(e)}var Ra=Do((function(e,t,n){Br(e,t,n)})),Na=Do((function(e,t,n,r){Br(e,t,n,r)})),Pa=ei((function(e,t){var n={};if(null==e)return n;var r=!1;t=_t(t,(function(t){return t=yo(t,e),r||(r=t.length>1),t})),Ao(e,ni(e),n),r&&(n=sr(n,7,Xo));for(var o=t.length;o--;)lo(n,t[o]);return n})),Ia=ei((function(e,t){return null==e?{}:function(e,t){return Hr(e,t,(function(t,n){return Oa(e,n)}))}(e,t)}));function La(e,t){if(null==e)return{};var n=_t(ni(e),(function(e){return[e]}));return t=si(t),Hr(e,n,(function(e,n){return t(e,n[0])}))}var ja=Yo(Da),Fa=Yo(_a);function Ba(e){return null==e?[]:Jt(e,Da(e))}var za=Po((function(e,t,n){return t=t.toLowerCase(),e+(n?$a(t):t)}));function $a(e){return Ga(ya(e).toLowerCase())}function Ha(e){return(e=ya(e))&&e.replace(ve,en).replace(Qe,"")}var Wa=Po((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ua=Po((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Va=No("toLowerCase"),qa=Po((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ka=Po((function(e,t,n){return e+(n?" ":"")+Ga(t)})),Ya=Po((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ga=No("toUpperCase");function Ja(e,t,n){return e=ya(e),(t=n?o:t)===o?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 Qa=Kr((function(e,t){try{return kt(e,o,t)}catch(e){return Gs(e)?e:new xe(e)}})),Xa=ei((function(e,t){return Mt(t,(function(t){t=Li(t),rr(e,t,As(e[t],e))})),e}));function Za(e){return function(){return e}}var el=jo(),tl=jo(!0);function nl(e){return e}function rl(e){return Nr("function"==typeof e?e:sr(e,1))}var ol=Kr((function(e,t){return function(n){return Ar(n,e,t)}})),il=Kr((function(e,t){return function(n){return Ar(e,n,t)}}));function sl(e,t,n){var r=Da(t),o=wr(t,r);null!=n||Zs(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=wr(t,Da(t)));var i=!(Zs(n)&&"chain"in n&&!n.chain),s=Js(e);return Mt(o,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Eo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Rt([this.value()],arguments))})})),e}function al(){}var ll=$o(_t),cl=$o(Et),ul=$o(It);function hl(e){return vi(e)?Wt(Li(e)):function(e){return function(t){return xr(t,e)}}(e)}var dl=Wo(),fl=Wo(!0);function pl(){return[]}function ml(){return!1}var gl,yl=zo((function(e,t){return e+t}),0),vl=qo("ceil"),bl=zo((function(e,t){return e/t}),1),wl=qo("floor"),xl=zo((function(e,t){return e*t}),1),Sl=qo("round"),kl=zo((function(e,t){return e-t}),0);return Fn.after=function(e,t){if("function"!=typeof t)throw new Ee(i);return e=fa(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=Os,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 Ws(e)?e:[e]},Fn.chain=hs,Fn.chunk=function(e,t,n){t=(n?yi(e,t,n):t===o)?1:gn(fa(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,l=r(dt(i/t));s<i;)l[a++]=eo(e,s,s+=t);return l},Fn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Fn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Rt(Ws(n)?Eo(n):[n],mr(t,1))},Fn.cond=function(e){var t=null==e?0:e.length,n=si();return e=t?_t(e,(function(e){if("function"!=typeof e[1])throw new Ee(i);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var o=e[r];if(kt(o[0],this,n))return kt(o[1],this,n)}}))},Fn.conforms=function(e){return function(e){var t=Da(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 i=Go(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Fn.curryRight=function e(t,n,r){var i=Go(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Fn.debounce=Ds,Fn.defaults=ka,Fn.defaultsDeep=Ca,Fn.defer=_s,Fn.delay=Rs,Fn.difference=Bi,Fn.differenceBy=zi,Fn.differenceWith=$i,Fn.drop=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=n||t===o?1:fa(t))<0?0:t,r):[]},Fn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,0,(t=r-(t=n||t===o?1:fa(t)))<0?0:t):[]},Fn.dropRightWhile=function(e,t){return e&&e.length?uo(e,si(t,3),!0,!0):[]},Fn.dropWhile=function(e,t){return e&&e.length?uo(e,si(t,3),!0):[]},Fn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=fa(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:fa(r))<0&&(r+=i),r=n>r?0:pa(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Fn.filter=function(e,t){return(Ws(e)?At:pr)(e,si(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===o?1:fa(n),mr(Ss(e,t),n)},Fn.flatten=Ui,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===o?1:fa(t)):[]},Fn.flip=function(e){return Go(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 o=e[t];r[o[0]]=o[1]}return r},Fn.functions=function(e){return null==e?[]:wr(e,Da(e))},Fn.functionsIn=function(e){return null==e?[]:wr(e,_a(e))},Fn.groupBy=bs,Fn.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},Fn.intersection=qi,Fn.intersectionBy=Ki,Fn.intersectionWith=Yi,Fn.invert=Ea,Fn.invertBy=Aa,Fn.invokeMap=ws,Fn.iteratee=rl,Fn.keyBy=xs,Fn.keys=Da,Fn.keysIn=_a,Fn.map=Ss,Fn.mapKeys=function(e,t){var n={};return t=si(t,3),vr(e,(function(e,r,o){rr(n,t(e,r,o),e)})),n},Fn.mapValues=function(e,t){var n={};return t=si(t,3),vr(e,(function(e,r,o){rr(n,r,t(e,r,o))})),n},Fn.matches=function(e){return jr(sr(e,1))},Fn.matchesProperty=function(e,t){return Fr(e,sr(t,1))},Fn.memoize=Ns,Fn.merge=Ra,Fn.mergeWith=Na,Fn.method=ol,Fn.methodOf=il,Fn.mixin=sl,Fn.negate=Ps,Fn.nthArg=function(e){return e=fa(e),Kr((function(t){return zr(t,e)}))},Fn.omit=Pa,Fn.omitBy=function(e,t){return La(e,Ps(si(t)))},Fn.once=function(e){return Es(2,e)},Fn.orderBy=function(e,t,n,r){return null==e?[]:(Ws(t)||(t=null==t?[]:[t]),Ws(n=r?o: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?o:xr(e,t)}},Fn.pull=Ji,Fn.pullAll=Qi,Fn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,si(n,2)):e},Fn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,o,n):e},Fn.pullAt=Xi,Fn.range=dl,Fn.rangeRight=fl,Fn.rearg=Fs,Fn.reject=function(e,t){return(Ws(e)?At:pr)(e,Ps(si(t,3)))},Fn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=si(t,3);++r<i;){var s=e[r];t(s,r,e)&&(n.push(s),o.push(r))}return Ur(e,o),n},Fn.rest=function(e,t){if("function"!=typeof e)throw new Ee(i);return Kr(e,t=t===o?t:fa(t))},Fn.reverse=Zi,Fn.sampleSize=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:fa(t),(Ws(e)?Jn:Gr)(e,t)},Fn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Fn.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Jr(e,t,n,r)},Fn.shuffle=function(e){return(Ws(e)?Qn:Zr)(e)},Fn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&yi(e,t,n)?(t=0,n=r):(t=null==t?0:fa(t),n=n===o?r:fa(n)),eo(e,t,n)):[]},Fn.sortBy=Cs,Fn.sortedUniq=function(e){return e&&e.length?oo(e):[]},Fn.sortedUniqBy=function(e,t){return e&&e.length?oo(e,si(t,2)):[]},Fn.split=function(e,t,n){return n&&"number"!=typeof n&&yi(e,t,n)&&(t=n=o),(n=n===o?f:n>>>0)?(e=ya(e))&&("string"==typeof t||null!=t&&!oa(t))&&!(t=so(t))&&rn(e)?bo(hn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Ee(i);return t=null==t?0:gn(fa(t),0),Kr((function(n){var r=n[t],o=bo(n,0,t);return r&&Rt(o,r),kt(e,this,o)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:fa(t))<0?0:t):[]},Fn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=r-(t=n||t===o?1:fa(t)))<0?0:t,r):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?uo(e,si(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?uo(e,si(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Ee(i);return Zs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ds(e,t,{leading:r,maxWait:t,trailing:o})},Fn.thru=ds,Fn.toArray=ha,Fn.toPairs=ja,Fn.toPairsIn=Fa,Fn.toPath=function(e){return Ws(e)?_t(e,Li):aa(e)?[e]:Eo(Ii(ya(e)))},Fn.toPlainObject=ga,Fn.transform=function(e,t,n){var r=Ws(e),o=r||Ks(e)||la(e);if(t=si(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Zs(e)&&Js(i)?Bn(Ue(e)):{}}return(o?Mt:vr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Fn.unary=function(e){return Os(e,1)},Fn.union=es,Fn.unionBy=ts,Fn.unionWith=ns,Fn.uniq=function(e){return e&&e.length?ao(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?ao(e,si(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?ao(e,o,t):[]},Fn.unset=function(e,t){return null==e||lo(e,t)},Fn.unzip=rs,Fn.unzipWith=os,Fn.update=function(e,t,n){return null==e?e:co(e,t,go(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:co(e,t,go(n),r)},Fn.values=Ba,Fn.valuesIn=function(e){return null==e?[]:Jt(e,_a(e))},Fn.without=is,Fn.words=Ja,Fn.wrap=function(e,t){return Ls(go(t),e)},Fn.xor=ss,Fn.xorBy=as,Fn.xorWith=ls,Fn.zip=cs,Fn.zipObject=function(e,t){return po(e||[],t||[],Zn)},Fn.zipObjectDeep=function(e,t){return po(e||[],t||[],Jr)},Fn.zipWith=us,Fn.entries=ja,Fn.entriesIn=Fa,Fn.extend=ba,Fn.extendWith=wa,sl(Fn,Fn),Fn.add=yl,Fn.attempt=Qa,Fn.camelCase=za,Fn.capitalize=$a,Fn.ceil=vl,Fn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=ma(n))==n?n:0),t!==o&&(t=(t=ma(t))==t?t:0),ir(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:o)},Fn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:o)},Fn.conformsTo=function(e,t){return null==t||ar(e,t,Da(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=so(t);var r=e.length,i=n=n===o?r:ir(fa(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Fn.eq=Bs,Fn.escape=function(e){return(e=ya(e))&&Y.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=Ws(e)?Et:dr;return n&&yi(e,t,n)&&(t=o),r(e,si(t,3))},Fn.find=ms,Fn.findIndex=Hi,Fn.findKey=function(e,t){return jt(e,si(t,3),vr)},Fn.findLast=gs,Fn.findLastIndex=Wi,Fn.findLastKey=function(e,t){return jt(e,si(t,3),br)},Fn.floor=wl,Fn.forEach=ys,Fn.forEachRight=vs,Fn.forIn=function(e,t){return null==e?e:gr(e,si(t,3),_a)},Fn.forInRight=function(e,t){return null==e?e:yr(e,si(t,3),_a)},Fn.forOwn=function(e,t){return e&&vr(e,si(t,3))},Fn.forOwnRight=function(e,t){return e&&br(e,si(t,3))},Fn.get=Ma,Fn.gt=zs,Fn.gte=$s,Fn.has=function(e,t){return null!=e&&fi(e,t,Mr)},Fn.hasIn=Oa,Fn.head=Vi,Fn.identity=nl,Fn.includes=function(e,t,n,r){e=Vs(e)?e:Ba(e),n=n&&!r?fa(n):0;var o=e.length;return n<0&&(n=gn(o+n,0)),sa(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Bt(e,t,n)>-1},Fn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:fa(n);return o<0&&(o=gn(r+o,0)),Bt(e,t,o)},Fn.inRange=function(e,t,n){return t=da(t),n===o?(n=t,t=0):n=da(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=Ws,Fn.isArrayBuffer=Us,Fn.isArrayLike=Vs,Fn.isArrayLikeObject=qs,Fn.isBoolean=function(e){return!0===e||!1===e||ea(e)&&kr(e)==y},Fn.isBuffer=Ks,Fn.isDate=Ys,Fn.isElement=function(e){return ea(e)&&1===e.nodeType&&!ra(e)},Fn.isEmpty=function(e){if(null==e)return!0;if(Vs(e)&&(Ws(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||la(e)||Hs(e)))return!e.length;var t=di(e);if(t==S||t==E)return!e.size;if(xi(e))return!Pr(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},Fn.isEqual=function(e,t){return Dr(e,t)},Fn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Dr(e,t,o,n):!!r},Fn.isError=Gs,Fn.isFinite=function(e){return"number"==typeof e&&Lt(e)},Fn.isFunction=Js,Fn.isInteger=Qs,Fn.isLength=Xs,Fn.isMap=ta,Fn.isMatch=function(e,t){return e===t||_r(e,t,li(t))},Fn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,_r(e,t,li(t),n)},Fn.isNaN=function(e){return na(e)&&e!=+e},Fn.isNative=function(e){if(wi(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(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=oa,Fn.isSafeInteger=function(e){return Qs(e)&&e>=-9007199254740991&&e<=h},Fn.isSet=ia,Fn.isString=sa,Fn.isSymbol=aa,Fn.isTypedArray=la,Fn.isUndefined=function(e){return e===o},Fn.isWeakMap=function(e){return ea(e)&&di(e)==D},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=Wa,Fn.last=Gi,Fn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=fa(n))<0?gn(r+i,0):yn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Ft(e,$t,i,!0)},Fn.lowerCase=Ua,Fn.lowerFirst=Va,Fn.lt=ca,Fn.lte=ua,Fn.max=function(e){return e&&e.length?fr(e,nl,Cr):o},Fn.maxBy=function(e,t){return e&&e.length?fr(e,si(t,2),Cr):o},Fn.mean=function(e){return Ht(e,nl)},Fn.meanBy=function(e,t){return Ht(e,si(t,2))},Fn.min=function(e){return e&&e.length?fr(e,nl,Ir):o},Fn.minBy=function(e,t){return e&&e.length?fr(e,si(t,2),Ir):o},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,fa(t)):o},Fn.noConflict=function(){return ht._===this&&(ht._=Fe),this},Fn.noop=al,Fn.now=Ms,Fn.pad=function(e,t,n){e=ya(e);var r=(t=fa(t))?un(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Ho(ft(o),n)+e+Ho(dt(o),n)},Fn.padEnd=function(e,t,n){e=ya(e);var r=(t=fa(t))?un(e):0;return t&&r<t?e+Ho(t-r,n):e},Fn.padStart=function(e,t,n){e=ya(e);var r=(t=fa(t))?un(e):0;return t&&r<t?Ho(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&&yi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=da(e),t===o?(t=e,e=0):t=da(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=wn();return yn(e+i*(t-e+at("1e-"+((i+"").length-1))),t)}return Vr(e,t)},Fn.reduce=function(e,t,n){var r=Ws(e)?Nt:Vt,o=arguments.length<3;return r(e,si(t,4),n,o,ur)},Fn.reduceRight=function(e,t,n){var r=Ws(e)?Pt:Vt,o=arguments.length<3;return r(e,si(t,4),n,o,hr)},Fn.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:fa(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,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++r<i;){var s=null==e?o:e[Li(t[r])];s===o&&(r=i,s=n),e=Js(s)?s.call(e):s}return e},Fn.round=Sl,Fn.runInContext=e,Fn.sample=function(e){return(Ws(e)?Gn:Yr)(e)},Fn.size=function(e){if(null==e)return 0;if(Vs(e))return sa(e)?un(e):e.length;var t=di(e);return t==S||t==E?e.size:Pr(e).length},Fn.snakeCase=qa,Fn.some=function(e,t,n){var r=Ws(e)?It:to;return n&&yi(e,t,n)&&(t=o),r(e,si(t,3))},Fn.sortedIndex=function(e,t){return no(e,t)},Fn.sortedIndexBy=function(e,t,n){return ro(e,t,si(n,2))},Fn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=no(e,t);if(r<n&&Bs(e[r],t))return r}return-1},Fn.sortedLastIndex=function(e,t){return no(e,t,!0)},Fn.sortedLastIndexBy=function(e,t,n){return ro(e,t,si(n,2),!0)},Fn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=no(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:ir(fa(n),0,e.length),t=so(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,si(t,2)):0},Fn.template=function(e,t,n){var r=Fn.templateSettings;n&&yi(e,t,n)&&(t=o),e=ya(e),t=wa({},t,r,Jo);var i,s,a=wa({},t.imports,r.imports,Jo),l=Da(a),c=Jt(a,l),u=0,h=t.interpolate||be,d="__p += '",f=Me((t.escape||be).source+"|"+h.source+"|"+(h===Q?he:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,(function(t,n,r,o,a,l){return r||(r=o),d+=e.slice(u,l).replace(we,nn),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),d+="';\n";var m=Ne.call(t,"variable")&&t.variable;if(m){if(ce.test(m))throw new xe("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(H,""):d).replace(W,"$1").replace(U,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Qa((function(){return Se(l,p+"return "+d).apply(o,c)}));if(g.source=d,Gs(g))throw g;return g},Fn.times=function(e,t){if((e=fa(e))<1||e>h)return[];var n=f,r=yn(e,f);t=si(t),e-=f;for(var o=Kt(r,t);++n<e;)t(n);return o},Fn.toFinite=da,Fn.toInteger=fa,Fn.toLength=pa,Fn.toLower=function(e){return ya(e).toLowerCase()},Fn.toNumber=ma,Fn.toSafeInteger=function(e){return e?ir(fa(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===o))return Yt(e);if(!e||!(t=so(t)))return e;var r=hn(e),i=hn(t);return bo(r,Xt(r,i),Zt(r,i)+1).join("")},Fn.trimEnd=function(e,t,n){if((e=ya(e))&&(n||t===o))return e.slice(0,dn(e)+1);if(!e||!(t=so(t)))return e;var r=hn(e);return bo(r,0,Zt(r,hn(t))+1).join("")},Fn.trimStart=function(e,t,n){if((e=ya(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=so(t)))return e;var r=hn(e);return bo(r,Xt(r,hn(t))).join("")},Fn.truncate=function(e,t){var n=30,r="...";if(Zs(t)){var i="separator"in t?t.separator:i;n="length"in t?fa(t.length):n,r="omission"in t?so(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?bo(a,0,l).join(""):e.slice(0,l);if(i===o)return c+r;if(a&&(l+=c.length-l),oa(i)){if(e.slice(l).search(i)){var u,h=c;for(i.global||(i=Me(i.source,ya(de.exec(i))+"g")),i.lastIndex=0;u=i.exec(h);)var d=u.index;c=c.slice(0,d===o?l:d)}}else if(e.indexOf(so(i),l)!=l){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+r},Fn.unescape=function(e){return(e=ya(e))&&K.test(e)?e.replace(V,fn):e},Fn.uniqueId=function(e){var t=++Pe;return ya(e)+t},Fn.upperCase=Ya,Fn.upperFirst=Ga,Fn.each=ys,Fn.eachRight=vs,Fn.first=Vi,sl(Fn,(gl={},vr(Fn,(function(e,t){Ne.call(Fn.prototype,t)||(gl[t]=e)})),gl),{chain:!1}),Fn.VERSION="4.17.21",Mt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),Mt(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===o?1:gn(fa(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,f),type:e+(r.__dir__<0?"Right":"")}),r},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Mt(["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:si(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Mt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),Mt(["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(Ps(si(e)))},Hn.prototype.slice=function(e,t){e=fa(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!==o&&(n=(t=fa(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(f)},vr(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Fn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);i&&(Fn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,l=t instanceof Hn,c=a[0],u=l||Ws(t),h=function(e){var t=i.apply(Fn,Rt([e],a));return r&&d?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,f=!!this.__actions__.length,p=s&&!d,m=l&&!f;if(!s&&u){t=m?t:new Hn(this);var g=e.apply(t,a);return g.__actions__.push({func:ds,args:[h],thisArg:o}),new $n(g,d)}return p&&m?e.apply(this,a):(g=this.thru(h),p?r?g.value()[0]:g.value():g)})})),Mt(["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 o=this.value();return t.apply(Ws(o)?o:[],e)}return this[n]((function(n){return t.apply(Ws(n)?n:[],e)}))}})),vr(Hn.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";Ne.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:t,func:n})}})),Tn[Fo(o,2).name]=[{name:"wrapper",func:o}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Eo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Eo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Eo(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=Ws(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],s=i.size;switch(i.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,o,this.__views__),s=i.start,a=i.end,l=a-s,c=r?a:s-1,u=this.__iteratees__,h=u.length,d=0,f=yn(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return ho(e,this.__actions__);var p=[];e:for(;l--&&d<f;){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[d++]=g}return p},Fn.prototype.at=fs,Fn.prototype.chain=function(){return hs(this)},Fn.prototype.commit=function(){return new $n(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===o&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Fi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__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:ds,args:[Zi],thisArg:o}),new $n(t,this.__chain__)}return this.thru(Zi)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return ho(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Ge&&(Fn.prototype[Ge]=function(){return this}),Fn}();ht._=pn,(r=function(){return pn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},631:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.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,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="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,M=Array.prototype.slice,O=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,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,_="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function P(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?-O(-e):O(e);if(r!==e){var o=String(r),i=v.call(t,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(i,/([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,""")}function z(e){return!("[object Array]"!==V(e)||_&&"object"==typeof e&&_ in e)}function $(e){return!("[object RegExp]"!==V(e)||_&&"object"==typeof e&&_ in e)}function H(e){if(D)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,o){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?P(t,w):w}if("bigint"==typeof t){var S=String(t)+"n";return m?P(t,S):S}var O=void 0===a.depth?5:a.depth;if(void 0===r&&(r=0),r>=O&&O>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===o)o=[];else if(q(o,t)>=0)return"[Circular]";function W(t,n,i){if(n&&(o=M.call(o)).push(n),i){var s={depth:a.depth};return U(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,r+1,o)}return e(t,a,r+1,o)}if("function"==typeof t&&!$(t)){var Y=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,W);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(ee.length>0?" { "+C.call(ee,", ")+" }":"")}if(H(t)){var te=D?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(t);return"object"!=typeof t||D?te:G(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||[],oe=0;oe<re.length;oe++)ne+=" "+re[oe].name+"="+F(B(re[oe].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 ie=Z(t,W);return L&&!function(e){for(var t=0;t<e.length;t++)if(q(e[t],"\n")>=0)return!1;return!0}(ie)?"["+X(ie,L)+"]":"[ "+C.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t)){var se=Z(t,W);return"cause"in Error.prototype||!("cause"in t)||R.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+C.call(se,", ")+" }":"{ ["+String(t)+"] "+C.call(k.call("[cause]: "+W(t.cause),se),", ")+" }"}if("object"==typeof t&&l){if(j&&"function"==typeof t[j]&&I)return I(t,{depth:O-r});if("symbol"!==l&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.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(W(n,t,!0)+" => "+W(e,t))})),Q("Map",i.call(t),ae,L)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.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(W(e,t))})),Q("Set",c.call(t),le,L)}if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t))return G(W(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 G(W(E.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t))return G(p.call(t));if(function(e){return!("[object String]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t))return G(W(String(t)));if(!function(e){return!("[object Date]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t)&&!$(t)){var ce=Z(t,W),ue=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,he=t instanceof Object?"":"null prototype",de=!ue&&_&&Object(t)===t&&_ in t?v.call(V(t),8,-1):he?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||he?"["+C.call(k.call([],de||[],he||[]),": ")+"] ":"");return 0===ce.length?fe+"{}":L?fe+"{"+X(ce,L)+"}":fe+"{ "+C.call(ce,", ")+" }"}return String(t)};var W=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return W.call(e,t)}function V(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,Y),"single",t)}function Y(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 G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Q(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 o=0;o<e.length;o++)r[o]=U(e,o)?t(e[o],e):""}var i,s="function"==typeof A?A(e):[];if(D){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)U(e,l)&&(n&&String(Number(l))===l&&l<e.length||D&&i["$"+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++)R.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),o=n(5559),i=n(4244),s=n(5624),a=n(2281),l=o(s(),Object);r(l,{getPolyfill:s,implementation:i,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),o=n(4289);e.exports=function(){var e=r();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},8987:(e,t,n)=>{"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=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},d={$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},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.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]"===i.call(e),r=s(e),a=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var p=c&&n;if(a&&e.length>0&&!o.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(r&&e.length>0)for(var g=0;g<e.length;++g)d.push(String(g));else for(var y in e)p&&"prototype"===y||!o.call(e,y)||d.push(String(y));if(l)for(var v=function(e){if("undefined"==typeof window||!f)return h(e);try{return h(e)}catch(e){return!1}}(e),b=0;b<u.length;++b)v&&"constructor"===u[b]||!o.call(e,u[b])||d.push(u[b]);return d}}e.exports=r},2215:(e,t,n)=>{"use strict";var r=Array.prototype.slice,o=n(1414),i=Object.keys,s=i?function(e){return i(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 o(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),o=n(5419)(),i=n(1924),s=Object,a=i("Array.prototype.push"),l=i("Object.prototype.propertyIsEnumerable"),c=o?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 i=1;i<arguments.length;++i){var u=s(arguments[i]),h=r(u),d=o&&(Object.getOwnPropertySymbols||c);if(d)for(var f=d(u),p=0;p<f.length;++p){var m=f[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),o=n(5559),i=n(2837),s=n(8162),a=n(4489),l=o.apply(s()),c=function(e,t){return l(Object,arguments)};r(c,{getPolyfill:s,implementation:i,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 o=Object.assign({},n),i="";for(var s in o)i+=s;return e!==i}()||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),o=n(8162);e.exports=function(){var e=o();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 o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t,n){return i=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 o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},i.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 i(e,arguments,o(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 o(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=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),o}(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 o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*t,s=i*(1-Math.abs(o%2-1)),a=0,l=0,u=0;o>=0&&o<1?(a=i,l=s):o>=1&&o<2?(a=s,l=i):o>=2&&o<3?(l=i,u=s):o>=3&&o<4?(l=s,u=i):o>=4&&o<5?(a=s,u=i):o>=5&&o<6&&(a=i,u=s);var h=n-i/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"},d=/^#[a-fA-F0-9]{6}$/,f=/^#[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 o=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(d))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(f)){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 o=g.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var i=y.exec(t.substring(0,50));if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])>1?parseFloat(""+i[4])/100:parseFloat(""+i[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("+o.red+","+o.green+","+o.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 o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,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:i,resetWarningCache:o};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,o){n=n||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(n);var a=1e3;o&&"number"==typeof o.maxKeys&&(a=o.maxKeys);var l=e.length;a>0&&l>a&&(l=a);for(var c=0;c<l;++c){var u,h,d,f,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=""),d=decodeURIComponent(u),f=decodeURIComponent(h),t(i,d)?Array.isArray(i[d])?i[d].push(f):i[d]=[i[d],f]:i[d]=f}return i}},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,o){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var i=encodeURIComponent(t(o))+r;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(t(e))})).join(n):i+encodeURIComponent(t(e[o]))})).filter(Boolean).join(n):o?encodeURIComponent(t(o))+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 o(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 o=n.call(e,"string");if("object"!==r(o))return o;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 i(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 i(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)?i(e,t):void 0}}function a(e){return function(e){if(Array.isArray(e))return i(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,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||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),d={};function f(e,t){}const p=function(e,t){!function(e,t,n){t||d[n]||(e(!1,n),d[n]=!0)}(f,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),o=0;o<n;o++)r[o]=arguments[o];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[]);return n}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],o=n[1];return c.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[r,function(e,n){n&&t.current||o(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,o=(0,x.Z)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}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){o(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 M={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>=M.F1&&t<=M.F12)return!1;switch(t){case M.ALT:case M.CAPS_LOCK:case M.CONTEXT_MENU:case M.CTRL:case M.DOWN:case M.END:case M.ESC:case M.HOME:case M.INSERT:case M.LEFT:case M.MAC_FF_META:case M.META:case M.NUMLOCK:case M.NUM_CENTER:case M.PAGE_DOWN:case M.PAGE_UP:case M.PAUSE:case M.PRINT_SCREEN:case M.RIGHT:case M.SHIFT:case M.UP:case M.WIN_KEY:case M.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=M.ZERO&&e<=M.NINE)return!0;if(e>=M.NUM_ZERO&&e<=M.NUM_MULTIPLY)return!0;if(e>=M.A&&e<=M.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case M.SPACE:case M.QUESTION_MARK:case M.NUM_PLUS:case M.NUM_MINUS:case M.NUM_PERIOD:case M.NUM_DIVISION:case M.SEMICOLON:case M.DASH:case M.EQUALS:case M.COMMA:case M.PERIOD:case M.SLASH:case M.APOSTROPHE:case M.SINGLE_QUOTE:case M.OPEN_SQUARE_BRACKET:case M.BACKSLASH:case M.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const O=M,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 o=A(t,n,r),i={};switch(e){case"rtl":i.right="".concat(100*o,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(100*o,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(100*o,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(100*o,"%"),i.transform="translateX(-50%)"}return i}function D(e,t){return Array.isArray(e)?e[t]:e}var _=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"];const R=c.forwardRef((function(e,t){var n,r,i=e.prefixCls,s=e.value,a=e.valueIndex,l=e.onStartMove,u=e.style,d=e.render,f=e.dragging,p=e.onOffsetChange,m=S(e,_),g=c.useContext(E),y=g.min,v=g.max,b=g.direction,x=g.disabled,k=g.keyboard,M=g.range,A=g.tabIndex,R=g.ariaLabelForHandle,N=g.ariaLabelledByForHandle,P=g.ariaValueTextFormatterForHandle,I="".concat(i,"-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={},o(n,"".concat(I,"-").concat(a+1),M),o(n,"".concat(I,"-dragging"),f),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 O.LEFT:t="ltr"===b||"btt"===b?-1:1;break;case O.RIGHT:t="ltr"===b||"btt"===b?1:-1;break;case O.UP:t="ttb"!==b?1:-1;break;case O.DOWN:t="ttb"!==b?-1:1;break;case O.HOME:t="min";break;case O.END:t="max";break;case O.PAGE_UP:t=2;break;case O.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),p(t,a))}},tabIndex:x?null:D(A,a),role:"slider","aria-valuemin":y,"aria-valuemax":v,"aria-valuenow":s,"aria-disabled":x,"aria-label":D(R,a),"aria-labelledby":D(N,a),"aria-valuetext":null===(r=D(P,a))||void 0===r?void 0:r(s)},m));return d&&(F=d(F,{index:a,prefixCls:i,value:s,dragging:f})),F}));var N=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"];const P=c.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,i=e.onOffsetChange,s=e.values,a=e.handleRender,l=e.draggingIndex,u=S(e,N),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(R,(0,w.Z)({ref:function(e){e?h.current[t]=e:delete h.current[t]},dragging:l===t,prefixCls:n,style:D(r,t),key:t,value:e,valueIndex:t,onStartMove:o,onOffsetChange:i,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,o=e.end,i=e.index,s=e.onStartMove,a=c.useContext(E),l=a.direction,u=a.min,d=a.max,f=a.disabled,p=a.range,m="".concat(t,"-track"),g=A(r,u,d),y=A(o,u,d),v=function(e){!f&&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(i+1)),style:C(C({},b),n),onMouseDown:v,onTouchStart:v})}function j(e){var t=e.prefixCls,n=e.style,r=e.values,o=e.startPoint,i=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!=o?o:u,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],i=0;i<r.length-1;i+=1)n.push({start:r[i],end:r[i+1]});return n}),[r,l,o,u]);return a?h.map((function(e,r){var o=e.start,s=e.end;return c.createElement(L,{index:r,prefixCls:t,style:D(n,r),start:o,end:s,key:r,onStartMove:i})})):null}function F(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,s=e.onClick,a=c.useContext(E),l=a.min,u=a.max,d=a.direction,f=a.includedStart,p=a.includedEnd,m=a.included,g="".concat(t,"-text"),y=T(d,i,l,u);return c.createElement("span",{className:h()(g,o({},"".concat(g,"-active"),m&&f<=i&&i<=p)),style:C(C({},y),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){s(i)}},r)}function B(e){var t=e.prefixCls,n=e.marks,r=e.onClick,o="".concat(t,"-mark");return n.length?c.createElement("div",{className:o},n.map((function(e){var t=e.value,n=e.style,i=e.label;return c.createElement(F,{key:t,prefixCls:o,style:n,value:t,onClick:r},i)}))):null}function z(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,s=c.useContext(E),a=s.min,l=s.max,u=s.direction,d=s.included,f=s.includedStart,p=s.includedEnd,m="".concat(t,"-dot"),g=d&&f<=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 i?i(n):i)),c.createElement("span",{className:h()(m,o({},"".concat(m,"-active"),g)),style:y})}function $(e){var t=e.prefixCls,n=e.marks,r=e.dots,o=e.style,i=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:o,activeStyle:i})})))}const H=c.forwardRef((function(e,t){var n,i=e.prefixCls,s=void 0===i?"rc-slider":i,u=e.className,d=e.style,f=e.disabled,g=void 0!==f&&f,w=e.keyboard,x=void 0===w||w,S=e.autoFocus,k=e.onFocus,C=e.onBlur,M=e.min,O=void 0===M?0:M,A=e.max,T=void 0===A?100:A,D=e.step,_=void 0===D?1:D,R=e.value,N=e.defaultValue,L=e.range,F=e.count,z=e.onChange,H=e.onBeforeChange,W=e.onAfterChange,U=e.allowCross,V=void 0===U||U,q=e.pushable,K=void 0!==q&&q,Y=e.draggableTrack,G=e.reverse,J=e.vertical,Q=e.included,X=void 0===Q||Q,Z=e.startPoint,ee=e.trackStyle,te=e.handleStyle,ne=e.railStyle,re=e.dotStyle,oe=e.activeDotStyle,ie=e.marks,se=e.dots,ae=e.handleRender,le=e.tabIndex,ce=void 0===le?0:le,ue=e.ariaLabelForHandle,he=e.ariaLabelledByForHandle,de=e.ariaValueTextFormatterForHandle,fe=c.useRef(),pe=c.useRef(),me=c.useMemo((function(){return J?G?"ttb":"btt":G?"rtl":"ltr"}),[G,J]),ge=c.useMemo((function(){return isFinite(O)?O:0}),[O]),ye=c.useMemo((function(){return isFinite(T)?T:100}),[T]),ve=c.useMemo((function(){return null!==_&&_<=0?1:_}),[_]),be=c.useMemo((function(){return!0===K?ve:K>=0&&K}),[K,ve]),we=c.useMemo((function(){return Object.keys(ie||{}).map((function(e){var t=ie[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}))}),[ie]),xe=function(e,t,n,r,o,i){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 o=e+Math.round((s(r)-e)/n)*n,i=function(e){return(String(e).split(".")[1]||"").length},a=Math.max(i(n),i(t),i(e)),l=Number(o.toFixed(a));return e<=l&&l<=t?l:null}return null}),[n,e,t,s]),u=c.useCallback((function(o){var i=s(o),a=r.map((function(e){return e.value}));null!==n&&a.push(l(o)),a.push(e,t);var c=a[0],u=t-e;return a.forEach((function(e){var t=Math.abs(i-e);t<=u&&(c=e,u=t)})),c}),[e,t,r,n,s,l]),h=function o(i,s,c){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof s){var h,d=i[c],f=d+s,p=[];r.forEach((function(e){p.push(e.value)})),p.push(e,t),p.push(l(d));var m=s>0?1:-1;"unit"===u?p.push(l(d+m*n)):p.push(l(f)),p=p.filter((function(e){return null!==e})).filter((function(e){return s<0?e<=d:e>=d})),"unit"===u&&(p=p.filter((function(e){return e!==d})));var g="unit"===u?d:f;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(i);return v[c]=h,o(v,s-m,c,u)}return h}return"min"===s?e:"max"===s?t:void 0},d=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=e[n],i=h(e,t,n,r);return{value:i,changed:i!==o}},f=function(e){return null===i&&0===e||"number"==typeof i&&e<i};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===o){var c=i||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 i||null===i){for(var p=n+1;p<s.length;p+=1)for(var m=!0;f(s[p]-s[p-1])&&m;){var g=d(s,1,p);s[p]=g.value,m=g.changed}for(var y=n;y>0;y-=1)for(var v=!0;f(s[y]-s[y-1])&&v;){var b=d(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;f(s[w]-s[w-1])&&x;){var S=d(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;f(s[k+1]-s[k])&&C;){var M=d(s,1,k+1);s[k+1]=M.value,C=M.changed}}return{value:s[n],values:s}}]}(ge,ye,ve,we,V,be),Se=l(xe,2),ke=Se[0],Ce=Se[1],Me=function(e,t){var n=t||{},r=n.defaultValue,o=n.value,i=n.onChange,s=n.postState,a=l(v((function(){return b(o)?o:b(r)?"function"==typeof r?r():r:"function"==typeof e?e():e})),2),c=a[0],u=a[1],h=void 0!==o?o:c,d=s?s(h):h,f=m(i),p=l(v([h]),2),g=p[0],w=p[1];return y((function(){var e=g[0];c!==e&&f(c,e)}),[g]),y((function(){b(o)||u(o)}),[o]),[d,m((function(e,t){u(e,t),w([h],t)}))]}(N,{value:R}),Oe=l(Me,2),Ee=Oe[0],Ae=Oe[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 o;n.push(null!==(o=n[n.length-1])&&void 0!==o?o: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]),De=c.useRef(Te);De.current=Te;var _e=function(e){return L?e:e[0]},Re=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],o=new Set;return function e(t,i){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=o.has(t);if(p(!a,"Warning: There may be circular references"),a)return!1;if(t===i)return!0;if(n&&s>1)return!1;o.add(t);var l=s+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var c=0;c<t.length;c++)if(!e(t[c],i[c],l))return!1;return!0}if(t&&i&&"object"===r(t)&&"object"===r(i)){var u=Object.keys(t);return u.length===Object.keys(i).length&&u.every((function(n){return e(t[n],i[n],l)}))}return!1}(e,t)}(t,De.current,!0)&&z(_e(t)),Ae(t)},Ne=function(e){if(!g){var t=0,n=ye-ge;Te.forEach((function(r,o){var i=Math.abs(e-r);i<=n&&(n=i,t=o)}));var r=a(Te);r[t]=e,L&&!Te.length&&void 0===F&&r.push(e),null==H||H(_e(r)),Re(r),null==W||W(_e(r))}},Pe=l(c.useState(null),2),Ie=Pe[0],Le=Pe[1];c.useEffect((function(){if(null!==Ie){var e=Te.indexOf(Ie);e>=0&&fe.current.focus(e)}Le(null)}),[Ie]);var je=c.useMemo((function(){return(!Y||null!==ve)&&Y}),[Y,ve]),Fe=function(e,t,n,r,o,i,s,u,h){var d=l(c.useState(null),2),f=d[0],p=d[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),M=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",M.current),document.removeEventListener("touchmove",C.current),document.removeEventListener("touchend",M.current)}}),[]);var O=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=o-s,u=t*(o-r);u=Math.max(u,l),u=Math.min(u,c);var d=i(n+u);u=d-n;var f=S.map((function(e){return e+u}));O(f)}else{var p=(o-r)*t,m=a(b);m[e]=S[e];var g=h(m,p,e,"dist");O(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,f,T,function(r,o){r.stopPropagation();var i=n[o];y(o),p(i),k(n);var s=I(r),a=s.pageX,l=s.pageY,c=function(n){n.preventDefault();var r,i=I(n),s=i.pageX,c=i.pageY,u=s-a,h=c-l,d=e.current.getBoundingClientRect(),f=d.width,p=d.height;switch(t){case"btt":r=-h/p;break;case"ttb":r=h/p;break;case"rtl":r=-u/f;break;default:r=u/f}A.current(o,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,M.current=null,y(-1),null==W||W(_e(De.current))};document.addEventListener("mouseup",u),document.addEventListener("mousemove",c),document.addEventListener("touchend",u),document.addEventListener("touchmove",c),C.current=c,M.current=u}]}(pe,me,Te,ge,ye,ke,Re,0,Ce),Be=l(Fe,4),ze=Be[0],$e=Be[1],He=Be[2],We=Be[3],Ue=function(e,t){We(e,t),null==H||H(_e(De.current))},Ve=-1!==ze;c.useEffect((function(){if(!Ve){var e=Te.lastIndexOf($e);fe.current.focus(e)}}),[Ve]);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),Ye=Ke[0],Ge=Ke[1];c.useImperativeHandle(t,(function(){return{focus:function(){fe.current.focus(0)},blur:function(){var e=document.activeElement;pe.current.contains(e)&&(null==e||e.blur())}}})),c.useEffect((function(){S&&fe.current.focus(0)}),[]);var Je=c.useMemo((function(){return{min:ge,max:ye,direction:me,disabled:g,keyboard:x,step:ve,included:X,includedStart:Ye,includedEnd:Ge,range:L,tabIndex:ce,ariaLabelForHandle:ue,ariaLabelledByForHandle:he,ariaValueTextFormatterForHandle:de}}),[ge,ye,me,g,x,ve,X,Ye,Ge,L,ce,ue,he,de]);return c.createElement(E.Provider,{value:Je},c.createElement("div",{ref:pe,className:h()(s,u,(n={},o(n,"".concat(s,"-disabled"),g),o(n,"".concat(s,"-vertical"),J),o(n,"".concat(s,"-horizontal"),!J),o(n,"".concat(s,"-with-marks"),we.length),n)),style:d,onMouseDown:function(e){e.preventDefault();var t,n=pe.current.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,s=n.top,a=n.bottom,l=n.right,c=e.clientX,u=e.clientY;switch(me){case"btt":t=(a-u)/o;break;case"ttb":t=(u-s)/o;break;case"rtl":t=(l-c)/r;break;default:t=(c-i)/r}Ne(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:oe}),c.createElement(P,{ref:fe,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(_e(Te)),Re(n.values),null==W||W(_e(n.values)),Le(n.value)}},onFocus:k,onBlur:C,handleRender:ae}),c.createElement(B,{prefixCls:s,marks:we,onClick:Ne})))}))},4448:(e,t,n)=>{"use strict";var r=n(7294),o=n(3840);function i(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,d=/^[: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]*$/,f={},p={};function m(e,t,n,r,o,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,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 o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0!==o.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,o,r)&&(n=null),r||null===o?function(e){return!!h.call(p,e)||!h.call(f,e)&&(d.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!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"),M=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),E=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var P=Symbol.iterator;function I(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=P&&e[P]||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 o=t.stack.split("\n"),i=r.stack.split("\n"),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(1!==s||1!==a)do{if(s--,0>--a||o[s]!==i[a]){var l="\n"+o[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 M:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case D:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case O: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 _:return null!==(t=e.displayName||null)?t:H(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return H(e(t))}catch(e){}}return null}function W(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 V(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=V(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.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=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(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 G(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 J(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 Q(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function X(e,t){Q(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&&Y(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 o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+U(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return j({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(te(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:U(n)}}function ie(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 de(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 fe={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||fe.hasOwnProperty(e)&&fe[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("--"),o=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[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(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(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 Me(e){if(e=yo(e)){if("function"!=typeof Se)throw Error(i(280));var t=e.stateNode;t&&(t=bo(t),Se(e.stateNode,e.type,t))}}function Oe(e){ke?Ce?Ce.push(e):Ce=[e]:ke=e}function Ee(){if(ke){var e=ke,t=Ce;if(Ce=ke=null,Me(e),t)for(e=0;e<t.length;e++)Me(t[e])}}function Ae(e,t){return e(t)}function Te(){}var De=!1;function _e(e,t,n){if(De)return e(t,n);De=!0;try{return Ae(e,t,n)}finally{De=!1,(null!==ke||null!==Ce)&&(Te(),Ee())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=bo(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(i(231,t,typeof n));return n}var Ne=!1;if(u)try{var Pe={};Object.defineProperty(Pe,"passive",{get:function(){Ne=!0}}),window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,Pe)}catch(ue){Ne=!1}function Ie(e,t,n,r,o,i,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,o,i,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 We(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(i(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var s=o.alternate;if(null===s){if(null!==(r=o.return)){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Ue(o),e;if(s===r)return Ue(o),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=s;else{for(var a=!1,l=o.child;l;){if(l===n){a=!0,n=o,r=s;break}if(l===r){a=!0,r=o,n=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===n){a=!0,n=s,r=o;break}if(l===r){a=!0,r=s,n=o;break}l=l.sibling}if(!a)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(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=o.unstable_scheduleCallback,Ye=o.unstable_cancelCallback,Ge=o.unstable_shouldYield,Je=o.unstable_requestPaint,Qe=o.unstable_now,Xe=o.unstable_getCurrentPriorityLevel,Ze=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,it=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 dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~o;0!==a?r=ht(a):0!=(i&=s)&&(r=ht(i))}else 0!=(s=n&~o)?r=ht(s):0!==i&&(r=ht(i));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!=(4194240&i)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-st(t)),r|=e[n],t&=~o;return r}function ft(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),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var xt,St,kt,Ct,Mt,Ot=!1,Et=[],At=null,Tt=null,Dt=null,_t=new Map,Rt=new Map,Nt=[],Pt="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":Dt=null;break;case"pointerover":case"pointerout":_t.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function Lt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&null!==(t=yo(t))&&St(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function jt(e){var t=go(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=We(n)))return e.blockedOn=t,void Mt(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=Gt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=yo(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(){Ot=!1,null!==At&&Ft(At)&&(At=null),null!==Tt&&Ft(Tt)&&(Tt=null),null!==Dt&&Ft(Dt)&&(Dt=null),_t.forEach(Bt),Rt.forEach(Bt)}function $t(e,t){e.blockedOn===t&&(e.blockedOn=null,Ot||(Ot=!0,o.unstable_scheduleCallback(o.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!==Dt&&$t(Dt,e),_t.forEach(t),Rt.forEach(t),n=0;n<Nt.length;n++)(r=Nt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&null===(n=Nt[0]).blockedOn;)jt(n),null===n.blockedOn&&Nt.shift()}var Wt=w.ReactCurrentBatchConfig,Ut=!0;function Vt(e,t,n,r){var o=bt,i=Wt.transition;Wt.transition=null;try{bt=1,Kt(e,t,n,r)}finally{bt=o,Wt.transition=i}}function qt(e,t,n,r){var o=bt,i=Wt.transition;Wt.transition=null;try{bt=4,Kt(e,t,n,r)}finally{bt=o,Wt.transition=i}}function Kt(e,t,n,r){if(Ut){var o=Gt(e,t,n,r);if(null===o)$r(e,t,r,Yt,n),It(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return At=Lt(At,e,t,n,r,o),!0;case"dragenter":return Tt=Lt(Tt,e,t,n,r,o),!0;case"mouseover":return Dt=Lt(Dt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return _t.set(i,Lt(_t.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Rt.set(i,Lt(Rt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(It(e,r),4&t&&-1<Pt.indexOf(e)){for(;null!==o;){var i=yo(o);if(null!==i&&xt(i),null===(i=Gt(e,t,n,r))&&$r(e,t,r,Yt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else $r(e,t,r,null,n)}}var Yt=null;function Gt(e,t,n,r){if(Yt=null,null!==(e=go(e=xe(r))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=We(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 Yt=e,null}function Jt(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 Qt=null,Xt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Xt,r=n.length,o="value"in Qt?Qt.value:Qt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===o[i-t];t++);return Zt=o.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,o,i){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(o):o[s]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.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}),dn=on(hn),fn=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(fn),mn=on(j({},fn,{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 Mn=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}})),On=on(j({},fn,{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({},fn,{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})),Dn=[9,13,27,32],_n=u&&"CompositionEvent"in window,Rn=null;u&&"documentMode"in document&&(Rn=document.documentMode);var Nn=u&&"TextEvent"in window&&!Rn,Pn=u&&(!_n||Rn&&8<Rn&&11>=Rn),In=String.fromCharCode(32),Ln=!1;function jn(e,t){switch(e){case"keyup":return-1!==Dn.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){Oe(r),0<(t=Wr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Un=null;function Vn(e){Ir(e,0)}function qn(e){if(K(vo(e)))return e}function Kn(e,t){if("change"===e)return t}var Yn=!1;if(u){var Gn;if(u){var Jn="oninput"in document;if(!Jn){var Qn=document.createElement("div");Qn.setAttribute("oninput","return;"),Jn="function"==typeof Qn.oninput}Gn=Jn}else Gn=!1;Yn=Gn&&(!document.documentMode||9<document.documentMode)}function Xn(){Wn&&(Wn.detachEvent("onpropertychange",Zn),Un=Wn=null)}function Zn(e){if("value"===e.propertyName&&qn(Un)){var t=[];Hn(t,Un,e,xe(e)),_e(Vn,t)}}function er(e,t,n){"focusin"===e?(Xn(),Un=n,(Wn=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 or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ir(e,t){if(or(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 o=n[r];if(!h.call(t,o)||!or(e[o],t[o]))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=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Y((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 o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ar(n,i);var s=ar(n,r);o&&s&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>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 dr=u&&"documentMode"in document&&11>=document.documentMode,fr=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==fr||fr!==Y(r)||(r="selectionStart"in(r=fr)&&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&&ir(mr,r)||(mr=r,0<(r=Wr(pr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fr)))}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"),Mr=Sr("animationstart"),Or=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 Dr=0;Dr<Ar.length;Dr++){var _r=Ar[Dr];Tr(_r.toLowerCase(),"on"+(_r[0].toUpperCase()+_r.slice(1)))}Tr(kr,"onAnimationEnd"),Tr(Cr,"onAnimationIteration"),Tr(Mr,"onAnimationStart"),Tr("dblclick","onDoubleClick"),Tr("focusin","onFocus"),Tr("focusout","onBlur"),Tr(Or,"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 Rr="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(" "),Nr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rr));function Pr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,s,a,l,c){if($e.apply(this,arguments),Le){if(!Le)throw Error(i(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],o=r.event;r=r.listeners;e:{var i=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!==i&&o.isPropagationStopped())break e;Pr(o,a,c),i=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Pr(o,a,c),i=l}}}if(Fe)throw e=Be,Fe=!1,Be=null,e}function Lr(e,t){var n=t[fo];void 0===n&&(n=t[fo]=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&&(Nr.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(Jt(t)){case 1:var o=Vt;break;case 4:o=qt;break;default:o=Kt}n=o.bind(null,t,n,e),o=void 0,!Ne||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function $r(e,t,n,r,o){var i=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===o||8===a.nodeType&&a.parentNode===o)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;s=s.return}for(;null!==a;){if(null===(s=go(a)))return;if(5===(l=s.tag)||6===l){r=i=s;continue e}a=a.parentNode}}r=r.return}_e((function(){var r=i,o=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=Mn;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 Mr:l=yn;break;case Or:l=An;break;case"scroll":l=dn;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=On}var u=0!=(4&t),h=!u&&"scroll"===e,d=u?null!==a?a+"Capture":null:a;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==d&&null!=(m=Re(p,d))&&u.push(Hr(p,m,f))),h)break;p=p.return}0<u.length&&(a=new l(a,c,null,n,o),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)||!go(c)&&!c[ho])&&(l||a)&&(a=o.window===o?o:(a=o.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?go(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",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=On,m="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?a:vo(l),f=null==c?a:vo(c),(a=new u(m,p+"leave",l,n,o)).target=h,a.relatedTarget=f,m=null,go(o)===r&&((u=new u(d,p+"enter",c,n,o)).target=f,u.relatedTarget=h,m=u),h=m,l&&c)e:{for(d=c,p=0,f=u=l;f;f=Ur(f))p++;for(f=0,m=d;m;m=Ur(m))f++;for(;0<p-f;)u=Ur(u),p--;for(;0<f-p;)d=Ur(d),f--;for(;p--;){if(u===d||null!==d&&u===d.alternate)break e;u=Ur(u),d=Ur(d)}u=null}else u=null;null!==l&&Vr(s,a,l,u,!1),null!==c&&null!==h&&Vr(s,h,c,u,!0)}if("select"===(l=(a=r?vo(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=Kn;else if($n(a))if(Yn)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,o):(y&&y(e,a,r),"focusout"===e&&(y=a._wrapperState)&&y.controlled&&"number"===a.type&&ee(a,"number",a.value)),y=r?vo(r):window,e){case"focusin":($n(y)||"true"===y.contentEditable)&&(fr=y,pr=r,mr=null);break;case"focusout":mr=pr=fr=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,yr(s,n,o);break;case"selectionchange":if(dr)break;case"keydown":case"keyup":yr(s,n,o)}var v;if(_n)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&&(Pn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Bn&&(v=en()):(Xt="value"in(Qt=o)?Qt.value:Qt.textContent,Bn=!0)),0<(y=Wr(r,b)).length&&(b=new bn(b,e,null,n,o),s.push({event:b,listeners:y}),(v||null!==(v=Fn(n)))&&(b.data=v))),(v=Nn?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||!_n&&jn(e,t)?(e=en(),Zt=Xt=Qt=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 Pn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Wr(r,"onBeforeInput")).length&&(o=new bn("onBeforeInput","beforeinput",null,n,o),s.push({event:o,listeners:r}),o.data=v)}Ir(s,t)}))}function Hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Re(e,n))&&r.unshift(Hr(e,i,o)),null!=(i=Re(e,t))&&r.push(Hr(e,i,o))),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 Vr(e,t,n,r,o){for(var i=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,o?null!=(l=Re(n,i))&&s.unshift(Hr(n,l,a)):o||null!=(l=Re(n,i))&&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 Yr(e){return("string"==typeof e?e:""+e).replace(qr,"\n").replace(Kr,"")}function Gr(e,t,n){if(t=Yr(t),Yr(e)!==t&&n)throw Error(i(425))}function Jr(){}var Qr=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 eo="function"==typeof setTimeout?setTimeout:void 0,to="function"==typeof clearTimeout?clearTimeout:void 0,no="function"==typeof Promise?Promise:void 0,ro="function"==typeof queueMicrotask?queueMicrotask:void 0!==no?function(e){return no.resolve(null).then(e).catch(oo)}:eo;function oo(e){setTimeout((function(){throw e}))}function io(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Ht(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Ht(t)}function so(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 ao(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 lo=Math.random().toString(36).slice(2),co="__reactFiber$"+lo,uo="__reactProps$"+lo,ho="__reactContainer$"+lo,fo="__reactEvents$"+lo,po="__reactListeners$"+lo,mo="__reactHandles$"+lo;function go(e){var t=e[co];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ho]||n[co]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ao(e);null!==e;){if(n=e[co])return n;e=ao(e)}return t}n=(e=n).parentNode}return null}function yo(e){return!(e=e[co]||e[ho])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function vo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function bo(e){return e[uo]||null}var wo=[],xo=-1;function So(e){return{current:e}}function ko(e){0>xo||(e.current=wo[xo],wo[xo]=null,xo--)}function Co(e,t){xo++,wo[xo]=e.current,e.current=t}var Mo={},Oo=So(Mo),Eo=So(!1),Ao=Mo;function To(e,t){var n=e.type.contextTypes;if(!n)return Mo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Do(e){return null!=e.childContextTypes}function _o(){ko(Eo),ko(Oo)}function Ro(e,t,n){if(Oo.current!==Mo)throw Error(i(168));Co(Oo,t),Co(Eo,n)}function No(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,W(e)||"Unknown",o));return j({},n,r)}function Po(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Mo,Ao=Oo.current,Co(Oo,e),Co(Eo,Eo.current),!0}function Io(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=No(e,t,Ao),r.__reactInternalMemoizedMergedChildContext=e,ko(Eo),ko(Oo),Co(Oo,e)):ko(Eo),Co(Eo,n)}var Lo=null,jo=!1,Fo=!1;function Bo(e){null===Lo?Lo=[e]:Lo.push(e)}function zo(){if(!Fo&&null!==Lo){Fo=!0;var e=0,t=bt;try{var n=Lo;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Lo=null,jo=!1}catch(t){throw null!==Lo&&(Lo=Lo.slice(e+1)),Ke(Ze,zo),t}finally{bt=t,Fo=!1}}return null}var $o=[],Ho=0,Wo=null,Uo=0,Vo=[],qo=0,Ko=null,Yo=1,Go="";function Jo(e,t){$o[Ho++]=Uo,$o[Ho++]=Wo,Wo=e,Uo=t}function Qo(e,t,n){Vo[qo++]=Yo,Vo[qo++]=Go,Vo[qo++]=Ko,Ko=e;var r=Yo;e=Go;var o=32-st(r)-1;r&=~(1<<o),n+=1;var i=32-st(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Yo=1<<32-st(t)+o|n<<o|r,Go=i+e}else Yo=1<<i|n<<o|r,Go=e}function Xo(e){null!==e.return&&(Jo(e,1),Qo(e,1,0))}function Zo(e){for(;e===Wo;)Wo=$o[--Ho],$o[Ho]=null,Uo=$o[--Ho],$o[Ho]=null;for(;e===Ko;)Ko=Vo[--qo],Vo[qo]=null,Go=Vo[--qo],Vo[qo]=null,Yo=Vo[--qo],Vo[qo]=null}var ei=null,ti=null,ni=!1,ri=null;function oi(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 ii(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,ei=e,ti=so(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ei=e,ti=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ko?{id:Yo,overflow:Go}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ei=e,ti=null,!0);default:return!1}}function si(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ai(e){if(ni){var t=ti;if(t){var n=t;if(!ii(e,t)){if(si(e))throw Error(i(418));t=so(n.nextSibling);var r=ei;t&&ii(e,t)?oi(r,n):(e.flags=-4097&e.flags|2,ni=!1,ei=e)}}else{if(si(e))throw Error(i(418));e.flags=-4097&e.flags|2,ni=!1,ei=e}}}function li(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ei=e}function ci(e){if(e!==ei)return!1;if(!ni)return li(e),ni=!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=ti)){if(si(e))throw ui(),Error(i(418));for(;t;)oi(e,t),t=so(t.nextSibling)}if(li(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ti=so(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ti=null}}else ti=ei?so(e.stateNode.nextSibling):null;return!0}function ui(){for(var e=ti;e;)e=so(e.nextSibling)}function hi(){ti=ei=null,ni=!1}function di(e){null===ri?ri=[e]:ri.push(e)}var fi=w.ReactCurrentBatchConfig;function pi(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 mi=So(null),gi=null,yi=null,vi=null;function bi(){vi=yi=gi=null}function wi(e){var t=mi.current;ko(mi),e._currentValue=t}function xi(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 Si(e,t){gi=e,vi=yi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(ya=!0),e.firstContext=null)}function ki(e){var t=e._currentValue;if(vi!==e)if(e={context:e,memoizedValue:t,next:null},null===yi){if(null===gi)throw Error(i(308));yi=e,gi.dependencies={lanes:0,firstContext:e}}else yi=yi.next=e;return t}var Ci=null;function Mi(e){null===Ci?Ci=[e]:Ci.push(e)}function Oi(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Mi(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ei(e,r)}function Ei(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 Ai=!1;function Ti(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Di(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 _i(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ri(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Ol)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ei(e,n)}return null===(o=r.interleaved)?(t.next=t,Mi(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ei(e,n)}function Ni(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 Pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=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===i?o=i=s:i=i.next=s,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ii(e,t,n,r){var o=e.updateQueue;Ai=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(null!==a){o.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?i=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!==i){var h=o.baseState;for(s=0,u=c=l=null,a=i;;){var d=a.lane,f=a.eventTime;if((r&d)===d){null!==u&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(d=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(d="function"==typeof(p=m.payload)?p.call(f,h,d):p))break e;h=j({},h,d);break e;case 2:Ai=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(d=o.effects)?o.effects=[a]:d.push(a))}else f={eventTime:f,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=f,l=h):u=u.next=f,s|=d;if(null===(a=a.next)){if(null===(a=o.shared.pending))break;a=(d=a).next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}if(null===u&&(l=h),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{s|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Pl|=s,e.lanes=s,e.memoizedState=h}}function Li(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(i(191,o));o.call(r)}}}var ji=(new r.Component).refs;function Fi(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 Bi={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xl(),o=Zl(e),i=_i(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Ri(e,i,o))&&(ec(t,e,o,r),Ni(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xl(),o=Zl(e),i=_i(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Ri(e,i,o))&&(ec(t,e,o,r),Ni(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xl(),r=Zl(e),o=_i(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Ri(e,o,r))&&(ec(t,e,r,n),Ni(t,e,r))}};function zi(e,t,n,r,o,i,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,s):!(t.prototype&&t.prototype.isPureReactComponent&&ir(n,r)&&ir(o,i))}function $i(e,t,n){var r=!1,o=Mo,i=t.contextType;return"object"==typeof i&&null!==i?i=ki(i):(o=Do(t)?Ao:Oo.current,i=(r=null!=(r=t.contextTypes))?To(e,o):Mo),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Bi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Hi(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&&Bi.enqueueReplaceState(t,t.state,null)}function Wi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=ji,Ti(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=ki(i):(i=Do(t)?Ao:Oo.current,o.context=To(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(Fi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Bi.enqueueReplaceState(o,o.state,null),Ii(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function Ui(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(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=o.refs;t===ji&&(t=o.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!=typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function Vi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qi(e){return(0,e._init)(e._payload)}function Ki(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 o(e,t){return(e=_c(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=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===k?h(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===R&&qi(i)===t.type)?((r=o(t,n.props)).ref=Ui(e,t,n),r.return=e,r):((r=Rc(n.type,n.key,n.props,null,e.mode,r)).ref=Ui(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=o(t,n.children||[])).return=e,t)}function h(e,t,n,r,i){return null===t||7!==t.tag?((t=Nc(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(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=Rc(t.type,t.key,t.props,null,e.mode,n)).ref=Ui(e,null,t),n.return=e,n;case S:return(t=Lc(t,e.mode,n)).return=e,t;case R:return d(e,(0,t._init)(t._payload),n)}if(te(t)||I(t))return(t=Nc(t,e.mode,n,null)).return=e,t;Vi(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?c(e,t,n,r):null;case S:return n.key===o?u(e,t,n,r):null;case R:return f(e,t,(o=n._init)(n._payload),r)}if(te(n)||I(n))return null!==o?null:h(e,t,n,r,null);Vi(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);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,o);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case R:return p(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||I(r))return h(t,e=e.get(n)||null,r,o,null);Vi(t,r)}return null}function m(o,i,a,l){for(var c=null,u=null,h=i,m=i=0,g=null;null!==h&&m<a.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var y=f(o,h,a[m],l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(o,h),i=s(y,i,m),null===u?c=y:u.sibling=y,u=y,h=g}if(m===a.length)return n(o,h),ni&&Jo(o,m),c;if(null===h){for(;m<a.length;m++)null!==(h=d(o,a[m],l))&&(i=s(h,i,m),null===u?c=h:u.sibling=h,u=h);return ni&&Jo(o,m),c}for(h=r(o,h);m<a.length;m++)null!==(g=p(h,o,m,a[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),i=s(g,i,m),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(o,e)})),ni&&Jo(o,m),c}function g(o,a,l,c){var u=I(l);if("function"!=typeof u)throw Error(i(150));if(null==(l=u.call(l)))throw Error(i(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=f(o,m,v.value,c);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(o,m),a=s(b,a,g),null===h?u=b:h.sibling=b,h=b,m=y}if(v.done)return n(o,m),ni&&Jo(o,g),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=d(o,v.value,c))&&(a=s(v,a,g),null===h?u=v:h.sibling=v,h=v);return ni&&Jo(o,g),u}for(m=r(o,m);!v.done;g++,v=l.next())null!==(v=p(m,o,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(o,e)})),ni&&Jo(o,g),u}return function e(r,i,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=i;null!==u;){if(u.key===c){if((c=s.type)===k){if(7===u.tag){n(r,u.sibling),(i=o(u,s.props.children)).return=r,r=i;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===R&&qi(c)===u.type){n(r,u.sibling),(i=o(u,s.props)).ref=Ui(r,u,s),i.return=r,r=i;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===k?((i=Nc(s.props.children,r.mode,l,s.key)).return=r,r=i):((l=Rc(s.type,s.key,s.props,null,r.mode,l)).ref=Ui(r,i,s),l.return=r,r=l)}return a(r);case S:e:{for(u=s.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===s.containerInfo&&i.stateNode.implementation===s.implementation){n(r,i.sibling),(i=o(i,s.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=Lc(s,r.mode,l)).return=r,r=i}return a(r);case R:return e(r,i,(u=s._init)(s._payload),l)}if(te(s))return m(r,i,s,l);if(I(s))return g(r,i,s,l);Vi(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,s)).return=r,r=i):(n(r,i),(i=Ic(s,r.mode,l)).return=r,r=i),a(r)):n(r,i)}}var Yi=Ki(!0),Gi=Ki(!1),Ji={},Qi=So(Ji),Xi=So(Ji),Zi=So(Ji);function es(e){if(e===Ji)throw Error(i(174));return e}function ts(e,t){switch(Co(Zi,t),Co(Xi,e),Co(Qi,Ji),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)}ko(Qi),Co(Qi,t)}function ns(){ko(Qi),ko(Xi),ko(Zi)}function rs(e){es(Zi.current);var t=es(Qi.current),n=le(t,e.type);t!==n&&(Co(Xi,e),Co(Qi,n))}function os(e){Xi.current===e&&(ko(Qi),ko(Xi))}var is=So(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,ds=null,fs=null,ps=null,ms=!1,gs=!1,ys=0,vs=0;function bs(){throw Error(i(321))}function ws(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function xs(e,t,n,r,o,s){if(hs=s,ds=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cs.current=null===e||null===e.memoizedState?oa:ia,e=n(r,o),gs){s=0;do{if(gs=!1,ys=0,25<=s)throw Error(i(301));s+=1,ps=fs=null,t.updateQueue=null,cs.current=sa,e=n(r,o)}while(gs)}if(cs.current=ra,t=null!==fs&&null!==fs.next,hs=0,ps=fs=ds=null,ms=!1,t)throw Error(i(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?ds.memoizedState=ps=e:ps=ps.next=e,ps}function Cs(){if(null===fs){var e=ds.alternate;e=null!==e?e.memoizedState:null}else e=fs.next;var t=null===ps?ds.memoizedState:ps.next;if(null!==t)ps=t,fs=e;else{if(null===e)throw Error(i(310));e={memoizedState:(fs=e).memoizedState,baseState:fs.baseState,baseQueue:fs.baseQueue,queue:fs.queue,next:null},null===ps?ds.memoizedState=ps=e:ps=ps.next=e}return ps}function Ms(e,t){return"function"==typeof t?t(e):t}function Os(e){var t=Cs(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=fs,o=r.baseQueue,s=n.pending;if(null!==s){if(null!==o){var a=o.next;o.next=s.next,s.next=a}r.baseQueue=o=s,n.pending=null}if(null!==o){s=o.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 d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=d,a=r):c=c.next=d,ds.lanes|=h,Pl|=h}u=u.next}while(null!==u&&u!==s);null===c?a=r:c.next=l,or(r,t.memoizedState)||(ya=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{s=o.lane,ds.lanes|=s,Pl|=s,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Es(e){var t=Cs(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(null!==o){n.pending=null;var a=o=o.next;do{s=e(s,a.action),a=a.next}while(a!==o);or(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=ds,r=Cs(),o=t(),s=!or(r.memoizedState,o);if(s&&(r.memoizedState=o,ya=!0),r=r.queue,$s(Rs.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||null!==ps&&1&ps.memoizedState.tag){if(n.flags|=2048,Ls(9,_s.bind(null,n,r,o,t),void 0,null),null===El)throw Error(i(349));0!=(30&hs)||Ds(n,t,o)}return o}function Ds(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ds.updateQueue)?(t={lastEffect:null,stores:null},ds.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,Ns(t)&&Ps(e)}function Rs(e,t,n){return n((function(){Ns(t)&&Ps(e)}))}function Ns(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(e){return!0}}function Ps(e){var t=Ei(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:Ms,lastRenderedState:e},t.queue=e,e=e.dispatch=Zs.bind(null,ds,e),[t.memoizedState,e]}function Ls(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ds.updateQueue)?(t={lastEffect:null,stores:null},ds.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 o=ks();ds.flags|=e,o.memoizedState=Ls(1|t,n,void 0,void 0===r?null:r)}function Bs(e,t,n,r){var o=Cs();r=void 0===r?null:r;var i=void 0;if(null!==fs){var s=fs.memoizedState;if(i=s.destroy,null!==r&&ws(r,s.deps))return void(o.memoizedState=Ls(t,n,i,r))}ds.flags|=e,o.memoizedState=Ls(1|t,n,i,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 Ws(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 Vs(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 Ys(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 Gs(e,t,n){return 0==(21&hs)?(e.baseState&&(e.baseState=!1,ya=!0),e.memoizedState=n):(or(n,t)||(n=mt(),ds.lanes|=n,Pl|=n,e.baseState=!0),t)}function Js(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 Qs(){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=Oi(e,t,n,r))&&(ec(n,e,r,Xl()),na(n,t,r))}function Zs(e,t,n){var r=Zl(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ea(e))ta(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,or(a,s)){var l=t.interleaved;return null===l?(o.next=o,Mi(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(e){}null!==(n=Oi(e,t,o,r))&&(ec(n,e,r,o=Xl()),na(n,t,r))}}function ea(e){var t=e.alternate;return e===ds||null!==t&&t===ds}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:ki,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},oa={readContext:ki,useCallback:function(e,t){return ks().memoizedState=[e,void 0===t?null:t],e},useContext:ki,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,ds,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=Js.bind(null,e[1]),ks().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ds,o=ks();if(ni){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===El)throw Error(i(349));0!=(30&hs)||Ds(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,zs(Rs.bind(null,r,s,e),[e]),r.flags|=2048,Ls(9,_s.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ks(),t=El.identifierPrefix;if(ni){var n=Go;t=":"+t+"R"+(n=(Yo&~(1<<32-st(Yo)-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},ia={readContext:ki,useCallback:Ks,useContext:ki,useEffect:$s,useImperativeHandle:Vs,useInsertionEffect:Hs,useLayoutEffect:Ws,useMemo:Ys,useReducer:Os,useRef:js,useState:function(){return Os(Ms)},useDebugValue:qs,useDeferredValue:function(e){return Gs(Cs(),fs.memoizedState,e)},useTransition:function(){return[Os(Ms)[0],Cs().memoizedState]},useMutableSource:As,useSyncExternalStore:Ts,useId:Qs,unstable_isNewReconciler:!1},sa={readContext:ki,useCallback:Ks,useContext:ki,useEffect:$s,useImperativeHandle:Vs,useInsertionEffect:Hs,useLayoutEffect:Ws,useMemo:Ys,useReducer:Es,useRef:js,useState:function(){return Es(Ms)},useDebugValue:qs,useDeferredValue:function(e){var t=Cs();return null===fs?t.memoizedState=e:Gs(t,fs.memoizedState,e)},useTransition:function(){return[Es(Ms)[0],Cs().memoizedState]},useMutableSource:As,useSyncExternalStore:Ts,useId:Qs,unstable_isNewReconciler:!1};function aa(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,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=_i(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Wl=r),ca(0,t)},n}function da(e,t,n){(n=_i(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ca(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.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 fa(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ua;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.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,o){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=_i(-1,1)).tag=2,Ri(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var ga=w.ReactCurrentOwner,ya=!1;function va(e,t,n,r){t.child=null===e?Gi(t,null,n,r):Yi(t,e.child,n,r)}function ba(e,t,n,r,o){n=n.render;var i=t.ref;return Si(t,o),r=xs(e,t,n,r,i,o),n=Ss(),null===e||ya?(ni&&n&&Xo(t),t.flags|=1,va(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ha(e,t,o))}function wa(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Dc(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Rc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,xa(e,t,i,r,o))}if(i=e.child,0==(e.lanes&o)){var s=i.memoizedProps;if((n=null!==(n=n.compare)?n:ir)(s,r)&&e.ref===t.ref)return Ha(e,t,o)}return t.flags|=1,(e=_c(i,r)).ref=t.ref,e.return=t,t.child=e}function xa(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(ir(i,r)&&e.ref===t.ref){if(ya=!1,t.pendingProps=r=i,0==(e.lanes&o))return t.lanes=e.lanes,Ha(e,t,o);0!=(131072&e.flags)&&(ya=!0)}}return Ca(e,t,n,r,o)}function Sa(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Co(_l,Dl),Dl|=n;else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Co(_l,Dl),Dl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Co(_l,Dl),Dl|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Co(_l,Dl),Dl|=r;return va(e,t,o,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,o){var i=Do(n)?Ao:Oo.current;return i=To(t,i),Si(t,o),n=xs(e,t,n,r,i,o),r=Ss(),null===e||ya?(ni&&r&&Xo(t),t.flags|=1,va(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ha(e,t,o))}function Ma(e,t,n,r,o){if(Do(n)){var i=!0;Po(t)}else i=!1;if(Si(t,o),null===t.stateNode)$a(e,t),$i(t,n,r),Wi(t,n,r,o),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?ki(c):To(t,c=Do(n)?Ao:Oo.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)&&Hi(t,s,r,c),Ai=!1;var d=t.memoizedState;s.state=d,Ii(t,r,s,o),l=t.memoizedState,a!==r||d!==l||Eo.current||Ai?("function"==typeof u&&(Fi(t,n,u,r),l=t.memoizedState),(a=Ai||zi(t,n,a,r,d,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,Di(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:pi(t.type,a),s.props=c,h=t.pendingProps,d=s.context,l="object"==typeof(l=n.contextType)&&null!==l?ki(l):To(t,l=Do(n)?Ao:Oo.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==h||d!==l)&&Hi(t,s,r,l),Ai=!1,d=t.memoizedState,s.state=d,Ii(t,r,s,o);var p=t.memoizedState;a!==h||d!==p||Eo.current||Ai?("function"==typeof f&&(Fi(t,n,f,r),p=t.memoizedState),(c=Ai||zi(t,n,c,r,d,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&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===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&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Oa(e,t,n,r,i,o)}function Oa(e,t,n,r,o,i){ka(e,t);var s=0!=(128&t.flags);if(!r&&!s)return o&&Io(t,n,!1),Ha(e,t,i);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=Yi(t,e.child,null,i),t.child=Yi(t,null,a,i)):va(e,t,a,i),t.memoizedState=r.state,o&&Io(t,n,!0),t.child}function Ea(e){var t=e.stateNode;t.pendingContext?Ro(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ro(0,t.context,!1),ts(e,t.containerInfo)}function Aa(e,t,n,r,o){return hi(),di(o),t.flags|=256,va(e,t,n,r),t.child}var Ta,Da,_a,Ra,Na={dehydrated:null,treeContext:null,retryLane:0};function Pa(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ia(e,t,n){var r,o=t.pendingProps,s=is.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),Co(is,1&s),null===e)return ai(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=o.children,e=o.fallback,a?(o=t.mode,a=t.child,l={mode:"hidden",children:l},0==(1&o)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Pc(l,o,0,null),e=Nc(e,o,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Pa(n),t.memoizedState=Na,e):La(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,o,s,a){if(n)return 256&t.flags?(t.flags&=-257,ja(e,t,a,r=la(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Pc({mode:"visible",children:r.children},o,0,null),(s=Nc(s,o,a,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,0!=(1&t.mode)&&Yi(t,e.child,null,a),t.child.memoizedState=Pa(a),t.memoizedState=Na,s);if(0==(1&t.mode))return ja(e,t,a,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,ja(e,t,a,r=la(s=Error(i(419)),r,void 0))}if(l=0!=(a&e.childLanes),ya||l){if(null!==(r=El)){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|a))?0:o)&&o!==s.retryLane&&(s.retryLane=o,Ei(e,o),ec(r,e,o,-1))}return fc(),ja(e,t,a,r=la(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Mc.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,ti=so(o.nextSibling),ei=t,ni=!0,ri=null,null!==e&&(Vo[qo++]=Yo,Vo[qo++]=Go,Vo[qo++]=Ko,Yo=e.id,Go=e.overflow,Ko=t),(t=La(t,r.children)).flags|=4096,t)}(e,t,l,o,r,s,n);if(a){a=o.fallback,l=t.mode,r=(s=e.child).sibling;var c={mode:"hidden",children:o.children};return 0==(1&l)&&t.child!==s?((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null):(o=_c(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==r?a=_c(r,a):(a=Nc(a,l,n,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,l=null===(l=e.child.memoizedState)?Pa(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Na,o}return e=(a=e.child).sibling,o=_c(a,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function La(e,t){return(t=Pc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ja(e,t,n,r){return null!==r&&di(r),Yi(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),xi(e.return,t,n)}function Ba(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function za(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(va(e,t,r.children,n),0!=(2&(r=is.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(Co(is,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ss(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ba(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ss(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ba(t,!0,n,null,i);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),Pl|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=_c(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=_c(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Wa(e,t){if(!ni)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 o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Va(e,t,n){var r=t.pendingProps;switch(Zo(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 Do(t.type)&&_o(),Ua(t),null;case 3:return r=t.stateNode,ns(),ko(Eo),ko(Oo),ls(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ci(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==ri&&(oc(ri),ri=null))),Da(e,t),Ua(t),null;case 5:os(t);var o=es(Zi.current);if(n=t.type,null!==e&&null!=t.stateNode)_a(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return Ua(t),null}if(e=es(Qi.current),ci(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[co]=t,r[uo]=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(o=0;o<Rr.length;o++)Lr(Rr[o],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":J(r,s),Lr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Lr("invalid",r);break;case"textarea":oe(r,s),Lr("invalid",r)}for(var l in ve(n,s),o=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==s.suppressHydrationWarning&&Gr(r.textContent,c,e),o=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Gr(r.textContent,c,e),o=["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=Jr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===o.nodeType?o:o.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[co]=t,e[uo]=r,Ta(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Lr("cancel",e),Lr("close",e),o=r;break;case"iframe":case"object":case"embed":Lr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Rr.length;o++)Lr(Rr[o],e);o=r;break;case"source":Lr("error",e),o=r;break;case"img":case"image":case"link":Lr("error",e),Lr("load",e),o=r;break;case"details":Lr("toggle",e),o=r;break;case"input":J(e,r),o=G(e,r),Lr("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=j({},r,{value:void 0}),Lr("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Lr("invalid",e)}for(s in ve(n,o),c=o)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)&&de(e,u):"number"==typeof u&&de(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 o.onClick&&(e.onclick=Jr)}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)Ra(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(n=es(Zi.current),es(Qi.current),ci(t)){if(r=t.stateNode,n=t.memoizedProps,r[co]=t,(s=r.nodeValue!==n)&&null!==(e=ei))switch(e.tag){case 3:Gr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Gr(r.nodeValue,n,0!=(1&e.mode))}s&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[co]=t,t.stateNode=r}return Ua(t),null;case 13:if(ko(is),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ni&&null!==ti&&0!=(1&t.mode)&&0==(128&t.flags))ui(),hi(),t.flags|=98560,s=!1;else if(s=ci(t),null!==r&&null!==r.dehydrated){if(null===e){if(!s)throw Error(i(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(i(317));s[co]=t}else hi(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ua(t),s=!1}else null!==ri&&(oc(ri),ri=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&is.current)?0===Rl&&(Rl=3):fc())),null!==t.updateQueue&&(t.flags|=4),Ua(t),null);case 4:return ns(),Da(e,t),null===e&&Br(t.stateNode.containerInfo),Ua(t),null;case 10:return wi(t.type._context),Ua(t),null;case 19:if(ko(is),null===(s=t.memoizedState))return Ua(t),null;if(r=0!=(128&t.flags),null===(l=s.rendering))if(r)Wa(s,!1);else{if(0!==Rl||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ss(e))){for(t.flags|=128,Wa(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 Co(is,1&is.current|2),t.child}e=e.sibling}null!==s.tail&&Qe()>zl&&(t.flags|=128,r=!0,Wa(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),Wa(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!ni)return Ua(t),null}else 2*Qe()-s.renderingStartTime>zl&&1073741824!==n&&(t.flags|=128,r=!0,Wa(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=Qe(),t.sibling=null,n=is.current,Co(is,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&Dl)&&(Ua(t),6&t.subtreeFlags&&(t.flags|=8192)):Ua(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function qa(e,t){switch(Zo(t),t.tag){case 1:return Do(t.type)&&_o(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ns(),ko(Eo),ko(Oo),ls(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return os(t),null;case 13:if(ko(is),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));hi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ko(is),null;case 4:return ns(),null;case 10:return wi(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}},Da=function(){},_a=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,es(Qi.current);var i,s=null;switch(n){case"input":o=G(e,o),r=G(e,r),s=[];break;case"select":o=j({},o,{value:void 0}),r=j({},r,{value:void 0}),s=[];break;case"textarea":o=re(e,o),r=re(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(u in ve(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}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!=o?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}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)}},Ra=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ka=!1,Ya=!1,Ga="function"==typeof WeakSet?WeakSet:Set,Ja=null;function Qa(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 o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&Xa(t,n,i)}o=o.next}while(o!==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[co],delete t[uo],delete t[fo],delete t[po],delete t[mo]),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 ol(e){return 5===e.tag||3===e.tag||4===e.tag}function il(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(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=Jr));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(it&&"function"==typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(e){}switch(n.tag){case 5:Ya||Qa(n,t);case 6:var r=ll,o=cl;ll=null,ul(e,t,n),cl=o,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?io(e.parentNode,n):1===e.nodeType&&io(e,n),Ht(e)):io(ll,n.stateNode));break;case 4:r=ll,o=cl,ll=n.stateNode.containerInfo,cl=!0,ul(e,t,n),ll=r,cl=o;break;case 0:case 11:case 14:case 15:if(!Ya&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,void 0!==s&&(0!=(2&i)||0!=(4&i))&&Xa(n,t,s),o=o.next}while(o!==r)}ul(e,t,n);break;case 1:if(!Ya&&(Qa(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?(Ya=(r=Ya)||null!==n.memoizedState,ul(e,t,n),Ya=r):ul(e,t,n);break;default:ul(e,t,n)}}function dl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ga),t.forEach((function(t){var r=Oc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function fl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=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(i(160));hl(s,a,o),ll=null,cl=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(e){Sc(o,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(fl(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:fl(t,e),ml(e),512&r&&null!==n&&Qa(n,n.return);break;case 5:if(fl(t,e),ml(e),512&r&&null!==n&&Qa(n,n.return),32&e.flags){var o=e.stateNode;try{de(o,"")}catch(t){Sc(e,e.return,t)}}if(4&r&&null!=(o=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&&Q(o,s),be(l,a);var u=be(l,s);for(a=0;a<c.length;a+=2){var h=c[a],d=c[a+1];"style"===h?ge(o,d):"dangerouslySetInnerHTML"===h?he(o,d):"children"===h?de(o,d):b(o,h,d,u)}switch(l){case"input":X(o,s);break;case"textarea":ie(o,s);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;null!=p?ne(o,!!s.multiple,p,!1):f!==!!s.multiple&&(null!=s.defaultValue?ne(o,!!s.multiple,s.defaultValue,!0):ne(o,!!s.multiple,s.multiple?[]:"",!1))}o[uo]=s}catch(t){Sc(e,e.return,t)}}break;case 6:if(fl(t,e),ml(e),4&r){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(t){Sc(e,e.return,t)}}break;case 3:if(fl(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:fl(t,e),ml(e);break;case 13:fl(t,e),ml(e),8192&(o=e.child).flags&&(s=null!==o.memoizedState,o.stateNode.isHidden=s,!s||null!==o.alternate&&null!==o.alternate.memoizedState||(Bl=Qe())),4&r&&dl(e);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&e.mode?(Ya=(u=Ya)||h,fl(t,e),Ya=u):fl(t,e),ml(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!h&&0!=(1&e.mode))for(Ja=e,h=e.child;null!==h;){for(d=Ja=h;null!==Ja;){switch(p=(f=Ja).child,f.tag){case 0:case 11:case 14:case 15:el(4,f,f.return);break;case 1:Qa(f,f.return);var m=f.stateNode;if("function"==typeof m.componentWillUnmount){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Sc(r,n,e)}}break;case 5:Qa(f,f.return);break;case 22:if(null!==f.memoizedState){bl(d);continue}}null!==p?(p.return=f,Ja=p):bl(d)}h=h.sibling}e:for(h=null,d=e;;){if(5===d.tag){if(null===h){h=d;try{o=d.stateNode,u?"function"==typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=d.stateNode,a=null!=(c=d.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",a))}catch(t){Sc(e,e.return,t)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(t){Sc(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:fl(t,e),ml(e),4&r&&dl(e);case 21:}}function ml(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ol(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(de(o,""),r.flags&=-33),al(e,il(e),o);break;case 3:case 4:var s=r.stateNode.containerInfo;sl(e,il(e),s);break;default:throw Error(i(161))}}catch(t){Sc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gl(e,t,n){Ja=e,yl(e,t,n)}function yl(e,t,n){for(var r=0!=(1&e.mode);null!==Ja;){var o=Ja,i=o.child;if(22===o.tag&&r){var s=null!==o.memoizedState||Ka;if(!s){var a=o.alternate,l=null!==a&&null!==a.memoizedState||Ya;a=Ka;var c=Ya;if(Ka=s,(Ya=l)&&!c)for(Ja=o;null!==Ja;)l=(s=Ja).child,22===s.tag&&null!==s.memoizedState?wl(o):null!==l?(l.return=s,Ja=l):wl(o);for(;null!==i;)Ja=i,yl(i,t,n),i=i.sibling;Ja=o,Ka=a,Ya=c}vl(e)}else 0!=(8772&o.subtreeFlags)&&null!==i?(i.return=o,Ja=i):vl(e)}}function vl(e){for(;null!==Ja;){var t=Ja;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ya||tl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ya)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:pi(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Li(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}Li(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 d=h.dehydrated;null!==d&&Ht(d)}}}break;default:throw Error(i(163))}Ya||512&t.flags&&nl(t)}catch(e){Sc(t,t.return,e)}}if(t===e){Ja=null;break}if(null!==(n=t.sibling)){n.return=t.return,Ja=n;break}Ja=t.return}}function bl(e){for(;null!==Ja;){var t=Ja;if(t===e){Ja=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Ja=n;break}Ja=t.return}}function wl(e){for(;null!==Ja;){var t=Ja;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 o=t.return;try{r.componentDidMount()}catch(e){Sc(t,o,e)}}var i=t.return;try{nl(t)}catch(e){Sc(t,i,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){Ja=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Ja=a;break}Ja=t.return}}var xl,Sl=Math.ceil,kl=w.ReactCurrentDispatcher,Cl=w.ReactCurrentOwner,Ml=w.ReactCurrentBatchConfig,Ol=0,El=null,Al=null,Tl=0,Dl=0,_l=So(0),Rl=0,Nl=null,Pl=0,Il=0,Ll=0,jl=null,Fl=null,Bl=0,zl=1/0,$l=null,Hl=!1,Wl=null,Ul=null,Vl=!1,ql=null,Kl=0,Yl=0,Gl=null,Jl=-1,Ql=0;function Xl(){return 0!=(6&Ol)?Qe():-1!==Jl?Jl:Jl=Qe()}function Zl(e){return 0==(1&e.mode)?1:0!=(2&Ol)&&0!==Tl?Tl&-Tl:null!==fi.transition?(0===Ql&&(Ql=mt()),Ql):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Jt(e.type)}function ec(e,t,n,r){if(50<Yl)throw Yl=0,Gl=null,Error(i(185));yt(e,n,r),0!=(2&Ol)&&e===El||(e===El&&(0==(2&Ol)&&(Il|=n),4===Rl&&ic(e,Tl)),tc(e,r),1===n&&0===Ol&&0==(1&t.mode)&&(zl=Qe()+500,jo&&zo()))}function tc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-st(i),a=1<<s,l=o[s];-1===l?0!=(a&n)&&0==(a&r)||(o[s]=ft(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}(e,t);var r=dt(e,e===El?Tl:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){jo=!0,Bo(e)}(sc.bind(null,e)):Bo(sc.bind(null,e)),ro((function(){0==(6&Ol)&&zo()})),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(Jl=-1,Ql=0,0!=(6&Ol))throw Error(i(327));var n=e.callbackNode;if(wc()&&e.callbackNode!==n)return null;var r=dt(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 o=Ol;Ol|=2;var s=dc();for(El===e&&Tl===t||($l=null,zl=Qe()+500,uc(e,t));;)try{gc();break}catch(t){hc(e,t)}bi(),kl.current=s,Ol=o,null!==Al?t=0:(El=null,Tl=0,t=Rl)}if(0!==t){if(2===t&&0!==(o=pt(e))&&(r=o,t=rc(e,o)),1===t)throw n=Nl,uc(e,0),ic(e,r),tc(e,Qe()),n;if(6===t)ic(e,r);else{if(o=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 o=n[r],i=o.getSnapshot;o=o.value;try{if(!or(i(),o))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}(o)&&(2===(t=pc(e,r))&&0!==(s=pt(e))&&(r=s,t=rc(e,s)),1===t))throw n=Nl,uc(e,0),ic(e,r),tc(e,Qe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:bc(e,Fl,$l);break;case 3:if(ic(e,r),(130023424&r)===r&&10<(t=Bl+500-Qe())){if(0!==dt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){Xl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=eo(bc.bind(null,e,Fl,$l),t);break}bc(e,Fl,$l);break;case 4:if(ic(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-st(r);s=1<<a,(a=t[a])>o&&(o=a),r&=~s}if(r=o,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=eo(bc.bind(null,e,Fl,$l),r);break}bc(e,Fl,$l);break;default:throw Error(i(329))}}}return tc(e,Qe()),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&&oc(t)),e}function oc(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function ic(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&Ol))throw Error(i(327));wc();var t=dt(e,0);if(0==(1&t))return tc(e,Qe()),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=Nl,uc(e,0),ic(e,t),tc(e,Qe()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bc(e,Fl,$l),tc(e,Qe()),null}function ac(e,t){var n=Ol;Ol|=1;try{return e(t)}finally{0===(Ol=n)&&(zl=Qe()+500,jo&&zo())}}function lc(e){null!==ql&&0===ql.tag&&0==(6&Ol)&&wc();var t=Ol;Ol|=1;var n=Ml.transition,r=bt;try{if(Ml.transition=null,bt=1,e)return e()}finally{bt=r,Ml.transition=n,0==(6&(Ol=t))&&zo()}}function cc(){Dl=_l.current,ko(_l)}function uc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,to(n)),null!==Al)for(n=Al.return;null!==n;){var r=n;switch(Zo(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&_o();break;case 3:ns(),ko(Eo),ko(Oo),ls();break;case 5:os(r);break;case 4:ns();break;case 13:case 19:ko(is);break;case 10:wi(r.type._context);break;case 22:case 23:cc()}n=n.return}if(El=e,Al=e=_c(e.current,null),Tl=Dl=t,Rl=0,Nl=null,Ll=Il=Pl=0,Fl=jl=null,null!==Ci){for(t=0;t<Ci.length;t++)if(null!==(r=(n=Ci[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var s=i.next;i.next=o,r.next=s}n.pending=r}Ci=null}return e}function hc(e,t){for(;;){var n=Al;try{if(bi(),cs.current=ra,ms){for(var r=ds.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ms=!1}if(hs=0,ps=fs=ds=null,gs=!1,ys=0,Cl.current=null,null===n||null===n.return){Rl=1,Nl=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,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.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&&fa(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)){fa(s,u,t),fc();break e}c=Error(i(426))}else if(ni&&1&l.mode){var y=pa(a);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),ma(y,a,l,0,t),di(aa(c,l));break e}}s=c=aa(c,l),4!==Rl&&(Rl=2),null===jl?jl=[s]:jl.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Pi(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,Pi(s,da(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 dc(){var e=kl.current;return kl.current=ra,null===e?ra:e}function fc(){0!==Rl&&3!==Rl&&2!==Rl||(Rl=4),null===El||0==(268435455&Pl)&&0==(268435455&Il)||ic(El,Tl)}function pc(e,t){var n=Ol;Ol|=2;var r=dc();for(El===e&&Tl===t||($l=null,uc(e,t));;)try{mc();break}catch(t){hc(e,t)}if(bi(),Ol=n,kl.current=r,null!==Al)throw Error(i(261));return El=null,Tl=0,Rl}function mc(){for(;null!==Al;)yc(Al)}function gc(){for(;null!==Al&&!Ge();)yc(Al)}function yc(e){var t=xl(e.alternate,e,Dl);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=Va(n,t,Dl)))return void(Al=n)}else{if(null!==(n=qa(n,t)))return n.flags&=32767,void(Al=n);if(null===e)return Rl=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===Rl&&(Rl=5)}function bc(e,t,n){var r=bt,o=Ml.transition;try{Ml.transition=null,bt=1,function(e,t,n,r){do{wc()}while(null!==ql);if(0!=(6&Ol))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(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 o=31-st(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,s),e===El&&(Al=El=null,Tl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Vl||(Vl=!0,Ec(tt,(function(){return wc(),null}))),s=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||s){s=Ml.transition,Ml.transition=null;var a=bt;bt=1;var l=Ol;Ol|=4,Cl.current=null,function(e,t){if(Qr=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 o=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,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(l=a+o),d!==s||0!==r&&3!==d.nodeType||(c=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(l=a),f===s&&++h===r&&(c=a),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=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,Ja=t;null!==Ja;)if(e=(t=Ja).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Ja=e;else for(;null!==Ja;){t=Ja;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:pi(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(i(163))}}catch(e){Sc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Ja=e;break}Ja=t.return}m=Za,Za=!1}(e,n),pl(n,e),hr(Xr),Ut=!!Qr,Xr=Qr=null,e.current=n,gl(n,e,o),Je(),Ol=l,bt=a,Ml.transition=s}else e.current=n;if(Vl&&(Vl=!1,ql=e,Kl=o),0===(s=e.pendingLanes)&&(Ul=null),function(e){if(it&&"function"==typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),tc(e,Qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((o=t[n]).value,{componentStack:o.stack,digest:o.digest});if(Hl)throw Hl=!1,e=Wl,Wl=null,e;0!=(1&Kl)&&0!==e.tag&&wc(),0!=(1&(s=e.pendingLanes))?e===Gl?Yl++:(Yl=0,Gl=e):Yl=0,zo()}(e,t,n,r)}finally{Ml.transition=o,bt=r}return null}function wc(){if(null!==ql){var e=wt(Kl),t=Ml.transition,n=bt;try{if(Ml.transition=null,bt=16>e?16:e,null===ql)var r=!1;else{if(e=ql,ql=null,Kl=0,0!=(6&Ol))throw Error(i(331));var o=Ol;for(Ol|=4,Ja=e.current;null!==Ja;){var s=Ja,a=s.child;if(0!=(16&Ja.flags)){var l=s.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Ja=u;null!==Ja;){var h=Ja;switch(h.tag){case 0:case 11:case 15:el(8,h,s)}var d=h.child;if(null!==d)d.return=h,Ja=d;else for(;null!==Ja;){var f=(h=Ja).sibling,p=h.return;if(rl(h),h===u){Ja=null;break}if(null!==f){f.return=p,Ja=f;break}Ja=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)}}Ja=s}}if(0!=(2064&s.subtreeFlags)&&null!==a)a.return=s,Ja=a;else e:for(;null!==Ja;){if(0!=(2048&(s=Ja).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,Ja=v;break e}Ja=s.return}}var b=e.current;for(Ja=b;null!==Ja;){var w=(a=Ja).child;if(0!=(2064&a.subtreeFlags)&&null!==w)w.return=a,Ja=w;else e:for(a=b;null!==Ja;){if(0!=(2048&(l=Ja).flags))try{switch(l.tag){case 0:case 11:case 15:tl(9,l)}}catch(e){Sc(l,l.return,e)}if(l===a){Ja=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,Ja=x;break e}Ja=l.return}}if(Ol=o,zo(),it&&"function"==typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(e){}r=!0}return r}finally{bt=n,Ml.transition=t}}return!1}function xc(e,t,n){e=Ri(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=Ri(t,e=da(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===Rl||3===Rl&&(130023424&Tl)===Tl&&500>Qe()-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=Ei(e,t))&&(yt(e,t,n),tc(e,n))}function Mc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cc(e,n)}function Oc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(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 Dc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function _c(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 Rc(e,t,n,r,o,s){var a=2;if(r=e,"function"==typeof e)Dc(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case k:return Nc(n.children,o,s,t);case C:a=8,o|=8;break;case M:return(e=Tc(12,n,t,2|o)).elementType=M,e.lanes=s,e;case T:return(e=Tc(13,n,t,o)).elementType=T,e.lanes=s,e;case D:return(e=Tc(19,n,t,o)).elementType=D,e.lanes=s,e;case N:return Pc(n,o,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:a=10;break e;case E:a=9;break e;case A:a=11;break e;case _:a=14;break e;case R:a=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Tc(a,n,t,o)).elementType=e,t.type=r,t.lanes=s,t}function Nc(e,t,n,r){return(e=Tc(7,e,r,t)).lanes=n,e}function Pc(e,t,n,r){return(e=Tc(22,e,r,t)).elementType=N,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,o){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=o,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,r,o,i,s,a,l){return e=new jc(e,t,n,a,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Tc(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ti(i),e}function Bc(e){if(!e)return Mo;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Do(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(Do(n))return No(e,n,t)}return t}function zc(e,t,n,r,o,i,s,a,l){return(e=Fc(n,r,!0,e,0,i,0,a,l)).context=Bc(null),n=e.current,(i=_i(r=Xl(),o=Zl(n))).callback=null!=t?t:null,Ri(n,i,o),e.current.lanes=o,yt(e,o,r),tc(e,r),e}function $c(e,t,n,r){var o=t.current,i=Xl(),s=Zl(o);return n=Bc(n),null===t.context?t.context=n:t.pendingContext=n,(t=_i(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ri(o,t,s))&&(ec(e,o,s,i),Ni(e,o,s)),s}function Hc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wc(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){Wc(e,t),(e=e.alternate)&&Wc(e,t)}xl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Eo.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),hi();break;case 5:rs(t);break;case 1:Do(t.type)&&Po(t);break;case 4:ts(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Co(mi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Co(is,1&is.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ia(e,t,n):(Co(is,1&is.current),null!==(e=Ha(e,t,n))?e.sibling:null);Co(is,1&is.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!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Co(is,is.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,ni&&0!=(1048576&t.flags)&&Qo(t,Uo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$a(e,t),e=t.pendingProps;var o=To(t,Oo.current);Si(t,n),o=xs(null,t,r,e,o,n);var s=Ss();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Do(r)?(s=!0,Po(t)):s=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ti(t),o.updater=Bi,t.stateNode=o,o._reactInternals=t,Wi(t,r,e,n),t=Oa(null,t,r,!0,s,n)):(t.tag=0,ni&&s&&Xo(t),va(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch($a(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Dc(e)?1:0;if(null!=e){if((e=e.$$typeof)===A)return 11;if(e===_)return 14}return 2}(r),e=pi(r,e),o){case 0:t=Ca(null,t,r,e,n);break e;case 1:t=Ma(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,pi(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ca(e,t,r,o=t.elementType===r?o:pi(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ma(e,t,r,o=t.elementType===r?o:pi(r,o),n);case 3:e:{if(Ea(t),null===e)throw Error(i(387));r=t.pendingProps,o=(s=t.memoizedState).element,Di(e,t),Ii(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,o=aa(Error(i(423)),t));break e}if(r!==o){t=Aa(e,t,r,n,o=aa(Error(i(424)),t));break e}for(ti=so(t.stateNode.containerInfo.firstChild),ei=t,ni=!0,ri=null,n=Gi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(hi(),r===o){t=Ha(e,t,n);break e}va(e,t,r,n)}t=t.child}return t;case 5:return rs(t),null===e&&ai(t),r=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,a=o.children,Zr(r,o)?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&&ai(t),null;case 13:return Ia(e,t,n);case 4:return ts(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Yi(t,null,r,n):va(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,ba(e,t,r,o=t.elementType===r?o:pi(r,o),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,o=t.pendingProps,s=t.memoizedProps,a=o.value,Co(mi,r._currentValue),r._currentValue=a,null!==s)if(or(s.value,a)){if(s.children===o.children&&!Eo.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=_i(-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),xi(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(i(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),xi(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,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Si(t,n),r=r(o=ki(o)),t.flags|=1,va(e,t,r,n),t.child;case 14:return o=pi(r=t.type,t.pendingProps),wa(e,t,r,o=pi(r.type,o),n);case 15:return xa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:pi(r,o),$a(e,t),t.tag=1,Do(r)?(e=!0,Po(t)):e=!1,Si(t,n),$i(t,r,o),Wi(t,r,o,n),Oa(null,t,r,!0,e,n);case 19:return za(e,t,n);case 22:return Sa(e,t,n)}throw Error(i(156,t.tag))};var Vc="function"==typeof reportError?reportError:function(e){console.error(e)};function qc(e){this._internalRoot=e}function Kc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Gc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jc(){}function Qc(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if("function"==typeof o){var a=o;o=function(){var e=Hc(s);a.call(e)}}$c(t,s,e,o)}else s=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=Hc(s);i.call(e)}}var s=zc(t,r,e,0,null,!1,0,"",Jc);return e._reactRootContainer=s,e[ho]=s.current,Br(8===e.nodeType?e.parentNode:e),lc(),s}for(;o=e.lastChild;)e.removeChild(o);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,"",Jc);return e._reactRootContainer=l,e[ho]=l.current,Br(8===e.nodeType?e.parentNode:e),lc((function(){$c(t,l,n,r)})),l}(n,t,e,o,r);return Hc(s)}Kc.prototype.render=qc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(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[ho]=null}},Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&0!==t&&t<Nt[n].priority;n++);Nt.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,Qe()),0==(6&Ol)&&(zl=Qe()+500,zo()))}break;case 13:lc((function(){var t=Ei(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=Ei(e,134217728);null!==t&&ec(t,e,134217728,Xl()),Uc(e,134217728)}},kt=function(e){if(13===e.tag){var t=Zl(e),n=Ei(e,t);null!==n&&ec(n,e,t,Xl()),Uc(e,t)}},Ct=function(){return bt},Mt=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 o=bo(r);if(!o)throw Error(i(90));K(r),X(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ae=ac,Te=lc;var Xc={usingClientEntryPoint:!1,Events:[yo,vo,bo,Oe,Ee,ac]},Zc={findFiberByHostInstance:go,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=Ve(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{ot=tu.inject(eu),it=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(!Yc(t))throw Error(i(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(!Yc(e))throw Error(i(299));var n=!1,r="",o=Vc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Fc(e,1,!1,null,0,n,0,r,o),e[ho]=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(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return lc(e)},t.hydrate=function(e,t,n){if(!Gc(t))throw Error(i(200));return Qc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yc(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,s="",a=Vc;if(null!=n&&(!0===n.unstable_strictMode&&(o=!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,o,0,s,a),e[ho]=t.current,Br(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Kc(t)},t.render=function(e,t,n){if(!Gc(t))throw Error(i(200));return Qc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Gc(e))throw Error(i(40));return!!e._reactRootContainer&&(lc((function(){Qc(null,null,e,!1,(function(){e._reactRootContainer=null,e[ho]=null}))})),!0)},t.unstable_batchedUpdates=ac,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gc(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return Qc(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),o=n(5697),i=n.n(o);function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(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,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=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(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=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,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function c(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);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 d=[".DS_Store","Thumbs.db"];function f(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===d.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 o(){var i=this;t.readEntries((function(t){return s(i,void 0,void 0,(function(){var i,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 i=a.sent(),e(i),[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),o(),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 M=n(8363);function O(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(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 D(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,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||_(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 _(e,t){if(e){if("string"==typeof e)return R(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)?R(e,t):void 0}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var N=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)}},P=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,M.Z)(e,t);return[n,n?null:N(t)]}function F(e,t,n){if(B(e.size))if(B(t)&&B(n)){if(e.size>n)return[!1,P(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,P(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 W(){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),o=1;o<n;o++)r[o-1]=arguments[o];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 V(e){return/^.*\.[\w]+$/.test(e)}var q=["children"],K=["open"],Y=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],G=["refKey","onChange","onClick"];function J(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,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||Q(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 Q(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,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var re=(0,r.forwardRef)((function(e,t){var n=e.children,o=se(ne(e,q)),i=o.open,s=ne(o,K);return(0,r.useImperativeHandle)(t,(function(){return{open:i}}),[i]),r.createElement(r.Fragment,null,n(ee(ee({},s),{},{open:i})))}));re.displayName="Dropzone";var oe={disabled:!1,getFilesFromEvent:function(e){return s(this,void 0,void 0,(function(){return a(this,(function(t){return f(e)&&f(e.dataTransfer)?[2,g(e.dataTransfer,e.type)]:f(n=e)&&f(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=oe,re.propTypes={children:i().func,accept:i().objectOf(i().arrayOf(i().string)),multiple:i().bool,preventDropOnDocument:i().bool,noClick:i().bool,noKeyboard:i().bool,noDrag:i().bool,noDragEventsBubbling:i().bool,minSize:i().number,maxSize:i().number,maxFiles:i().number,disabled:i().bool,getFilesFromEvent:i().func,onFileDialogCancel:i().func,onFileDialogOpen:i().func,useFsAccessApi:i().bool,autoFocus:i().bool,onDragEnter:i().func,onDragLeave:i().func,onDragOver:i().func,onDrop:i().func,onDropAccepted:i().func,onDropRejected:i().func,onError:i().func,validator:i().func};var ie={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({},oe),e),n=t.accept,o=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,a=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,d=t.onDragOver,f=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,M=t.onError,E=t.validator,_=(0,r.useMemo)((function(){return function(e){if(B(e))return Object.entries(e).reduce((function(e,t){var n=D(t,2),r=n[0],o=n[1];return[].concat(O(e),[r],O(o))}),[]).filter((function(e){return U(e)||V(e)})).join(",")}(n)}),[n]),R=(0,r.useMemo)((function(){return function(e){return B(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=D(e,2),n=t[0],r=t[1],o=!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.')),o=!1),Array.isArray(r)&&r.every(V)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=D(t,2),r=n[0],o=n[1];return A(A({},e),{},T({},r,o))}),{})}]:e}(n)}),[n]),N=(0,r.useMemo)((function(){return"function"==typeof y?y:le}),[y]),P=(0,r.useMemo)((function(){return"function"==typeof g?g:le}),[g]),I=(0,r.useRef)(null),q=(0,r.useRef)(null),K=J((0,r.useReducer)(ae,ie),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"}),P()))}),300)};(0,r.useEffect)((function(){return window.addEventListener("focus",he,!1),function(){window.removeEventListener("focus",he,!1)}}),[q,ce,P,ue]);var de=(0,r.useRef)([]),fe=function(e){I.current&&I.current.contains(e.target)||(e.preventDefault(),de.current=[])};(0,r.useEffect)((function(){return w&&(document.addEventListener("dragover",H,!1),document.addEventListener("drop",fe,!1)),function(){w&&(document.removeEventListener("dragover",H),document.removeEventListener("drop",fe))}}),[I,w]),(0,r.useEffect)((function(){return!o&&b&&I.current&&I.current.focus(),function(){}}),[I,b,o]);var pe=(0,r.useCallback)((function(e){M?M(e):console.error(e)}),[M]),me=(0,r.useCallback)((function(e){var t;e.preventDefault(),e.persist(),Ae(e),de.current=[].concat(function(e){if(Array.isArray(e))return X(e)}(t=de.current)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||Q(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(i(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,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!(!i&&t.length>1||i&&s>=1&&t.length>s)&&t.every((function(e){var t=D(j(e,n),1)[0],i=D(F(e,r,o),1)[0],s=a?a(e):null;return t&&i&&!s}))}({files:t,accept:_,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)}))}),[i,u,pe,C,_,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&&d&&d(e),!1}),[d,C]),ye=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),Ae(e);var t=de.current.filter((function(e){return I.current&&I.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),de.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=J(j(e,_),2),o=t[0],i=t[1],l=J(F(e,a,s),2),c=l[0],u=l[1],h=E?E(e):null;if(o&&c&&!h)n.push(e);else{var d=[i,u];h&&(d=d.concat(h)),r.push({file:e,errors:d.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"}),f&&f(n,r,t),r.length>0&&m&&m(r,t),n.length>0&&p&&p(n,t)}),[re,l,_,a,s,c,f,p,m,E]),be=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),Ae(e),de.current=[],$(e)&&Promise.resolve(i(e)).then((function(t){z(e)&&!C||ve(t,e)})).catch((function(e){return pe(e)})),re({type:"reset"})}),[i,ve,pe,C]),we=(0,r.useCallback)((function(){if(ue.current){re({type:"openDialog"}),N();var e={multiple:l,types:R};window.showOpenFilePicker(e).then((function(e){return i(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)?(P(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"}),N(),q.current.value=null,q.current.click())}),[re,N,P,v,ve,pe,R,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]),Me=function(e){return o?null:e},Oe=function(e){return S?null:Me(e)},Ee=function(e){return k?null:Me(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,i=e.onKeyDown,s=e.onFocus,a=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,h=e.onDragLeave,d=e.onDrop,f=ne(e,Y);return ee(ee(te({onKeyDown:Oe(W(i,xe)),onFocus:Oe(W(s,Se)),onBlur:Oe(W(a,ke)),onClick:Me(W(l,Ce)),onDragEnter:Ee(W(c,me)),onDragOver:Ee(W(u,ge)),onDragLeave:Ee(W(h,ye)),onDrop:Ee(W(d,be)),role:"string"==typeof r&&""!==r?r:"presentation"},n,I),o||S?{}:{tabIndex:0}),f)}}),[I,xe,Se,ke,Ce,me,ge,ye,be,S,k,o]),De=(0,r.useCallback)((function(e){e.stopPropagation()}),[]),_e=(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,o=e.onClick,i=ne(e,G);return ee(ee({},te({accept:_,multiple:l,type:"file",style:{display:"none"},onChange:Me(W(r,be)),onClick:Me(W(o,De)),tabIndex:-1},n,q)),i)}}),[q,n,l,be,o]);return ee(ee({},Z),{},{isFocused:se&&!o,getRootProps:Te,getInputProps:_e,rootRef:I,inputRef:q,open:Me(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({},ie),{},{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({},ie);default:return e}}function le(){}},9921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=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,d=n?Symbol.for("react.forward_ref"):60112,f=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 i:case a:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case g:case m:case l:return e;default:return t}}case o: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=d,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=f,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)===d},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===a},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===h||e===a||e===s||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||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:()=>f});var o=n(7294),i=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(o,2))).startTransition;function u(e){let{basename:t,children:n,future:r,window:a}=e,l=o.useRef();null==l.current&&(l.current=(0,s.q_)({window:a,v5Compat:!0}));let u=l.current,[h,d]=o.useState({action:u.action,location:u.location}),{v7_startTransition:f}=r||{},p=o.useCallback((e=>{f&&c?c((()=>d(e))):d(e)}),[d,f]);return o.useLayoutEffect((()=>u.listen(p)),[u,p]),o.createElement(i.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,d=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,f=o.forwardRef((function(e,t){let n,{onClick:r,relative:c,reloadDocument:u,replace:f,state:p,target:m,to:g,preventScrollReset:y}=e,v=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,l),{basename:b}=o.useContext(i.Us),w=!1;if("string"==typeof g&&d.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,i.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,i.s0)(),h=(0,i.TH)(),d=(0,i.WU)(e,{relative:c});return o.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)(d);u(e,{replace:n,state:a,preventScrollReset:l,relative:c})}}),[h,u,d,r,a,n,e,l,c])}(g,{replace:f,state:p,target:m,preventScrollReset:y,relative:c});return o.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:()=>_,Fg:()=>T,TH:()=>m,UO:()=>b,Us:()=>c,V$:()=>x,WU:()=>w,j3:()=>D,oQ:()=>f,s0:()=>y,w3:()=>a});var o=n(7294),i=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=o.createContext(null),l=o.createContext(null),c=o.createContext(null),u=o.createContext(null),h=o.createContext({outlet:null,matches:[],isDataRoute:!1}),d=o.createContext(null);function f(e,t){let{relative:n}=void 0===t?{}:t;p()||(0,i.J0)(!1);let{basename:r,navigator:s}=o.useContext(c),{hash:a,pathname:l,search:u}=w(e,{relative:n}),h=l;return"/"!==r&&(h="/"===l?r:(0,i.RQ)([r,l])),s.createHref({pathname:h,search:u,hash:a})}function p(){return null!=o.useContext(u)}function m(){return p()||(0,i.J0)(!1),o.useContext(u).location}function g(e){o.useContext(c).static||o.useLayoutEffect(e)}function y(){let{isDataRoute:e}=o.useContext(h);return e?function(){let{router:e}=function(e){let t=o.useContext(a);return t||(0,i.J0)(!1),t}(O.UseNavigateStable),t=A(E.UseNavigateStable),n=o.useRef(!1);return g((()=>{n.current=!0})),o.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,s({fromRouteId:t},o)))}),[e,t])}():function(){p()||(0,i.J0)(!1);let e=o.useContext(a),{basename:t,navigator:n}=o.useContext(c),{matches:r}=o.useContext(h),{pathname:s}=m(),l=JSON.stringify((0,i.Zq)(r).map((e=>e.pathnameBase))),u=o.useRef(!1);return g((()=>{u.current=!0})),o.useCallback((function(r,o){if(void 0===o&&(o={}),!u.current)return;if("number"==typeof r)return void n.go(r);let a=(0,i.pC)(r,JSON.parse(l),s,"path"===o.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:(0,i.RQ)([t,a.pathname])),(o.replace?n.replace:n.push)(a,o.state,o)}),[t,n,l,s,e])}()}const v=o.createContext(null);function b(){let{matches:e}=o.useContext(h),t=e[e.length-1];return t?t.params:{}}function w(e,t){let{relative:n}=void 0===t?{}:t,{matches:r}=o.useContext(h),{pathname:s}=m(),a=JSON.stringify((0,i.Zq)(r).map((e=>e.pathnameBase)));return o.useMemo((()=>(0,i.pC)(e,JSON.parse(a),s,"path"===n)),[e,a,s,n])}function x(e,t){return function(e,t,n){p()||(0,i.J0)(!1);let{navigator:r}=o.useContext(c),{matches:a}=o.useContext(h),l=a[a.length-1],d=l?l.params:{},f=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let g,y=m();if(t){var v;let e="string"==typeof t?(0,i.cP)(t):t;"/"===f||(null==(v=e.pathname)?void 0:v.startsWith(f))||(0,i.J0)(!1),g=e}else g=y;let b=g.pathname||"/",w="/"===f?b:b.slice(f.length)||"/",x=(0,i.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,i.J0)(!1),a=a.slice(0,Math.min(a.length,e+1))}return a.reduceRight(((e,r,i)=>{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,i+1)),h=()=>{let t;return t=s?c:r.route.Component?o.createElement(r.route.Component,null):r.route.element?r.route.element:e,o.createElement(M,{match:r,routeContext:{outlet:e,matches:u,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?o.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({},d,e.params),pathname:(0,i.RQ)([f,r.encodeLocation?r.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:(0,i.RQ)([f,r.encodeLocation?r.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,n);return t&&S?o.createElement(u.Provider,{value:{location:s({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:i.aU.Pop}},S):S}(e,t)}function S(){let e=function(){var e;let t=o.useContext(d),n=function(e){let t=o.useContext(l);return t||(0,i.J0)(!1),t}(E.UseRouteError),r=A(E.UseRouteError);return t||(null==(e=n.errors)?void 0:e[r])}(),t=(0,i.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 o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),n?o.createElement("pre",{style:r},n):null,null)}const k=o.createElement(S,null);class C extends o.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?o.createElement(h.Provider,{value:this.props.routeContext},o.createElement(d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function M(e){let{routeContext:t,match:n,children:r}=e,i=o.useContext(a);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),o.createElement(h.Provider,{value:t},r)}var O=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(O||{}),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=o.useContext(h);return t||(0,i.J0)(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||(0,i.J0)(!1),n.route.id}function T(e){let{to:t,replace:n,state:r,relative:s}=e;p()||(0,i.J0)(!1);let{matches:a}=o.useContext(h),{pathname:l}=m(),c=y(),u=(0,i.pC)(t,(0,i.Zq)(a).map((e=>e.pathnameBase)),l,"path"===s),d=JSON.stringify(u);return o.useEffect((()=>c(JSON.parse(d),{replace:n,state:r,relative:s})),[c,d,s,n,r]),null}function D(e){return function(e){let t=o.useContext(h).outlet;return t?o.createElement(v.Provider,{value:e},t):t}(e.context)}function _(e){let{basename:t="/",children:n=null,location:r,navigationType:s=i.aU.Pop,navigator:a,static:l=!1}=e;p()&&(0,i.J0)(!1);let h=t.replace(/^\/*/,"/"),d=o.useMemo((()=>({basename:h,navigator:a,static:l})),[h,a,l]);"string"==typeof r&&(r=(0,i.cP)(r));let{pathname:f="/",search:m="",hash:g="",state:y=null,key:v="default"}=r,b=o.useMemo((()=>{let e=(0,i.Zn)(f,h);return null==e?null:{location:{pathname:e,search:m,hash:g,state:y,key:v},navigationType:s}}),[h,f,m,g,y,v,s]);return null==b?null:o.createElement(c.Provider,{value:d},o.createElement(u.Provider,{children:n,value:b}))}(r||(r=n.t(o,2))).startTransition,new Promise((()=>{}));class R extends o.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,o=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(o===AwaitRenderStatus.error&&r._error instanceof AbortedDeferredError)throw neverSettledPromise;if(o===AwaitRenderStatus.error&&!t)throw r._error;if(o===AwaitRenderStatus.error)return React.createElement(AwaitContext.Provider,{value:r,children:t});if(o===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),o=n(296),i=n.n(o);function s(e){let{debounce:t,scroll:n,polyfill:o,offsetSize:s}=void 0===e?{debounce:0,scroll:!1,offsetSize:!1}:e;const l=o||("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}),d=(0,r.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:u}),f=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(!d.current.element)return;const{left:e,top:t,width:n,height:r,bottom:o,right:i,x:a,y:l}=d.current.element.getBoundingClientRect(),u={left:e,top:t,width:n,height:r,bottom:o,right:i,x:a,y:l};d.current.element instanceof HTMLElement&&s&&(u.height=d.current.element.offsetHeight,u.width=d.current.element.offsetWidth),Object.freeze(u),m.current&&!c(d.current.lastBounds,u)&&h(d.current.lastBounds=u)};return[e,p?i()(e,p):e,f?i()(e,f):e]}),[h,s,f,p]);function b(){d.current.scrollContainers&&(d.current.scrollContainers.forEach((e=>e.removeEventListener("scroll",v,!0))),d.current.scrollContainers=null),d.current.resizeObserver&&(d.current.resizeObserver.disconnect(),d.current.resizeObserver=null)}function w(){d.current.element&&(d.current.resizeObserver=new l(v),d.current.resizeObserver.observe(d.current.element),n&&d.current.scrollContainers&&d.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!==d.current.element&&(b(),d.current.element=e,d.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:o}=window.getComputedStyle(e);return[n,r,o].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),o=Symbol.for("react.element"),i=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,i={},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)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},2408:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=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 M(e,t,r){var o,i={},s=null,a=null;if(null!=t)for(o in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)S.call(t,o)&&!C.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:n,type:e,key:s,ref:a,props:i,_owner:k.current}}function O(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,o,i,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=""===i?"."+A(l,0):i,x(s)?(o="",null!=e&&(o=e.replace(E,"$&/")+"/"),T(s,t,o,"",(function(e){return e}))):null!=s&&(O(s)&&(s=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,o+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(E,"$&/")+"/")+e)),t.push(s)),1;if(l=0,i=""===i?".":i+":",x(e))for(var c=0;c<e.length;c++){var u=i+A(a=e[c],c);l+=T(a,t,o,u,s)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||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,o,u=i+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 D(e,t,n){if(null==e)return e;var r=[],o=0;return T(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function _(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 R={current:null},N={transition:null},P={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:N,ReactCurrentOwner:k};t.Children={map:D,forEach:function(e,t,n){D(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return D(e,(function(){t++})),t},toArray:function(e){return D(e,(function(e){return e}))||[]},only:function(e){if(!O(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=o,t.Profiler=s,t.PureComponent=b,t.StrictMode=i,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,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 o=m({},e.props),i=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&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)S.call(t,c)&&!C.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:n,type:e.type,key:i,ref:s,props:o,_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=M,t.createFactory=function(e){var t=M.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=O,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:_}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.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(),o=Object,i=TypeError;e.exports=function(){if(null!=this&&this!==o(this))throw new i("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"})},3290:(e,t,n)=>{"use strict";var r=n(4289),o=n(5559),i=n(3697),s=n(1721),a=n(2753),l=o(s());r(l,{getPolyfill:s,implementation:i,shim:a}),e.exports=l},1721:(e,t,n)=>{"use strict";var r=n(3697),o=n(4289).supportsDescriptors,i=Object.getOwnPropertyDescriptor;e.exports=function(){if(o&&"gim"===/a/gim.flags){var e=i(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,o=n(1721),i=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=o(),t=l(c),n=i(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,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(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,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(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,d=null,f=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)o(u);else{if(!(t.startTime<=e))break;o(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,N(S);else{var t=r(u);null!==t&&P(x,t.startTime-e)}}function S(e,n){m=!1,g&&(g=!1,v(O),O=-1),p=!0;var i=f;try{for(w(n),d=r(c);null!==d&&(!(d.expirationTime>n)||e&&!T());){var s=d.callback;if("function"==typeof s){d.callback=null,f=d.priorityLevel;var a=s(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?d.callback=a:d===r(c)&&o(c),w(n)}else o(c);d=r(c)}if(null!==d)var l=!0;else{var h=r(u);null!==h&&P(x,h.startTime-n),l=!1}return l}finally{d=null,f=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,C=!1,M=null,O=-1,E=5,A=-1;function T(){return!(t.unstable_now()-A<E)}function D(){if(null!==M){var e=t.unstable_now();A=e;var n=!0;try{n=M(!0,e)}finally{n?k():(C=!1,M=null)}}else C=!1}if("function"==typeof b)k=function(){b(D)};else if("undefined"!=typeof MessageChannel){var _=new MessageChannel,R=_.port2;_.port1.onmessage=D,k=function(){R.postMessage(null)}}else k=function(){y(D,0)};function N(e){M=e,C||(C=!0,k())}function P(e,n){O=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,N(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 f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=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=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,o,i){var s=t.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?s+i: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:o,priorityLevel:e,startTime:i,expirationTime:a=i+a,sortIndex:-1},i>s?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(g?(v(O),O=-1):g=!0,P(x,i-s))):(e.sortIndex=a,n(c,e),m||p||(m=!0,N(S))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},3840:(e,t,n)=>{"use strict";e.exports=n(53)},7478:(e,t,n)=>{"use strict";var r=n(210),o=n(1924),i=n(631),s=r("%TypeError%"),a=r("%WeakMap%",!0),l=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),h=o("WeakMap.prototype.has",!0),d=o("Map.prototype.get",!0),f=o("Map.prototype.set",!0),p=o("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 "+i(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 d(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,o){a&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new a),u(e,r,o)):l?(t||(t=new l),f(t,r,o)):(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,o))}};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,o=e.length;n<o;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="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,o>>>=5,o>0&&(t|=32),n+=r.encode(t)}while(o>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,o,i,s,a){const l=Math.floor((r-e)/2)+e,c=s(o,i[l],!0);return 0===c?l:c>0?r-l>1?n(l,r,o,i,s,a):a==t.LEAST_UPPER_BOUND?r<i.length?r:-1:l:l-e>1?n(e,l,o,i,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,o,i){if(0===r.length)return-1;let s=n(-1,r.length,e,r,o,i||t.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(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,o=t.generatedLine,i=e.generatedColumn,s=t.generatedColumn;return o>n||o==n&&s>=i||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 o=r.join("/","mappings.wasm");t.readFile(o,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),o=n(9216),i=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 o=null!=n.sections?new h(n,t):new u(n,t);return Promise.resolve(o)}(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 o=e;"string"==typeof e&&(o=r.parseSourceMapInput(e));const s=r.getArg(o,"version");let l=r.getArg(o,"sources");const c=r.getArg(o,"names",[]);let u=r.getArg(o,"sourceRoot",null);const h=r.getArg(o,"sourcesContent",null),d=r.getArg(o,"mappings"),f=r.getArg(o,"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=i.fromArray(c.map(String),!0),n._sources=i.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=d,n._sourceMapURL=t,n.file=f,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),o=new Uint8Array(this._wasm.exports.memory.buffer,r,n);for(let t=0;t<n;t++)o[t]=e.charCodeAt(t);const i=this._wasm.exports.parse_mappings(r);if(!i){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=i}eachMapping(e,t,n){const o=t||null,i=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(o,t)}),(()=>{switch(i){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"),o=e.column||0;if(t=this._findSourceIndex(t),t<0)return[];if(n<1)throw new Error("Line numbers must be >= 1");if(o<0)throw new Error("Column numbers must be >= 0");const i=[];return this._wasm.withMappingCallback((e=>{let t=e.lastGeneratedColumn;this._computedColumnSpans&&null===t&&(t=1/0),i.push({line:e.generatedLine,column:e.generatedColumn,lastColumn:t})}),(()=>{this._wasm.exports.all_generated_locations_for(this._getMappingsPtr(),t,n-1,"column"in e,o)})),i}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,o=r.getArg(e,"bias",c.GREATEST_LOWER_BOUND);if(null==o&&(o=c.GREATEST_LOWER_BOUND),this._wasm.withMappingCallback((e=>n=e),(()=>{this._wasm.exports.original_location_for(this._getMappingsPtr(),t.generatedLine-1,t.generatedColumn,o)})),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 o,i=e;if(null!=this.sourceRoot&&(i=r.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=r.urlParse(this.sourceRoot))){const e=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" 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 o,i=r.getArg(e,"bias",c.GREATEST_LOWER_BOUND);if(null==i&&(i=c.GREATEST_LOWER_BOUND),this._wasm.withMappingCallback((e=>o=e),(()=>{this._wasm.exports.generated_location_for(this._getMappingsPtr(),n.source,n.originalLine-1,n.originalColumn,i)})),o&&o.source===n.source){let e=o.lastGeneratedColumn;return this._computedColumnSpans&&null===e&&(e=1/0),{line:r.getArg(o,"generatedLine",null),column:r.getArg(o,"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 o=e;"string"==typeof e&&(o=r.parseSourceMapInput(e));const s=r.getArg(o,"version"),a=r.getArg(o,"sections");if(s!=n._version)throw new Error("Unsupported version: "+s);n._sources=new i,n._names=new i,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"),o=r.getArg(n,"line"),i=r.getArg(n,"column");if(o<l.line||o===l.line&&i<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:o+1,generatedColumn:i+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=o.search(t,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn})),i=this._sections[n];return i?i.consumer.originalPositionFor({line:t.generatedLine-(i.generatedOffset.generatedLine-1),column:t.generatedColumn-(i.generatedOffset.generatedLine===t.generatedLine?i.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 o=n.consumer.generatedPositionFor(e);if(o)return{line:o.line+(n.generatedOffset.generatedLine-1),column:o.column+(n.generatedOffset.generatedLine===o.line?n.generatedOffset.generatedColumn-1:0)}}return{line:null,column:null}}_parseMappings(e,t){const n=this.__generatedMappingsUnsorted=[],o=this.__originalMappingsUnsorted=[];for(let e=0;e<this._sections.length;e++){const t=this._sections[e],i=[];t.consumer.eachMapping((e=>i.push(e)));for(let e=0;e<i.length;e++){const s=i[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&&o.push(c)}}}eachMapping(e,t,n){const o=t||null;let i;switch(n||c.GENERATED_ORDER){case c.GENERATED_ORDER:i=this._generatedMappings;break;case c.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}const s=this.sourceRoot;i.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,o)}_findMapping(e,t,n,r,i,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 o.search(e,t,i,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 i=[];let s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,o.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),i.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),i.push({line:r.getArg(n,"generatedLine",null),column:r.getArg(n,"generatedColumn",null),lastColumn:e}),n=this._originalMappings[++s]}}}return i}destroy(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.destroy()}}},4433:(e,t,n)=>{const r=n(6400),o=n(2728),i=n(8213).I,s=n(1188).H;class a{constructor(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,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=o.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 i=r;null!==t&&(i=o.relative(t,r)),n._sources.has(i)||n._sources.add(i);const s=e.sourceContentFor(r);null!=s&&n.setSourceContent(r,s)})),n}addMapping(e){const t=o.getArg(e,"generated"),n=o.getArg(e,"original",null);let r=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})}setSourceContent(e,t){let n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[o.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=o.relative(s,r));const a=this._mappings.toArray().length>0?new i:this._sources,l=new i;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=o.join(n,t.source)),null!=s&&(t.source=o.relative(s,t.source)),t.originalLine=r.line,t.originalColumn=r.column,null!=r.name&&(t.name=r.name))}const i=t.source;null==i||a.has(i)||a.add(i);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=o.join(n,t)),null!=s&&(t=o.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,i,s=0,a=1,l=0,c=0,u=0,h=0,d="";const f=this._mappings.toArray();for(let p=0,m=f.length;p<m;p++){if(t=f[p],e="",t.generatedLine!==a)for(s=0;t.generatedLine!==a;)e+=";",a++;else if(p>0){if(!o.compareByGeneratedPositionsInflated(t,f[p-1]))continue;e+=","}e+=r.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=r.encode(i-h),h=i,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)),d+=e}return d}_generateSourcesContent(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));const n=o.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 o(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 i(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=o,t.urlGenerate=i;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=o(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,i(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=o(t),a=o(e);if(a&&(e=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),i(n);if(n||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);const l="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,i(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=o(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(i(e),t)}return s(t)}},1225:(e,t,n)=>{const r=n(8429);function o(){this.generatedLine=0,this.generatedColumn=0,this.lastGeneratedColumn=null,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}let i=null;e.exports=function(){if(i)return i;const e=[];return i=r().then((t=>WebAssembly.instantiate(t,{env:{mapping_callback(t,n,r,i,s,a,l,c,u,h){const d=new o;d.generatedLine=t+1,d.generatedColumn=n,r&&(d.lastGeneratedColumn=i-1),s&&(d.source=a,d.originalLine=l+1,d.originalColumn=c,u&&(d.name=h)),e[e.length-1](d)},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 i=null,e})),i}},9125:(e,t,n)=>{n(4433).h,t.SourceMapConsumer=n(6771).SourceMapConsumer,n(7085)},9829:function(e,t){var n,r,o;!function(i,s){"use strict";r=[],void 0===(o="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"],o=["fileName","functionName","source"],i=n.concat(r,o,["args"],["evalOrigin"]);function s(t){if(t)for(var n=0;n<i.length;n++)void 0!==t[i[n]]&&this["set"+e(i[n])](t[i[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),o=e.substring(t+1,n).split(","),i=e.substring(n+1);if(0===i.indexOf("@"))var a=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(i,""),l=a[1],c=a[2],u=a[3];return new s({functionName:r,args:o||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<o.length;c++)s.prototype["get"+e(o[c])]=t(o[c]),s.prototype["set"+e(o[c])]=function(e){return function(t){this[e]=String(t)}}(o[c]);return s})?n.apply(t,r):n)||(e.exports=o)}()},6373:(e,t,n)=>{"use strict";var r=n(9496),o=SyntaxError,i="object"==typeof StopIteration?StopIteration:null;e.exports=function(e){if(!i)throw new o("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!==i)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),o=n.n(r),i=n(7795),s=n.n(i),a=n(569),l=n.n(a),c=n(3565),u=n.n(c),h=n(7446),d=n.n(h),f=n(4589),p=n.n(f),m=n(8687),g={};g.styleTagTransform=p(),g.setAttributes=u(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=d(),o()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals},1313:(e,t,n)=>{"use strict";var r=n(3379),o=n.n(r),i=n(7795),s=n.n(i),a=n(569),l=n.n(a),c=n(3565),u=n.n(c),h=n(7446),d=n.n(h),f=n(4589),p=n.n(f),m=n(7584),g={};g.styleTagTransform=p(),g.setAttributes=u(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=d(),o()(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 i={},s=[],a=0;a<e.length;a++){var l=e[a],c=r.base?l[0]+r.base:l[0],u=i[c]||0,h="".concat(c," ").concat(u);i[c]=u+1;var d=n(h),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var p=o(f,r);r.byIndex=a,t.splice(a,0,{identifier:h,updater:p,references:1})}s.push(h)}return s}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<i.length;s++){var a=n(i[s]);t[a].references--}for(var l=r(e,o),c=0;c<i.length;c++){var u=n(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=l}}},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 o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},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),o=n.n(r),i=n(7563),s=n(211),a=n(6686),l=n(2190);function c(e,t,n){switch(e.type){case i.K$:case i.h5:case i.Ab:return e.return=e.return||e.value;case i.Fr:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach((function(e){e.type===i.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===i.lK||e.type===i.QY||e.type===i.Fr&&(!e.parent||e.parent.type===i.iD||e.parent.type===i.Fr)){var s=o().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:()=>i});var r=n(7294),o=n(9250);const i=({children:e})=>{var t;const{navigator:n}=(0,r.useContext)(o.Us),i=(0,o.s0)(),s=null==(t=(0,r.useContext)(o.w3))?void 0:t.router,a=(0,o.TH)();return e({replace(e){i(e.search||"?",{replace:!0,state:e.state})},push(e){i(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 o=e.decode(...r);return void 0===o||n&&null===o?t:o}}}function o(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 i(e){return null==e?e:String(e)}function s(e){const t=o(e,!0);return null==t?t:String(t)}n.d(t,{JsonParam:()=>u,NumberParam:()=>c,QueryParamProvider:()=>A,StringParam:()=>a,createEnumParam:()=>l,useQueryParams:()=>N,withDefault:()=>r});const a={encode:i,decode:s},l=e=>({encode:i,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=o(e);return null==t?t:""===t?null:+t}},u={encode:function(e){return null==e?e:JSON.stringify(e)},decode:function(e){const t=o(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 d=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 f(e,t,n,r){var o;if(!n||!t.length)return e;let i={...e},s=!1;for(const e of t)Object.prototype.hasOwnProperty.call(i,e)||(i[e]=null!=(o=n[e])?o:r,s=!0);return s?i: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,o;if(m(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(let s=0;s<i.length;s++){const a=null!=(o=null==(r=null==n?void 0:n[i[s]])?void 0:r.equals)?o:m;if(!p.call(t,i[s])||!a(e[i[s]],t[i[s]]))return!1}return!0}function y(e,t,n){const r={},o=Object.keys(t);for(const i of o){const o=t[i],s=e[i];let a;if(n.has(i,s,o.decode))a=n.get(i);else{if(a=o.decode(s),o.equals&&n.has(i,s)){const e=n.get(i);o.equals(a,e)&&(a=e)}void 0!==a&&n.set(i,s,a,o.decode)}void 0===a&&void 0!==o.default&&(a=o.default),r[i]=a}return r}function v(){let e;return function(t,n,r){const o=y(t,n,r);return null!=e&&g(e,o)?e:(e=o,o)}}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 o=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==o?void 0:o[e])&&(delete r[e],e=o[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 M={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}},O=h.createContext(M);function E({children:e,adapter:t,options:n}){const{adapter:r,options:o}=h.useContext(O),i=h.useMemo((()=>({adapter:null!=t?t:r,options:C(o,n)})),[t,n,r,o]);return h.createElement(O.Provider,{value:i},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:o}){const{searchStringToObject:i,objectToSearchString:s}=o;let a;null==t&&(t=o.updateType);const l=k(i,n),c=f(r,Object.keys(e),o.params);let u,h;return u="function"==typeof e?e(y(l,c,d)):e,a=function(e,t){const n={},r=Object.keys(t);for(const o of r){const r=t[o];e[o]?n[o]=e[o].encode(t[o]):n[o]=null==r?r:String(r)}return n}(c,u),o.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 o in e)null!=(null==(n=t[o])?void 0:n.urlName)?r[t[o].urlName]=e[o]:r[o]=e[o];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 D=e=>e(),_=e=>setTimeout((()=>e()),0),R=[];function N(e,t){const{adapter:n,options:r}=function(){const e=h.useContext(O);if(void 0===e||e===M)throw new Error("useQueryParams must be used within a QueryParamProvider");return e}(),[o]=(0,h.useState)(v),{paramConfigMap:i,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,o;const i={};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,i[n]=null!=(o=null==(r=t.params)?void 0:r[n])?o:a):i[n]=l}return s?i:e}(i,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=f(c,Object.keys(u),l.params,a));const p=o(u,c,d),m=Object.keys(c).join("\0");(0,h.useEffect)((()=>{const e=m.split("\0");return d.registerParams(e),()=>{d.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:o}=y.current;null==t&&(t=o.updateType),function(e,{immediate:t}={}){R.push(e);let n=t?D:_;1===R.length&&n((()=>{const t=R.slice();R.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 o={...t.location,search:e};n&&("string"==typeof r&&r.startsWith("replace")?t.replace(o):t.push(o))}({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:o,adapter:n},{immediate:!o.enableBatching})}));return[p,b]}},3250:(e,t,n)=>{"use strict";var r=n(7294),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=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!o(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=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return a((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),s((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},139:(e,t,n)=>{"use strict";var r=n(7294),o=n(1688),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=o.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var h=a(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;h=c((function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==o&&d.hasValue){var t=d.value;if(o(t,e))return a=t}return a=e}if(t=a,i(s,e))return t;var n=r(e);return void 0!==o&&o(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,o]);var f=s(e,h[0],h[1]);return l((function(){d.hasValue=!0,d.value=f}),[f]),u(f),f}},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 o;const i=new Uint8Array(16);function s(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(i)}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 o=(e=e||{}).random||(e.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[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()}(o)}},3679:(e,t,n)=>{"use strict";var r=n(9981),o=n(4578),i=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":o(e)?"Number":i(e)?"Boolean":s(e)?"Symbol":a(e)?"BigInt":void 0}},6430:(e,t,n)=>{"use strict";var r=n(4029),o=n(3083),i=n(1924),s=n(7296),a=i("Object.prototype.toString"),l=n(6410)(),c="undefined"==typeof globalThis?n.g:globalThis,u=o(),h=i("String.prototype.slice"),d={},f=Object.getPrototypeOf;l&&s&&f&&r(u,(function(e){if("function"==typeof c[e]){var t=new c[e];if(Symbol.toStringTag in t){var n=f(t),r=s(n,Symbol.toStringTag);if(!r){var o=f(n);r=s(o,Symbol.toStringTag)}d[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(d,(function(n,r){if(!t)try{var o=n.call(e);o===r&&(t=o)}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"],o="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof o[r[t]]&&(e[e.length]=r[t]);return e}},3216:(e,t,n)=>{"use strict";var r=n(2584),o=n(6373);if(n(1405)()||n(5419)()){var i=Symbol.iterator;e.exports=function(e){return null!=e&&void 0!==e[i]?e[i]():r(e)?Array.prototype[i].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),d=h("Array.prototype.push"),f=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=f(e,t);if(n<55296||n>56319)return t+1;var r=f(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 o(x(e));if(k)return k(e);if(b){var t=[];return b(e,(function(e,n){d(t,[n,e])})),m(t)}}if(v(e)){if(S)return o(S(e));if(C)return C(e);if(w){var n=[];return w(e,(function(e){d(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),o=n(9572),i=n(1718),s=n(5899);e.exports=function(e){if(e&&"object"==typeof e){if(r(e))return"Map";if(o(e))return"Set";if(i(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,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}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:()=>V,Wl:()=>K,Xs:()=>Ee,YW:()=>he,as:()=>E,bg:()=>S,cp:()=>g,f_:()=>Ae,gc:()=>M,gm:()=>x,jT:()=>I,n0:()=>O,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),i.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),i.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),o=new l(e);for(let e=t,i=t;;){if(r.next(e),o.next(e),e=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(i+=r.value.length,r.done||i>=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 o(e):i.from(o.split(e,[])):r.empty}}class o 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 o=0;;o++){let i=this.text[o],s=r+i.length;if((t?n:s)>=e)return new h(r,s,n,i);r=s+1,n++}}decompose(e,t,n,r){let i=e<=0&&t>=this.length?this:new o(a(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=s(i.text,e.text.slice(),0,i.length);if(t.length<=32)n.push(new o(t,e.length+i.length));else{let e=t.length>>1;n.push(new o(t.slice(0,e)),new o(t.slice(e)))}}else n.push(i)}replace(e,t,n){if(!(n instanceof o))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 o(r,l):i.from(o.split(r,[]),l)}sliceString(e,t=this.length,n="\n"){let r="";for(let o=0,i=0;o<=t&&i<this.text.length;i++){let s=this.text[i],a=o+s.length;o>e&&i&&(r+=n),e<a&&t>o&&(r+=s.slice(Math.max(0,e-o),t-o)),o=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 i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new o(n,r)),n=[],r=-1);return r>-1&&t.push(new o(n,r)),t}}class i 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 o=0;;o++){let i=this.children[o],s=r+i.length,a=n+i.lines-1;if((t?a:s)>=e)return i.lineInner(e,t,n,r);r=s+1,n=a+1}}decompose(e,t,n,r){for(let o=0,i=0;i<=t&&o<this.children.length;o++){let s=this.children[o],a=i+s.length;if(e<=a&&t>=i){let o=r&((i<=e?1:0)|(a>=t?2:0));i>=e&&a<=t&&!o?n.push(s):s.decompose(e-i,t-i,n,o)}i=a+1}}replace(e,t,n){if(n.lines<this.lines)for(let r=0,o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.length;if(e>=o&&t<=a){let l=s.replace(e-o,t-o,n),c=this.lines-s.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let o=this.children.slice();return o[r]=l,new i(o,this.length-(t-e)+n.length)}return super.replace(o,a,l)}o=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){let r="";for(let o=0,i=0;o<this.children.length&&i<=t;o++){let s=this.children[o],a=i+s.length;i>e&&o&&(r+=n),e<a&&t>i&&(r+=s.sliceString(e-i,t-i,n)),i=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof i))return 0;let n=0,[r,o,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,o+=t){if(r==s||o==a)return n;let i=this.children[r],l=e.children[o];if(i!=l)return n+i.scanIdentical(l,t);n+=i.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 o(n,t)}let r=Math.max(32,n>>5),s=r<<1,a=r>>1,l=[],c=0,u=-1,h=[];function d(e){let t;if(e.lines>s&&e instanceof i)for(let t of e.children)d(t);else e.lines>a&&(c>a||!c)?(f(),l.push(e)):e instanceof o&&c&&(t=h[h.length-1])instanceof o&&e.lines+t.lines<=32?(c+=e.lines,u+=e.length+1,h[h.length-1]=new o(t.text.concat(e.text),t.length+1+e.length)):(c+e.lines>r&&f(),c+=e.lines,u+=e.length+1,h.push(e))}function f(){0!=c&&(l.push(1==h.length?h[0]:i.from(h,u)),u=-1,c=h.length=0)}for(let t of e)d(t);return f(),1==l.length?l[0]:new i(l,t)}}function s(e,t,n=0,r=1e9){for(let o=0,i=0,s=!0;i<e.length&&o<=r;i++){let a=e[i],l=o+a.length;l>=n&&(l>r&&(a=a.slice(0,r-o)),o<n&&(a=a.slice(n-o)),s?(t[t.length-1]+=a,s=!1):t.push(a)),o=l+1}return t}function a(e,t,n){return s(e,[""],t,n)}r.empty=new o([""],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 o?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],i=this.offsets[n],s=i>>1,a=r instanceof o?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&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof o){let o=r.text[s+(t<0?-1:0)];if(this.offsets[n]+=t,o.length>Math.max(0,e))return this.value=0==e?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let i=r.children[s+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof o?i.text.length:i.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 d="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<d.length;e++)d[e]+=d[e-1];function f(e){for(let t=1;t<d.length;t+=2)if(d[t]>e)return d[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 o=x(e,t);if(r==m||o==m||n&&f(o))t+=k(o),r=o;else{if(!p(o))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 M=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(M||(M={}));class O{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 o=this.sections[t++],i=this.sections[t++];i<0?(e(n,r,o),r+=o):r+=i,n+=o}}iterChangedRanges(e,t=!1){D(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 O(e)}composeDesc(e){return this.empty?e:e.empty?this:R(this,e)}mapDesc(e,t=!1){return e.empty?this:_(this,e,t)}mapPos(e,t=-1,n=M.Simple){let r=0,o=0;for(let i=0;i<this.sections.length;){let s=this.sections[i++],a=this.sections[i++],l=r+s;if(a<0){if(l>e)return o+(e-r);o+=s}else{if(n!=M.Simple&&l>=e&&(n==M.TrackDel&&r<e&&l>e||n==M.TrackBefore&&r<e||n==M.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!s)return e==r||t<0?o:o+a;o+=a}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let o=r+this.sections[n++];if(this.sections[n++]>=0&&r<=t&&o>=e)return!(r<e&&o>t)||"cover";r=o}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 O(e)}static create(e){return new O(e)}}class E extends O{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 D(this,((t,n,r,o,i)=>e=e.replace(r,r+(n-t),i)),!1),e}mapDesc(e,t=!1){return _(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let o=0,i=0;o<t.length;o+=2){let s=t[o],a=t[o+1];if(a>=0){t[o]=a,t[o+1]=s;let l=o>>1;for(;n.length<l;)n.push(r.empty);n.push(s?e.slice(i,i+s):r.empty)}i+=s}return new E(t,n)}compose(e){return this.empty?e:e.empty?this:R(this,e,!0)}map(e,t=!1){return e.empty?this:_(this,e,t,!0)}iterChanges(e,t=!1){D(this,e,t)}get desc(){return O.create(this.sections)}filter(e){let t=[],n=[],r=[],o=new N(this);e:for(let i=0,s=0;;){let a=i==e.length?1e9:e[i++];for(;s<a||s==a&&0==o.len;){if(o.done)break e;let e=Math.min(o.len,a-s);A(r,e,-1);let i=-1==o.ins?-1:0==o.off?o.ins:0;A(t,e,i),i>0&&T(n,t,o.text),o.forward(e),s+=e}let l=e[i++];for(;s<l;){if(o.done)break e;let e=Math.min(o.len,l-s);A(t,e,-1),A(r,e,-1==o.ins?-1:0==o.off?o.ins:0),o.forward(e),s+=e}}return{changes:new E(t,n),filtered:O.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 o=[],i=[],s=0,a=null;function l(e=!1){if(!e&&!o.length)return;s<t&&A(o,t-s,-1);let n=new E(o,i);a=a?a.compose(n.map(a)):n,o=[],i=[],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,d=h.length;if(e==a&&0==d)return;e<s&&l(),e>s&&A(o,e-s,-1),A(o,a-e,d),T(i,o,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 o=0;o<e.length;o++){let i=e[o];if("number"==typeof i)t.push(i,-1);else{if(!Array.isArray(i)||"number"!=typeof i[0]||i.some(((e,t)=>t&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)t.push(i[0],0);else{for(;n.length<o;)n.push(r.empty);n[o]=r.of(i.slice(1)),t.push(i[0],n[o].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 o=e.length-2;o>=0&&n<=0&&n==e[o+1]?e[o]+=t:0==t&&0==e[o]?e[o+1]+=n:r?(e[o]+=t,e[o+1]+=n):e.push(t,n)}function T(e,t,n){if(0==n.length)return;let o=t.length-2>>1;if(o<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<o;)e.push(r.empty);e.push(n)}}function D(e,t,n){let o=e.inserted;for(let i=0,s=0,a=0;a<e.sections.length;){let l=e.sections[a++],c=e.sections[a++];if(c<0)i+=l,s+=l;else{let u=i,h=s,d=r.empty;for(;u+=l,h+=c,c&&o&&(d=d.append(o[a-2>>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)l=e.sections[a++],c=e.sections[a++];t(i,u,s,h,d),i=u,s=h}}}function _(e,t,n,r=!1){let o=[],i=r?[]:null,s=new N(e),a=new N(t);for(let e=-1;;)if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);A(o,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(o,a.ins,-1);t;){let n=Math.min(s.len,t);s.ins>=0&&e<s.i&&s.len<=n&&(A(o,0,s.ins),i&&T(i,o,s.text),e=s.i),s.forward(n),t-=n}a.next()}else{if(!(s.ins>=0)){if(s.done&&a.done)return i?E.createSet(o,i):O.create(o);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(o,t,e<s.i?s.ins:0),i&&e<s.i&&T(i,o,s.text),e=s.i,s.forward(s.len-n)}}}function R(e,t,n=!1){let r=[],o=n?[]:null,i=new N(e),s=new N(t);for(let e=!1;;){if(i.done&&s.done)return o?E.createSet(r,o):O.create(r);if(0==i.ins)A(r,i.len,0,e),i.next();else if(0!=s.len||s.done){if(i.done||s.done)throw new Error("Mismatched change set lengths");{let t=Math.min(i.len2,s.len),n=r.length;if(-1==i.ins){let n=-1==s.ins?-1:s.off?0:s.ins;A(r,t,n,e),o&&n&&T(o,r,s.text)}else-1==s.ins?(A(r,i.off?0:i.len,t,e),o&&T(o,r,i.textBit(t))):(A(r,i.off?0:i.len,s.off?0:s.ins,e),o&&!s.off&&T(o,r,s.text));e=(i.ins>t||s.ins>=0&&s.len>t)&&(e||r.length>n),i.forward2(t),s.forward(t)}}else A(r,0,s.ins,e),o&&T(o,r,s.text),s.next()}}class N{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 P{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 P(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 P(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=>P.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 o=e[r];if(o.empty?o.from<=n:o.from<n)return I.normalized(e.slice(),t);n=o.to}return new I(e,t)}static cursor(e,t=0,n,r){return P.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 o=(null!=n?n:33554431)<<5|(null==r?3:Math.min(2,r));return t<e?P.create(t,e,24|o):P.create(e,t,(t>e?4:0)|o)}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],o=e[n-1];if(r.empty?r.from<=o.to:r.from<o.to){let i=o.from,s=Math.max(r.to,o.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?I.range(s,i):I.range(i,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,o){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=j++,this.default=e([]),this.extensions="function"==typeof o?o(this):o}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,o=this.id,i=e[o]>>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[i]=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[i],r):!r(t,e.values[i]))return e.values[i]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[o];if(null!=l){let o=Z(t,l);if(this.dependencies.every((n=>n instanceof F?t.facet(n)===e.facet(n):!(n instanceof V)||t.field(n,!1)==e.field(n,!1)))||(s?$(a=n(e),o,r):r(a=n(e),o)))return e.values[i]=o,0}else a=n(e);return e.values[i]=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 W(e,t,n){let r=n.map((t=>e[t.id])),o=n.map((e=>e.type)),i=r.filter((e=>!(1&e))),s=e[t.id]>>1;function a(e){let n=[];for(let t=0;t<r.length;t++){let i=Z(e,r[t]);if(2==o[t])for(let e of i)n.push(e);else n.push(i)}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,i))return 0;let r=a(e);return t.compare(r,e.values[s])?0:(e.values[s]=r,1)},reconfigure(e,o){let i=H(e,r),l=o.config.facets[t.id],c=o.facet(t);if(l&&!i&&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 V{constructor(e,t,n,r,o){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=o,this.provides=void 0}static define(e){let t=new V(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],o=this.updateF(r,n);return this.compareF(r,o)?0:(e.values[t]=o,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 Y(t,e)}const K={highest:q(0),high:q(1),default:q(2),low:q(3),lowest:q(4)};class Y{constructor(e,t){this.inner=e,this.prec=t}}class G{of(e){return new J(this,e)}reconfigure(e){return G.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class J{constructor(e,t){this.compartment=e,this.inner=t}}class Q{constructor(e,t,n,r,o,i){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=o,this.facets=i,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=[],o=Object.create(null),i=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],o=new Map;return function e(i,s){let a=o.get(i);if(null!=a){if(a<=s)return;let e=r[a].indexOf(i);e>-1&&r[a].splice(e,1),i instanceof J&&n.delete(i.compartment)}if(o.set(i,s),Array.isArray(i))for(let t of i)e(t,s);else if(i instanceof J){if(n.has(i.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(i.compartment)||i.inner;n.set(i.compartment,r),e(r,s)}else if(i instanceof Y)e(i.inner,i.prec);else if(i instanceof V)r[s].push(i),i.provides&&e(i.provides,s);else if(i instanceof z)r[s].push(i),i.facet.extensions&&e(i.facet.extensions,2);else{let t=i.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${i}). 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,i))n instanceof V?r.push(n):(o[n.facet.id]||(o[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 o){let t=o[e],r=t[0].facet,i=c&&c[e]||[];if(t.every((e=>0==e.type)))if(s[r.id]=a.length<<1|1,B(i,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=>W(e,r,t)))}}let u=l.map((e=>e(s)));return new Q(e,i,u,s,a,o)}}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 o=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|o}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(),oe=F.define(),ie=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,o,i){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,n&&L(n,t.newLength),o.some((e=>e.type==he.time))||(this.annotations=o.concat(he.time.of(Date.now())))}static create(e,t,n,r,o,i){return new he(e,t,n,r,o,i)}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 de(e,t){let n=[];for(let r=0,o=0;;){let i,s;if(r<e.length&&(o==t.length||t[o]>=e[r]))i=e[r++],s=e[r++];else{if(!(o<t.length))return n;i=t[o++],s=t[o++]}!n.length||n[n.length-1]<i?n.push(i,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function fe(e,t,n){var r;let o,i,s;return n?(o=t.changes,i=E.empty(t.changes.length),s=e.changes.compose(t.changes)):(o=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(o)),{changes:s,selection:t.selection?t.selection.map(i):null===(r=e.selection)||void 0===r?void 0:r.map(o),effects:ue.mapEffects(e.effects,o).concat(ue.mapEffects(t.effects,i)),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,o=ye(t.annotations);return t.userEvent&&(o=o.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:o,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 o=1;o<t.length;o++){!1===t[o].filter&&(n=!1);let i=!!t[o].sequential;r=fe(r,pe(e,t[o],i?r.changes.newLength:e.doc.length),i)}let o=he.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){let t=e.startState,n=t.facet(ie),r=e;for(let o=n.length-1;o>=0;o--){let i=n[o](e);i&&Object.keys(i).length&&(r=fe(r,pe(t,i,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:de(n,t))}if(!0!==n){let r,o;if(!1===n)o=e.changes.invertedDesc,r=E.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,o=t.filtered.mapDesc(t.changes).invertedDesc}e=he.create(t,r,e.selection&&e.selection.map(o),ue.mapEffects(e.effects,o),e.annotations,e.scrollIntoView)}let r=t.facet(oe);for(let n=r.length-1;n>=0;n--){let o=r[n](e);e=o instanceof he?o:Array.isArray(o)&&1==o.length&&o[0]instanceof he?o[0]:me(t,ye(o),!1)}return e}(o):o)}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,o,i){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,i&&(i._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:o}=n;for(let t of e.effects)t.is(G.reconfigure)?(n&&(o=new Map,n.compartments.forEach(((e,t)=>o.set(t,e))),n=null),o.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=Q.resolve(r,o,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),o=[n.range],i=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++)o[e]=o[e].map(l);let c=r.mapDesc(a,!0);o.push(s.range.map(c)),r=r.compose(l),i=ue.mapEffects(i,l).concat(ue.mapEffects(ye(s.effects),c))}return{changes:r,selection:I.create(o,t.mainIndex),effects:i}}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 V&&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 o=n[t],i=e[t];r.push(o.init((e=>o.spec.fromJSON(i,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=Q.resolve(e.extensions||[],new Map),n=e.doc instanceof r?e.doc:r.of((e.doc||"").split(t.staticFacet(xe.lineSeparator)||C)),o=e.selection?e.selection instanceof I?e.selection:I.single(e.selection.anchor,e.selection.head):I.single(0);return L(o,n.length),t.staticFacet(te)||(o=o.asSingle()),new xe(t,n,o,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 o of this.facet(ee))for(let i of o(this,t,n))Object.prototype.hasOwnProperty.call(i,e)&&r.push(i[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),o=this.charCategorizer(e),i=e-n,s=e-n;for(;i>0;){let e=g(t,i,!1);if(o(t.slice(e,i))!=ve.Word)break;i=e}for(;s<r;){let e=g(t,s);if(o(t.slice(s,e))!=ve.Word)break;s=e}return i==s?null:I.range(i+n,s+n)}}function Se(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let o=t[e],i=r[e];if(void 0===i)r[e]=o;else if(i===o||void 0===o);else{if(!Object.hasOwnProperty.call(n,e))throw new Error("Config merge conflict for field "+e);r[e]=n[e](i,o)}}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=oe,xe.transactionExtender=ie,G.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=M.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 Me(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class Oe{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 o=n?this.to:this.from;for(let i=r,s=o.length;;){if(i==s)return i;let r=i+s>>1,a=o[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==i)return a>=0?i:s;a>=0?s=r:i=r+1}}between(e,t,n,r){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(n,1e9,!1,o);o<i;o++)if(!1===r(this.from[o]+e,this.to[o]+e,this.value[o]))return!1}map(e,t){let n=[],r=[],o=[],i=-1,s=-1;for(let a=0;a<this.value.length;a++){let l,c,u=this.value[a],h=this.from[a]+e,d=this.to[a]+e;if(h==d){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(d,u.endSide),l>c||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(i<0&&(i=l),u.point&&(s=Math.max(s,c-l)),n.push(u),r.push(l-i),o.push(c-i))}return{mapped:n.length?new Oe(r,o,n,s):null,pos:i}}}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:o=this.length}=e,i=e.filter;if(0==t.length&&!i)return this;if(n&&(t=t.slice().sort(Me)),this.isEmpty)return t.length?Ee.of(t):this;let s=new De(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)&&(!i||r>this.chunkEnd(s.chunkIndex)||o<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!i||r>s.to||o<s.from||i(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:i,filterFrom:r,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],r=-1;for(let o=0;o<this.chunk.length;o++){let i=this.chunkPos[o],s=this.chunk[o],a=e.touchesRange(i,i+s.length);if(!1===a)r=Math.max(r,s.maxPoint),t.push(s),n.push(e.mapPos(i));else if(!0===a){let{mapped:o,pos:a}=s.map(i,e);o&&(r=Math.max(r,o.maxPoint),t.push(o),n.push(a))}}let o=this.nextLayer.map(e);return 0==t.length?o:new Ee(n,t,o||Ee.empty,r)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let o=this.chunkPos[r],i=this.chunk[r];if(t>=o&&e<=o+i.length&&!1===i.between(o,e-o,t-o,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return _e.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return _e.from(e).goto(t)}static compare(e,t,n,r,o=-1){let i=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),s=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),a=Te(i,s,n),l=new Ne(i,a,o),c=new Ne(s,a,o);n.iterGaps(((e,t,n)=>Pe(l,e,c,t,n,r))),n.empty&&0==n.length&&Pe(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(o.length!=i.length)return!1;if(!o.length)return!0;let s=Te(o,i),a=new Ne(o,s,0).goto(n),l=new Ne(i,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,o=-1){let i=new Ne(e,null,o).goto(t),s=t,a=i.openStart;for(;;){let e=Math.min(i.to,n);if(i.point){let n=i.activeForPoint(i.to),o=i.pointFrom<t?n.length+1:Math.min(n.length,a);r.point(s,e,i.point,n,o,i.pointRank),a=Math.min(i.openEnd(e),n.length)}else e>s&&(r.span(s,e,i.active,a),a=i.openEnd(e));if(i.to>n)return a+(i.point&&i.to>n?1:0);s=i.to,i.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(Me(t,r)>0)return e.slice().sort(Me);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 Oe(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 o=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let i=r.get(e.chunk[t]);null==i||(n?n.mapPos(i):i)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(i,i+e.chunk[t].length))||o.add(e.chunk[t])}return o}class De{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 _e{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let o=0;o<e.length;o++)for(let i=e[o];!i.isEmpty;i=i.nextLayer)i.maxPoint>=n&&r.push(new De(i,t,n,o));return 1==r.length?r[0]:new _e(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--)Re(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--)Re(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(),Re(this.heap,0)}}}function Re(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let o=e[r];if(r+1<e.length&&o.compare(e[r+1])>=0&&(o=e[r+1],r++),n.compare(o)<0)break;e[r]=n,e[t]=o,t=r}}class Ne{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=_e.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:o}=this.cursor;for(;t<this.activeRank.length&&this.activeRank[t]<=o;)t++;je(this.active,t,n),je(this.activeTo,t,r),je(this.activeRank,t,o),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 Pe(e,t,n,r,o,i){e.goto(t),n.goto(r);let s=r+o,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,o=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))||i.comparePoint(a,o,e.point,n.point):o>a&&!Ie(e.active,n.active)&&i.compareRange(a,o,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 o=0;o<t.length;o++)(t[o]-r||e[o].endSide-e[n].endSide)<0&&(n=o,r=t[o]);return n}function Be(e,t,n=e.length){let r=0;for(let o=0;o<n;)9==e.charCodeAt(o)?(r+=t-r%t,o++):(r++,o=g(e,o));return r}function ze(e,t,n,r){for(let r=0,o=0;;){if(o>=t)return r;if(r==e.length)break;o+=9==e.charCodeAt(r)?n-o%n:1,r=g(e,r)}return!0===r?-1:e.length}},2393:(e,t,n)=>{"use strict";n.d(t,{p:()=>de,Nm:()=>Ye,tk:()=>Hn,SJ:()=>mo,lg:()=>Fe,l9:()=>ue,S2:()=>Ur,Uw:()=>dr,qr:()=>Sr,Sd:()=>co,gB:()=>so,v5:()=>bo,ZO:()=>Pr,HQ:()=>jo,AE:()=>Dr,bF:()=>io,$f:()=>Jn,Eu:()=>No,OO:()=>Pe,W$:()=>Fr,Zs:()=>$r,$1:()=>Zn,mH:()=>po,hJ:()=>Zr});for(var r=n(8120),o=n(8699),i={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++)i[48+h]=i[96+h]=String(h);for(h=1;h<=24;h++)i[h+111]="F"+h;for(h=65;h<=90;h++)i[h]=String.fromCharCode(h+32),s[h]=String.fromCharCode(h);for(var d in i)s.hasOwnProperty(d)||(s[d]=i[d]);function f(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,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:w(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=v(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(o<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=o<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 M,O=null;function E(e){if(e.setActive)return e.setActive();if(O)return e.focus(O);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==O?{get preventScroll(){return O={preventScroll:!0},!0}}:void 0),!O){O=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],o=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=o&&(n.scrollLeft=o)}}}function A(e,t,n=t){let r=M||(M=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},o=new KeyboardEvent("keydown",r);o.synthetic=!0,e.dispatchEvent(o);let i=new KeyboardEvent("keyup",r);return i.synthetic=!0,e.dispatchEvent(i),o.defaultPrevented||i.defaultPrevented}function D(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}class _{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new _(e.parentNode,v(e),t)}static after(e,t){return new _(e.parentNode,v(e)+1,t)}}const R=[];class N{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,o=null;for(let i of this.children){if(i.dirty){if(!i.dom&&(n=o?o.nextSibling:r.firstChild)){let e=N.get(n);(!e||!e.parent&&e.canReuseDOM(i))&&i.reuseDOM(n)}i.sync(e,t),i.dirty=0}if(n=o?o.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=i.dom&&(t.written=!0),i.dom.parentNode==r)for(;n&&n!=i.dom;)n=P(n);else r.insertBefore(i.dom,n);o=i.dom}for(n=o?o.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=P(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&&!N.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,o=-1,i=-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,o=l),l>t&&n.dom.parentNode==this.dom){i=a,s=c;break}c=u,l=u+n.breakAfter}return{from:o,to:s<0?n+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i<this.children.length&&i>=0?this.children[i].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=R){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,o,i){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor}getSide(){return 0}destroy(){this.parent=null}}function P(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}N.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,o,i,s,a,l){let{children:c}=e,u=c.length?c[t]:null,h=i.length?i[i.length-1]:null,d=h?h.breakAfter:s;if(!(t==r&&u&&!s&&!d&&i.length<2&&u.merge(n,o,i.length?h:null,0==n,a,l))){if(r<c.length){let e=c[r];e&&o<e.length?(t==r&&(e=e.split(o),o=0),!d&&h&&e.merge(0,o,h,!0,0,l)?i[i.length-1]=e:(o&&e.merge(0,o,null,!1,0,l),i.push(e))):(null==e?void 0:e.breakAfter)&&(h?h.breakAfter=1:s=1),r++}for(u&&(u.breakAfter=s,n>0&&(!s&&i.length&&u.merge(n,u.length,i[0],!1,a,0)?u.breakAfter=i.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&&i.length;)if(c[r-1].become(i[i.length-1]))r--,i.pop(),l=i.length?0:a;else{if(!c[t].become(i[0]))break;t++,i.shift(),a=i.length?0:l}!i.length&&t&&r<c.length&&!c[t-1].breakAfter&&c[r].merge(0,0,c[t-1],!1,a,l)&&t--,(t<r||i.length)&&e.replaceChildren(t,r,i)}}function j(e,t,n,r,o,i){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,o,i)}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),W=!!($||H||z),U=!W&&/gecko\/(\d+)/i.test(F.userAgent),V=!W&&/Chrome\/(\d+)/.exec(F.userAgent),q="webkitFontSmoothing"in B.documentElement.style,K=!W&&/Apple Computer/.test(F.vendor),Y=K&&(/Mobile\/\w+/.test(F.userAgent)||F.maxTouchPoints>2);var G={mac:Y||/Mac/.test(F.platform),windows:/Win/.test(F.platform),linux:/Linux|X11/.test(F.platform),ie:W,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:!!V,chrome_version:V?+V[1]:0,ios:Y,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 J extends N{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 J&&!(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 J(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 _(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 Q extends N{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(D(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,o,i){return!(n&&(!(n instanceof Q&&n.mark.eq(this.mark))||e&&o<=0||t<this.length&&i<=0)||(j(this,e,t,n?n.children:[],o-1,i-1),this.markDirty(),0))}split(e){let t=[],n=0,r=-1,o=0;for(let i of this.children){let s=n+i.length;s>e&&t.push(n<e?i.split(e-n):i),r<0&&n>=e&&(r=o),n=s,o++}let i=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Q(this.mark,t,i)}domAtPos(e){return oe(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 o=t,i=t,s=0;0==t&&n<0||t==r&&n>=0?G.chrome||G.gecko||(t?(o--,s=1):i<r&&(i++,s=-1)):n<0?o--:i<r&&i++;let a=A(e,o,i).getClientRects();if(!a.length)return x;let l=a[(s?s<0:n>=0)?0:a.length-1];return G.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 N{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,o,i){return!(n&&(!(n instanceof Z&&this.widget.compare(n.widget))||e>0&&o<=0||t<this.length&&i<=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,o=this.posAtStart;return n?n.slice(o,o+this.length):r.xv.empty}domAtPos(e){return 0==e?_.before(this.dom):_.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 _(n,Math.min(e,n.nodeValue.length)))):new _(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,o,i){if(n instanceof Q){for(let s=n.dom.firstChild;s;s=s.nextSibling){let n=N.get(s);if(!n)return i(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,o,i):o(n,e,t);e-=l}return o(n,n.length,-1)}return n.dom==r?i(e,t):o(n,e,t)}function ne(e,t,n,r){if(n instanceof Q){let o=0;for(let i of n.children){let n=p(i.dom,r);if(p(i.dom,e))return o+(n?ne(e,t,i,r):i.localPosFromDOM(e,t));o+=n?r.nodeValue.length:i.length}}else if(n.dom==r)return Math.min(t,r.nodeValue.length);return n.localPosFromDOM(e,t)}class re extends N{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?_.before(this.dom):_.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 J){let n=e.coordsAt(t<0?e.length:0,t);if(n)return n}r+=t}else{if(!(n instanceof Q&&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 oe(e,t){let n=e.dom,{children:r}=e,o=0;for(let e=0;o<r.length;o++){let i=r[o],s=e+i.length;if(!(s==e&&i.getSide()<=0)){if(t>e&&t<s&&i.dom.parentNode==n)return i.domAtPos(t-e);if(t<=e)break;e=s}}for(let e=o;e>0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=o;e<r.length;e++){let t=r[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new _(n,0)}function ie(e,t,n){let r,{children:o}=e;n>0&&t instanceof Q&&o.length&&(r=o[o.length-1])instanceof Q&&r.mark.eq(t.mark)?ie(r,t.children[0],n-1):(o.push(t),t.setParent(e)),e.length+=t.length}function se(e,t,n){let r=null,o=-1,i=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):!i&&(u>n||l==u&&c.getSide()>0)?(i=c,s=n-l):(l<n||l==u&&c.getSide()<0)&&(r=c,o=n-l)),l=u}}(e,t);let a=(n<0?r:i)||r||i;return a?a.coordsAt(Math.max(0,a==r?o: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 o of n)if(-1==r.indexOf(o)||e[o]!==t[o])return!1;return!0}function ce(e,t,n){let r=null;if(t)for(let o in t)n&&o in n||e.removeAttribute(r=o);if(n)for(let o in n)t&&t[o]==n[o]||e.setAttribute(r=o,n[o]);return!!r}J.prototype.children=Z.prototype.children=re.prototype.children=R;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 de 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 fe(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:o,end:i}=ge(e,r);t=(o?r?-3e8:-1:5e8)-1,n=1+(i?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}}de.none=r.Xs.empty;class fe extends de{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 fe&&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)}}fe.prototype.point=!1;class pe extends de{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 de{constructor(e,t,n,o,i,s){super(t,n,i,e),this.block=o,this.isReplace=s,this.mapMode=o?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 o=n.length-1;o>=0&&n[o]+r>=e?n[o]=Math.max(n[o],t):n.push(e,t)}me.prototype.point=!0;class ve extends N{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,o,i){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:[],o,i),!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){ie(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 oe(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.dirty|=6)}sync(e,t){var n;this.dom?4&this.dirty&&(D(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&&N.get(r)instanceof Q;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=N.get(r))||void 0===n?void 0:n.isEditable)||G.ios&&this.children.some((e=>e instanceof J))))){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 J)||/[^ -~]/.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 o=e.children[n],i=r+o.length;if(i>=t){if(o instanceof ve)return o;if(i>t)break}r=i+o.breakAfter}return null}}class be extends N{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,o,i){return!(n&&(!(n instanceof be&&this.widget.compare(n.widget))||e>0&&o<=0||t<this.length&&i<=0)||(this.length=e+(n?n.length:0)+(this.length-t),0))}domAtPos(e){return 0==e?_.before(this.dom):_.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 R}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 J(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,o,i){if(this.disallowBlockEffectsFor[i]&&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 i=Z.create(n.widget||new Se("span"),s,s?0:n.startSide),a=this.atCursorPos&&!i.isEditable&&o<=r.length&&(e<t||n.startSide>0),l=!i.isEditable&&(e<t||o>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),o),o=r.length+Math.max(0,o-r.length)),c.append(xe(i,r),o),this.atCursorPos=l,this.pendingBuffer=l?e<t||o>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=o)}static build(e,t,n,o,i){let s=new we(e,t,n,i);return s.openEnd=r.Xs.spans(o,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 Q(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(),Me=r.r$.define(),Oe=r.r$.define(),Ee=r.r$.define(),Ae=r.r$.define(),Te=r.r$.define(),De=r.r$.define({combine:e=>e.some((e=>e))}),_e=r.r$.define({combine:e=>e.some((e=>e))});class Re{constructor(e,t="nearest",n="nearest",r=5,o=5){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=o}map(e){return e.empty?this:new Re(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const Ne=r.Py.define({map:(e,t)=>e.map(t)});function Pe(e,t,n){let r=e.facet(Oe);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:o}=t||{};return new Fe(Le++,e,n,(e=>{let t=[je.of(e)];return o&&t.push(He.of((t=>{let n=t.plugin(e);return n?o(n):de.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(Pe(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){Pe(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){Pe(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(),We=r.r$.define(),Ue=r.r$.define(),Ve=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,o=0,i=0,s=0;;r++){let a=r==e.length?null:e[r],l=i-s,c=a?a.fromB:1e9;for(;o<t.length&&t[o]<c;){let e=t[o],r=t[o+1],i=Math.max(s,e),a=Math.min(c,r);if(i<=a&&new qe(i+l,a+l,i,a).addToSet(n),r>c)break;o+=2}if(!a)return n;new qe(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),i=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 o=[];this.changes.iterChangedRanges(((e,t,n,r)=>o.push(new qe(e,t,n,r)))),this.changedRanges=o}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 Ye=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(Ye||(Ye={}));const Ge=Ye.LTR,Je=Ye.RTL;function Qe(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}const Xe=Qe("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Ze=Qe("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?Je:Ge}side(e,t){return this.dir==t==e?this.to:this.from}static find(e,t,n,r){let o=-1;for(let i=0;i<e.length;i++){let s=e[i];if(s.from<=t&&s.to>=t){if(s.level==n)return i;(o<0||(0!=r?r<0?s.from<t:s.to>t:e[o].level>s.level))&&(o=i)}}if(o<0)throw new RangeError("Index out of range");return o}}const ot=[];function it(e){return[new rt(0,e,0)]}let st="";function at(e,t,n,o,i){var s;let a=o.head-e.from,l=-1;if(0==a){if(!i||!e.length)return null;t[0].level!=n&&(a=t[0].side(!1,n),l=0)}else if(a==e.length){if(i)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=o.bidiLevel)&&void 0!==s?s:-1,o.assoc));let c=t[l];a==c.side(i,n)&&(c=t[l+=i?1:-1],a=c.side(!i,n));let u=i==(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(i,n))return r.jT.cursor(h+e.from,u?-1:1,c.level);let d=l==(i?t.length-1:0)?null:t[l+(i?1:-1)];return d||c.level==n?d&&d.level<c.level?r.jT.cursor(d.side(!i,n)+e.from,i?1:-1,d.level):r.jT.cursor(h+e.from,i?-1:1,c.level):r.jT.cursor(i?e.to:e.from,i?-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 o=N.get(r),i=N.get(e);(o&&i?o.breakAfter:(o?o.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 o,i=-1,s=1;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,s=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<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=i+s}}readNode(e){if(e.cmIgnore)return;let t=N.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 dt extends N{constructor(e){super(),this.view=e,this.compositionDeco=de.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=de.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=function(e,t){let n=pt(e);if(!n)return de.none;let{from:r,to:o,node:i,text:s}=n,a=t.mapPos(r,1),l=Math.max(a,t.mapPos(o,-1)),{state:c}=e,u=3==i.nodeType?i.nodeValue:new ct([],c).readRange(i.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 de.none;a=l-u.length}else if(c.doc.sliceString(a,l,lt)!=u)return de.none;let h=N.get(i);return h instanceof ee?h=h.widget.topView:h&&(h.parent=null),de.set(de.replace({widget:new mt(i,s,h),inclusive:!0}).range(a,l))}(this.view,e.changes)),(G.ie||G.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let n=function(e,t,n){let o=new yt;return r.Xs.compare(e,t,n,o),o.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=G.chrome||G.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 ft&&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:o,toA:i,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:d,off:f}=n.findPos(i,1),{i:p,off:m}=n.findPos(o,-1);L(this,p,m,d,f,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,o=this.domAtPos(r.anchor),i=r.empty?o:this.domAtPos(r.head);if(G.gecko&&r.empty&&1==(s=o).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((()=>o.node.insertBefore(e,o.node.childNodes[o.offset]||null))),o=i=new _(e,0),n=!0}var s;let a=this.view.observer.selectionRange;!n&&a.focusNode&&y(o.node,o.offset,a.anchorNode,a.anchorOffset)&&y(i.node,i.offset,a.focusNode,a.focusOffset)||(this.view.observer.ignore((()=>{G.android&&G.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=f(this.view.root);if(e)if(r.empty){if(G.gecko){let e=(t=o.node,n=o.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(o.node,o.offset,1==e?1:-1);t&&(o=new _(t,1==e?0:t.nodeValue.length))}}e.collapse(o.node,o.offset),null!=r.bidiLevel&&null!=a.cursorBidiLevel&&(a.cursorBidiLevel=r.bidiLevel)}else if(e.extend){e.collapse(o.node,o.offset);try{e.extend(i.node,i.offset)}catch(e){}}else{let t=document.createRange();r.anchor>r.head&&([o,i]=[i,o]),t.setEnd(i.node,i.offset),t.setStart(o.node,o.offset),e.removeAllRanges(),e.addRange(t)}var t,n})),this.view.observer.setSelectionRange(o,i)),this.impreciseAnchor=o.precise?null:new _(a.anchorNode,a.anchorOffset),this.impreciseHead=i.precise?null:new _(a.focusNode,a.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,n=f(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let i=ve.find(this,t.head);if(!i)return;let s=i.posAtStart;if(t.head==s||t.head==s+i.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,o)}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=N.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 o=this.children[r],i=n-o.breakAfter-o.length;if(e>i||e==i&&o.type!=he.WidgetBefore&&o.type!=he.WidgetAfter&&(!r||2==t||this.children[r-1].breakAfter||this.children[r-1].type==he.WidgetBefore&&t>-2))return o.coordsAt(e-i,t);n=i}}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,o=this.view.contentDOM.clientWidth,i=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==Ye.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),i){let t=c.dom.lastChild,r=t?g(t):[];if(r.length){let t=r[r.length-1],i=a?t.right-n.left:n.right-t.left;i>s&&(s=i,this.minWidth=o,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?Ye.RTL:Ye.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 o=g(r.firstChild)[0];e=r.getBoundingClientRect().height,t=o?o.width/27:7,n=o?o.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 o=r==t.viewports.length?null:t.viewports[r],i=o?o.from-1:this.length;if(i>n){let r=t.lineBlockAt(i).bottom-t.lineBlockAt(n).top;e.push(de.replace({widget:new ft(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,i))}if(!o)break;n=o.to+1}return de.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 o=0,i=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&&(o=Math.max(o,t)),null!=n&&(i=Math.max(i,n)),null!=r&&(s=Math.max(s,r)),null!=l&&(a=Math.max(a,l))}let l={left:r.left-o,top:r.top-s,right:r.right+i,bottom:r.bottom+a};!function(e,t,n,r,o,i,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 d=0,f=0;if("nearest"==o)t.top<e.top?(f=-(e.top-t.top+s),n>0&&t.bottom>e.bottom+f&&(f=t.bottom-e.bottom+f+s)):t.bottom>e.bottom&&(f=t.bottom-e.bottom+s,n<0&&t.top-f<e.top&&(f=-(e.top+f-t.top+s)));else{let r=t.bottom-t.top,i=e.bottom-e.top;f=("center"==o&&r<=i?t.top+r/2-i/2:"start"==o||"center"==o&&n<0?t.top-s:t.bottom-i+s)-e.top}if("nearest"==r?t.left<e.left?(d=-(e.left-t.left+i),n>0&&t.right>e.right+d&&(d=t.right-e.right+d+i)):t.right>e.right&&(d=t.right-e.right+i,n<0&&t.left<e.left+d&&(d=-(e.left+d-t.left+i))):d=("center"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==a?t.left-i:t.right-(e.right-e.left)+i)-e.left,d||f)if(h)c.scrollBy(d,f);else{let e=0,n=0;if(f){let e=u.scrollTop;u.scrollTop+=f,n=u.scrollTop-e}if(d){let t=u.scrollLeft;u.scrollLeft+=d,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-d)<1&&(r="nearest"),n&&Math.abs(n-f)<1&&(o="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==Ye.LTR)}}class ft 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&>(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&&!N.get(t);)t=t.previousSibling;let o=t?N.get(t).posAtEnd:r.posAtStart;return{from:o,to:o,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,o=t;;){if(3==r.nodeType)return r;if(!(1==r.nodeType&&o<r.childNodes.length&&n>=0))break;r=r.childNodes[o],o=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,o,i,s,a,l,c,u,h=!1;for(let d=e.firstChild;d;d=d.nextSibling){let e=g(d);for(let f=0;f<e.length;f++){let p=e[f];o&&wt(o,p)&&(p=xt(St(p,o.bottom),o.top));let m=vt(t,p),g=bt(n,p);if(0==m&&0==g)return 3==d.nodeType?Ct(d,t,n):kt(d,t,n);if(!r||s>g||s==g&&i>m){r=d,o=p,i=m,s=g;let a=g?n<p.top?-1:1:m?t<p.left?-1:1:0;h=!a||(a>0?f<e.length-1:f>0)}0==m?n>p.bottom&&(!c||c.bottom<p.bottom)?(a=d,c=p):n<p.top&&(!u||u.top>p.top)&&(l=d,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,o=c):u&&u.top<=n&&(r=l,o=u),!r)return{node:e,offset:0};let d=Math.max(o.left,Math.min(o.right,t));return 3==r.nodeType?Ct(r,d,n):h&&"false"!=r.contentEditable?kt(r,d,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(o.left+o.right)/2?1:0)}}function Ct(e,t,n){let r=e.nodeValue.length,o=-1,i=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<i){let n=t>=(c.left+c.right)/2,r=n;if((G.chrome||G.gecko)&&A(e,a).getBoundingClientRect().left==c.right&&(r=!n),u<=0)return{node:e,offset:a+(r?1:0)};o=a+(r?1:0),i=u}}}return{node:e,offset:o>-1?o:s>0?e.nodeValue.length:0}}function Mt(e,t,n,r=-1){var o,i;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:h}=t,d=h-l;if(d<0)return 0;if(d>c)return e.state.doc.length;for(let t=e.defaultLineHeight/2,o=!1;s=e.elementAtHeight(d),s.type!=he.Text;)for(;d=r>0?s.bottom+t:s.top-t,!(d>=0&&d<=c);){if(o)return n?null:0;o=!0,r=-r}h=l+d;let f=s.from;if(f<e.viewport.from)return 0==e.viewport.from?0:n?null:Ot(e,a,s,u,h);if(f>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:Ot(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===(o=e.docView.nearest(g))||void 0===o?void 0:o.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)||G.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)||G.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,f);if(!t)return d>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===(i=b.dom)||void 0===i?void 0:i.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 Ot(e,t,n,o,i){let s=Math.round((o-t.left)*e.defaultCharacterWidth);e.lineWrapping&&n.height>1.5*e.defaultLineHeight&&(s+=Math.floor((i-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,o){let i=e.state.doc.lineAt(t.head),s=e.bidiSpans(i),a=e.textDirectionAt(i.from);for(let l=t,c=null;;){let t=at(i,s,a,l,n),u=st;if(!t){if(i.number==(n?e.state.doc.lines:1))return l;u="\n",i=e.state.doc.line(i.number+(n?1:-1)),s=e.bidiSpans(i),t=r.jT.cursor(n?i.from:i.to)}if(c){if(!c(u))return l}else{if(!o)return t;c=o(u)}l=t}}function At(e,t,n){let o=e.state.facet(We).map((t=>t(e)));for(;;){let e=!1;for(let i of o)i.between(n.from-1,n.from+1,((o,i,s)=>{n.from>o&&n.from<i&&(n=t.head>n.from?r.jT.cursor(o,1):r.jT.cursor(i,-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)}})),G.chrome&&102==G.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,G.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 o of t)if(r=null===(n=o.update(e).spec)||void 0===n?void 0:n.domEventHandlers){this.customHandlers.push({plugin:o.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 o=r.handlers[e];if(o)try{if(o.call(r.plugin,n,t)||n.defaultPrevented)return!0}catch(e){Pe(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){Pe(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(G.android&&G.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let n;return!(!G.ios||t.synthetic||t.altKey||t.metaKey||!((n=Dt.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||_t.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||!!(G.safari&&!G.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 Dt=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],_t="dthko",Rt=[16,17,18,20,91,92,224,225];function Nt(e){return.7*e+8}class Pt{constructor(e,t,n,o){this.view=e,this.style=n,this.mustSelect=o,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 i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.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):G.mac?t.metaKey:t.ctrlKey}(e,t),this.dragMove=function(e,t){let n=e.state.facet(Ce);return n.length?n[0](t):G.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=f(e.root);if(!r||0==r.rangeCount)return!0;let o=r.getRangeAt(0).getClientRects();for(let e=0;e<o.length;e++){let n=o[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!=Gt(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,o=(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<=o.left?n=-Nt(o.left-e.clientX):e.clientX>=o.right&&(n=Nt(e.clientX-o.right)),e.clientY<=o.top?r=-Nt(o.top-e.clientY):e.clientY>=o.bottom&&(r=Nt(e.clientY-o.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=N.get(r))&&n.ignoreEvent(t))return!1;return!0}const Lt=Object.create(null),jt=Object.create(null),Ft=G.ie&&G.ie_version<15||G.ios&&G.webkit_version<604;function Bt(e,t){let n,{state:o}=e,i=1,s=o.toText(t),a=s.lines==o.selection.ranges.length;if(null!=Qt&&o.selection.ranges.every((e=>e.empty))&&Qt==s.toString()){let e=-1;n=o.changeByRange((n=>{let l=o.doc.lineAt(n.from);if(l.from==e)return{range:n};e=l.from;let c=o.toText((a?s.line(i++).text:t)+o.lineBreak);return{changes:{from:l.from,insert:c},range:r.jT.cursor(n.from+c.length)}}))}else n=a?o.changeByRange((e=>{let t=s.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:r.jT.cursor(e.from+t.length)}})):o.replaceSelection(s);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function zt(e,t,n,o){if(1==o)return r.jT.cursor(t,n);if(2==o)return function(e,t,n=1){let o=e.charCategorizer(t),i=e.doc.lineAt(t),s=t-i.from;if(0==i.length)return r.jT.cursor(t);0==s?n=1:s==i.length&&(n=-1);let a=s,l=s;n<0?a=(0,r.cp)(i.text,s,!1):l=(0,r.cp)(i.text,s);let c=o(i.text.slice(a,l));for(;a>0;){let e=(0,r.cp)(i.text,a,!1);if(o(i.text.slice(e,a))!=c)break;a=e}for(;l<i.length;){let e=(0,r.cp)(i.text,l);if(o(i.text.slice(l,e))!=c)break;l=e}return r.jT.range(a+i.from,l+i.from)}(e.state,t,n);{let n=ve.find(e.docView,t),o=e.state.doc.lineAt(n?n.posAtEnd:t),i=n?n.posAtStart:o.from,s=n?n.posAtEnd:o.to;return s<e.state.doc.length&&s==o.to&&s++,r.jT.range(i,s)}}Lt.keydown=(e,t)=>{e.inputState.setSelectionOrigin("select"),27==t.keyCode?e.inputState.lastEscPress=Date.now():Rt.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(Me))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=Ut(e,t),o=Gt(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,s,a){let l=Ut(e,t),c=zt(e,l.pos,l.bias,o);if(n.pos!=l.pos&&!s){let t=zt(e,n.pos,n.bias,o),i=Math.min(t.from,c.from),s=Math.max(t.to,c.to);c=i<c.from?r.jT.range(i,s):r.jT.range(s,i)}return s?i.replaceRange(i.main.extend(c.from,c.to)):a&&i.ranges.length>1&&i.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))}(i,c):a?i.addRange(c):r.jT.create([c])}}}(e,t)),n){let r=e.root.activeElement!=e.contentDOM;e.inputState.startMouseSelection(new Pt(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 Wt(e,t,n,r){let o=ve.find(e.docView,t);if(!o)return 1;let i=t-o.posAtStart;if(0==i)return 1;if(i==o.length)return-1;let s=o.coordsAt(i,-1);if(s&&Ht(n,r,s))return-1;let a=o.coordsAt(i,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:Wt(e,n,t.clientX,t.clientY)}}const Vt=G.ie&&G.ie_version<=11;let qt=null,Kt=0,Yt=0;function Gt(e){if(!Vt)return e.detail;let t=qt,n=Yt;return qt=e,Yt=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 Jt(e,t,n,r){if(!n)return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();let{mouseSelection:i}=e.inputState,s=r&&i&&i.dragging&&i.dragMove?{from:i.dragging.from,to:i.dragging.to}:null,a={from:o,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,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),o=0,i=()=>{++o==n.length&&Jt(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=i,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),i()},t.readAsText(n[e])}}else Jt(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 Qt=null;Lt.copy=Lt.cut=(e,t)=>{let{text:n,ranges:r,linewise:o}=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 o=-1;for(let{from:r}of e.selection.ranges){let i=e.doc.lineAt(r);i.number>o&&(t.push(i.text),n.push({from:i.from,to:Math.min(e.doc.length,i.to+1)})),o=i.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!o)return;Qt=o?n:null;let i=Ft?null:t.clipboardData;i?(t.preventDefault(),i.clearData(),i.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 o=r(e,t);o&&n.push(o)}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,G.chrome&&G.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(G.chrome&&G.android&&(r=Dt.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,o,i){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=o,a){this.heightSamples={};for(let e=0;e<i.length;e++){let t=i[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,o){this.from=e,this.length=t,this.top=n,this.height=r,this.type=o}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 o=this,i=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],h=o.lineAt(a,sn.ByPosNoHeight,n.setDoc(t),0,0),d=h.to>=l?h:o.lineAt(l,sn.ByPosNoHeight,n,0,0);for(u+=d.to-l,l=d.to;s>0&&h.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a<h.from&&(h=o.lineAt(a,sn.ByPosNoHeight,n,0,0));c+=h.from-a,a=h.from;let f=pn.build(n.setDoc(i),e,c,u);o=o.replace(a,l,f)}return o.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,o=0;for(;;)if(t==n)if(r>2*o){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),n+=1+o.break,r-=o.size}else{if(!(o>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,o-=t.size}}else if(r<o){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(o+=t.size)}let i=0;return null==e[t-1]?(i=1,t--):null==e[t]&&(i=1,n++),new dn(ln.of(e.slice(0,t)),i,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,o){return this.blockAt(0,n,r,o)}forEachLine(e,t,n,r,o,i){e<=o+this.length&&t>=o&&i(this.blockAt(0,n,r,o))}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,o=e.doc.lineAt(t+this.length).number,i=o-r+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);n=t/i,s=(this.height-t)/(this.length-i-1)}else n=this.height/i;return{firstLine:r,lastLine:o,perLine:n,perChar:s}}blockAt(e,t,n,r){let{firstLine:o,lastLine:i,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let o=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),i=t.doc.lineAt(o),l=s+i.length*a,c=Math.max(n,e-l/2);return new on(i.from,i.length,c,l,he.Text)}{let r=Math.max(0,Math.min(i-o,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(o+r);return new on(a,l,n+s*r,s,he.Text)}}lineAt(e,t,n,r,o){if(t==sn.ByHeight)return this.blockAt(e,n,r,o);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:i,perLine:s,perChar:a}=this.heightMetrics(n,o),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-i,h=r+s*u+a*(l.from-o-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,o,i){e=Math.max(e,o),t=Math.min(t,o+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,o);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-o-n)}let r=a+l*t.length;i(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 o=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],i=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new hn(r.from-t-1).updateHeight(e,t));i<=o&&r.more;){let t=e.doc.lineAt(i).length;n.length&&n.push(null);let o=r.heights[r.index++];-1==s?s=o:Math.abs(o-s)>=an&&(s=-2);let a=new un(t,o);a.outdated=!1,n.push(a),i+=t+1}i<=o&&n.push(null,new hn(o-i).updateHeight(e,i));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 dn 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 o=n+this.left.height;return e<o?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,o,r+this.left.length+this.break)}lineAt(e,t,n,r,o){let i=r+this.left.height,s=o+this.left.length+this.break,a=t==sn.ByHeight?e<i:e<s,l=a?this.left.lineAt(e,t,n,r,o):this.right.lineAt(e,t,n,i,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,i,s)):this.left.lineAt(s,c,n,r,o).join(l)}forEachLine(e,t,n,r,o,i){let s=r+this.left.height,a=o+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,n,r,o,i),t>=a&&this.right.forEachLine(e,t,n,s,a,i);else{let l=this.lineAt(a,sn.ByPos,n,r,o);e<l.from&&this.left.forEachLine(e,l.from-1,n,r,o,i),l.to>=e&&l.from<=t&&i(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,i)}}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 o=[];e>0&&this.decomposeLeft(e,o);let i=o.length;for(let e of n)o.push(e);if(e>0&&fn(o,i-1),t<this.length){let e=o.length;this.decomposeRight(t,o),fn(o,e)}return ln.of(o)}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:o,right:i}=this,s=t+o.length+this.break,a=null;return r&&r.from<=t+o.length&&r.more?a=o=o.updateHeight(e,t,n,r):o.updateHeight(e,t,n),r&&r.from<=s+i.length&&r.more?a=i=i.updateHeight(e,s,n,r):i.updateHeight(e,s,n),a?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function fn(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 o=t-e;n.block?this.addBlock(new cn(o,r,n.type)):(o||r>=5)&&this.addLineDeco(r,o)}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,o){let i=new pn(n,e);return r.Xs.spans(t,n,o,i,0),i.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,o=r.defaultView||window,i=Math.max(0,n.left),s=Math.min(o.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(o.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();i=Math.max(i,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:i-n.left,right:Math.max(i,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],o=t[n];if(r.from!=o.from||r.to!=o.to||r.size!=o.size)return!1}return!0}draw(e){return de.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=Mn,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ye.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=de.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?Mn:new On(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 o=e.changedRanges,i=qe.extendWithRanges(o,function(e,t,n){let o=new mn;return r.Xs.compare(e,t,n,o,0),o.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),i),this.heightMap.height!=s&&(e.flags|=2);let a=i.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(_e)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),o=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?Ye.RTL:Ye.LTR;let s=this.heightOracle.mustRefreshForWrapping(i),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,d=parseInt(n.paddingBottom)||0;this.paddingTop==h&&this.paddingBottom==d||(this.paddingTop=h,this.paddingBottom=d,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let f=(this.printing?yn:gn)(t,this.paddingTop),p=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;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(o.mustRefreshForHeights(t)&&(s=!0),s||o.lineWrapping&&Math.abs(y-this.contentDOMWidth)>o.charWidth){let{lineHeight:n,charWidth:r,textHeight:a}=e.docView.measureTextSize();s=n>0&&o.refresh(i,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)),o.heightChanged=!1;for(let n of this.viewports){let i=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(o,0,s,new rn(n.from,i))}o.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,o=this.heightOracle,{visibleTop:i,visibleBottom:s}=this,a=new xn(r.lineAt(i-1e3*n,sn.ByHeight,o,0,0).from,r.lineAt(s+1e3*(1-n),sn.ByHeight,o,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let n,i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,sn.ByPos,o,0,0);n="center"==t.y?(s.top+s.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e<a.from?s.top:s.bottom-i,a=new xn(r.lineAt(n-500,sn.ByHeight,o,0,0).from,r.lineAt(n+i+500,sn.ByHeight,o,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:o}=this.heightMap.lineAt(t,sn.ByPos,this.heightOracle,0,0),{visibleTop:i,visibleBottom:s}=this;return(0==e||r<=i-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||o>=s+Math.max(10,Math.min(n,250)))&&r>i-2e3&&o<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,o=n?1e4:2e3,i=o>>1,s=o<<1;if(this.defaultTextDirection!=Ye.LTR&&!n)return[];let a=[],l=(o,s,c,u)=>{if(s-o<i)return;let h=this.state.selection.main,d=[h.from];h.empty||d.push(h.to);for(let e of d)if(e>o&&e<s)return l(o,e-10,c,u),void l(e+10,s,c,u);let f=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-o)<i&&Math.abs(e.to-s)<i&&!d.some((t=>e.from<t&&e.to>t))));if(!f){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>o&&(s=e)}f=new vn(o,s,this.gapSize(c,o,s,u))}a.push(f)};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,i,a=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let n,s,l=o/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=a){let r=Cn(t,a),o=((this.visibleBottom-this.visibleTop)/2+l)/e.height;n=r-o,s=r+o}else n=(this.visibleTop-e.top-l)/e.height,s=(this.visibleBottom-e.top+l)/e.height;r=kn(t,n),i=kn(t,s)}else{let e,n,s=t.total*this.heightOracle.charWidth,l=o*this.heightOracle.charWidth;if(null!=a){let r=Cn(t,a),o=((this.pixelViewport.right-this.pixelViewport.left)/2+l)/s;e=r-o,n=r+o}else e=(this.pixelViewport.left-l)/s,n=(this.pixelViewport.right+l)/s;r=kn(t,e),i=kn(t,n)}r>e.from&&l(e.from,r,e,t),i<e.to&&l(i,e.to,e,t)}return a}gapSize(e,t,n,r){let o=Cn(r,n)-Cn(r,t);return this.heightOracle.lineWrapping?e.height*o:r.total*this.heightOracle.charWidth*o}updateLineGaps(e){vn.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=de.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 o=[],i=e,s=0;return r.Xs.spans(n,e,t,{span(){},point(e,t){e>i&&(o.push({from:i,to:e}),s+=e-i),i=t}},20),i<t&&(o.push({from:i,to:t}),s+=t-i),{total:s,ranges:o}}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:o}=t[e],i=o-n;if(r<=i)return n+r;r-=i}}function Cn(e,t){let n=0;for(let{from:r,to:o}of e.ranges){if(t<=o){n+=t-r;break}n+=o-r}return n/e.total}const Mn={toDOM:e=>e,fromDOM:e=>e,scale:1};class On{constructor(e,t,n){let r=0,o=0,i=0;this.viewports=n.map((({from:n,to:o})=>{let i=t.lineAt(n,sn.ByPos,e,0,0).top,s=t.lineAt(o,sn.ByPos,e,0,0).bottom;return r+=s-i,{from:n,to:o,top:i,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=i+(e.top-o)*this.scale,i=e.domBottom=e.domTop+(e.bottom-e.top),o=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.top)return r+(e-n)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);n=o.bottom,r=o.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.domTop)return n+(e-r)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);n=o.bottom,r=o.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}),Dn=o.V.newName(),_n=o.V.newName(),Rn=o.V.newName(),Nn={"&light":"."+_n,"&dark":"."+Rn};function Pn(e,t,n){return new o.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=Pn("."+Dn,{"&":{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"}},Nn);class Ln{constructor(e,t,n,o){this.typeOver=o,this.bounds=null,this.text="";let{impreciseHead:i,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=i||s?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}=e.observer.selectionRange;return n&&(t.push(new ht(n,r)),o==n&&i==r||t.push(new ht(o,i))),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,o=2==e.length?e[1].pos:n;return n>-1&&o>-1?r.jT.single(n+t,o+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!p(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),o=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(o,n)}}}function jn(e,t){let n,{newSel:o}=t,i=e.state.selection.main;if(t.bounds){let{from:o,to:s}=t.bounds,a=i.from,l=null;(8===e.inputState.lastKeyCode&&e.inputState.lastKeyTime>Date.now()-100||G.android&&t.text.length<s-o)&&(a=i.to,l="end");let c=function(e,t,n,r){let o=Math.min(e.length,t.length),i=0;for(;i<o&&e.charCodeAt(i)==t.charCodeAt(i);)i++;if(i==o&&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,i-Math.min(s,a))-i),s<i&&e.length<t.length?(i-=n<=i&&n>=s?i-n:0,a=i+(a-s),s=i):a<i&&(i-=n<=i&&n>=a?i-n:0,s=i+(s-a),a=i),{from:i,toA:s,toB:a}}(e.state.doc.sliceString(o,s,lt),t.text,a-o,l);c&&(G.chrome&&13==e.inputState.lastKeyCode&&c.toB==c.from+2&&t.text.slice(c.from,c.toB)==lt+lt&&c.toB--,n={from:o+c.from,to:o+c.toA,insert:r.xv.of(t.text.slice(c.from,c.toB).split(lt))})}else o&&(!e.hasFocus&&e.state.facet(Ie)||o.main.eq(i))&&(o=null);if(!n&&!o)return!1;if(!n&&t.typeOver&&!i.empty&&o&&o.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(G.mac||G.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(o&&2==n.insert.length&&(o=r.jT.single(o.main.anchor-1,o.main.head-1)),n={from:i.from,to:i.to,insert:r.xv.of([" "])}):G.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(o&&(o=r.jT.single(o.main.anchor-1,o.main.head-1)),n={from:i.from,to:i.to,insert:r.xv.of([" "])}),n){let t=e.state;if(G.ios&&e.inputState.flushIOSKey(e))return!0;if(G.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&T(e.contentDOM,"Enter",13)||n.from==i.from-1&&n.to==i.to&&0==n.insert.length&&T(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.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>=i.from&&n.to<=i.to&&n.to-n.from>=(i.to-i.from)/3&&(!o||o.main.empty&&o.main.from==n.from+n.insert.length)&&e.inputState.composing<0){let r=i.from<n.from?t.sliceDoc(i.from,n.from):"",o=i.to>n.to?t.sliceDoc(n.to,i.to):"";s=t.replaceSelection(e.state.toText(r+n.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let a=t.changes(n),l=o&&!t.selection.main.eq(o.main)&&o.main.to<=a.newLength?o.main:void 0;if(t.selection.ranges.length>1&&e.inputState.composing>=0&&n.to<=i.to&&n.to>=i.to-10){let o=e.state.sliceDoc(n.from,n.to),c=pt(e)||e.state.doc.lineAt(i.head),u=i.to-n.to,h=i.to-i.from;s=t.changeByRange((s=>{if(s.from==i.from&&s.to==i.to)return{changes:a,range:l||s.map(a)};let d=s.to-u,f=d-o.length;if(s.to-s.from!=h||e.state.sliceDoc(f,d)!=o||c&&s.to>=c.from&&s.from<=c.to)return{range:s};let p=t.changes({from:f,to:d,insert:n.insert}),m=s.to-i.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(o&&!o.main.eq(i)){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:o,scrollIntoView:t,userEvent:n}),!0}return!1}const Fn={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Bn=G.ie&&G.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);(G.ie&&G.ie_version<=11||G.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 o=r.anchorNode&&n.docView.nearest(r.anchorNode);o&&o.ignoreEvent(e)?t||(this.selectionChanged=!1):(G.ie&&G.ie_version<=11||G.android&&G.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=G.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,o=t.startOffset,i=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return y(a.node,a.offset,i,s)&&([r,o,i,s]=[i,s,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}}(this.view)||f(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 o of e){let e=this.readMutation(o);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=N.get(t);if(r&&r.parent==e)return r;let o=t.parentNode;t=o!=e.dom?o: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 dt(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,o=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);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(i,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(i.doc)||!this.state.selection.eq(i.selection))&&(u=null)):this.observer.clear(),i.facet(r.yy.phrases)!=this.state.facet(r.yy.phrases))return this.setState(i);t=Ke.create(this,i,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 Re(e.empty?e:r.jT.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Ne)&&(h=e.value)}this.viewState.update(t,h),this.bidiCache=Vn.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(Ve)!=this.styleModules&&this.mountStyles(),o=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||o||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 dt(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 o of n){let n=t.indexOf(o);if(n<0)r.push(new Be(o));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:o}=this.scrollDOM,i=r>n-o-4?n:r;try{for(let e=0;;e++){this.updateState=1;let n=this.viewport,r=this.viewState.lineBlockAtHeight(i),o=this.viewState.measure(this);if(!o&&!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&o||([this.measureRequests,s]=[s,this.measureRequests]);let a=s.map((e=>{try{return e.read(this)}catch(e){return Pe(this.state,e),Un}})),l=Ke.create(this,this.state,[]),c=!1,u=!1;l.flags|=o,t?t.flags|=o: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){Pe(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 Dn+" "+(this.state.facet(Tn)?Rn:_n)+" "+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:`${G.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(Ve),o.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 o=e.state.charCategorizer(t),i=o(n);return e=>{let t=o(e);return i==r.D0.Space&&(i=t),i==t}}(this,e.head,t))))}moveToLineBoundary(e,t,n=!0){return function(e,t,n,o){let i=e.state.doc.lineAt(t.head),s=o&&e.lineWrapping?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(s){let t=e.dom.getBoundingClientRect(),o=e.textDirectionAt(i.from),a=e.posAtCoords({x:n==(o==Ye.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?i.to:i.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,o){let i=t.head,s=n?1:-1;if(i==(n?e.state.doc.length:0))return r.jT.cursor(i,t.assoc);let a,l=t.goalColumn,c=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(i),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(i);null==l&&(l=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from))),a=(s<0?t.top:t.bottom)+h}let d=c.left+l,f=null!=o?o:e.defaultLineHeight>>1;for(let n=0;;n+=10){let o=a+(f+n)*s,u=Mt(e,{x:d,y:o},!1,s);if(o<c.top||o>c.bottom||(s<0?u<i:u>i))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(),Mt(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),o=this.bidiSpans(r);return S(n,o[rt.find(o,e-r.from,-1,t)].dir==Ye.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(De)||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>Wn)return it(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==Ge?1:2,o=t==Ge?2:1;if(!e||1==r&&!nt.test(e))return it(n);for(let t=0,o=r,s=r;t<n;t++){let n=(i=e.charCodeAt(t))<=247?Xe[i]:1424<=i&&i<=1524?2:1536<=i&&i<=1785?Ze[i-1536]:1774<=i&&i<=2220?4:8192<=i&&i<=8203?256:64336<=i&&i<=65023?4:8204==i?256:1;512==n?n=o:8==n&&4==s&&(n=16),ot[t]=4==n?2:n,7&n&&(s=n),o=n}var i;for(let e=0,t=r,o=r;e<n;e++){let r=ot[e];if(128==r)e<n-1&&t==ot[e+1]&&24&t?r=ot[e]=t:ot[e]=256;else if(64==r){let r=e+1;for(;r<n&&64==ot[r];)r++;let i=e&&8==t||r<n&&8==ot[r]?1==o?1:8:256;for(let t=e;t<r;t++)ot[t]=i;e=r-1}else 8==r&&1==o&&(ot[e]=1);t=r,7&r&&(o=r)}for(let t,i,s,a=0,l=0,c=0;a<n;a++)if(i=et[t=e.charCodeAt(a)])if(i<0){for(let e=l-3;e>=0;e-=3)if(tt[e+1]==-i){let t=tt[e+2],n=2&t?r:4&t?1&t?o:r:0;n&&(ot[a]=ot[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=ot[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==ot[e]){let t=e+1;for(;t<n&&256==ot[t];)t++;let o=1==(e?ot[e-1]:r),i=o==(1==(t<n?ot[t]:r))?o?1:2:r;for(let n=e;n<t;n++)ot[n]=i;e=t-1}let s=[];if(1==r)for(let e=0;e<n;){let t=e,r=1!=ot[e++];for(;e<n&&r==(1!=ot[e]);)e++;if(r)for(let n=e;n>t;){let e=n,r=2!=ot[--n];for(;n>t&&r==(2!=ot[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==ot[e++];for(;e<n&&r==(2==ot[e]);)e++;s.push(new rt(t,e,r?1:2))}return s}(e.text,t);return this.bidiCache.push(new Vn(e.from,e.to,t,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||G.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 Ne.of(new Re("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=o.V.newName(),r=[An.of(n),Ve.of(Pn(`.${n}`,e))];return t&&t.dark&&r.push(Tn.of(!0)),r}static baseTheme(e){return r.Wl.lowest(Ve.of(Pn("."+Dn,e,Nn)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&N.get(n)||N.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}Hn.styleModule=Ve,Hn.inputHandler=Ae,Hn.focusChangeEffect=Te,Hn.perLineTextDirection=De,Hn.exceptionSink=Oe,Hn.updateListener=Ee,Hn.editable=Ie,Hn.mouseSelectionStyle=Me,Hn.dragMovesSelection=Ce,Hn.clickAddsSelectionRange=ke,Hn.decorations=He,Hn.atomicRanges=We,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 Wn=4096,Un={};class Vn{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:Ye.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let i=e[o];i.dir!=r||t.touchesRange(i.from,i.to)||n.push(new Vn(t.mapPos(i.from,1),t.mapPos(i.to,-1),i.dir,i.order))}return n}}function qn(e,t,n){for(let r=e.state.facet(t),o=r.length-1;o>=0;o--){let t=r[o],i="function"==typeof t?t(e):t;i&&ae(i,n)}return n}const Kn=G.mac?"mac":G.windows?"win":G.linux?"linux":"key";function Yn(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 Gn=r.Wl.default(Hn.domEventHandlers({keydown:(e,t)=>nr(Xn(t.state),e,t,"editor")})),Jn=r.r$.define({enables:Gn}),Qn=new WeakMap;function Xn(e){let t=e.facet(Jn),n=Qn.get(t);return n||Qn.set(t,n=function(e,t=Kn){let n=Object.create(null),r=Object.create(null),o=(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")},i=(e,r,i,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,o,i,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))o=!0;else if(/^s(hift)?$/i.test(a))i=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==t?s=!0:o=!0}}return r&&(a="Alt-"+a),o&&(a="Ctrl-"+a),s&&(a="Meta-"+a),i&&(a="Shift-"+a),a}(e,t)));for(let t=1;t<u.length;t++){let n=u.slice(0,t).join(" ");o(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(" ");o(h,!1);let d=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())||[]});i&&d.run.push(i),s&&(d.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 o=r[t]||r.key;if(o)for(let t of e)i(t,o,r.run,r.preventDefault),r.shift&&i(t,"Shift-"+o,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,o){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:i)[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,d="",f=!1;er&&er.view==n&&er.scope==o&&(d=er.prefix+" ",(f=Rt.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&&(f=!0)}return!1},v=e[o];if(v){if(y(v[d+Yn(a,t,!h)]))return!0;if(h&&(t.altKey||t.metaKey||t.ctrlKey)&&!(G.windows&&t.ctrlKey&&t.altKey)&&(p=i[t.keyCode])&&p!=a){if(y(v[d+Yn(p,t,!0)]))return!0;if(t.shiftKey&&(m=s[t.keyCode])!=a&&m!=p&&y(v[d+Yn(m,t,!1)]))return!0}else if(h&&t.shiftKey&&y(v[d+Yn(a,t,!0)]))return!0;if(y(v._any))return!0}return f}class rr{constructor(e,t,n,r,o){this.className=e,this.left=t,this.top=n,this.width=r,this.height=o}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 o=or(e);return[new rr(t,r.left-o.left,r.top-o.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),o=Math.min(n.to,e.viewport.to),i=e.textDirection==Ye.LTR,s=e.contentDOM,a=s.getBoundingClientRect(),l=or(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),d=a.right-(u?parseInt(u.paddingRight):0),f=sr(e,r),p=sr(e,o),m=f.type==he.Text?f:null,g=p.type==he.Text?p:null;if(e.lineWrapping&&(m&&(m=ir(e,r,m)),g&&(g=ir(e,o,g))),m&&g&&m.from==g.from)return v(b(n.from,n.to,m));{let t=m?b(n.from,null,m):w(f,!1),r=g?b(null,n.to,g):w(p,!0),o=[];return(m||f).to<(g||p).from-1?o.push(y(h,t.bottom,d,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(o).concat(v(r))}function y(e,n,r,o){return new rr(t,e-l.left,n-l.top-.01,r-e,o-n+.01)}function v({top:e,bottom:t,horizontal:n}){let r=[];for(let o=0;o<n.length;o+=2)r.push(y(n[o],e,n[o+1],t));return r}function b(t,n,r){let o=1e9,s=-1e9,a=[];function l(t,n,l,c,u){let f=e.coordsAtPos(t,t==r.to?-2:2),p=e.coordsAtPos(l,l==r.from?2:-2);o=Math.min(f.top,p.top,o),s=Math.max(f.bottom,p.bottom,s),u==Ye.LTR?a.push(i&&n?h:f.left,i&&c?d:p.right):a.push(!i&&c?h:p.left,!i&&n?d:f.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 o=Math.max(r.from,c),i=Math.min(r.to,u);;){let r=e.state.doc.lineAt(o);for(let s of e.bidiSpans(r)){let e=s.from+r.from,a=s.to+r.from;if(e>=i)break;a>o&&l(Math.max(e,o),null==t&&e<=c,Math.min(a,i),null==n&&a>=u,s.dir)}if(o=r.to+1,o>=i)break}return 0==a.length&&l(c,null==t,u,null==n,e.textDirection),{top:o,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 or(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==Ye.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function ir(e,t,n){let o=r.jT.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(o,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(o,!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=!G.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 dr(e={}){return[hr.of(e),pr,gr,vr,_e.of(!0)]}function fr(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),o=[];for(let i of t.selection.ranges){let s=i==t.selection.main;if(i.empty?!s||ur:n.drawRangeCursor){let t=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:r.jT.cursor(i.head,i.head>i.anchor?-1:1);for(let r of rr.forRange(e,t,n))o.push(r)}}return o},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=fr(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||fr(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,o){t.lastIndex=0;for(let i,s=e.iterRange(n,r),a=n;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;i=t.exec(s.value);)o(a+i.index,i)}class Cr{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:o,maxLength:i=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,o)=>r(o,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,o)=>{let i=n(e,t,r);i&&o(r,r+e[0].length,i)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,o)=>o(r,r+e[0].length,n)}this.boundary=o,this.maxLength=i}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:o,to:i}of n)o=Math.max(e.state.doc.lineAt(o).from,o-t),i=Math.min(e.state.doc.lineAt(i).to,i+t),r.length&&r[r.length-1].to>=o?r[r.length-1].to=i:r.push({from:o,to:i});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,o,i,s)=>{s>e.view.viewport.from&&i<e.view.viewport.to&&(n=Math.min(i,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 o of e.visibleRanges){let i=Math.max(o.from,n),s=Math.min(o.to,r);if(s>i){let n=e.state.doc.lineAt(i),r=n.to<s?e.state.doc.lineAt(s):n,a=Math.max(o.from,n.from),l=Math.min(o.to,r.to);if(this.boundary){for(;i>n.from;i--)if(this.boundary.test(n.text[i-1-n.from])){a=i;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 Mr=null!=/x/.unicode?"gu":"g",Or=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",Mr),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:Or,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,Mr)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,Mr)),t}});function Dr(e={}){return[Tr.of(e),_r||(_r=Fe.fromClass(class{constructor(e){this.view=e,this.decorations=de.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,o)=>{let{doc:i}=n.state,s=(0,r.gm)(t[0],0);if(9==s){let e=i.lineAt(o),t=n.state.tabSize,s=(0,r.IS)(e.text,t,o-e.from);return de.replace({widget:new Nr((t-s%t)*this.view.defaultCharacterWidth)})}return this.decorationCache[s]||(this.decorationCache[s]=de.replace({widget:new Rr(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 _r=null;class Rr 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 o=document.createElement("span");return o.textContent=t,o.title=n,o.setAttribute("aria-label",n),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class Nr 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 Pr(){return Lr}const Ir=de.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 o=e.lineBlockAt(r.head);o.from>t&&(n.push(Ir.range(o.from)),t=o.from)}return de.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=de.set([de.widget({widget:new jr(e),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?de.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),o=e.state.doc.lineAt(n),i=n-o.from,s=i>Br?-1:i==o.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)(o.text,e.state.tabSize,n-o.from);return{line:o.number,col:s,off:i}}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),o=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)},o=o.map(e.changes)}},get(t,i,s){let a=zr(e,t);if(!a)return o;let l=function(e,t,n){let o=Math.min(t.line,n.line),i=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=o;t<=i;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=o;t<=i;t++){let n=e.doc.line(t),o=(0,r.Gz)(n.text,a,e.tabSize,!0);if(o<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+o,n.from+t))}}}return s}(e.state,n,a);return l.length?s?r.jT.create(l.concat(o.ranges)):r.jT.create(l):o}}: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]},Wr={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)?Wr:null}))]}const Vr="-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 o=[];for(let t=0;t<r.length;t++){let n=r[t],i=-1;if(n){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==n.create&&(i=e)}if(i<0)o[t]=this.createTooltipView(n);else{let n=o[t]=this.tooltipViews[i];n.update&&n.update(e)}}}for(let e of this.tooltipViews)o.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=o,!0}}function Kr(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const Yr=r.r$.define({combine:e=>{var t,n,r;return{position:G.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}}}),Gr=new WeakMap,Jr=Fe.fromClass(class{constructor(e){this.view=e,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(Yr);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(Yr);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=Vr,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(Yr).tooltipSpace(this.view)}}writeMeasure(e){var t;let{editor:n,space:r}=e,o=[];for(let i=0;i<this.manager.tooltips.length;i++){let s=this.manager.tooltips[i],a=this.manager.tooltipViews[i],{dom:l}=a,c=e.pos[i],u=e.size[i];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=Vr;continue}let h=s.arrow?a.dom.querySelector(".cm-tooltip-arrow"):null,d=h?7:0,f=u.right-u.left,p=null!==(t=Gr.get(a))&&void 0!==t?t:u.bottom-u.top,m=a.offset||Xr,g=this.view.textDirection==Ye.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-f):Math.max(r.left,c.left-f+(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)-d;if(b<p&&!1!==a.resize){if(b<this.view.defaultLineHeight){l.style.top=Vr;continue}Gr.set(a,p),l.style.height=(p=b)+"px"}else l.style.height&&(l.style.height="");let w=v?c.top-p-d-m.y:c.bottom+d+m.y,x=y+f;if(!0!==a.overlap)for(let e of o)e.left<x&&e.right>y&&e.top<w+p&&e.bottom>w&&(w=v?e.top-p-2-d:e.bottom+d+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&&o.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=Vr}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Qr=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:[Jr,Qr]}),eo=r.r$.define();class to{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,eo,(e=>this.createHostedView(e)))}static create(e){return new to(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 no=Zr.compute([eo],(e=>{let t=e.facet(eo).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:to.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class ro{constructor(e,t,n,r,o){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=o,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)),o=r&&r.dir==Ye.RTL?-1:1,i=this.source(this.view,t,e.x<n.left?-o:o);if(null==i?void 0:i.then){let e=this.pending={pos:t};i.then((t=>{this.pending==e&&(this.pending=null,t&&this.view.dispatch({effects:this.setHover.of(t)}))}),(e=>Pe(this.view.state,e,"hover tooltip")))}else i&&this.view.dispatch({effects:this.setHover.of(i)})}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&&!oo(this.lastMove.target)||this.pending){let{pos:r}=n||this.pending,o=null!==(t=null==n?void 0:n.end)&&void 0!==t?t:r;(r==o?this.view.posAtCoords(this.lastMove)==r:function(e,t,n,r,o,i){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-o,o-t.bottom,t.left-r,r-t.right)<=6)return!0}return!1}(this.view,r,o,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&&!oo(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 oo(e){for(let t=e;t;t=t.parentNode)if(1==t.nodeType&&t.classList.contains("cm-tooltip"))return!0;return!1}function io(e,t={}){let n=r.Py.define(),o=r.QQ.define({create:()=>null,update(e,o){if(e&&(t.hideOnChange&&(o.docChanged||o.selection)||t.hideOn&&t.hideOn(o,e)))return null;if(e&&o.docChanged){let t=o.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=o.changes.mapPos(e.end)),e=n}for(let t of o.effects)t.is(n)&&(e=t.value),t.is(ao)&&(e=null);return e},provide:e=>eo.from(e)});return[o,Fe.define((r=>new ro(r,e,o,n,t.hoverTime||300))),no]}function so(e,t){let n=e.plugin(Jr);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const ao=r.Py.define(),lo=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 co(e,t){let n=e.plugin(uo),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const uo=Fe.fromClass(class{constructor(e){this.input=e.state.facet(po),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(lo);this.top=new ho(e,!0,t.topContainer),this.bottom=new ho(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(lo);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new ho(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new ho(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(po);if(n!=this.input){let t=n.filter((e=>e)),r=[],o=[],i=[],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?o:i).push(t)}this.specs=t,this.panels=r,this.top.sync(o),this.bottom.sync(i);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 ho{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=fo(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=fo(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 fo(e){let t=e.nextSibling;return e.remove(),t}const po=r.r$.define({enables:uo});class mo extends r.uU{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}mo.prototype.elementClass="",mo.prototype.toDOM=void 0,mo.prototype.mapMode=r.gc.TrackBefore,mo.prototype.startSide=mo.prototype.endSide=-1,mo.prototype.point=!0;const go=r.r$.define(),yo={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>r.Xs.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},vo=r.r$.define();function bo(e){return[xo(),vo.of(Object.assign(Object.assign({},yo),e))]}const wo=r.r$.define({combine:e=>e.some((e=>e))});function xo(e){let t=[So];return e&&!1===e.fixed&&t.push(wo.of(!0)),t}const So=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(vo).map((t=>new Oo(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(wo),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(wo)!=!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(go),this.view.viewport.from),o=[],i=this.gutters.map((e=>new Mo(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){o.length&&(o=[]),Co(n,o,e.from);for(let e of i)e.line(this.view,t,o)}}for(let e of i)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(vo),n=e.state.facet(vo),o=e.docChanged||e.heightChanged||e.viewportChanged||!r.Xs.eq(e.startState.facet(go),e.state.facet(go),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(o=!0);else{o=!0;let r=[];for(let o of n){let n=t.indexOf(o);n<0?r.push(new Oo(this.view,o)):(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 o}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==Ye.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}:null}))});function ko(e){return Array.isArray(e)?e:[e]}function Co(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class Mo{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=[];Co(this.cursor,r,t.from),n.length&&(r=r.concat(n));let o=this.gutter.config.lineMarker(e,t,r);o&&r.unshift(o);let i=this.gutter;if(0==r.length&&!i.config.renderEmptyElements)return;let s=t.top-this.height;if(this.i==i.elements.length){let n=new Eo(e,t.height,s,r);i.elements.push(n),i.dom.appendChild(n.dom)}else i.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 Oo{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 o,i=r.target;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();o=(e.top+e.bottom)/2}else o=r.clientY;let s=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()}));this.markers=ko(t.markers(e)),t.initialSpacer&&(this.spacer=new Eo(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=ko(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 Eo{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 o=0,i=0;;){let s=i,a=o<t.length?t[o++]:null,l=!1;if(a){let e=a.elementClass;e&&(n+=" "+e);for(let e=i;e<this.markers.length;e++)if(this.markers[e].compare(a)){s=e,l=!0;break}}else s=this.markers.length;for(;i<s;){let e=this.markers[i++];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&&i++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}const Ao=r.r$.define(),To=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],o=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||o(e,t,n):o}return n}})});class Do extends mo{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function _o(e,t){return e.state.facet(To).formatNumber(t,e.state)}const Ro=vo.compute([To],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(Ao),lineMarker:(e,t,n)=>n.some((e=>e.toDOM))?null:new Do(_o(e,e.state.doc.lineAt(t.from).number)),lineMarkerChange:e=>e.startState.facet(To)!=e.state.facet(To),initialSpacer:e=>new Do(_o(e,Po(e.state.doc.lines))),updateSpacer(e,t){let n=_o(t.view,Po(t.view.state.doc.lines));return n==e.number?e:new Do(n)},domEventHandlers:e.facet(To).domEventHandlers})));function No(e={}){return[To.of(e),xo(),Ro]}function Po(e){let t=9;for(;t<e;)t=10*t+9;return t}const Io=new class extends mo{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Lo=go.compute(["selection"],(e=>{let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.head).from;o>n&&(n=o,t.push(Io.range(o)))}return r.Xs.of(t)}));function jo(){return Lo}},5761:(e,t,n)=>{"use strict";n.d(t,{j:()=>s});var r=n(3989),o=n(2161);class i extends r.l{constructor(){super(),this.setup=e=>{if(!o.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 i},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,d="forward"===(null==u?void 0:u.direction),f="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,o)=>{if(y)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);const i={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};var s;s=i,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(i);return Promise.resolve(a).then((e=>b(t,r,e,o)))};let x;if(p.length)if(d){const t=void 0!==h,n=t?h:o(e.options,p);x=w(p,t,n)}else if(f){const t=void 0!==h,n=t?h:i(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 i=t?m[n]:o(e.options,r);return w(r,t,i)}return Promise.resolve(b(r,m[n],p[n]))}))}else x=w([]);return x.then((e=>({pages:e,pageParams:g})))}}}}function o(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function i(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=o(e,t);return null!=n&&!1!==n}}function a(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){const n=i(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),o=n(81),i=n(9643),s=n(2379);class a extends i.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,o,i,a,l,c,u;if(!t){var h,d,f,p;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(h=(d=this.mutationCache.config).onMutate)?void 0:h.call(d,this.state.variables,this));const e=await(null==(f=(p=this.options).onMutate)?void 0:f.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==(o=(i=this.options).onSuccess)?void 0:o.call(i,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),o.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:()=>o});var r=n(2161);const o=function(){let e=[],t=0,n=e=>{e()},o=e=>{e()};const i=o=>{t?e.push(o):(0,r.A4)((()=>{n(o)}))};return{batch:i=>{let s;t++;try{s=i()}finally{t--,t||(()=>{const t=e;e=[],t.length&&(0,r.A4)((()=>{o((()=>{t.forEach((e=>{n(e)}))}))}))})()}return s},batchCalls:e=>(...t)=>{i((()=>{e(...t)}))},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{o=e}}}()},6474:(e,t,n)=>{"use strict";n.d(t,{N:()=>s});var r=n(3989),o=n(2161);class i extends r.l{constructor(){super(),this.setup=e=>{if(!o.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 i},948:(e,t,n)=>{"use strict";n.d(t,{S:()=>g});var r=n(2161),o=n(819),i=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||o._,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,o;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return null==(i=this.retryer)||i.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==(o=u.fetchOptions)?void 0:o.meta))&&this.dispatch({type:"fetch",meta:null==(h=u.fetchOptions)?void 0:h.meta});const d=e=>{var t,n,r,o;(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=(o=this.cache.config).onSettled)||r.call(o,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,o;void 0!==e?(this.setData(e),null==(t=(n=this.cache.config).onSuccess)||t.call(n,e,this),null==(r=(o=this.cache.config).onSettled)||r.call(o,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):d(new Error("undefined"))},onError:d,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 o=e.error;return(0,s.DV)(o)&&o.revert&&this.revertState?{...this.revertState}:{...t,error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),i.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 o;const i=t.queryKey,s=null!=(o=t.queryHash)?o:(0,r.Rm)(i,t);let a=this.get(s);return a||(a=new l({cache:this,logger:e.getLogger(),queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),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(){i.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){i.V.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){i.V.batch((()=>{this.queries.forEach((e=>{e.onFocus()}))}))}onOnline(){i.V.batch((()=>{this.queries.forEach((e=>{e.onOnline()}))}))}}var h=n(9886);class d 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(){i.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){i.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 i.V.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(r.ZT)))),Promise.resolve())))})).then((()=>{this.resuming=void 0})),this.resuming}}var f=n(5761),p=n(6474),m=n(9499);class g{constructor(e={}){this.queryCache=e.queryCache||new u,this.mutationCache=e.mutationCache||new d,this.logger=e.logger||o._,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=f.j.subscribe((()=>{f.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 o=(0,r._v)(e,t,n),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const o=this.queryCache.find(e),i=null==o?void 0:o.state.data,s=(0,r.SE)(t,i);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 i.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),o=this.queryCache;i.V.batch((()=>{o.findAll(n).forEach((e=>{o.remove(e)}))}))}resetQueries(e,t,n){const[o,s]=(0,r.I6)(e,t,n),a=this.queryCache,l={type:"active",...o};return i.V.batch((()=>(a.findAll(o).forEach((e=>{e.reset()})),this.refetchQueries(l,s))))}cancelQueries(e,t,n){const[o,s={}]=(0,r.I6)(e,t,n);void 0===s.revert&&(s.revert=!0);const a=i.V.batch((()=>this.queryCache.findAll(o).map((e=>e.cancel(s)))));return Promise.all(a).then(r.ZT).catch(r.ZT)}invalidateQueries(e,t,n){const[o,s]=(0,r.I6)(e,t,n);return i.V.batch((()=>{var e,t;if(this.queryCache.findAll(o).forEach((e=>{e.invalidate()})),"none"===o.refetchType)return Promise.resolve();const n={...o,type:null!=(e=null!=(t=o.refetchType)?t:o.type)?e:"active"};return this.refetchQueries(n,s)}))}refetchQueries(e,t,n){const[o,s]=(0,r.I6)(e,t,n),a=i.V.batch((()=>this.queryCache.findAll(o).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:o.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 o=(0,r._v)(e,t,n),i=this.defaultQueryOptions(o);void 0===i.retry&&(i.retry=!1);const s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):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 o=(0,r._v)(e,t,n);return o.behavior=(0,m.Gm)(),this.fetchQuery(o)}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),o=n(81),i=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,o=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 i=this.hasListeners();i&&h(this.currentQuery,o,this.options,n)&&this.executeFetch(),this.updateResult(t),!i||this.currentQuery===o&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();const s=this.computeRefetchInterval();!i||this.currentQuery===o&&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||i.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,o=this.options,i=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,u=e!==n,f=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(),i=!r&&c(e,t),s=r&&h(e,n,t,o);(i||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(i&&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==i?void 0:i.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!=i&&i.isPlaceholderData&&t.placeholderData===(null==l?void 0:l.placeholderData))e=i.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==i?void 0:i.data,e,t),k=!0)}this.selectError&&(v=this.selectError,g=this.selectResult,b=Date.now(),x="error");const C="fetching"===w,M="loading"===x,O="error"===x;return{status:x,fetchStatus:w,isLoading:M,isSuccess:"success"===x,isError:O,isInitialLoading:M&&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>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:C,isRefetching:C&&!M,isLoadingError:O&&0===m.dataUpdatedAt,isPaused:"paused"===w,isPlaceholderData:k,isPreviousData:S,isRefetchError:O&&0!==m.dataUpdatedAt,isStale:d(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 o={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)}))})()&&(o.listeners=!0),this.notify({...o,...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){o.V.batch((()=>{var t,n,r,o;if(e.onSuccess)null==(t=(n=this.options).onSuccess)||t.call(n,this.currentResult.data),null==(r=(o=this.options).onSettled)||r.call(o,this.currentResult.data,null);else if(e.onError){var i,s,a,l;null==(i=(s=this.options).onError)||i.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&&d(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)&&d(e,n)}function d(e,t){return e.isStaleByTime(t.staleTime)}},9643:(e,t,n)=>{"use strict";n.d(t,{F:()=>o});var r=n(2161);class o{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),o=n(6474),i=n(2161);function s(e){return Math.min(1e3*2**e,3e4)}function a(e){return"online"!==(null!=e?e:"online")||o.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,d=!1;const f=new Promise(((e,t)=>{n=e,c=t})),p=()=>!r.j.isFocused()||"always"!==e.networkMode&&!o.N.isOnline(),m=r=>{d||(d=!0,null==e.onSuccess||e.onSuccess(r),null==t||t(),n(r))},g=n=>{d||(d=!0,null==e.onError||e.onError(n),null==t||t(),c(n))},y=()=>new Promise((n=>{t=e=>{const t=d||!p();return t&&n(e),t},null==e.onPause||e.onPause()})).then((()=>{t=void 0,d||null==e.onContinue||e.onContinue()})),v=()=>{if(d)return;let t;try{t=e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch((t=>{var n,r;if(d)return;const o=null!=(n=e.retry)?n:3,a=null!=(r=e.retryDelay)?r:s,l="function"==typeof a?a(h,t):a,c=!0===o||"number"==typeof o&&h<o||"function"==typeof o&&o(h,t);!u&&c?(h++,null==e.onFail||e.onFail(h,t),(0,i.Gh)(l).then((()=>{if(p())return y()})).then((()=>{u?g(t):v()}))):g(t)}))};return a(e.networkMode)?v():y().then(v),{promise:f,cancel:t=>{d||(g(new l(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?f: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:()=>M,Gh:()=>k,I6:()=>u,Kp:()=>a,PN:()=>s,Rm:()=>f,SE:()=>i,VS:()=>v,X7:()=>d,ZT:()=>o,_v:()=>l,_x:()=>h,lV:()=>c,oE:()=>O,sk:()=>r,to:()=>m,yF:()=>p});const r="undefined"==typeof window||"Deno"in window;function o(){}function i(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:o,predicate:i,queryKey:s,stale:a}=e;if(S(s))if(r){if(t.queryHash!==f(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!==o&&o!==t.state.fetchStatus||i&&!i(t))}function d(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(S(i)){if(!t.options.mutationKey)return!1;if(n){if(p(t.options.mutationKey)!==p(i))return!1}else if(!m(t.options.mutationKey,i))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||o&&!o(t))}function f(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,o=n?t:Object.keys(t),i=o.length,s=n?[]:{};let a=0;for(let r=0;r<i;r++){const i=n?r:o[r];s[i]=y(e[i],t[i]),s[i]===e[i]&&a++}return r===i&&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 M(){if("function"==typeof AbortController)return new AbortController}function O(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 o=r.createContext(void 0),i=r.createContext(!1);function s(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=o),window.ReactQueryClientContext):o)}const a=({context:e}={})=>{const t=r.useContext(s(e,r.useContext(i)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},l=({client:e,children:t,context:n,contextSharing:o=!1})=>{r.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]);const a=s(n,o);return r.createElement(i.Provider,{value:!n&&o},r.createElement(a.Provider,{value:e},t))}},5079:(e,t,n)=>{"use strict";n.d(t,{r:()=>v});var r=n(7294),o=n(464),i=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 d=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},f=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=i.V.batchCalls(h.onError)),h.onSuccess&&(h.onSuccess=i.V.batchCalls(h.onSuccess)),h.onSettled&&(h.onSettled=i.V.batchCalls(h.onSettled)),m(h),d(h,c),f(c);const[v]=r.useState((()=>new t(n,h))),b=v.getOptimisticResult(h);if((0,o.$)(r.useCallback((e=>s?()=>{}:v.subscribe(i.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),o=n(2924),i=n(9499);class s extends o.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,i.Gm)()},t)}getOptimisticResult(e){return e.behavior=(0,i.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,o,s,a,l;const{state:c}=e,u=super.createResult(e,t),{isFetching:h,isRefetching:d}=u,f=h&&"forward"===(null==(n=c.fetchMeta)||null==(r=n.fetchMore)?void 0:r.direction),p=h&&"backward"===(null==(o=c.fetchMeta)||null==(s=o.fetchMore)?void 0:s.direction);return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,i.Qy)(t,null==(a=c.data)?void 0:a.pages),hasPreviousPage:(0,i.ZF)(t,null==(l=c.data)?void 0:l.pages),isFetchingNextPage:f,isFetchingPreviousPage:p,isRefetching:d&&!f&&!p}}}var a=n(5079);function l(e,t,n){const o=(0,r._v)(e,t,n);return(0,a.r)(o,s)}},4469:(e,t,n)=>{"use strict";n.d(t,{D:()=>d});var r=n(7294),o=n(464),i=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,i.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,o;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=(o=this.mutateOptions).onSettled)||r.call(o,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(e.onError){var i,s,a,l;null==(i=(s=this.mutateOptions).onError)||i.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 d(e,t,n){const s=(0,i.lV)(e,t,n),l=(0,u.NL)({context:s.context}),[d]=r.useState((()=>new c(l,s)));r.useEffect((()=>{d.setOptions(s)}),[d,s]);const p=(0,o.$)(r.useCallback((e=>d.subscribe(a.V.batchCalls(e))),[d]),(()=>d.getCurrentResult()),(()=>d.getCurrentResult())),m=r.useCallback(((e,t)=>{d.mutate(e,t).catch(f)}),[d]);if(p.error&&(0,h.L)(d.options.useErrorBoundary,[p.error]))throw p.error;return{...p,mutate:m,mutateAsync:p.mutate}}function f(){}},6492:(e,t,n)=>{"use strict";n.d(t,{a:()=>s});var r=n(2161),o=n(2924),i=n(5079);function s(e,t,n){const s=(0,r._v)(e,t,n);return(0,i.r)(s,o.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:()=>qe,hj:()=>oe,vc:()=>Qe,NB:()=>Xe,DK:()=>Ze,nU:()=>H,XP:()=>Me,b5:()=>Oe,qv:()=>Ee,u9:()=>Te,QC:()=>De,Nl:()=>I,Jo:()=>Ce,tI:()=>_e,bR:()=>Ie,Cf:()=>Ke,K9:()=>et,P1:()=>B,x2:()=>Ye,zK:()=>Ge,S0:()=>Je});var r=n(2376),o=n(4348),i=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 o=function(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}(e,n);if(!o)return!1;let i=d(o);if(!i){let n=o.blockRange(),r=n&&(0,a.k9)(n);return null!=r&&(t&&t(e.tr.lift(n,r).scrollIntoView()),!0)}let l=i.nodeBefore;if(!l.type.spec.isolating&&S(e,i,t))return!0;if(0==o.parent.content.size&&(u(l,"end")||r.qv.isSelectable(l))){let n=(0,a.dR)(e.doc,o.before(),o.after(),s.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let o=e.tr.step(n);o.setSelection(u(l,"end")?r.Y1.findFrom(o.doc.resolve(o.mapping.map(i.pos,-1)),-1):r.qv.create(o.doc,i.pos-l.nodeSize)),t(o.scrollIntoView())}return!0}}return!(!l.isAtom||i.depth!=o.depth-1||(t&&t(e.tr.delete(i.pos-l.nodeSize,i.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:o,empty:i}=e.selection,s=o;if(!i)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;s=d(o)}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 d(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 f=(e,t,n)=>{let o=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(!o)return!1;let i=m(o);if(!i)return!1;let l=i.nodeAfter;if(S(e,i,t))return!0;if(0==o.parent.content.size&&(u(l,"start")||r.qv.isSelectable(l))){let n=(0,a.dR)(e.doc,o.before(),o.after(),s.p2.empty);if(n&&n.slice.size<n.to-n.from){if(t){let o=e.tr.step(n);o.setSelection(u(l,"start")?r.Y1.findFrom(o.doc.resolve(o.mapping.map(i.pos)),1):r.qv.create(o.doc,o.mapping.map(i.pos))),t(o.scrollIntoView())}return!0}}return!(!l.isAtom||i.depth!=o.depth-1||(t&&t(e.tr.delete(i.pos,i.pos+l.nodeSize).scrollIntoView()),0))},p=(e,t,n)=>{let{$head:o,empty:i}=e.selection,s=o;if(!i)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;s=m(o)}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:o}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(o))return!1;let i=n.node(-1),s=n.indexAfter(-1),a=y(i.contentMatchAt(s));if(!a||!i.canReplaceWith(s,s,a))return!1;if(t){let o=n.after(),i=e.tr.replaceWith(o,o,a.createAndFill());i.setSelection(r.Y1.near(i.doc.resolve(o),1)),t(i.scrollIntoView())}return!0},b=(e,t)=>{let n=e.selection,{$from:o,$to:i}=n;if(n instanceof r.C1||o.parent.inlineContent||i.parent.inlineContent)return!1;let s=y(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let n=(!o.parentOffset&&i.index()<i.parent.childCount?o:i).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(),o=r&&(0,a.k9)(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};var x;function S(e,t,n){let o,i,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,o=t.nodeAfter,i=t.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(i,i+1)||!o.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&&(o=(i=l.contentMatchAt(l.childCount)).findWrapping(c.type))&&i.matchType(o[0]||c.type).validEnd){if(n){let r=t.pos+c.nodeSize,i=s.HY.empty;for(let e=o.length-1;e>=0;e--)i=s.HY.from(o[e].create(null,i));i=s.HY.from(l.copy(i));let u=e.tr.step(new a.FC(t.pos-1,r,t.pos,r,new s.p2(i,1,0),o.length,!0)),h=r+2*o.length;(0,a.Mn)(u.doc,h)&&u.join(h),n(u.scrollIntoView())}return!0}let d=r.Y1.findFrom(t,1),f=d&&d.$from.blockRange(d.$to),p=f&&(0,a.k9)(f);if(null!=p&&p>=t.depth)return n&&n(e.tr.lift(f,p).scrollIntoView()),!0;if(h&&u(c,"start",!0)&&u(l,"end")){let r=l,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let i=c,u=1;for(;!i.isTextblock;i=i.firstChild)u++;if(r.canReplace(r.childCount,r.childCount,i.content)){if(n){let r=s.HY.empty;for(let e=o.length-1;e>=0;e--)r=s.HY.from(o[e].copy(r));n(e.tr.step(new a.FC(t.pos-o.length,t.pos+c.nodeSize,t.pos+u,t.pos+c.nodeSize-u,new s.p2(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function k(e){return function(t,n){let o=t.selection,i=e<0?o.$from:o.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return!!i.node(s).isTextblock&&(n&&n(t.tr.setSelection(r.Bs.create(t.doc,e<0?i.start(s):i.end(s)))),!0)}}const C=k(-1),M=k(1);function O(e,t=null){return function(n,r){let o=!1;for(let r=0;r<n.selection.ranges.length&&!o;r++){let{$from:{pos:i},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(i,s,((r,i)=>{if(o)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)o=!0;else{let t=n.doc.resolve(i),r=t.index();o=t.parent.canReplaceWith(r,r+1,e)}}))}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:i},$to:{pos:s}}=n.selection.ranges[r];o.setBlockType(i,s,e,t)}r(o.scrollIntoView())}return!0}}function E(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let A=E(l,c,h),T=E(l,f,p);const D={Enter:E(g,b,w,((e,t)=>{let{$from:n,$to:o}=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 i=o.parentOffset==o.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]:i&&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),!i&&!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)},_={"Ctrl-h":D.Backspace,"Alt-Backspace":D["Mod-Backspace"],"Ctrl-d":D.Delete,"Ctrl-Alt-Backspace":D["Mod-Delete"],"Alt-Delete":D["Mod-Delete"],"Alt-d":D["Mod-Delete"],"Ctrl-a":C,"Ctrl-e":M};for(let e in D)_[e]=D[e];function R(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=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 i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class N{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:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(...e)=>{const n=t(...e)(i);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],a=!!e,l=e||o.tr,c={...Object.fromEntries(Object.entries(n).map((([e,n])=>[e,(...e)=>{const r=this.buildProps(l,t),o=n(...e)(r);return s.push(o),c}]))),run:()=>(a||!t||l.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(l),s.every((e=>!0===e)))};return c}createCan(e){const{rawCommands:t,state:n}=this,r=e||n.tr,o=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map((([e,t])=>[e,(...e)=>t(...e)({...o,dispatch:void 0})]))),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:e,editor:r,view:i,state:R({state:o,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 P{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),o=[...n,...r],i={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:{...i,...r}})}))}))}))})),o.forEach((e=>{const n={name:e.name,options:e.options,storage:e.storage},r=I(e,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...i,...r};"function"==typeof(null==o?void 0:o.default)&&(o.default=o.default()),(null==o?void 0:o.isRequired)&&void 0===(null==o?void 0:o.default)&&delete o.default,t.push({type:e.name,name:n,attribute:o})}))})),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(" "):[],o=n[e]?n[e].split(" "):[],i=r.filter((e=>!o.includes(e)));n[e]=[...o,...i].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 W(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;const o=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,...o}}}}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 V(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,o,i)=>{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:o,index:i}))||e.textContent||"%leaf%";n+=l.slice(0,Math.max(0,r-t))})),n};function Y(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class G{constructor(e){this.find=e.find,this.handler=e.handler}}const J=(e,t)=>{if(Y(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 Q(e){var t;const{editor:n,from:r,to:o,text:i,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)+i;return s.forEach((e=>{if(u)return;const t=J(h,e.find);if(!t)return;const s=l.state.tr,c=R({state:l.state,transaction:s}),d={from:r-(t[0].length-i.length),to:o},{commands:f,chain:p,can:m}=new N({editor:n,state:c});null!==e.handler({state:c,range:d,match:t,commands:f,chain:p,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:o,text:i}),l.dispatch(s),u=!0)})),u}function X(e){const{editor:t,rules:n}=e,o=new r.Sy({state:{init:()=>null,apply:(e,t)=>e.getMeta(o)||(e.selectionSet||e.docChanged?null:t)},props:{handleTextInput:(e,r,i,s)=>Q({editor:t,from:r,to:i,text:s,rules:n,plugin:o}),handleDOMEvents:{compositionend:e=>(setTimeout((()=>{const{$cursor:r}=e.state.selection;r&&Q({editor:t,from:r.pos,to:r.pos,text:"",rules:n,plugin:o})})),!1)},handleKeyDown(e,r){if("Enter"!==r.key)return!1;const{$cursor:i}=e.state.selection;return!!i&&Q({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:o})}},isInputRules:!0});return o}class Z{constructor(e){this.find=e.find,this.handler=e.handler}}function ee(e){const{editor:t,rules:n}=e;let o=null,i=!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;o=(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=o===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,i=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(n,r,o)=>{const c=n[0],u="paste"===c.getMeta("uiEvent")&&!i,h="drop"===c.getMeta("uiEvent")&&!s;if(!u&&!h)return;const d=r.doc.content.findDiffStart(o.doc.content),f=r.doc.content.findDiffEnd(o.doc.content);if("number"!=typeof d||!f||d===f.b)return;const p=o.tr,m=R({state:o,transaction:p}),g=function(e){const{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:c,can:u}=new N({editor:t,state:n}),h=[];return n.doc.nodesBetween(r,o,((e,t)=>{if(!e.isTextblock||e.type.spec.code)return;const d=Math.max(r,t),f=Math.min(o,t+e.content.size);((e,t)=>{if(Y(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(d-t,f-t,void 0,""),i.find).forEach((e=>{if(void 0===e.index)return;const t=d+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=i.handler({state:n,range:o,match:e,commands:l,chain:c,can:u,pasteEvent:s,dropEvent:a});h.push(f)}))})),h.every((e=>null!==e))}({editor:t,state:m,from:Math.max(d-1,0),to:f.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:o,markExtensions:i}=L(e),a=null===(n=o.find((e=>I(e,"topNode"))))||void 0===n?void 0:n.name,l=Object.fromEntries(o.map((n=>{const o=r.filter((e=>e.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:t},s=U({...e.reduce(((e,t)=>{const r=I(t,"extendNodeSchema",i);return{...e,...r?r(n):{}}}),{}),content:H(I(n,"content",i)),marks:H(I(n,"marks",i)),group:H(I(n,"group",i)),inline:H(I(n,"inline",i)),atom:H(I(n,"atom",i)),selectable:H(I(n,"selectable",i)),draggable:H(I(n,"draggable",i)),code:H(I(n,"code",i)),defining:H(I(n,"defining",i)),isolating:H(I(n,"isolating",i)),attrs:Object.fromEntries(o.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",i));a&&(s.parseDOM=a.map((e=>W(e,o))));const l=I(n,"renderHTML",i);l&&(s.toDOM=e=>l({node:e,HTMLAttributes:z(e,o)}));const c=I(n,"renderText",i);return c&&(s.toText=c),[n.name,s]}))),c=Object.fromEntries(i.map((n=>{const o=r.filter((e=>e.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:t},s=U({...e.reduce(((e,t)=>{const r=I(t,"extendMarkSchema",i);return{...e,...r?r(n):{}}}),{}),inclusive:H(I(n,"inclusive",i)),excludes:H(I(n,"excludes",i)),group:H(I(n,"group",i)),spanning:H(I(n,"spanning",i)),code:H(I(n,"code",i)),attrs:Object.fromEntries(o.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",i));a&&(s.parseDOM=a.map((e=>W(e,o))));const l=I(n,"renderHTML",i);return l&&(s.toDOM=e=>l({mark:e,HTMLAttributes:z(e,o)})),[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:V(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 o=I(e,"onCreate",n);o&&this.editor.on("create",o);const i=I(e,"onUpdate",n);i&&this.editor.on("update",i);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:V(t.name,this.schema)});return n?{...e,...n()}:e}),{})}get plugins(){const{editor:e}=this,t=te.sort([...this.extensions].reverse()),n=[],r=[],o=t.map((t=>{const o={name:t.name,options:t.options,storage:t.storage,editor:e,type:V(t.name,this.schema)},s=[],a=I(t,"addKeyboardShortcuts",o);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,i.h)(l);s.push(c);const u=I(t,"addInputRules",o);q(t,e.options.enableInputRules)&&u&&n.push(...u());const h=I(t,"addPasteRules",o);q(t,e.options.enablePasteRules)&&h&&r.push(...h());const d=I(t,"addProseMirrorPlugins",o);if(d){const e=d();s.push(...e)}return s})).flat();return[X({editor:e,rules:n}),...ee({editor:e,rules:r}),...o]}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)},o=I(t,"addNodeView",r);return o?[t.name,(r,i,s,a)=>{const l=z(r,n);return o()({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 oe{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 oe(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 oe(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 ie(e,t,n){const{from:r,to:o}=t,{blockSeparator:i="\n\n",textSerializers:s={}}=n||{};let a="",l=!0;return e.nodesBetween(r,o,((e,n,c,u)=>{var h;const d=null==s?void 0:s[e.type.name];d?(e.isBlock&&!l&&(a+=i,l=!0),c&&(a+=d({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,o-n),l=!1):e.isBlock&&!l&&(a+=i,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=oe.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:o}=t,{ranges:i}=o;return ie(r,{from:Math.min(...i.map((e=>e.$from.pos))),to:Math.max(...i.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]:Y(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 o=ce([...r.node.marks],t,n);if(!o)return;let i=r.index,s=e.start()+r.offset,a=i+1,l=s+r.node.nodeSize;for(ce([...r.node.marks],t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,s-=e.parent.child(i).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 de(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 fe(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),o=r.Y1.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return o;const i=n.from,s=o.to;return"all"===t?r.Bs.create(e,pe(0,i,s),pe(e.content.size,i,s)):r.Bs.create(e,pe(t,i,s),pe(t,i,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:o,empty:i}=e.selection,s=t?F(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,((e,t)=>{if(e.isText)return;const n=Math.max(r,t),i=Math.min(o,t+e.nodeSize);a.push({node:e,from:n,to:i})}));const l=o-r,c=a.filter((e=>!s||s.name===e.node.type.name)).filter((e=>le(e.node.attrs,n,{strict:!1})));return i?!!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=de(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,(e=>{s.push(...e.marks)}));const a=s.find((e=>e.type.name===n.name));return a?{...a.attrs}:{}}function Me(e,t){const n=new a.wx(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}function Oe(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:o}=e.selection,i=[];e.doc.nodesBetween(r,o,(e=>{i.push(e)}));const s=i.reverse().find((e=>e.type.name===n.name));return s?{...s.attrs}:{}}(e,t):"mark"===n?Ce(e,t):{}}function De(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,o)=>{const i=[];if(e.ranges.length)e.forEach(((e,t)=>{i.push({from:e,to:t})}));else{const{from:e,to:t}=n[o];if(void 0===e||void 0===t)return;i.push({from:e,to:t})}i.forEach((({from:e,to:n})=>{const i=t.slice(o).map(e,-1),s=t.slice(o).map(n),a=t.invert().map(i,-1),l=t.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,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 _e(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach((t=>{const o=he(n.resolve(e-1),t.type);o&&r.push({mark:t,...o})})):n.nodesBetween(e,t,((e,t)=>{r.push(...e.marks.map((n=>({from:t,to:t+e.nodeSize,mark:n}))))})),r}function Re(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 Ne(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?de(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter((e=>!i||i.name===e.type.name)).find((e=>le(e.attrs,n,{strict:!1})));let s=0;const a=[];if(o.forEach((({$from:t,$to:n})=>{const r=t.pos,o=n.pos;e.doc.nodesBetween(r,o,((e,t)=>{if(!e.isText&&!e.marks.length)return;const n=Math.max(r,t),i=Math.min(o,t+e.nodeSize);s+=i-n,a.push(...e.marks.map((e=>({mark:e,from:n,to:i}))))}))})),0===s)return!1;const l=a.filter((e=>!i||i.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=>!i||e.mark.type!==i&&e.mark.type.excludes(i))).reduce(((e,t)=>e+t.to-t.from),0);return(l>0?l+c:l)>=s}function Pe(e,t){const{nodeExtensions:n}=L(t),r=n.find((t=>t.name===e));if(!r)return!1;const o=H(I(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function Ie(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)}function Le(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 je=(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 o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!(0,a.Mn)(e.doc,n.pos)||(e.join(n.pos),!0)},Fe=(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 o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!(0,a.Mn)(e.doc,r)||(e.join(r),!0)};var Be=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:o}=r;return!n||(o.forEach((({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,((e,n)=>{if(e.type.isText)return;const{doc:r,mapping:o}=t,i=r.resolve(o.map(n)),s=r.resolve(o.map(n+e.nodeSize)),l=i.blockRange(s);if(!l)return;const c=(0,a.k9)(l);if(e.type.isTextblock){const{defaultType:e}=i.parent.contentMatchAt(i.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:o})=>{const{state:i}=n,s=i.doc.slice(e.from,e.to);o.deleteRange(e.from,e.to);const a=o.mapping.map(t);return o.insert(a,s.content),o.setSelection(new r.Bs(o.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 o=e.selection.$anchor;for(let n=o.depth;n>0;n-=1)if(o.node(n).type===r.type){if(t){const t=o.before(n),r=o.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1},deleteNode:e=>({tr:t,state:n,dispatch:r})=>{const o=F(e,n.schema),i=t.selection.$anchor;for(let e=i.depth;e>0;e-=1)if(i.node(e).type===o){if(r){const n=i.before(e),r=i.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!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:o,dispatch:i})=>{const s=de(e,o.schema),{doc:a,selection:l}=n,{$from:c,from:u,to:h}=l;if(i){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:o,dispatch:i})=>{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(i&&null===e&&!fe(n.state.selection))return s(),!0;const a=me(o.doc,e)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.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:o,dispatch:i,editor:s})=>{if(i){n={parseOptions:{},updateSelection:!0,...n};const i=ve(t,s.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===i.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((i.toString().startsWith("<")?i:[i]).forEach((e=>{e.check(),u=!!u&&e.isText&&0===e.marks.length,h=!!h&&e.isBlock})),l===c&&h){const{parent:e}=o.doc.resolve(l);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(l-=1,c+=1)}u?Array.isArray(t)?o.insertText(t.map((e=>e.text||"")).join(""),l,c):"object"==typeof t&&t&&t.text?o.insertText(t.text,l,c):o.insertText(t,l,c):o.replaceWith(l,c,i),n.updateSelection&&function(e,t,n){const o=e.steps.length-1;if(o<t)return;const i=e.steps[o];if(!(i instanceof a.Pu||i instanceof a.FC))return;const s=e.mapping.maps[o];let l=0;s.forEach(((e,t,n,r)=>{0===l&&(l=r)})),e.setSelection(r.Y1.near(e.doc.resolve(l),-1))}(o,o.steps.length-1)}return!0},joinUp:()=>({state:e,dispatch:t})=>((e,t)=>{let n,o=e.selection,i=o instanceof r.qv;if(i){if(o.node.isTextblock||!(0,a.Mn)(e.doc,o.from))return!1;n=o.from}else if(n=(0,a.GJ)(e.doc,o.from,-1),null==n)return!1;if(t){let o=e.tr.join(n);i&&o.setSelection(r.qv.create(o.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0})(e,t),joinDown:()=>({state:e,dispatch:t})=>((e,t)=>{let n,o=e.selection;if(o instanceof r.qv){if(o.node.isTextblock||!(0,a.Mn)(e.doc,o.to))return!1;n=o.to}else if(n=(0,a.GJ)(e.doc,o.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})=>f(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:o})=>{const i=function(e){const t=e.split(/-(?!$)/);let n,r,o,i,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))i=!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))o=!0;else{if(!/^mod$/i.test(s))throw new Error(`Unrecognized modifier name: ${s}`);ge()||be()?i=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),i&&(s=`Meta-${s}`),o&&(s=`Shift-${s}`),s}(e).split(/-(?!$)/),s=i.find((e=>!["Alt","Ctrl","Meta","Shift"].includes(e))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.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&&o&&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,o=n.blockRange(r),i=o&&(0,a.k9)(o);return null!=i&&(t&&t(e.tr.lift(o,i).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:o}=e.selection,i=n.blockRange(o,(e=>e.childCount>0&&e.firstChild.type==r));return!!i&&(!t||(n.node(i.depth-1).type==r?function(e,t,n,r){let o=e.tr,i=r.end,l=r.$to.end(r.depth);i<l&&(o.step(new a.FC(i-1,l,i,l,new s.p2(s.HY.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new s.Ts(o.doc.resolve(r.$from.pos),o.doc.resolve(l),r.depth));const c=(0,a.k9)(r);if(null==c)return!1;o.lift(r,c);let u=o.mapping.map(i,-1)-1;return(0,a.Mn)(o.doc,u)&&o.join(u),t(o.scrollIntoView()),!0}(e,t,r,i):function(e,t,n){let r=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,i=n.startIndex;t>i;t--)e-=o.child(t).nodeSize,r.delete(e-1,e+1);let i=r.doc.resolve(n.start),l=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,u=n.endIndex==o.childCount,h=i.node(-1),d=i.index(-1);if(!h.canReplace(d+(c?0:1),d+1,l.content.append(u?s.HY.empty:s.HY.from(o))))return!1;let f=i.pos,p=f+l.nodeSize;return r.step(new a.FC(f-(c?1:0),p+(u?1:0),f+1,p-1,new s.p2((c?s.HY.empty:s.HY.from(o.copy(s.HY.empty))).append(u?s.HY.empty:s.HY.from(o.copy(s.HY.empty))),c?0:1,u?0:1),c?0:1)),t(r.scrollIntoView()),!0}(e,t,i)))})(t,n);var r},newlineInCode:()=>({state:e,dispatch:t})=>g(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=xe("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(i=F(e,r.schema)),"mark"===a&&(s=de(e,r.schema)),o&&n.selection.ranges.forEach((e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,((e,r)=>{i&&i===e.type&&n.setNodeMarkup(r,void 0,Se(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((o=>{s===o.type&&n.addMark(r,r+e.nodeSize,s.create(Se(o.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:o,to:i}=e.selection,s=o.sharedDepth(i);return 0!=s&&(n=o.before(s),t&&t(e.tr.setSelection(r.qv.create(e.doc,n))),!0)})(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>M(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>C(e,t),setContent:(e,t=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=ke(e,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=de(e,r.schema);if(o)if(s){const e=Ce(r,l);n.addStoredMark(l.create({...e,...t}))}else a.forEach((e=>{const o=e.$from.pos,i=e.$to.pos;r.doc.nodesBetween(o,i,((e,r)=>{const s=Math.max(r,o),a=Math.min(r+e.nodeSize,i);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:o}=t;let i=null;if(fe(o)&&(i=o.$cursor),i){const t=null!==(r=e.storedMarks)&&void 0!==r?r:i.marks();return!!n.isInSet(t)||!t.some((e=>e.type.excludes(n)))}const{ranges:s}=o;return s.some((({$from:t,$to:r})=>{let o=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,((e,t,r)=>{if(o)return!1;if(e.isInline){const t=!r||r.type.allowsMarkType(n),i=!!n.isInSet(e.marks)||!e.marks.some((e=>e.type.excludes(n)));o=t&&i}return!o})),o}))}(r,n,l)},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=F(e,n.schema);return i.isTextblock?o().command((({commands:e})=>!!O(i,t)(n)||e.clearNodes())).command((({state:e})=>O(i,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,o=pe(e,0,n.content.size),i=r.qv.create(n,o);t.setSelection(i)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,{from:o,to:i}="number"==typeof e?{from:e,to:e}:e,s=r.Bs.atStart(n).from,a=r.Bs.atEnd(n).to,l=pe(o,s,a),c=pe(i,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(o=r,function(e,t){let{$from:n,$to:r}=e.selection,i=n.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==o));if(!i)return!1;let l=i.startIndex;if(0==l)return!1;let c=i.parent,u=c.child(l-1);if(u.type!=o)return!1;if(t){let n=u.lastChild&&u.lastChild.type==c.type,r=s.HY.from(n?o.create():null),l=new s.p2(s.HY.from(o.create(null,s.HY.from(c.type.create(null,r)))),n?3:1,0),h=i.start,d=i.end;t(e.tr.step(new a.FC(h-(n?3:1),d,h,d,l,1,!0)).scrollIntoView())}return!0})(t,n);var o},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:o,editor:i})=>{const{selection:s,doc:l}=t,{$from:c,$to:u}=s,h=Re(i.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)||(o&&(e&&Le(n,i.extensionManager.splittableMarks),t.split(c.pos).scrollIntoView()),0));if(!c.parent.isBlock)return!1;if(o){const o=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 d=o&&l?[{type:l,attrs:h}]:void 0,f=(0,a.Ax)(t.doc,t.mapping.map(c.pos),1,d);if(d||f||!(0,a.Ax)(t.doc,t.mapping.map(c.pos),1,l?[{type:l}]:void 0)||(f=!0,d=l?[{type:l,attrs:h}]:void 0),f&&(t.split(t.mapping.map(c.pos),1,d),l&&!o&&!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&&Le(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0},splitListItem:e=>({tr:t,state:n,dispatch:o,editor:i})=>{var l;const c=F(e,n.schema),{$from:u,$to:h}=n.selection,d=n.selection.node;if(d&&d.isBlock||u.depth<2||!u.sameParent(h))return!1;const f=u.node(-1);if(f.type!==c)return!1;const p=i.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(o){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 o=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,i=Re(p,u.node().type.name,u.node().attrs),a=(null===(l=c.contentMatch.defaultType)||void 0===l?void 0:l.createAndFill(i))||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(-o),new s.p2(e,4-n,0));let d=-1;t.doc.nodesBetween(h,t.doc.content.size,((e,t)=>{if(d>-1)return!1;e.isTextblock&&0===e.content.size&&(d=t+1)})),d>-1&&t.setSelection(r.Bs.near(t.doc.resolve(d))),t.scrollIntoView()}return!0}const m=h.pos===u.end()?f.contentMatchAt(0).defaultType:null,g=Re(p,f.type.name,f.attrs),y=Re(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(o){const{selection:e,storedMarks:r}=n,{splittableMarks:s}=i.extensionManager,a=r||e.$to.parentOffset&&e.$from.marks();if(t.split(u.pos,2,v).scrollIntoView(),!a||!o)return!0;const l=a.filter((e=>s.includes(e.type.name)));t.ensureMarks(l)}return!0},toggleList:(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:h,splittableMarks:d}=o.extensionManager,f=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=>Pe(e.type.name,h)))(m);if(b.depth>=1&&x&&b.depth-x.depth<=1){if(x.node.type===f)return c.liftListItem(p);if(Pe(x.node.type.name,h)&&f.validContent(x.node.content)&&a)return l().command((()=>(i.setNodeMarkup(x.pos,f),!0))).command((()=>je(i,f))).command((()=>Fe(i,f))).run()}return n&&w&&a?l().command((()=>{const e=u().wrapInList(f,r),t=w.filter((e=>d.includes(e.type.name)));return i.ensureMarks(t),!!e||c.clearNodes()})).wrapInList(f,r).command((()=>je(i,f))).command((()=>Fe(i,f))).run():l().command((()=>!!u().wrapInList(f,r)||c.clearNodes())).wrapInList(f,r).command((()=>je(i,f))).command((()=>Fe(i,f))).run()},toggleMark:(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=de(e,r.schema);return Ne(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},toggleNode:(e,t,n={})=>({state:r,commands:o})=>{const i=F(e,r.schema),s=F(t,r.schema);return we(r,i,n)?o.setNode(s):o.setNode(i,n)},toggleWrap:(e,t={})=>({state:n,commands:r})=>{const o=F(e,n.schema);return we(n,o,t)?r.lift(o):r.wrapIn(o,t)},undoInputRule:()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){const t=e.tr,n=i.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(i.text){const n=t.doc.resolve(i.from).marks();t.replaceWith(i.from,i.to,e.schema.text(i.text,n))}else t.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos)})),!0},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=de(e,r.schema),{$from:c,empty:u,ranges:h}=a;if(!o)return!0;if(u&&s){let{from:e,to:t}=a;const r=null===(i=c.marks().find((e=>e.type===l)))||void 0===i?void 0:i.attrs,o=he(c,l,r);o&&(e=o.from,t=o.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:o})=>{let i=null,s=null;const a=xe("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(i=F(e,r.schema)),"mark"===a&&(s=de(e,r.schema)),o&&n.selection.ranges.forEach((e=>{const o=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(o,a,((e,r)=>{i&&i===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),s&&e.marks.length&&e.marks.forEach((i=>{if(s===i.type){const l=Math.max(r,o),c=Math.min(r+e.nodeSize,a);n.addMark(l,c,s.create({...i.attrs,...t}))}}))}))})),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),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:o,$to:i}=n.selection,l=o.blockRange(i),c=!1,u=l;if(!l)return!1;if(l.depth>=2&&o.node(l.depth-1).type.compatibleContent(e)&&0==l.startIndex){if(0==o.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(o,n.doc.resolve(i.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,o){let i=s.HY.empty;for(let e=n.length-1;e>=0;e--)i=s.HY.from(n[e].type.create(n[e].attrs,i));e.step(new a.FC(t.start-(r?2:0),t.end,t.start,t.end,new s.p2(i,0,0),n.length,!0));let l=0;for(let e=0;e<n.length;e++)n[e].type==o&&(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,o=!0;n<r;n++,o=!1)!o&&(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 ze=oe.create({name:"commands",addCommands:()=>({...Be})}),$e=oe.create({name:"editable",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("editable"),props:{editable:()=>this.editor.options.editable}})]}}),He=oe.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}}}})]}}),We=oe.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first((({commands:e})=>[()=>e.undoInputRule(),()=>e.command((({tr:t})=>{const{selection:n,doc:o}=t,{empty:i,$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,d=u&&1===c.parent.childCount?h===s.pos:r.Y1.atStart(o).from===a;return!(!(i&&d&&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()},o={...n},i={...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()?i:o},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:o,from:i,to:s}=t.selection,a=r.Y1.atStart(t.doc).from,l=r.Y1.atEnd(t.doc).to;if(o||i!==a||s!==l)return;if(0!==n.doc.textBetween(0,n.doc.content.size," "," ").length)return;const c=n.tr,u=R({state:n,transaction:c}),{commands:h}=new N({editor:this.editor,state:u});return h.clearNodes(),c.steps.length?c:void 0}})]}}),Ue=oe.create({name:"tabindex",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var Ve=Object.freeze({__proto__:null,ClipboardTextSerializer:ae,Commands:ze,Editable:$e,FocusEvents:He,Keymap:We,Tabindex:Ue});class qe extends P{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 o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute("data-tiptap-style",""),o.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(o),o}(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(Ve):[],...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 N({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 o.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"),o=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.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)||Ne(e,null,n);const r=xe(t,e.schema);return"node"===r?we(e,t,n):"mark"===r&&Ne(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 ie(e,{from:0,to:e.content.size},t)}(this.state.doc,{blockSeparator:t,textSerializers:{...se(this.schema),...n}})}get isEmpty(){return Ie(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 Ke(e){return new G({find:e.find,handler:({state:t,range:n,match:r})=>{const o=H(e.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:i}=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(_e(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&&i.delete(c,n.to),l>n.from&&i.delete(n.from+r,l);const u=n.from+r+s.length;i.addMark(n.from+r,u,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}function Ye(e){return new G({find:e.find,handler:({state:t,range:n,match:r})=>{const o=H(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let a=n.to;const l=e.type.create(o);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];i.insertText(t,s+r[0].length-1),i.replaceWith(e,a,l)}else r[0]&&i.insert(s-1,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a));i.scrollIntoView()}})}function Ge(e){return new G({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=H(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}})}function Je(e){return new G({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=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,i);if(!c)return null;if(s.wrap(l,c),e.keepMarks&&e.editor){const{selection:n,storedMarks:r}=t,{splittableMarks:o}=e.editor.extensionManager,i=r||n.$to.parentOffset&&n.$from.marks();if(i){const e=i.filter((e=>o.includes(e.type.name)));s.ensureMarks(e)}}if(e.keepAttributes){const t="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";o().updateAttributes(t,i).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 o=r.marks();if(!o.find((e=>(null==e?void 0:e.type.name)===t.name)))return!1;const i=o.find((e=>(null==e?void 0:e.type.name)===t.name));return i&&n.removeStoredMark(i),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}}class Xe{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 Xe(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 Xe(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 Ze{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,o,i,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 d=0,f=0;if(this.dom!==h){const t=this.dom.getBoundingClientRect(),n=h.getBoundingClientRect(),r=null!==(o=e.offsetX)&&void 0!==o?o:null===(i=e.nativeEvent)||void 0===i?void 0:i.offsetX,l=null!==(s=e.offsetY)&&void 0!==s?s:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;d=n.x-t.x+r,f=n.y-t.y+l}null===(l=e.dataTransfer)||void 0===l||l.setDragImage(this.dom,d,f);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 o=e.type.startsWith("drag"),i="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)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,d="cut"===e.type,f="mousedown"===e.type;if(!l&&c&&o&&e.preventDefault(),l&&o&&!a)return e.preventDefault(),!1;if(l&&s&&!a&&f){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||i||u||h||d||f&&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 et(e){return new Z({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const i=H(e.getAttributes,void 0,r,o);if(!1===i||null===i)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/),o=n.from+l.indexOf(a),u=o+a.length;if(_e(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>o)).length)return null;u<n.to&&s.delete(u,n.to),o>n.from&&s.delete(n.from+r,o),c=n.from+r+a.length,s.addMark(n.from+r,c,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}},9734:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>i});var r=n(3845);const o=/^\s*>\s$/,i=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:o,type:this.type})]}})},7937:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l});var r=n(3845);const o=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,i=/(?:^|\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:o,type:this.type}),(0,r.Cf)({find:s,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:i,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 o=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)}}}),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)}}}}),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(o.name,this.editor.getAttributes(i.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(i.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),o=n(2337),i=n(2376),s=n(7823),a=n(4348);class l extends i.Y1{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return l.valid(n)?new l(n):i.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,o=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){o=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(l.valid(s))return s}for(;;){let s=t>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!i.qv.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue e}break}o=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,i.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):i.Y1.near(t)}}const u=(0,o.$)({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,o){let s=e.selection,a=t>0?s.$to:s.$from,c=s.empty;if(s instanceof i.Bs){if(!o.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 d(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!l.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&i.qv.isSelectable(e.state.doc.nodeAt(o.inside))||(e.dispatch(e.state.tr.setSelection(new l(r))),0))}function f(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 o=s.HY.empty;for(let e=r.length-1;e>=0;e--)o=s.HY.from(r[e].createAndFill(null,o));let a=e.state.tr.replace(n.pos,n.pos,new s.p2(o,0,0));return a.setSelection(i.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 i.Sy({props:{decorations:p,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&l.valid(n)?new l(n):null,handleClick:d,handleKeyDown:u,handleDOMEvents:{beforeinput:f}}})],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:()=>o});var r=n(3845);const o=r.NB.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.P1)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:o}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:s}=r.extensionManager,a=o||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&i){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:()=>o});var r=n(3845);const o=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:()=>O});var r=n(3845),o=200,i=function(){};i.prototype.append=function(e){return e.length?(e=i.from(e),!this.length&&e||e.length<o&&this.leafAppend(e)||this.length<o&&e.leafPrepend(this)||this.appendInner(e)):this},i.prototype.prepend=function(e){return e.length?i.from(e).append(this):this},i.prototype.appendInner=function(e){return new a(this,e)},i.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?i.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},i.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},i.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)},i.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},i.from=function(e){return e instanceof i?e:e&&e.length?new s(e):i.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 o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=o)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=o)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}(i);i.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 o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&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}(i);const l=i;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,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new d(e.map));let t,o=e.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new d(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(i=n?e.selection.map(n.slice(r)):e.selection,s=new h(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let o=[],i=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 d(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?o.pop():s=s.slice(0,s.length-1)),o.push(u),t&&(i++,t=void 0),r||(a=u)}let l=i-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),i-=l),new h(s.append(o),i)}remapping(e,t){let n=new c.vs;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new h(this.items.append(e.map((e=>new d(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(a+1,r));c&&s++,n.push(new d(l,i,c))}else n.push(new d(l))}),r);let l=[];for(let e=t;e<i;e++)l.push(new d(o.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=[],o=0;return this.items.forEach(((i,s)=>{if(s>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=i.selection&&i.selection.map(t.slice(n));a&&o++;let l,c=new d(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new h(l.from(r.reverse()),o)}}h.empty=new h(l.empty,0);class d{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 d(t.getMap().invert(),t,this.selection)}}}class f{constructor(e,t,n,r,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const p=20;function m(e){let t=[];return e.forEach(((e,n,r,o)=>t.push(r,o))),t}function g(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function y(e,t,n,r){let o=w(t),i=x.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,o);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,o),c=new f(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 f(h.empty,h.empty,null,0,-1),apply:(t,n,r)=>function(e,t,n,r){let o,i=n.getMeta(x);if(i)return i.historyState;n.getMeta(S)&&(e=new f(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 f(e.done.addTransform(n,void 0,r,w(t)),e.undone,m(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new f(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(o=n.getMeta("rebased"))?new f(e.done.rebased(n,o),e.undone.rebased(n,o),g(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new f(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),g(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let o=n.getMeta("composition"),i=0==e.prevTime||!s&&e.prevComposition!=o&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),a=s?g(e.prevRanges,n.mapping):m(n.mapping.maps[n.steps.length-1]);return new f(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,w(t)),h.empty,a,n.time,null==o?e.prevComposition:o)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?C:"historyRedo"==n?M: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))},M=(e,t)=>{let n=x.getState(e);return!(!n||0==n.undone.eventCount||(t&&y(n,e,t,!0),0))},O=r.hj.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>C(e,t),redo:()=>({state:e,dispatch:t})=>M(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:()=>i});var r=n(3845);const o=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,i=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:o,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 o=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,i=/(?:^|\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:o,type:this.type}),(0,r.Cf)({find:s,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:i,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 o="aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",i="ελ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",d="domain",f="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[d]=!0),t[f]&&(t[d]=!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],o=t.jr[n][1];if(o&&r.test(e))return o}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 o=0;o<e.length;o++)this.tt(e[o],t,n,r)},tr(e,t,n,r){let o;return r=r||b.groups,t&&t.j?o=t:(o=new b(t),n&&r&&v(t,n,r)),this.jr.push([e,o]),o},ts(e,t,n,r){let o=this;const i=e.length;if(!i)return o;for(let t=0;t<i-1;t++)o=o.tt(e[t]);return o.tt(e[i-1],t,n,r)},tt(e,t,n,r){r=r||b.groups;const o=this;if(t&&t.j)return o.j[e]=t,t;const i=t;let a,l=o.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,i){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(i,e,r)}else n&&v(i,n,r);a.t=i}return o.j[e]=a,a}};const w=(e,t,n,r,o)=>e.ta(t,n,r,o),x=(e,t,n,r,o)=>e.tr(t,n,r,o),S=(e,t,n,r,o)=>e.ts(t,n,r,o),k=(e,t,n,r,o)=>e.tt(t,n,r,o),C="WORD",M="UWORD",O="LOCALHOST",E="TLD",A="UTLD",T="SCHEME",D="SLASH_SCHEME",_="NUM",R="WS",N="NL",P="OPENBRACE",I="OPENBRACKET",L="OPENANGLEBRACKET",j="OPENPAREN",F="CLOSEBRACE",B="CLOSEBRACKET",z="CLOSEANGLEBRACKET",$="CLOSEPAREN",H="AMPERSAND",W="APOSTROPHE",U="ASTERISK",V="AT",q="BACKSLASH",K="BACKTICK",Y="CARET",G="COLON",J="COMMA",Q="DOLLAR",X="DOT",Z="EQUALS",ee="EXCLAMATION",te="HYPHEN",ne="PERCENT",re="PIPE",oe="PLUS",ie="POUND",se="QUERY",ae="QUOTE",le="SEMI",ce="SLASH",ue="TILDE",he="UNDERSCORE",de="EMOJI",fe="SYM";var pe=Object.freeze({__proto__:null,WORD:C,UWORD:M,LOCALHOST:O,TLD:E,UTLD:A,SCHEME:T,SLASH_SCHEME:D,NUM:_,WS:R,NL:N,OPENBRACE:P,OPENBRACKET:I,OPENANGLEBRACKET:L,OPENPAREN:j,CLOSEBRACE:F,CLOSEBRACKET:B,CLOSEANGLEBRACKET:z,CLOSEPAREN:$,AMPERSAND:H,APOSTROPHE:W,ASTERISK:U,AT:V,BACKSLASH:q,BACKTICK:K,CARET:Y,COLON:G,COMMA:J,DOLLAR:Q,DOT:X,EQUALS:Z,EXCLAMATION:ee,HYPHEN:te,PERCENT:ne,PIPE:re,PLUS:oe,POUND:ie,QUERY:se,QUOTE:ae,SEMI:le,SLASH:ce,TILDE:ue,UNDERSCORE:he,EMOJI:de,SYM:fe});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 Me(e,t,n,r,o){let i;const s=t.length;for(let n=0;n<s-1;n++){const s=t[n];e.j[s]?i=e.j[s]:(i=new b(r),i.jr=o.slice(),e.j[s]=i),e=i}return i=new b(n),i.jr=o.slice(),e.j[t[s-1]]=i,i}function Oe(e){const t=[],n=[];let r=0;for(;r<e.length;){let o=0;for(;"0123456789".indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+o),10);t>0;t--)n.pop();r+=o}else n.push(e[r]),r++}return t}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,o=[];for(let e=0;e<r.length;e++)o.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}function Te(e){return e}function De(e,t){this.t="token",this.v=e,this.tk=t}function _e(e,t){class n extends De{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 o=this.o[e];return o?("object"==typeof o?(o=n.t in o?o[n.t]:Ee[e],"function"==typeof o&&r&&(o=o(t,n))):"function"==typeof o&&r&&(o=o(t,n.t,n)),o):o},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},De.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),o=e.get("tagName",n,t),i=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),d=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:o,attributes:a,content:i,eventListeners:d}}};const Re=_e("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Ne=_e("text"),Pe=_e("nl"),Ie=_e("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!==O&&e[1].t===G}}),Le=e=>new b(e);function je(e,t,n){const r=n[0].s,o=n[n.length-1].e;return new e(t.slice(r,o),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=Oe(o)),null==Ce&&(Ce=Oe(i)),k(n,"'",W),k(n,"{",P),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,"@",V),k(n,"`",K),k(n,"^",Y),k(n,":",G),k(n,",",J),k(n,"$",Q),k(n,".",X),k(n,"=",Z),k(n,"!",ee),k(n,"-",te),k(n,"%",ne),k(n,"|",re),k(n,"+",oe),k(n,"#",ie),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,_,{[a]:!0});x(r,ve,r);const h=x(n,me,C,{[l]:!0});x(h,me,h);const y=x(n,ge,M,{[c]:!0});x(y,me),x(y,ge,y);const w=x(n,be,R,{[g]:!0});k(n,we,N,{[g]:!0}),k(w,we),x(w,be,w);const Ee=x(n,ye,de,{[f]:!0});x(Ee,ye,Ee),k(Ee,xe,Ee);const Ae=k(Ee,Se);x(Ae,ye,Ee);const Te=[[me,h]],De=[[me,null],[ge,y]];for(let e=0;e<ke.length;e++)Me(n,ke[e],E,C,Te);for(let e=0;e<Ce.length;e++)Me(n,Ce[e],A,M,De);v(E,{tld:!0,ascii:!0},t),v(A,{utld:!0,alpha:!0},t),Me(n,"file",T,C,Te),Me(n,"mailto",T,C,Te),Me(n,"http",D,C,Te),Me(n,"https",D,C,Te),Me(n,"ftp",D,C,Te),Me(n,"ftps",D,C,Te),v(T,{scheme:!0,ascii:!0},t),v(D,{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],o=e[t][1]?{[p]:!0}:{[m]:!0};r.indexOf("-")>=0?o[d]=!0:me.test(r)?ve.test(r)?o[u]=!0:o[l]=!0:o[a]=!0,S(n,r,r,o)}return S(n,"localhost",O,{ascii:!0}),n.jd=new b(fe),{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,V,q,K,Y,Q,Z,te,_,ne,re,oe,ie,ce,fe,ue,he]),r=[W,z,F,B,$,G,J,X,ee,L,P,I,j,se,ae,le],o=[H,W,U,q,K,Y,F,Q,Z,te,P,ne,re,oe,ie,se,ce,fe,ue,he],i=Le(),s=k(i,ue);w(s,o,s),w(s,t.domain,s);const a=Le(),l=Le(),c=Le();w(i,t.domain,a),w(i,t.scheme,l),w(i,t.slashscheme,c),w(a,o,s),w(a,t.domain,a);const u=k(a,V);k(s,V,u),k(l,V,u),k(c,V,u);const h=k(s,X);w(h,o,s),w(h,t.domain,s);const d=Le();w(u,t.domain,d),w(d,t.domain,d);const f=k(d,X);w(f,t.domain,d);const p=Le(Re);w(f,t.tld,p),w(f,t.utld,p),k(u,O,p);const m=k(d,te);w(m,t.domain,d),w(p,t.domain,d),k(p,X,f),k(p,te,m);const g=k(p,G);w(g,t.numeric,Re);const y=k(a,te),v=k(a,X);w(y,t.domain,a),w(v,o,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,o,s),k(b,X,v),k(b,te,y),k(b,V,u);const x=k(b,G),S=Le(Ie);w(x,t.numeric,S);const C=Le(Ie),M=Le();w(C,n,C),w(C,r,M),w(M,n,C),w(M,r,M),k(b,ce,C),k(S,ce,C);const E=k(l,G),A=k(c,G),T=k(A,ce),D=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(D,t.domain,C),w(D,n,C),k(D,ce,C);const R=k(C,P),de=k(C,I),me=k(C,L),ge=k(C,j);k(M,P,R),k(M,I,de),k(M,L,me),k(M,j,ge),k(R,F,C),k(de,B,C),k(me,z,C),k(ge,$,C),k(R,F,C);const ye=Le(Ie),ve=Le(Ie),be=Le(Ie),we=Le(Ie);w(R,n,ye),w(de,n,ve),w(me,n,be),w(ge,n,we);const xe=Le(),Se=Le(),ke=Le(),Ce=Le();return w(R,r),w(de,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(i,O,b),k(i,N,Pe),{start:i,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,o=0,i=[],s=[];for(;o<r;){let a=e,l=null,c=null,u=0,h=null,d=-1;for(;o<r&&!(l=a.go(n[o].t));)s.push(n[o++]);for(;o<r&&(c=l||a.go(n[o].t));)l=null,a=c,a.accepts()?(d=0,h=a):d>=0&&d++,o++,u++;if(d<0)o-=u,o<r&&(s.push(n[o]),o++);else{s.length>0&&(i.push(je(Ne,t,s)),s=[]),o-=d,u-=d;const e=h.t,r=n.slice(o-u,o);i.push(je(e,t,r))}}return s.length>0&&i.push(je(Ne,t,s)),i}(Be.parser.start,e,function(e,t){const n=function(e){const t=[],n=e.length;let r=0;for(;r<n;){let o,i=e.charCodeAt(r),s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>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,o=[];let i=0,s=0;for(;s<r;){let a=e,l=null,c=0,u=null,h=-1,d=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(h=0,d=0,u=a):h>=0&&(h+=n[s].length,d++),c+=n[s].length,i+=n[s].length,s++;i-=h,s-=d,c-=h,o.push({t:u.t,v:t.slice(i-c,i),s:i-c,e:i})}return o}(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),o=$e(e),i=[];for(let e=0;e<o.length;e++){const n=o[e];!n.isLink||t&&n.t!==t||i.push(n.toFormattedObject(r))}return i}var We=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 o=null===(n=null==t?void 0:t.clipboardData)||void 0===n?void 0:n.getData("text/html"),i=null==o?void 0:o.match(/href="([^"]*)"/);return i?{href:i[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 We.Sy({key:new We.H$("autolink"),appendTransaction:(e,n,o)=>{const i=e.some((e=>e.docChanged))&&!n.doc.eq(o.doc),s=e.some((e=>e.getMeta("preventAutolink")));if(!i||s)return;const{tr:a}=o,l=(0,r.XP)(n.doc,[...e]);return(0,r.QC)(l).forEach((({newRange:e})=>{const n=(0,r.b5)(o.doc,e,(e=>e.isTextblock));let i,s;if(n.length>1?(i=n[0],s=o.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0," ")):n.length&&o.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(i=n[0],s=o.doc.textBetween(i.pos,e.to,void 0," ")),i&&s){const e=s.split(" ").filter((e=>""!==e));if(e.length<=0)return!1;const n=e[e.length-1],l=i.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=>!o.schema.marks.code||!o.doc.rangeHasMark(e.from,e.to,o.schema.marks.code))).filter((e=>!t.validate||t.validate(e.value))).forEach((e=>{(0,r.tI)(e.from,e.to,o.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 We.Sy({key:new We.H$("handleClickLink"),props:{handleClick:(t,n,o)=>{var i,s;if(0!==o.button)return!1;if("A"!==o.target.nodeName)return!1;const a=(0,r.u9)(t.state,e.type.name),l=o.target,c=null!==(i=null==l?void 0:l.href)&&void 0!==i?i: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 We.Sy({key:new We.H$("handlePasteLink"),props:{handlePaste:(t,n,r)=>{var o;const{state:i}=t,{selection:s}=i,{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===(o=n.clipboardData)||void 0===o?void 0:o.getData("text/html"),h=null==u?void 0:u.match(/href="([^"]*)"/),d=h?h[1]:c.href;return e.editor.commands.setMark(e.type,{href:d}),!0}}})}({editor:this.editor,type:this.type})),e;var t}})},4565:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(3845);const o=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 o=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)}}}),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)}}}}),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(o.name,this.editor.getAttributes(i.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(i.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:()=>o});var r=n(3845);const o=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()}}})},3237:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(3845),o=n(2376),i=n(4348);const s=r.hj.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new o.Sy({key:new o.H$("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=t,s=[];if(!n)return null;const a=this.editor.isEmpty;return e.descendants(((e,t)=>{const n=o>=t&&o<=t+e.nodeSize,l=!e.isLeaf&&(0,r.bR)(e);if((n||!this.options.showOnlyCurrent)&&l){const r=[this.options.emptyNodeClass];a&&r.push(this.options.emptyEditorClass);const o=i.p.node(t,t+e.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder});s.push(o)}return this.options.includeChildren})),i.EH.create(e,s)}}})]}})},658:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(3845);const o=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:()=>o});var r=n(3845);const o=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:()=>o});var r=n(3845);const o=r.NB.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",(0,r.P1)(this.options.HTMLAttributes,e),0]}})},1347:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>me});var r,o,i=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),o=(t,n)=>(e.set(t,n),n)}else{const e=[],t=10;let n=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},o=(r,o)=>(n==t&&(n=0),e[n++]=r,e[n++]=o)}var 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,o=t/this.width|0;let i=r+1,s=o+1;for(let e=1;i<this.width&&this.map[t+e]==n;e++)i++;for(let e=1;s<this.height&&this.map[t+this.width*e]==n;e++)s++;return{left:r,top:o,right:i,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:o,top:i,bottom:s}=this.findCell(e);return"horiz"==t?(n<0?0==r:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?0==i:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(e,t){const{left:n,right:r,top:o,bottom:i}=this.findCell(e),{left:s,right:a,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(o,l),right:Math.max(r,a),bottom:Math.max(i,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,o==e.left&&o&&this.map[i-1]==s||r==e.top&&r&&this.map[i-this.width]==s||t.push(s))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width;const r=(e+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?i-1:this.map[n]}o=i}}static get(e){return r(e)||o(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);const t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const o=e.child(r);let i=0;if(n)for(let t=0;t<r;t++){const n=e.child(t);for(let e=0;e<n.childCount;e++){const o=n.child(e);t+o.attrs.rowspan>r&&(i+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){const t=o.child(e);i+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[];let o=0,i=null;const s=[];for(let e=0,o=t*n;e<o;e++)r[e]=0;for(let a=0,l=0;a<n;a++){const c=e.child(a);l++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==c.childCount)break;const u=c.child(e),{colspan:h,rowspan:d,colwidth:f}=u.attrs;for(let e=0;e<d;e++){if(e+a>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:l,n:d-e});break}const c=o+e*t;for(let e=0;e<h;e++){0==r[c+e]?r[c+e]=l:(i||(i=[])).push({type:"collision",row:a,pos:l,n:h-e});const n=f&&f[e];if(n){const r=(c+e)%t*2,o=s[r];null==o||o!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):o==n&&s[r+1]++}}}o+=h,l+=u.nodeSize}const u=(a+1)*t;let h=0;for(;o<u;)0==r[o++]&&h++;h&&(i||(i=[])).push({type:"missing",row:a,n:h}),l++}const a=new h(t,n,r,i);let l=!1;for(let e=0;!l&&e<s.length;e+=2)null!=s[e]&&s[e+1]<n&&(l=!0);return l&&function(e,t,n){e.problems||(e.problems=[]);const r={};for(let o=0;o<e.map.length;o++){const i=e.map[o];if(r[i])continue;r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let a=null;const l=s.attrs;for(let n=0;n<l.colspan;n++){const r=t[(o+n)%e.width*2];null==r||l.colwidth&&l.colwidth[n]==r||((a||(a=d(l)))[n]=r)}a&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}(a,s,e),a}(e))}};function d(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function f(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}var 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),o=h.get(r),i=e.start(-1),s=o.nextCell(e.pos-i,t,n);return null==s?null:e.node(0).resolve(i+s)}function 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),o=e.start(-1),i=r.rectBetween(e.pos-o,t.pos-o),a=e.node(0),l=r.cellsInRect(i).filter((e=>e!=t.pos-o));l.unshift(t.pos-o);const c=l.map((e=>{const t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);const r=o+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),o={},i=[];for(let n=r.top;n<r.bottom;n++){const s=[];for(let i=n*t.width+r.left,a=r.left;a<r.right;a++,i++){const n=t.map[i];if(o[n])continue;o[n]=!0;const a=t.findCell(n);let l=e.nodeAt(n);if(!l)throw RangeError(`No cell with offset ${n} found`);const c=r.left-a.left,u=a.right-r.right;if(c>0||u>0){let e=l.attrs;if(c>0&&(e=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)}i.push(e.child(n).copy(a.HY.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?e:i;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 o=0;o<r.length;o++){const{$from:i,$to:s}=r[o],l=e.mapping.slice(n);e.replace(l.map(i.pos),l.map(s.pos),o?a.p2.empty:t)}const o=s.Y1.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}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),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<o.length;n++)e(t.nodeAt(o[n]),r+o[n])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),r=h.get(n),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(t.pos-o),a=e.node(0);return i.top<=s.top?(i.top>0&&(e=a.resolve(o+r.map[i.left])),s.bottom<r.height&&(t=a.resolve(o+r.map[r.width*(r.height-1)+s.right-1]))):(s.top>0&&(t=a.resolve(o+r.map[s.left])),i.bottom<r.height&&(e=a.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new 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),o=t.colCount(this.$headCell.pos-n);if(Math.min(r,o)>0)return!1;const i=r+this.$anchorCell.nodeAfter.attrs.colspan,s=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==t.width}eq(e){return e instanceof 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),o=e.start(-1),i=r.findCell(e.pos-o),s=r.findCell(t.pos-o),a=e.node(0);return i.left<=s.left?(i.left>0&&(e=a.resolve(o+r.map[i.top*r.width])),s.right<r.width&&(t=a.resolve(o+r.map[r.width*(s.top+1)-1]))):(s.left>0&&(t=a.resolve(o+r.map[s.top*r.width])),i.right<r.width&&(e=a.resolve(o+r.map[r.width*(i.top+1)-1]))),new 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 M(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 O=new s.H$("fix-tables");function E(e,t,n,r){const o=e.childCount,i=t.childCount;e:for(let s=0,a=0;s<i;s++){const i=t.child(s);for(let t=a,r=Math.min(o,s+3);t<r;t++)if(e.child(t)==i){a=t+1,n+=i.nodeSize;continue e}r(i,n),a<o&&e.child(a).sameMarkup(i)?E(e.child(a),i,n+1,r):i.nodesBetween(0,i.content.size,r,n+1),n+=i.nodeSize}}function A(e,t){let n;const r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){const o=h.get(t);if(!o.problems)return r;r||(r=e.tr);const i=[];for(let e=0;e<o.height;e++)i.push(0);for(let e=0;e<o.problems.length;e++){const s=o.problems[e];if("collision"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;const o=e.attrs;for(let e=0;e<o.rowspan;e++)i[s.row+e]+=s.n;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,x(o,o.colspan-s.n,s.n))}else if("missing"==s.type)i[s.row]+=s.n;else if("overlong_rowspan"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-s.n})}else if("colwidth mismatch"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+s.pos),null,{...e.attrs,colwidth:s.colwidth})}}let s,a;for(let e=0;e<i.length;e++)i[e]&&(null==s&&(s=e),a=e);for(let l=0,c=n+1;l<o.height;l++){const n=t.child(l),o=c+n.nodeSize,u=i[l];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);const i=[];for(let n=0;n<u;n++){const n=f(e.schema)[t].createAndFill();n&&i.push(n)}const h=0!=l&&s!=l-1||a!=l?o-1:c+1;r.insert(r.mapping.map(h),i)}c=o}return r.setMeta(O,{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 D(e,t,n,r,o,i,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let c=o;c<i;c++){const o=s*t.width+c,i=t.map[o];if(t.map[o-t.width]==i){l=!0;const o=n.nodeAt(i),{top:u,left:h}=t.findCell(i);e.setNodeMarkup(e.mapping.slice(a).map(i+r),null,{...o.attrs,rowspan:s-u}),e.insert(e.mapping.slice(a).map(t.positionAt(s,h,n)),o.type.createAndFill({...o.attrs,rowspan:u+o.attrs.rowspan-s})),c+=o.attrs.colspan-1}}return l}function _(e,t,n,r,o,i,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let c=o;c<i;c++){const o=c*t.width+s,i=t.map[o];if(t.map[o-1]==i){l=!0;const o=n.nodeAt(i),u=t.colCount(i),h=e.mapping.slice(a).map(i+r);e.setNodeMarkup(h,null,x(o.attrs,s-u,o.attrs.colspan-(s-u))),e.insert(h+o.nodeSize,o.type.createAndFill(x(o.attrs,0,s-u))),c+=o.attrs.rowspan-1}}return l}function R(e,t,n,r,o){let i=n?e.doc.nodeAt(n-1):e.doc;if(!i)throw new Error("No table found");let s=h.get(i);const{top:l,left:c}=r,u=c+o.width,d=l+o.height,p=e.tr;let m=0;function g(){if(i=n?p.doc.nodeAt(n-1):p.doc,!i)throw new Error("No table found");s=h.get(i),m=p.mapping.maps.length}(function(e,t,n,r,o,i,s){const l=f(e.doc.type.schema);let c,u;if(o>t.width)for(let i=0,a=0;i<t.height;i++){const h=n.child(i);a+=h.nodeSize;const d=[];let f;f=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<o;e++)d.push(f);e.insert(e.mapping.slice(s).map(a-1+r),d)}if(i>t.height){const h=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){const o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==l.header_cell;h.push(o?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const d=l.row.create(null,a.HY.from(h)),f=[];for(let e=t.height;e<i;e++)f.push(d);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),f)}return!(!c&&!u)})(p,s,i,n,u,d,m)&&g(),D(p,s,i,n,c,u,l,m)&&g(),D(p,s,i,n,c,u,d,m)&&g(),_(p,s,i,n,l,d,c,m)&&g(),_(p,s,i,n,l,d,u,m)&&g();for(let e=l;e<d;e++){const t=s.positionAt(e,c,i),r=s.positionAt(e,u,i);p.replace(p.mapping.slice(m).map(t+n),p.mapping.slice(m).map(r+n),new a.p2(o.rows[e-l],0,0))}g(),p.setSelection(new k(p.doc.resolve(n+s.positionAt(l,c,i)),p.doc.resolve(n+s.positionAt(d-1,u-1,i)))),t(p)}var N=(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 P(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function I(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof k)return P(n,r,s.Y1.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;const a=$(o,e,t);if(null==a)return!1;if("horiz"==e)return P(n,r,s.Y1.near(n.doc.resolve(i.head+t),t));{const o=n.doc.resolve(a),i=w(o,e,t);let l;return l=i?s.Y1.near(i,1):t<0?s.Y1.near(n.doc.resolve(o.before(-1)),-1):s.Y1.near(n.doc.resolve(o.after(-1)),1),P(n,r,l)}}}function L(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof k)s=i;else{const r=$(o,e,t);if(null==r)return!1;s=new k(n.doc.resolve(r))}const a=w(s.$headCell,e,t);return!!a&&P(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,o=f(e.schema).cell.createAndFill().content;n.forEachCell(((e,t)=>{e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new a.p2(o,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 o=t.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if("row"==i)for(let e=0;e<t.childCount;e++){let o=t.child(e).content;const i=e?0:Math.max(0,n-1),c=e<t.childCount-1?0:Math.max(0,r-1);(i||c)&&(o=T(f(s).row,new a.p2(o,i,c)).content),l.push(o)}else{if("cell"!=i&&"header_cell"!=i)return null;l.push(n||r?T(f(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:o,colspan:i}=r.child(t).attrs;for(let t=e;t<e+o;t++)n[t]=(n[t]||0)+i}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(a.HY.empty),n[o]<r){const i=f(e).cell.createAndFill(),s=[];for(let e=n[o];e<r;e++)s.push(i);t[o]=t[o].append(a.HY.from(s))}return{height:t.length,width:r,rows:t}}(s,l)}(n);const o=e.state.selection;if(o instanceof k){r||(r={width:1,height:1,rows:[a.HY.from(T(f(e.state.schema).cell,n))]});const t=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),s=h.get(t).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=function({width:e,height:t,rows:n},r,o){if(e!=r){const t=[],o=[];for(let e=0;e<n.length;e++){const i=n[e],s=[];for(let n=t[e]||0,o=0;n<r;o++){let a=i.child(o%i.childCount);n+a.attrs.colspan>r&&(a=a.type.createChecked(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}o.push(a.HY.from(s))}n=o,e=r}if(t!=o){const e=[];for(let r=0,i=0;r<o;r++,i++){const s=[],l=n[i%t];for(let e=0;e<l.childCount;e++){let t=l.child(e);r+t.attrs.rowspan>o&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,o-t.attrs.rowspan)},t.content)),s.push(t)}e.push(a.HY.from(s))}n=e,t=o}return{width:e,height:t,rows:n}}(r,s.right-s.left,s.bottom-s.top),R(e.state,e.dispatch,i,s,r),!0}if(r){const t=y(e.state),n=t.start(-1);return R(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 o;if(t.shiftKey&&e.state.selection instanceof k)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(o=m(e.state.selection.$anchor))&&(null==(n=W(e,t))?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(t,n){let r=W(e,n);const o=null==p.getState(e.state);if(!r||!b(t,r)){if(!o)return;r=t}const i=new k(t,r);if(o||!e.state.selection.eq(i)){const n=e.state.tr.setSelection(i);o&&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 o=n,a=p.getState(e.state);let l;if(null!=a)l=e.state.doc.resolve(a);else if(H(e,o.target)!=r&&(l=W(e,t),!l))return s();l&&i(l,o)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function $(e,t,n){if(!(e.state.selection instanceof s.Bs))return null;const{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){const i=r.before(o),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?i:null}}return null}function H(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function W(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")),V(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,V(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function V(e,t,n,r,o,i){var s;let a=0,l=!0,c=t.firstChild;const u=e.firstChild;if(u){for(let e=0,n=0;e<u.childCount;e++){const{colspan:s,colwidth:h}=u.child(e).attrs;for(let e=0;e<s;e++,n++){const s=o==n?i: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 o=new s.Sy({key:q,state:{init:(e,r)=>(o.spec.props.nodeViews[f(r.schema).table.name]=(e,r)=>new n(e,t,r),new Y(-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,o){const i=q.getState(e.state);if(i&&!i.dragging){const r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target);let s=-1;if(r){const{left:o,right:i}=r.getBoundingClientRect();t.clientX-o<=n?s=G(e,t,"left",n):i-t.clientX<=n&&(s=G(e,t,"right",n))}if(s!=i.activeHandle){if(!o&&-1!==s){const t=e.state.doc.resolve(s),n=t.node(-1),r=h.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}Q(e,s)}}}(t,n,e,0,r)},mouseleave:e=>{!function(e){const t=q.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&Q(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 o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=e.domAtPos(t);let s=i.node.childNodes[i.offset].offsetWidth,a=n;if(r)for(let e=0;e<n;e++)r[e]&&(s-=r[e],a--);return s/a}(e,r.activeHandle,o.attrs);function s(t){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);const r=q.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){const r=e.state.doc.resolve(t),o=r.node(-1),i=h.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<i.height;e++){const t=e*i.width+a;if(e&&i.map[t]==i.map[t-i.width])continue;const r=i.map[t],u=o.nodeAt(r).attrs,h=1==u.colspan?0:a-i.colCount(r);if(u.colwidth&&u.colwidth[h]==n)continue;const d=u.colwidth?u.colwidth.slice():(c=u.colspan,Array(c).fill(0));d[h]=n,l.setNodeMarkup(s+r,null,{...u,colwidth:d})}var c;l.docChanged&&e.dispatch(l)}(e,r.activeHandle,J(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 o=J(r.dragging,t,n);!function(e,t,n,r){const o=e.state.doc.resolve(t),i=o.node(-1),s=o.start(-1),a=h.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let l=e.domAtPos(o.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&V(i,l.firstChild,l,r,a,n)}(e,r.activeHandle,o,n)}}e.dispatch(e.state.tr.setMeta(q,{setDragging:{startX:t.clientX,startWidth:i}})),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),o=r.node(-1);if(!o)return l.EH.empty;const i=h.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let e=0;e<i.height;e++){const t=a+e*i.width-1;if(!(a!=i.width&&i.map[t]==i.map[t+1]||0!=e&&i.map[t]==i.map[t-i.width])){const e=i.map[t],r=s+e+o.nodeAt(e).nodeSize-1,a=document.createElement("div");a.className="column-resize-handle",n.push(l.p.widget(r,a))}}return l.EH.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}var Y=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 Y(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new Y(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 Y(n,t.dragging)}return t}};function G(e,t,n,r){const o="right"==n?-r:r,i=e.posAtCoords({left:t.clientX+o,top:t.clientY});if(!i)return-1;const{pos:s}=i,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 J(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Q(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),o=n.start(-1),i=h.get(r);return{...t instanceof k?i.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function Z(e,{map:t,tableStart:n,table:r},o){let i=o>0?-1:0;(function(e,t,n){const r=f(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(t,r,o+i)&&(i=0==o||o==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+o;if(o>0&&o<t.width&&t.map[a-1]==t.map[a]){const i=t.map[a],l=r.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,S(l.attrs,o-t.colCount(i))),s+=l.attrs.rowspan-1}else{const l=null==i?f(r.type.schema).cell:r.nodeAt(t.map[a+i]).type,c=t.positionAt(s,o,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function ee(e,{map:t,table:n,tableStart:r},o){const i=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+o,l=t.map[a],c=n.nodeAt(l),u=c.attrs;if(o>0&&t.map[a-1]==l||o<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(i).map(r+l),null,x(u,o-t.colCount(l)));else{const t=e.mapping.slice(i).map(r+l);e.delete(t,t+c.nodeSize)}s+=u.rowspan}}function te(e,{map:t,tableStart:n,table:r},o){var i;let s=n;for(let e=0;e<o;e++)s+=r.child(e).nodeSize;const a=[];let l=o>0?-1:0;(function(e,t,n){var r;const o=f(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if((null==(r=t.nodeAt(e.map[i+n*e.width]))?void 0:r.type)!=o)return!1;return!0})(t,r,o+l)&&(l=0==o||o==t.height?null:0);for(let s=0,c=t.width*o;s<t.width;s++,c++)if(o>0&&o<t.height&&t.map[c]==t.map[c-t.width]){const o=t.map[c],i=r.nodeAt(o).attrs;e.setNodeMarkup(n+o,null,{...i,rowspan:i.rowspan+1}),s+=i.colspan-1}else{const e=null==l?f(r.type.schema).cell:null==(i=r.nodeAt(t.map[c+l*t.width]))?void 0:i.type,n=null==e?void 0:e.createAndFill();n&&a.push(n)}return e.insert(s,f(r.type.schema).row.create(null,a)),e}function ne(e,{map:t,table:n,tableStart:r},o){let i=0;for(let e=0;e<o;e++)i+=n.child(e).nodeSize;const s=i+n.child(o).nodeSize,a=e.mapping.maps.length;e.delete(i+r,s+r);for(let i=0,s=o*t.width;i<t.width;i++,s++){const l=t.map[s];if(o>0&&l==t.map[s-t.width]){const t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(a).map(l+r),null,{...t,rowspan:t.rowspan-1}),i+=t.colspan-1}else if(o<t.width&&l==t.map[s+t.width]){const s=n.nodeAt(l),c=s.attrs,u=s.type.create({...c,rowspan:s.attrs.rowspan-1},s.content),h=t.positionAt(o+1,i,n);e.insert(e.mapping.slice(a).map(r+h),u),i+=c.colspan-1}}}function re(e){const t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function oe(e,t){const n=e.selection;if(!(n instanceof k)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=X(e),{map:o}=r;if(function({width:e,height:t,map:n},r){let o=r.top*e+r.left,i=o,s=(r.bottom-1)*e+r.left,a=o+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[i]==n[i-1]||r.right<e&&n[a]==n[a+1])return!0;i+=e,a+=e}for(let i=r.left;i<r.right;i++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[s]==n[s+e])return!0;o++,s++}return!1}(o,r))return!1;if(t){const n=e.tr,i={};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=o.map[e*o.width+t],u=r.table.nodeAt(a);if(!i[a]&&u)if(i[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 ie(e,t){const n=f(e.schema);return(r=({node:e})=>n[e.type.spec.tableRole],(e,t)=>{var n;const o=e.selection;let i,s;if(o instanceof k){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,s=o.$anchorCell.pos}else{if(i=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}(o.$from),!i)return!1;s=null==(n=m(o.$from))?void 0:n.pos}if(null==i||null==s)return!1;if(1==i.attrs.colspan&&1==i.attrs.rowspan)return!1;if(t){let n=i.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+=i.nodeSize);for(let n=c.left,o=0;n<c.right;n++,o++)n==c.left&&e==c.top||u.insert(h=u.mapping.map(t+c.tableStart,1),r({node:i,row:e,col:n}).createAndFill(a[o]))}u.setNodeMarkup(s,r({node:i,row:c.top,col:c.left}),a[0]),o instanceof k&&u.setSelection(new k(u.doc.resolve(o.$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 o=t.table.nodeAt(r[e]);if(o&&o.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=f(t.schema),o=X(t),i=t.tr,s=o.map.cellsInRect("column"==e?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==e?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),a=s.map((e=>o.table.nodeAt(e)));for(let e=0;e<s.length;e++)a[e].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[e],r.cell,a[e].attrs);if(0==i.steps.length)for(let e=0;e<s.length;e++)i.setNodeMarkup(o.tableStart+s[e],r.header_cell,a[e].attrs);n(i)}return!0}}(e):function(t,n){if(!g(t))return!1;if(n){const r=f(t.schema),o=X(t),i=t.tr,s=se("row",o,r),a=se("column",o,r),l=("column"===e?s:"row"===e&&a)?1:0,c="column"==e?{left:0,top:l,right:1,bottom:o.map.height}:"row"==e?{left:l,top:0,right:o.map.width,bottom:1}:o,u="column"==e?a?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((e=>{const t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)})),n(i)}return!0}}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),o=r.lastChild;if(o)return n-1-o.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){const e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(y(t),e);if(null==r)return!1;if(n){const e=t.doc.resolve(r);n(t.tr.setSelection(s.Bs.between(e,(o=e,o.node(0).resolve(o.pos+o.nodeAfter.nodeSize)))).scrollIntoView())}var o;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:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:M,handleDOMEvents:{mousedown:z},createSelectionBetween:e=>null!=p.getState(e.state)?e.state.selection:null,handleTripleClick:F,handleKeyDown:N,handlePaste:B},appendTransaction:(t,n,r)=>function(e,t,n){const r=(t||e).selection,o=(t||e).doc;let i,a;if(r instanceof s.qv&&(a=r.node.type.spec.tableRole)){if("cell"==a||"header_cell"==a)i=k.create(o,r.from);else if("row"==a){const e=o.resolve(r.from+1);i=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];i=k.create(o,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,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}(r)?i=s.Bs.create(o,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)&&(i=s.Bs.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}(r,A(r,n),e)})}function he(e,t,n,r,o,i){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=o===n?i: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 de{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 fe(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,i.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=i.NB.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:de,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:e}){return["table",(0,i.P1)(this.options.HTMLAttributes,e),["tbody",0]]},addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const a=function(e,t,n,r,o){const i=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=fe(i.cell,o);if(e&&a.push(e),r){const e=fe(i.header_cell,o);e&&s.push(e)}}const l=[];for(let e=0;e<t;e+=1)l.push(i.row.createChecked(null,r&&0===e?s:a));return i.table.createChecked(null,l)}(i.schema,e,t,n);if(o){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})=>oe(e,t),splitCell:()=>({state:e,dispatch:t})=>ie(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})=>!!oe(e,t)||ie(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>function(e,t){return function(n,r){if(!g(n))return!1;const o=y(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){const i=n.tr;n.selection instanceof k?n.selection.forEachCell(((n,r)=>{n.attrs[e]!==t&&i.setNodeMarkup(r,null,{...n.attrs,[e]:t})})):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}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,i.nU)((0,i.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:()=>o});var r=n(3845);const 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)}}}})},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:()=>o});var r=n(3845);const o=r.vc.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})},1284:(e,t,n)=>{"use strict";n.d(t,{T5:()=>d,fW:()=>m,jE:()=>u,kg:()=>l});var r=n(7294),o=n(3935),i=n(3845);const s=({renderers:e})=>r.createElement(r.Fragment,null,Object.entries(e).map((([e,t])=>o.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,o.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 i.ML{constructor(){super(...arguments),this.contentComponent=null}}const u=(e={},t=[])=>{const[n,o]=(0,r.useState)(null),i=function(){const[,e]=(0,r.useState)(0);return()=>e((e=>e+1))}(),{onBeforeCreate:s,onBlur:a,onCreate:l,onDestroy:u,onFocus:h,onSelectionUpdate:d,onTransaction:f,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)(d),x=(0,r.useRef)(f),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),d&&(n.off("selectionUpdate",w.current),n.on("selectionUpdate",d),w.current=d),f&&(n.off("transaction",x.current),n.on("transaction",f),x.current=f),p&&(n.off("update",S.current),n.on("update",p),S.current=p))}),[s,a,l,u,h,d,f,p,n]),(0,r.useEffect)((()=>{let t=!0;const n=new c(e);return o(n),n.on("transaction",(()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t&&i()}))}))})),()=>{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})),d=r.forwardRef(((e,t)=>{const{onDragStart:n}=(0,r.useContext)(h),o=e.as||"div";return r.createElement(o,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})}));class f{constructor(e,{editor:t,props:n={},as:r="div",className:o="",attrs:i}){this.ref=null,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),i&&Object.keys(i).forEach((e=>{this.element.setAttribute(e,i[e])})),this.render()}render(){var e,t;const n=this.component,o=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))&&(o.ref=e=>{this.ref=e}),this.reactElement=r.createElement(n,{...o}),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 i.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:o=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new f(t,{editor:this.editor,props:e,as:n,className:`node-${this.node.type.name} ${o}`.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,o=this.decorations;return this.node=e,this.decorations=t,this.options.update({oldNode:r,oldDecorations:o,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:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=o.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"),d=l("ArrayBuffer"),f=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=i(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,o;if("object"!=typeof e&&(e=[e]),u(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function C(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,O=e=>!h(e)&&e!==M,E=(A="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>A&&e instanceof A);var A;const T=l("HTMLFormElement"),D=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_=l("RegExp"),R=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};k(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},N="abcdefghijklmnopqrstuvwxyz",P="0123456789",I={DIGIT:P,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+P},L={isArray:u,isArrayBuffer:d,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||o.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&&d(e.buffer),t},isString:f,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:y,isUndefined:h,isDate:v,isFile:b,isBlob:w,isRegExp:_,isFunction:p,isStream:e=>g(e)&&p(e.pipe),isURLSearchParams:S,isTypedArray:E,isFileList:x,forEach:k,merge:function e(){const{caseless:t}=O(this)&&this||{},n={},r=(r,o)=>{const i=t&&C(n,o)||o;y(n[i])&&y(r)?n[i]=e(n[i],r):y(r)?n[i]=e({},r):u(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&k(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:o}={})=>(k(t,((t,o)=>{n&&p(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),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 o,s,a;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&i(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:D,hasOwnProp:D,reduceDescriptors:R,freezeMethods:e=>{R(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:M,isContextDefined:O,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 o=u(e)?[]:{};return k(e,((e,t)=>{const i=n(e,r+1);!h(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)}};function j(e,t,n,r,o){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),o&&(this.response=o)}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,o,i)=>{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,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),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 W(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)})),V=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,o=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(o))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,o){let a=e;if(e&&!o&&"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?W([n],r,i):null===s?n:n+"[]",l(e))})),!1;return!!$(e)||(t.append(W(o,n,i),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,i){!0===(!(L.isUndefined(n)||null===n)&&o.call(t,n,L.isString(i)?i.trim():i,r,h))&&e(n,r?r.concat(i):[i])})),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&&V(e,this,t)}const Y=K.prototype;Y.append=function(e,t){this._pairs.push([e,t])},Y.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 G=K;function J(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Q(e,t,n){if(!t)return e;const r=n&&n.encode||J,o=n&&n.serialize;let i;if(i=o?o(t,n):L.isURLSearchParams(t)?t.toString():new G(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}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:G,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,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&L.isArray(r)?r.length:i,a?(L.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&L.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&L.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!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,o=L.isObject(e);if(o&&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 i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return V(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((i=L.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return V(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||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 oe=re,ie=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,o){return L.isFunction(r)?r.call(this,t,n):(o&&(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 o(e,t,n){const o=ae(t);if(!o)throw new Error("header name must be a non-empty string");const i=L.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=le(e))}const i=(e,t)=>L.forEach(e,((e,n)=>o(e,n,t)));return L.isPlainObject(e)||e instanceof this.constructor?i(e,t):L.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ie[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&&o(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 o(e){if(e=ae(e)){const o=L.findKey(n,e);!o||t&&!ce(0,n[o],o,t)||(delete n[o],r=!0)}}return L.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return L.forEach(this,((r,o)=>{const i=L.findKey(n,o);if(i)return t[i]=le(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],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,o){return this[r].call(this,t,e,n,o)},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 de(e,t){const n=this||oe,r=t||n,o=he.from(r.headers);let i=r.data;return L.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function fe(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,o,i){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(o)&&s.push("domain="+o),!0===i&&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 o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[s];o||(o=l),n[i]=a,r[i]=l;let u=s,h=0;for(;u!==i;)h+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),l-o<t)return;const d=c&&l-c;return d?Math.round(1e3*h/d):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,l=r(a);n=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&i<=s?(s-i)/l:void 0,event:o};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 o=he.from(e.headers).normalize(),i=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)&&o.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.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:i&&"text"!==i&&"json"!==i?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),Q(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&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&L.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),L.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),i&&"json"!==i&&(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=de.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 o=0;o<t&&(n=e[o],!(r=L.isString(n)?we[n.toLowerCase()]:n));o++);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||oe.adapter)(e).then((function(t){return xe(e),t.data=de.call(e,e.transformResponse,t),t.headers=he.from(t.headers),t}),(function(t){return fe(t)||(xe(e),t&&t.response&&(t.response.data=de.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 o(e,t,n){return L.isUndefined(t)?L.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(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,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,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)=>o(ke(e),ke(t),!0)};return L.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const i=l[r]||o,s=i(e[r],t[r],r);L.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Me={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Me[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Oe={};Me.transitional=function(e,t,n){function r(e,t){return"[Axios v1.3.5] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new z(r(o," has been removed"+(t?" in "+t:"")),z.ERR_DEPRECATED);return t&&!Oe[o]&&(Oe[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};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 o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new z("option "+i+" must be "+n,z.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new z("Unknown option "+i,z.ERR_BAD_OPTION)}},validators:Me},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:o}=t;let i;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(),i=o&&L.merge(o.common,o[t.method]),i&&L.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=he.concat(i,o);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 d=t;for(h=0;h<u;){const e=s[h++],t=s[h++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=Se.call(this,d)}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 Q(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,o){return this.request(Ce(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Te.prototype[e]=t(),Te.prototype[e+"Form"]=t(!0)}));const De=Te;class _e{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,o){n.reason||(n.reason=new me(e,r,o),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 _e((function(t){e=t})),cancel:e}}}const Re=_e,Ne={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(Ne).forEach((([e,t])=>{Ne[t]=e}));const Pe=Ne,Ie=function e(t){const n=new De(t),o=r(De.prototype.request,n);return L.extend(o,De.prototype,n,{allOwnKeys:!0}),L.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Ce(t,n))},o}(oe);Ie.Axios=De,Ie.CanceledError=me,Ie.CancelToken=Re,Ie.isCancel=fe,Ie.VERSION="1.3.5",Ie.toFormData=V,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=Pe,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 o(e){return!!e&&!!e[U]}function i(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)===V}(e)||Array.isArray(e)||!!e[W]||!!(null===(t=e.constructor)||void 0===t?void 0:t[W])||h(e)||d(e))}function s(e){return o(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:d(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 d(e){return z&&e instanceof Set}function f(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 o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function m(e,t){return void 0===t&&(t=!1),y(e)||o(e)||!i(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=Y[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 M(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.O||v("ES5").S(t,e,o),o?(n[U].P&&(x(t),r(4)),i(e)&&(e=O(t,e),t.l||A(t,e)),t.u&&v("Patches").M(n[U].t,e,t.u,t.s)):e=O(t,n,[]),x(t),t.u&&t.v(t.u,t.s),e!==H?e:void 0}function O(e,t,n){if(y(t))return t;var r=t[U];if(!r)return a(t,(function(o,i){return E(e,r,t,o,i,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 o=4===r.i||5===r.i?r.o=p(r.k):r.o,i=o,s=!1;3===r.i&&(i=new Set(o),o.clear(),s=!0),a(i,(function(t,i){return E(e,r,o,t,i,n,s)})),A(e,o,!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(o(s)){var h=O(e,s,a&&t&&3!==t.i&&!c(t.R,r)?a.concat(r):void 0);if(u(n,r,h),!o(h))return;e.m=!1}else l&&n.add(s);if(i(s)&&!y(s)){if(!e.h.D&&e._<1)return;O(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?f(n):e)[t]}function D(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 _(e){e.P||(e.P=!0,e.l&&_(e.l))}function R(e){e.o||(e.o=p(e.t))}function N(e,t,n){var r=h(t)?v("MapSet").F(t,n):d(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},o=r,i=G;n&&(o=[r],i=J);var s=Proxy.revocable(o,i),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 P(e){return o(e)||r(22,e),function e(t){if(!i(t))return t;var n,r=t[U],o=l(t);if(r){if(!r.P&&(r.i<4||!v("ES5").K(r)))return r.t;r.I=!0,n=I(t,o),r.I=!1}else n=I(t,o);return a(n,(function(t,o){r&&function(e,t){return 2===l(e)?e.get(t):e[t]}(r.t,t)===o||u(n,t,e(o))})),3===o?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:()=>o});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),W=F?Symbol.for("immer-draftable"):"__$immer_draftable",U=F?Symbol.for("immer-state"):"__$immer_state",V=("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},Y={},G={get:function(e,t){if(t===U)return e;var n=f(e);if(!c(n,t))return function(e,t,n){var r,o=D(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!i(r)?r:r===T(e.t,t)?(R(e),e.o[t]=N(e.A.h,r,e)):r},has:function(e,t){return t in f(e)},ownKeys:function(e){return Reflect.ownKeys(f(e))},set:function(e,t,n){var r=D(f(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=T(f(e),t),i=null==o?void 0:o[U];if(i&&i.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,o)&&(void 0!==n||c(e.t,t)))return!0;R(e),_(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,R(e),_(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=f(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)}},J={};a(G,(function(e,t){J[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),J.deleteProperty=function(e,t){return J.set.call(this,e,t,void 0)},J.set=function(e,t,n){return G.set.call(this,e[0],t,n,e[0])};var Q=function(){function e(e){var t=this;this.O=$,this.D=!0,this.produce=function(e,n,o){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,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(o))}))}}var l;if("function"!=typeof n&&r(6),void 0!==o&&"function"!=typeof o&&r(7),i(e)){var c=k(t),u=N(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,o),M(e,c)}),(function(e){throw x(c),e})):(w(c,o),M(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),o){var d=[],f=[];v("Patches").M(e,l,d,f),o(d,f)}return l}r(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(o))}))};var r,o,i=t.produce(e,n,(function(e,t){r=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,r,o]})):[i,r,o]},"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){i(e)||r(8),o(e)&&(e=P(e));var t=k(this),n=N(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),M(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 i=v("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),X=new Q,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:()=>f});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),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),o[a]=String.fromCharCode(a);for(var l in r)o.hasOwnProperty(l)||(o[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,o,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let e=0;e<i.length-1;e++){let s=i[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);u?o=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function d(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function f(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=!(i&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||s&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?o:r)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),c=t[d(l,n)];if(c&&c(e.state,e.dispatch,e))return!0;if(1==l.length&&" "!=l){if(n.shiftKey){let r=t[d(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[d(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:()=>Q,PW:()=>ue,HY:()=>a,vc:()=>h,ZU:()=>Y,NB:()=>_,Ts:()=>T,e4:()=>d,V_:()=>G,p2:()=>f}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var o=n&&n!=e?this.remove(n):this,i=o.find(e),s=o.content.slice();return-1==i?s.push(n||e,t):(s[i+1]=t,n&&(s[i]=n)),new r(s)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var o=this.remove(t),i=o.content.slice(),s=o.find(e);return i.splice(-1==s?i.length:s,0,t,n),new r(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach((function(t,n){e[t]=n})),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};const o=r;function i(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),s=t.child(r);if(o!=s){if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)n++;return n}if(o.content.size||s.content.size){let e=i(o.content,s.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function s(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let a=e.child(--o),l=t.child(--i),c=a.nodeSize;if(a!=l){if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let e=0,t=Math.min(a.text.length,l.text.length);for(;e<t&&a.text[a.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let e=s(a.content,l.content,n-1,r-1);if(e)return e}n-=c,r-=c}else n-=c,r-=c}}class a{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,o){for(let i=0,s=0;s<t;i++){let a=this.content[i],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,e-o),Math.min(a.content.size,t-o),n,r+o)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf?(r?o+="function"==typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new a(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,i=0;i<t;o++){let s=this.content[o],a=i+s.nodeSize;a>e&&((i<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=a}return new a(n,r)}cutByIndex(e,t){return e==t?a.empty:0==e&&t==this.content.length?this:new a(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new a(r,o)}addToStart(e){return new a([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new a(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return i(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return s(this,e,t,n)}findIndex(e,t=-1){if(0==e)return c(0,e);if(e==this.size)return c(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return a.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return a.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new a(t||e,n)}static from(e){if(!e)return a.empty;if(e instanceof a)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new a([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}a.empty=new a([],0);const l={index:0,offset:0};function c(e,t){return l.index=e,l.offset=t,l}function u(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!u(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class 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 o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&u(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return 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 d extends Error{}class f{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=m(this.content,e+this.openStart,t);return n&&new f(n,this.openStart,this.openEnd)}removeBetween(e,t){return new f(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 f.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(a.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new f(e,n,r)}}function p(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(p(i.content,t-o-1,n-o-1)))}function m(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=m(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function g(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return y(e,t,n,0)}function y(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let s=y(e,t,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(a.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return S(i,k(e,o,s,t,r))}{let r=e.parent,o=r.content;return S(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return S(i,C(e,t,r))}function v(e,t){if(!t.type.compatibleContent(e.type))throw new d("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 o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(w(e.nodeAfter,r),i++));for(let e=i;e<s;e++)w(o.child(e),r);t&&t.depth==n&&t.textOffset&&w(t.nodeBefore,r)}function S(e,t){return e.type.checkContent(t),e.copy(t)}function k(e,t,n,r,o){let i=e.depth>o&&b(e,t,o+1),s=r.depth>o&&b(n,r,o+1),l=[];return x(null,e,o,l),i&&s&&t.index(o)==n.index(o)?(v(i,s),w(S(i,k(e,t,n,r,o+1)),l)):(i&&w(S(i,C(e,t,o+1)),l),x(t,n,o,l),s&&w(S(s,C(n,r,o+1)),l)),x(r,null,o,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)}f.empty=new f(a.empty,0,0);class M{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 o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new 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,o=t;for(let t=e;;){let{index:e,offset:i}=t.content.findIndex(o),s=o-i;if(n.push(t,e,r+i),!s)break;if(t=t.child(e),t.isText)break;o=s-1,r+=i+1}return new M(t,n,o)}static resolveCached(e,t){for(let n=0;n<O.length;n++){let r=O[n];if(r.pos==t&&r.doc==e)return r}let n=O[E]=M.resolve(e,t);return E=(E+1)%A,n}}let O=[],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 D=Object.create(null);class _{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||D)&&h.sameSet(this.marks,n||h.none)}copy(e=null){return e==this.content?this:new _(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new _(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return f.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new f(a,r.depth-i,o.depth-i)}replace(e,t,n){return g(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return M.resolveCached(this,e)}resolveNoCache(e){return M.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()+")"),N(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=a.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<o;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=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)}}_.prototype.text=void 0;class R extends _{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):N(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new R(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new R(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function N(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class P{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new I(e,t);if(null==n.next)return P.empty;let r=L(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);H(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new P(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort($);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}(H(e,0))}(function(e){let t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(e(n,i))),[]);if("seq"!=t.type){if("star"==t.type){let s=n();return r(i,s),o(e(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return o(e(t.expr,i),s),o(e(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){let s=i;for(let r=0;r<t.min;r++){let r=n();o(e(t.expr,s),r),s=r}if(-1==t.max)o(e(t.expr,s),s);else for(let i=t.min;i<t.max;i++){let i=n();r(s,i),o(e(t.expr,s),i),s=i}return[r(s)]}if("name"==t.type)return[r(i,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=e(t.exprs[r],i);if(r==t.exprs.length-1)return s;o(s,i=n())}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(i,s){let l=i.matchFragment(e,n);if(l&&(!t||l.validEnd))return a.from(s.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:i,next:s}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r})).join("\n")}}P.empty=new P(!0);class 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 o=[];for(let e in n){let r=n[e];r.groups.indexOf(t)>-1&&o.push(r)}return 0==o.length&&e.err("No node type or group '"+t+"' found"),o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=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 o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:i}=o[e];r||-1!=n.indexOf(i)||t(i)}}(t),n.sort($)}function W(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function U(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function V(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=V(n.attrs),this.defaultAttrs=W(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==P.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:U(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new _(this,this.computeAttrs(e),a.from(t),h.setFrom(n))}createChecked(e=null,t,n){return t=a.from(t),this.checkContent(t),new _(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),o=r&&r.fillBefore(a.empty,!0);return o?new _(this,e,t.append(o),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 Y{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=V(r.attrs),this.excluded=null;let o=W(this.attrs);this.instance=o?new h(this,o):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,o)=>n[e]=new Y(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class G{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=o.from(e.nodes),t.marks=o.from(e.marks||{}),this.nodes=q.compile(this.spec.nodes,this),this.marks=Y.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",o=t.spec.marks;t.contentMatch=n[r]||(n[r]=P.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.markSet="_"==o?null:o?J(this,o.split(" ")):""!=o&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:J(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof 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 R(n,n.defaultAttrs,e,h.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return _.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 J(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],s=i;if(i)n.push(i);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class Q{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),f.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(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 o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(e)||r.context&&!n.matchesContext(r.context)||i.length>e.length&&(61!=i.charCodeAt(e.length)||i.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach((e=>{n(e=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 Q(e,Q.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 oe(e,t,n){return null!=t?(t?te:0)|("full"===t?ne:0):e&&"pre"==e.whitespace?te|ne:n&~re}class ie{constructor(e,t,n,r,o,i,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=h.none,this.stashMarks=[],this.match=i||(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,o=t.topNode,i=oe(null,t.preserveWhitespace,0)|(n?re:0);r=o?new ie(o.type,o.attrs,h.none,h.none,!0,t.topMatch||o.type.contentMatch,i):new ie(n?null:e.schema.topNodeType,null,h.none,h.none,!0,null,i),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[o,i]=r,s=this.top;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]);t();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])}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],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();ee.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&ee.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:Z.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,i=this.needsBlock;if(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);o&&o.skip?this.addAll(e):this.withStyleRules(e,(()=>this.addAll(e))),t&&this.sync(n),this.needsBlock=i}else this.withStyleRules(e,(()=>{this.addElementByRule(e,o,!1===o.consuming?n:void 0)}))}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=h.none,n=h.none;for(let r=0;r<e.length;r+=2)for(let o;;){let i=this.parser.matchStyle(e[r],e[r+1],this,o);if(!i)break;if(i.ignore)return null;if(i.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach((e=>{i.clearMark(e)&&(n=e.addToSet(n))})):t=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(t),!1!==i.consuming)break;o=i}return[t,n]}addElementByRule(e,t,n){let r,o,i;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace)):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let i=oe(e,r,o.options);o.options&re&&0==o.content.length&&(i|=re),this.nodes.push(new ie(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=o;s--)if(i(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function 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 o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class ue{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=de(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,i=0;for(;n<o.length&&i<e.marks.length;){let t=e.marks[i];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],s=this.serializeMark(n,e.isInline,t);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=ue.renderSpec(de(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&ue.renderSpec(de(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,o=t[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?e.createElementNS(n,o):e.createElement(o),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let o=l;o<t.length;o++){let i=t[o];if(0===i){if(o<t.length-1||o>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:o}=ue.renderSpec(e,i,n);if(s.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new 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 de(e){return e.document||window.document}},2376:(e,t,n)=>{"use strict";n.d(t,{Bs:()=>u,C1:()=>p,H$:()=>A,Sy:()=>M,Y1:()=>s,qv:()=>d,xm:()=>a,yy:()=>k});var r=n(7823),o=n(6560);const i=Object.create(null);class s{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new a(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.p2.empty){let n=t.content.lastChild,o=null;for(let e=0;e<t.openEnd;e++)o=n,n=n.lastChild;let i=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=e.mapping.slice(i);e.replaceRange(u.map(l.pos),u.map(c.pos),a?r.p2.empty:t),0==a&&y(e,i,(n?n.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],a=e.mapping.slice(n),l=a.map(i.pos),c=a.map(s.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),y(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new u(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let o=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new 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=i[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends s{constructor(e,t=e){c(e),c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=e.resolve(t.map(this.anchor));return new u(r.parent.inlineContent?r:n,n)}replace(e,t=r.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 d extends s{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?s.near(o):new d(o)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(e){return e instanceof d&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new f(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new d(e.resolve(t.anchor))}static create(e,t){return new d(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}d.prototype.visible=!1,s.jsonID("node",d);class f{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new h(n,n):new f(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&d.isSelectable(n)?new d(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,o,i=!1){if(t.inlineContent)return u.create(e,n);for(let s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){let r=t.child(s);if(r.isAtom){if(!i&&d.isSelectable(r))return d.create(e,n-(o<0?r.nodeSize:0))}else{let t=g(e,r,n+o,o<0?r.childCount:0,o,i);if(t)return t}n+=r.nodeSize*o}return null}function y(e,t,n){let r=e.steps.length-1;if(r<t)return;let i,a=e.steps[r];(a instanceof o.Pu||a instanceof o.FC)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==i&&(i=r)})),e.setSelection(s.near(e.doc.resolve(i),n)))}class v extends o.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 o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function b(e,t){return t&&e?e.bind(t):e}class w{constructor(e,t,n){this.name=e,this.init=b(t.init,n),this.apply=b(t.apply,n)}}const 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 o=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let a=r?r[i].n:0,l=r?r[i].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new k(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new v(this)}static create(e){let t=new 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 o=n[t].name;r[o]=this.hasOwnProperty(o)?this[o]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((e=>e.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new S(e.schema,e.plugins),i=new k(o);return o.fields.forEach((o=>{if("doc"==o.name)i.doc=r.NB.fromJSON(e.schema,t.doc);else if("selection"==o.name)i.selection=s.fromJSON(i.doc,t.selection);else if("storedMarks"==o.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],a=s.spec.state;if(s.key==o.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r))return void(i[o.name]=a.fromJSON.call(s,e,t[r],i))}i[o.name]=o.init(e,i)}})),i}}function C(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=C(o,t,{})),n[r]=o}return n}class M{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 O=Object.create(null);function E(e){return e in O?e+"$"+ ++O[e]:(O[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:()=>M,Pu:()=>y,dR:()=>T,k9:()=>x,nd:()=>S,nj:()=>A,vs:()=>l,wx:()=>H});var r=n(7823);const o=Math.pow(2,16);function i(e){return 65535&e}class s{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class a{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&a.empty)return a.empty}recover(e){let t=0,n=i(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/o}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;let u=this.ranges[l+i],h=this.ranges[l+a],d=c+u;if(e<=d){let i=c+r+((u?e==c?-1:e==d?1:t:t)<0?0:h);if(n)return i;let a=e==c?2:e==d?1:4;return(t<0?e!=c:e!=d)&&(a|=8),new s(i,a,e==(t<0?c:d)?null:l/3+(e-c)*o)}r+=h-u}return n?e+r:new s(e+r,0,null)}touches(e,t){let n=0,r=i(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let i=this.ranges[t]-(this.inverted?n:0);if(i>e)break;let a=this.ranges[t+o];if(e<=i+a&&t==3*r)return!0;n+=this.ranges[t+s]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),o+=c-l}}invert(){return new a(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?a.empty:new a(e<0?[0,-e,0]:[0,0,e])}}a.empty=new a([]);class l{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new l(this.maps,this.mirror,e,t)}copy(){return new l(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new l;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let o=this.maps[n].mapResult(e,t);if(null!=o.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this.maps[t].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new s(e,r,null)}}const c=Object.create(null);class u{getMap(){return a.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=c[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in c)throw new RangeError("Duplicate use of step JSON ID "+e);return c[e]=t,t.prototype.jsonID=e,t}}class 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,o){try{return h.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.e4)return h.fail(e.message);throw e}}}function d(e,t,n){let o=[];for(let r=0;r<e.childCount;r++){let i=e.child(r);i.content.size&&(i=i.copy(d(i.content,t,i))),i.isInline&&(i=t(i,n,r)),o.push(i)}return r.HY.fromArray(o)}class f extends u{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),o=n.node(n.sharedDepth(this.to)),i=new r.p2(d(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),o),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,i)}invert(){return new p(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new f(t.pos,n.pos,this.mark)}merge(e){return e instanceof f&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new f(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new f(t.from,t.to,e.markFromJSON(t.mark))}}u.jsonID("addMark",f);class 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(d(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 f(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new 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,o,i,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(e){if(this.structure&&(b(e,this.from,this.gapFrom)||b(e,this.gapTo,this.to)))return 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),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new v(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new v(t.from,t.to,t.gapFrom,t.gapTo,r.p2.fromJSON(e,t.slice),t.insert,!!t.structure)}}function b(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let e=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function w(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function x(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!w(r,o,i))break}return null}function S(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<o;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return i?o.map(k).concat({type:t,attrs:n}).concat(i.map(k)):null}function k(e){return{type:e,attrs:null}}function C(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=n-2;e>i;e--,t--){let n=o.node(e),i=o.index(e);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(i,n.childCount),a=r&&r[t+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[t]||n;if(!n.canReplace(i+1,n.childCount)||!l.type.validContent(s))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function M(e,t){let n=e.resolve(t),r=n.index();return O(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function O(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 o,i,s=r.index(e);if(e==r.depth?(o=r.nodeBefore,i=r.nodeAfter):n>0?(o=r.node(e+1),s++,i=r.node(e).maybeChild(s)):(o=r.node(e).maybeChild(s-1),i=r.node(e+1)),o&&!o.isTextblock&&O(o,i)&&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 o=n.content;for(let e=0;e<n.openStart;e++)o=o.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,i=r.index(t)+(n>0?1:0),s=r.node(t),a=!1;if(1==e)a=s.canReplace(i,i,o);else{let e=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=e&&s.canReplaceWith(i,i,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function T(e,t,n=t,o=r.p2.empty){if(t==n&&!o.size)return null;let i=e.resolve(t),s=e.resolve(n);return D(i,s,o)?new y(t,n,o):new _(i,s,o).fit()}function D(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 _{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.HY.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(e<0?this.$to:n.doc.resolve(e));if(!o)return null;let i=this.placed,s=n.depth,a=o.depth;for(;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;let l=new r.p2(i,s,a);return e>-1?new v(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new y(n.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let o=t.firstChild;if(t.childCount>1&&(r=0),o.type.spec.isolating&&r<=n){e=n;break}t=o.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e,o=null;n?(o=P(this.unplaced.content,n-1).firstChild,e=o.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let s,{type:a,match:l}=this.frontier[e],c=null;if(1==t&&(i?l.matchType(i.type)||(c=l.fillBefore(r.HY.from(i),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:e,parent:o,inject:c};if(2==t&&i&&(s=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:o,wrap:s};if(o&&l.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=P(e,t);return!(!o.childCount||o.firstChild.isLeaf||(this.unplaced=new r.p2(e,t+1,Math.max(n,o.size+t>=e.size-n?t+1:0)),0))}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,o=P(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new r.p2(R(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new r.p2(R(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:o,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let s=this.unplaced,a=n?n.content:s.content,l=s.openStart-e,c=0,u=[],{match:h,type:d}=this.frontier[t];if(o){for(let e=0;e<o.childCount;e++)u.push(o.child(e));h=h.matchFragment(o)}let f=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(d.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?f:-1)))}let p=c==a.childCount;p||(f=-1),this.placed=N(this.placed,t,r.HY.from(u)),this.frontier[t].match=h,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?0==e?r.p2.empty:new r.p2(R(s.content,e-1,1),e-1,f<0?s.openEnd:e-1):new r.p2(R(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],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=L(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=L(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:i,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=N(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=N(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=N(this.placed,this.frontier.length,e))}}function R(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(R(e.firstChild.content,t-1,n)))}function N(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(N(e.lastChild.content,t-1,n)))}function P(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 o=e.content;return t>1&&(o=o.replaceChild(0,I(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.HY.empty,!0)))),e.copy(o)}function L(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,s)?a:null}function j(e,t,n,o,i){if(t<n){let r=e.firstChild;e=e.replaceChild(0,r.copy(j(r.content,t+1,n,o,r)))}if(t>o){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.HY.empty,!0))}return e}function F(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}class 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 o=t.type.create(n,null,t.marks);return h.fromReplace(e,this.pos,this.pos+1,new r.p2(r.HY.from(o),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 o=T(this.doc,e,t,n);return o&&this.step(o),this}replaceWith(e,t,n){return this.replace(e,t,new r.p2(r.HY.from(n),0,0))}delete(e,t){return this.replace(e,t,r.p2.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,o){if(!o.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),s=e.doc.resolve(n);if(D(i,s,o))return e.step(new y(t,n,o));let a=F(i,e.doc.resolve(n));0==a[a.length-1]&&a.pop();let l=-(i.depth+1);a.unshift(l);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(e)>-1?l=e:i.before(e)==t&&a.splice(1,0,-e)}let c=a.indexOf(l),u=[],h=o.openStart;for(let e=o.content,t=0;;t++){let n=e.firstChild;if(u.push(n),t==o.openStart)break;e=n.content}for(let e=h-1;e>=0;e--){let t=u[e],n=(d=t.type).spec.defining||d.spec.definingForContent;if(n&&!t.sameMarkup(i.node(Math.abs(l)-1)))h=e;else if(n||!t.type.isTextblock)break}var d;for(let t=o.openStart;t>=0;t--){let l=(t+h+1)%(o.openStart+1),d=u[l];if(d)for(let t=0;t<a.length;t++){let u=a[(t+c)%a.length],h=!0;u<0&&(h=!1,u=-u);let f=i.node(u-1),p=i.index(u-1);if(f.canReplaceWith(p,p,d.type,d.marks))return e.replace(i.before(u),h?s.after(u):n,new r.p2(j(o.content,0,o.openStart,l),l,o.openEnd))}}let f=e.steps.length;for(let r=a.length-1;r>=0&&(e.replace(t,n,o),!(e.steps.length>f));r--){let e=a[r];e<0||(t=i.before(e),n=s.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,o){if(!o.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}(e.doc,t,o.type);null!=r&&(t=n=r)}e.replaceRange(t,n,new r.p2(r.HY.from(o),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=F(r,o);for(let t=0;t<i.length;t++){let n=i[t],s=t==i.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return e.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return e.delete(r.before(i),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:o,$to:i,depth:s}=t,a=o.before(s+1),l=i.after(s+1),c=a,u=l,h=r.HY.empty,d=0;for(let e=s,t=!1;e>n;e--)t||o.index(e)>0?(t=!0,h=r.HY.from(o.node(e).copy(h)),d++):c--;let f=r.HY.empty,p=0;for(let e=s,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=r.HY.from(i.node(e).copy(f)),p++):u++;e.step(new v(c,u,a,l,new r.p2(h.append(f),d,p),h.size-d,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let o=new y(t-n,t+n,r.p2.empty,!0);e.step(o)}(this,e,t),this}wrap(e,t){return function(e,t,n){let o=r.HY.empty;for(let e=n.length-1;e>=0;e--){if(o.size){let t=n[e].type.contentMatch.matchFragment(o);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=r.HY.from(n[e].type.create(n[e].attrs,o))}let i=t.start,s=t.end;e.step(new v(i,s,i,s,new r.p2(o,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,o=null){return function(e,t,n,o,i){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(o,i)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(s).map(n),o)){e.clearIncompatible(e.mapping.slice(s).map(n,1),o);let a=e.mapping.slice(s),l=a.map(n,1),c=a.map(n+t.nodeSize,1);return e.step(new v(l,c,l+1,c-1,new r.p2(r.HY.from(o.create(i,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,o),this}setNodeMarkup(e,t,n=null,o){return function(e,t,n,o,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(o,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new v(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new r.p2(r.HY.from(a),0,0),1,!0))}(this,e,t,n,o),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,o){let i=e.doc.resolve(t),s=r.HY.empty,a=r.HY.empty;for(let e=i.depth,t=i.depth-n,l=n-1;e>t;e--,l--){s=r.HY.from(i.node(e).copy(s));let t=o&&o[l];a=r.HY.from(t?t.type.create(t.attrs,a):i.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 o,i,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),h=Math.min(l+e.nodeSize,n),d=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(d)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=h:s.push(o=new p(c,h,u[e])));i&&i.to==c?i.to=h:a.push(i=new f(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,o){let i=[],s=0;e.doc.nodesBetween(t,n,((e,a)=>{if(!e.isInline)return;s++;let l=null;if(o instanceof r.ZU){let t,n=e.marks;for(;t=o.isInSet(n);)(l||(l=[])).push(t),n=t.removeFromSet(n)}else o?o.isInSet(e.marks)&&(l=[o]):l=e.marks;if(l&&l.length){let r=Math.min(a+e.nodeSize,n);for(let e=0;e<l.length;e++){let n,o=l[e];for(let e=0;e<i.length;e++){let t=i[e];t.step==s-1&&o.eq(i[e].style)&&(n=t)}n?(n.to=r,n.step=s):i.push({style:o,from:Math.max(a,t),to:r,step:s})}}})),i.forEach((t=>e.step(new p(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,o=n.contentMatch){let i=e.doc.nodeAt(t),s=[],a=t+1;for(let t=0;t<i.childCount;t++){let l=i.child(t),c=a+l.nodeSize,u=o.matchType(l.type);if(u){o=u;for(let t=0;t<l.marks.length;t++)n.allowsMarkType(l.marks[t].type)||e.step(new p(a,c,l.marks[t]));if(l.isText&&!n.spec.code){let e,t,o=/\r?\n|\r/g;for(;e=o.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(!o.validEnd){let t=o.fillBefore(r.HY.empty,!0);e.replace(a,a,new r.p2(t,0,0))}for(let t=s.length-1;t>=0;t--)e.step(s[t])}(this,e,t,n),this}}},4348:(e,t,n)=>{"use strict";n.d(t,{EH:()=>Bt,p:()=>Lt,tk:()=>an});var r=n(2376),o=n(7823),i=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&&(d(e,t,n,r,-1)||d(e,t,n,r,1))},h=/^(img|br|input|textarea|hr)$/i;function d(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:f(e))){let n=e.parentNode;if(!n||1!=n.nodeType||p(e)||h.test(e.nodeName)||"false"==e.contentEditable)return!1;t=s(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?f(e):0}}}function f(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function 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,M=!k&&/gecko\/(\d+)/i.test(b);M&&(/Firefox\/(\d+)/.exec(b)||[0,0])[1];const O=!k&&/Chrome\/(\d+)/.exec(b),E=!!O,A=O?+O[1]:0,T=!k&&!!y&&/Apple Computer/.test(y.vendor),D=T&&(/Mobile\/\w+/.test(b)||!!y&&y.maxTouchPoints>2),_=D||!!y&&/Mac/.test(y.platform),R=!!y&&/Win/.test(y.platform),N=/Android \d/.test(b),P=!!v&&"webkitFontSmoothing"in v.documentElement.style,I=P?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function L(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function 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,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;s=a(s)){if(1!=s.nodeType)continue;let e=s,n=e==i.body,a=n?L(i):F(e),l=0,c=0;if(t.top<a.top+j(r,"top")?c=-(a.top-t.top+j(o,"top")):t.bottom>a.bottom-j(r,"bottom")&&(c=t.bottom-t.top>a.bottom-a.top?t.top+j(o,"top")-a.top:t.bottom-a.bottom+j(o,"bottom")),t.left<a.left+j(r,"left")?l=-(a.left-t.left+j(o,"left")):t.right>a.right-j(r,"right")&&(l=t.right-a.right+j(o,"right")),l||c)if(n)i.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let o=e.scrollLeft-n,i=e.scrollTop-r;t={left:t.left-o,top:t.top-i,right:t.right-o,bottom:t.bottom-i}}if(n||/^(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:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let H=null;function W(e,t){let n,r,o,i,s=2e8,a=0,l=t.top,u=t.top;for(let h=e.firstChild,d=0;h;h=h.nextSibling,d++){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 f=e[c];if(f.top<=l&&f.bottom>=u){l=Math.max(f.bottom,l),u=Math.min(f.top,u);let e=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(e<s){n=h,s=e,r=e&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==h.nodeType&&e&&(a=d+(t.left>=(f.left+f.right)/2?1:0));continue}}else f.top>t.top&&!o&&f.left<=t.left&&f.right>=t.left&&(o=h,i={left:Math.max(f.left,Math.min(f.right,t.left)),top:f.top});!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(a=d+1)}}return!n&&o&&(n=o,r=i,s=0),n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=Y(r,1);if(n.top!=n.bottom&&U(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||s&&1==n.nodeType?{node:e,offset:a}:W(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 V(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=e.childNodes[i];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let o=e[r];if(U(t,o))return V(n,t,o)}}if((i=(i+1)%r)==o)break}return e}function q(e,t){let n,r=e.dom.ownerDocument,o=0,i=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch(e){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}(r,t.left,t.top);i&&({node:n,offset:o}=i);let s,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=e.dom.getBoundingClientRect();if(!U(t,n))return null;if(l=V(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(M&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let e,r=n.childNodes[o];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&o++}let r;P&&o&&1==n.nodeType&&1==(r=n.childNodes[o-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=t.top&&o--,n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){let o=-1;for(let n=t,i=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent&&!i||!t.contentDOM)){let e=t.dom.getBoundingClientRect();if(t.node.isBlock&&t.parent&&!i&&(i=!0,e.left>r.left||e.top>r.top?o=t.posBefore:(e.right<r.left||e.bottom<r.top)&&(o=t.posAfter)),!t.contentDOM&&o<0&&!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 o>-1?o:e.docView.posFromDOM(t,n,-1)}(e,n,o,t))}null==s&&(s=function(e,t,n){let{node:r,offset:o}=W(t,n),i=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();i=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}(e,l,t));let c=e.docView.nearestDesc(l,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function K(e){return e.top<e.bottom||e.left<e.right}function Y(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 G=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function J(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),s=P||M;if(3==r.nodeType){if(!s||!G.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let e=o,t=o,i=n<0?1:-1;return n<0&&!o?(t++,i=-1):n>=0&&o==r.nodeValue.length?(e--,i=1):n<0?e--:t++,Q(Y(c(r,e,t),i),i<0)}{let e=Y(c(r,o,o),n);if(M&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=Y(c(r,o-1,o-1),-1);if(t.top==e.top){let n=Y(c(r,o,o+1),-1);if(n.top!=e.top)return Q(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(null==i&&o&&(n<0||o==f(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return X(e.getBoundingClientRect(),!1)}if(null==i&&o<f(r)){let e=r.childNodes[o];if(1==e.nodeType)return X(e.getBoundingClientRect(),!0)}return X(r.getBoundingClientRect(),n>=0)}if(null==i&&o&&(n<0||o==f(r))){let e=r.childNodes[o-1],t=3==e.nodeType?c(e,f(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return Q(Y(t,1),!1)}if(null==i&&o<f(r)){let e=r.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?c(e,0,s?0:1):1==e.nodeType?e:null:null;if(t)return Q(Y(t,-1),!0)}return Q(Y(3==r.nodeType?c(r):r,-n),n>=0)}function Q(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,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}const ee=/[\u0590-\u08ac]/;let te=null,ne=null,re=!1;class oe{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>s(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!t||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return i;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let o=this.children[n],i=t+o.size;if(i>e||o instanceof he){r=e-t;break}t=i}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof ie&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?s(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?s(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,a=0;;a++){let n=this.children[a],l=i+n.size;if(-1==r&&e<=l){let o=i+n.border;if(e>=o&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=i;for(let t=a;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=s(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(let e=a+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=s(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),i=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(o>a&&i<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let a=this.domFromPos(e,e?-1:1),l=t==e?a:this.domFromPos(t,t?-1:1),c=n.getSelection(),h=!1;if((M||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(M&&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 d=!1;if((c.extend||e==t)&&!h){c.collapse(a.node,a.offset);try{e!=t&&c.extend(l.node,l.offset),d=!0}catch(e){}}if(!d){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 o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){let r=n+o.border,s=i-o.border;if(e>=r&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=r||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-r,t-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class ie extends oe{constructor(e,t,n,r){let o,i=t.type.toDOM;if("function"==typeof i&&(i=i(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!t.type.spec.raw){if(1!=i.nodeType){let e=document.createElement("span");e.appendChild(i),i=e}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class se extends oe{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class ae extends oe{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let i=r.nodeViews[t.type.name],s=i&&i(t,r,n);return s&&s.dom||(s=o.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),o=this.children,i=this.size;t<i&&(o=Ce(o,t,i,n)),e>0&&(o=Ce(o,0,e,n));for(let e=0;e<o.length;e++)o[e].parent=r;return r.children=o,r}}class le extends oe{constructor(e,t,n,r,o,i,s,a,l){super(e,[],o,i),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(e,t,n,r,i,s){let a,l=i.nodeViews[t.type.name],c=l&&l(t,i,(()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s),n,r),u=c&&c.dom,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}=o.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 d=u;return u=be(u,n,t),c?a=new de(e,t,n,r,u,h||null,d,c,i,s+1):t.isText?new ue(e,t,n,r,u,d,i):new le(e,t,n,r,u,h||null,d,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>o.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,i=e.composing?this.localCompositionInfo(e,t):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new Se(this,s&&s.node,e);!function(e,t,n,r){let o=t.locals(e),i=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,o,t.forChild(i,s),n),i+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let u,h,d,f;for(;s<o.length&&o[s].to==i;){let e=o[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)f=-1,d=l,l=null;else{if(!(c<e.childCount))break;f=c,d=e.child(c++)}for(let e=0;e<a.length;e++)a[e].to<=i&&a.splice(e--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let p=i+d.nodeSize;if(d.isText){let e=p;s<o.length&&o[s].from<e&&(e=o[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<p&&(l=d.cut(e-i),d=d.cut(0,e-i),p=e,f=-1)}r(d,d.isInline&&!d.isLeaf?a.filter((e=>!e.inline)):a.slice(),t.forChild(i,d),f),i=p}}(this.node,this.innerDeco,((t,i,s)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!s&&l.syncToMarks(i==this.node.childCount?o.vc.none:this.node.child(i).marks,n,e),l.placeWidget(t,e,r)}),((t,o,s,c)=>{let u;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,o,s,c)||a&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,o,s,u,e)||l.updateNextNode(t,o,s,e,c,r)||l.addNode(t,o,s,e,r),r+=t.nodeSize})),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),fe(this.contentDOM,this.children,e),D&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:o}=e.state.selection;if(!(e.state.selection instanceof r.Bs)||n<t||o>t+this.node.content.size)return null;let i=e.domSelectionRange(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=f(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let e=s.nodeValue,r=function(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let s=e.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<e.childCount;){let t=e.child(o++);if(i+=t.nodeSize,!t.isText)break;l+=t.text}if(i>=n){if(i>=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,o-t);return r<0?null:{node:s,pos:r,text:e}}return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new se(this,o,t,r);e.input.compositionNodes.push(i),this.children=Ce(this.children,n,n+r.length,e,i)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node)||(this.updateInner(e,t,n,r),0))}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(we(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=ye(this.dom,this.nodeDOM,ge(this.outerDeco,this.node,t),ge(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ce(e,t,n,r,o){be(r,t,e);let i=new le(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class ue extends le{constructor(e,t,n,r,o,i,s){super(e,t,n,r,o,null,i,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node)||(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,0))}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new ue(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class he extends oe{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class de extends le{constructor(e,t,n,r,o,i,s,a,l,c){super(e,t,n,r,o,i,s,l,c),this.spec=a}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function fe(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let s=t[i],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=xe(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(a,r);if(s instanceof ae){let t=r?r.previousSibling:e.lastChild;fe(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=xe(r),o=!0;o&&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,o=[r];for(let i=0;i<e.length;i++){let s=e[i].type.attrs;if(s){s.nodeName&&o.push(r=new pe(s.nodeName));for(let e in s){let i=s[e];null!=i&&(n&&1==o.length&&o.push(r=new pe(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+i:"style"==e?r.style=(r.style?r.style+";":"")+i:"nodeName"!=e&&(r[e]=i))}}}return o}function ye(e,t,n,r){if(n==me&&r==me)return t;let o=t;for(let t=0;t<r.length;t++){let i=r[t],s=n[t];if(t){let t;s&&s.nodeName==i.nodeName&&o!=e&&(t=o.parentNode)&&t.nodeName.toLowerCase()==i.nodeName||(t=document.createElement(i.nodeName),t.pmIsDeco=!0,t.appendChild(o),s=me[0]),o=t}ve(o,s||me[0],i)}return o}function ve(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function be(e,t,n){return ye(e,e,me,ge(t,n,1!=e.nodeType))}function we(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function 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,o=e.childCount,i=new Map,s=[];e:for(;o>0;){let a;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof ae)){a=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,i=Math.min(o,e.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++){let n=this.top.children[t];if(n.matchesMark(e[o])&&!this.isLocked(n.dom)){r=t;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=ae.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r<o;r++){let o=this.top.children[r];if(o.matchesNode(e,t,n)&&!this.preMatch.matched.has(o)){i=r;break}}return!(i<0||(this.destroyBetween(this.index,i),this.index++,0))}updateNodeAt(e,t,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,o,i){for(let s=this.index;s<this.top.children.length;s++){let a=this.top.children[s];if(a instanceof le){let l=this.preMatch.matched.get(a);if(null!=l&&l!=o)return!1;let c,u=a.dom,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,i)))return this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(r,i+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,o,i){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let s=le.create(this.top,t,n,r,o,i);if(s.contentDOM){s.children=e.children,e.children=[];for(let e of s.children)e.parent=s}return e.destroy(),s}addNode(e,t,n,r,o){let i=le.create(this.top,e,t,n,r,o);i.contentDOM&&i.updateChildren(r,o+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new ie(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof ae;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof ue)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((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,o){let i=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function Me(e,t=null){let n=e.domSelectionRange(),o=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&0==i.size,l=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c,u,h=o.resolve(l);if(m(n)){for(c=h;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&r.qv.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==f(e);r||o;){if(e==n)return!0;let t=s(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==f(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;u=new r.qv(l==e?h:o.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;c=o.resolve(t)}return u||(u=Pe(e,c,h,"pointer"==t||e.state.selection.head<h.pos&&!a?1:-1)),u}function Oe(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(Re(e,n),Oe(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,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,s(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&k&&C<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let o,i,{anchor:s,head:a}=n;!Ae||n instanceof r.Bs||(n.$from.parent.inlineContent||(o=Te(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Te(e,n.to))),e.docView.setSelection(s,a,e.root,t),Ae&&(o&&_e(o),i&&_e(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Oe(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),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(T&&o&&"false"==o.contentEditable)return De(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return De(o);if(i)return De(i)}}function De(e){return e.contentEditable="true",T&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function _e(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Re(e,t){if(t instanceof r.qv){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ne(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ne(e)}function Ne(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Pe(e,t,n,o){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||r.Bs.between(t,n,o)}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:o}=e.selection,i=t>0?n.max(o):n.min(o),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&r.Y1.findFrom(s,t)}function Fe(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Be(e,t,n){let o=e.state.selection;if(!(o instanceof r.Bs)){if(o instanceof r.qv&&o.node.isInline)return Fe(e,new r.Bs(t>0?o.$to:o.$from));{let n=je(e.state,t);return!!n&&Fe(e,n)}}if(n.indexOf("s")>-1){let{$head:n}=o,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return Fe(e,new r.Bs(o.$anchor,s))}if(!o.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(!(_&&n.indexOf("m")>-1)){let n,i=o.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText)return!1;let a=t<0?i.pos-s.nodeSize:i.pos;return!!(s.isAtom||(n=e.docView.descAt(a))&&!n.contentDOM)&&(r.qv.isSelectable(s)?Fe(e,new r.qv(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):!!P&&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 o,i,a=!1;for(M&&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))o=n,i=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(We(n))break;{let t=n.previousSibling;for(;t&&$e(t,-1);)o=n.parentNode,i=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):o&&Ue(e,o,i)}(e):function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=ze(n);for(;;)if(r<a){if(1!=n.nodeType)break;if(!$e(n.childNodes[r],1))break;o=n,i=++r}else{if(We(n))break;{let t=n.nextSibling;for(;t&&$e(t,1);)o=t.parentNode,i=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}}}o&&Ue(e,o,i)}(e)}function We(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:o}=e;setTimeout((()=>{e.state==o&&Ee(e)}),50)}function Ve(e,t){let n=e.state.doc.resolve(t);if(!E&&!R&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function qe(e,t,n){let o=e.state.selection;if(o instanceof r.Bs&&!o.empty||n.indexOf("s")>-1)return!1;if(_&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=o;if(!i.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(!i.parent.inlineContent){let n=t<0?i:s,a=o 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:o,empty:i}=e.state.selection;if(!n.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=e.state.tr;return t<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),e.dispatch(r),!0}return!1}function Ye(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Ge(e,t){e.someProp("transformCopied",(n=>{t=n(t,e)}));let n=[],{content:r,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,s--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let a=e.someProp("clipboardSerializer")||o.PW.fromSchema(e.state.schema),l=it(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));let u,h=c.firstChild,d=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),d++}h=c.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:c,text:e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n")}}function Je(e,t,n,r,i){let s,a,l=i.parent.type.spec.code;if(!n&&!t)return null;let c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",(n=>{t=n(t,l||r,e)})),l)return t?new o.p2(o.HY.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):o.p2.empty;let n=e.someProp("clipboardTextParser",(n=>n(t,i,r,e)));if(n)a=n;else{let n=i.marks(),{schema:r}=e.state,a=o.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=it().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);if((n=o&&rt[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join("")),r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),P&&function(e){let t=e.querySelectorAll(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")||o.aw.fromSchema(e.state.schema);a=t.parseSlice(s,{preserveWhitespace:!(!c&&!h),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Qe.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:i,openStart:s,openEnd:a}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;i=o.HY.from(t.create(n[e+1],i)),s++,a++}return new o.p2(i,s,a)}(nt(a,+h[1],+h[2]),h[4]);else if(a=o.p2.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),s=[];if(e.forEach((e=>{if(!s)return;let t,n=i.findWrapping(e.type);if(!n)return s=null;if(t=s.length&&r.length&&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),i=i.matchType(t.type),r=n}})),s)return o.HY.from(s)}return e}(a.content,i),!0),a.openStart||a.openEnd){let e=0,t=0;for(let t=a.content.firstChild;e<a.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=a.content.lastChild;t<a.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);a=nt(a,e,t)}return e.someProp("transformPasted",(t=>{a=t(a,e)})),a}const Qe=/^(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,o.HY.from(e));return e}function Ze(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let s=Ze(e,t,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(o.HY.from(Xe(n,e,i+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(o.HY.empty,!0);return e.copy(n.append(r))}function tt(e,t,n,r,i,s){let a=t<0?e.firstChild:e.lastChild,l=a.content;return e.childCount>1&&(s=0),i<r-1&&(l=tt(l,t,n,r,i+1,s)),i>=n&&(l=t<0?a.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(o.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 o.p2(tt(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new o.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 ot=null;function it(){return ot||(ot=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=>dt(e,t))}))}function dt(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function ft(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,o){if(-1==r)return!1;let i=e.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(e.someProp(t,(t=>r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function 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,o){return mt(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(n=>n(e,t,o)))||function(e,t,n){if(0!=n.button)return!1;let o=e.state.doc;if(-1==t)return!!o.inlineContent&&(gt(e,r.Bs.create(o,0,o.content.size),"pointer"),!0);let i=o.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),s=i.before(t);if(n.inlineContent)gt(e,r.Bs.create(o,s+1,s+1+n.content.size),"pointer");else{if(!r.qv.isSelectable(n))continue;gt(e,r.qv.create(o,s),"pointer")}return!0}}(e,n,o)}function bt(e){return Ot(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(),!N||!E||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!D||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||_&&72==n&&"c"==r)return Ke(e,-1)||He(e,-1);if(46==n&&!t.shiftKey||_&&68==n&&"c"==r)return Ke(e,1)||He(e,1);if(13==n||27==n)return!0;if(37==n||_&&66==n&&"c"==r){let t=37==n?"ltr"==Ve(e,e.state.selection.from)?-1:1:-1;return Be(e,t,r)||He(e,t)}if(39==n||_&&70==n&&"c"==r){let t=39==n?"ltr"==Ve(e,e.state.selection.from)?1:-1:1;return Be(e,t,r)||He(e,t)}return 38==n||_&&80==n&&"c"==r?qe(e,-1,r)||He(e,-1):40==n||_&&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;Ye(e,n,"true"),setTimeout((()=>Ye(e,n,"false")),20)}return!1}(e)||qe(e,1,r)||He(e,1):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||_&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let o=e.state.selection;if(!(o instanceof r.Bs&&o.$from.sameParent(o.$to))){let t=String.fromCharCode(n.charCode);/[\r\n]/.test(t)||e.someProp("handleTextInput",(n=>n(e,o.$from.pos,o.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const wt=_?"metaKey":"ctrlKey";st.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=bt(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[wt]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(pt(n));s&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new xt(e,s,n,!!r)):("doubleClick"==i?yt:vt)(e,s.pos,s.inside,n)?n.preventDefault():ut(e,"pointer"))};class xt{constructor(e,t,n,o){let i,s;if(this.view=e,this.pos=t,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[wt],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,s=n.depth?n.before():0}const a=o?null:n.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||c instanceof r.qv&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!M||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,o,i){return mt(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(n=>n(e,t,o)))||(i?function(e,t){if(-1==t)return!1;let n,o,i=e.state.selection;i instanceof r.qv&&(n=i.node);let s=e.state.doc.resolve(t);for(let e=s.depth+1;e>0;e--){let t=e>s.depth?s.nodeAfter:s.node(e);if(r.qv.isSelectable(t)){o=n&&i.$from.depth>0&&e>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(e);break}}return null!=o&&(gt(e,r.qv.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.qv.isSelectable(o))&&(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=N?5e3:-1;function Ct(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>Ot(e)),t))}function Mt(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Ot(e,t=!1){if(!(N&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Mt(e),t||e.docView&&e.docView.dirty){let t=Me(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(),Ot(e,!0),e.markCursor=null;else if(Ot(e),M&&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||D&&I<604;function At(e,t,n,r,i){let s=Je(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,i,s||o.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,o="cut"==n.type;if(r.empty)return;let i=Et?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Ge(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},at.paste=(e,t)=>{let n=t;if(e.composing&&!N)return;let r=Et?null:n.clipboardData,o=e.input.shiftKey&&45!=e.input.lastKeyCode;r&&At(e,Tt(r),r.getData("text/html"),o,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 o=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?At(e,r.value,null,o,t):At(e,r.textContent,r.innerHTML,o,t)}),50)}(e,n)};class Dt{constructor(e,t){this.slice=e,this.move=t}}const _t=_?"altKey":"ctrlKey";st.dragstart=(e,t)=>{let n=t,o=e.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(pt(n));if(s&&s.pos>=i.from&&s.pos<=(i instanceof r.qv?i.to-1:i.to));else if(o&&o.mightDrag)e.dispatch(e.state.tr.setSelection(r.qv.create(e.state.doc,o.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(r.qv.create(e.state.doc,t.posBefore)))}let a=e.state.selection.content(),{dom:l,text:c}=Ge(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 Dt(a,!n[_t])},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=Je(e,Tt(n.dataTransfer),Et?null:n.dataTransfer.getData("text/html"),!1,l);let u=!(!s||n[_t]);if(e.someProp("handleDrop",(t=>t(e,n,c||o.p2.empty,u))))return void n.preventDefault();if(!c)return;n.preventDefault();let h=c?(0,i.nj)(e.state.doc,l.pos,c):l.pos;null==h&&(h=l.pos);let d=e.state.tr;u&&d.deleteSelection();let f=d.mapping.map(h),p=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=d.doc;if(p?d.replaceRangeWith(f,f,c.content.firstChild):d.replaceRange(f,f,c),d.doc.eq(m))return;let g=d.doc.resolve(f);if(p&&r.qv.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))d.setSelection(new r.qv(g));else{let t=d.mapping.map(h);d.mapping.maps[d.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),d.setSelection(Pe(e,g,d.doc.resolve(t)))}e.focus(),e.dispatch(d.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&&N&&"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 Rt(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Nt{constructor(e,t){this.toDOM=e,this.spec=t||Ft,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:i}=e.mapResult(t.from+r,this.side<0?-1:1);return i?null:new Lt(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Nt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Rt(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Pt{constructor(e,t){this.attrs=e,this.spec=t||Ft}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Lt(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Pt&&Rt(this.attrs,e.attrs)&&Rt(this.spec,e.spec)}static is(e){return e.type instanceof Pt}destroy(){}}class It{constructor(e,t){this.attrs=e,this.spec=t||Ft}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Lt(o.pos-n,i.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof It&&Rt(this.attrs,e.attrs)&&Rt(this.spec,e.spec)}destroy(){}}class Lt{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Lt(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Lt(e,e,new Nt(t,n))}static inline(e,t,n,r){return new Lt(e,t,new Pt(n,r))}static node(e,t,n,r){return new Lt(e,t,new It(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pt}get widget(){return this.type instanceof Nt}}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?Vt(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,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let s=this.children[i]+1;this.children[i+2].findInner(e-s,t-s,n,r+s,o)}}map(e,t,n){return this==zt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Ft)}mapInner(e,t,n,r,o){let i;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,s){let a=e.slice();for(let e=0,t=i;e<n.maps.length;e++){let r=0;n.maps[e].forEach(((e,n,i,s)=>{let l=s-i-(n-e);for(let s=0;s<a.length;s+=3){let c=a[s+1];if(c<0||e>c+t-r)continue;let u=a[s]+t-r;n>=u?a[s+1]=e<=u?-2:-1:i>=o&&l&&(a[s]+=l,a[s+1]+=l)}r+=l})),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){l=!0,a[t+1]=-1;continue}let c=n.map(e[t]+i),u=c-o;if(u<0||u>=r.content.size){l=!0;continue}let h=n.map(e[t+1]+i,-1)-o,{index:d,offset:f}=r.content.findIndex(u),p=r.maybeChild(d);if(p&&f==u&&f+p.nodeSize==h){let r=a[t+2].mapInner(n,p,c+1,e[t]+i+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,o,i,s){function a(e,t){for(let i=0;i<e.local.length;i++){let a=e.local[i].map(r,o,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[i].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+i+1);return n}(a,e,t,n,o,i,s),c=Vt(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,i||[],e,t,n,r,o):i?new Bt(i.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,o=0;e.forEach(((e,i)=>{let s,a=i+n;if(s=Wt(t,e,a)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(e,s,a+1):r.splice(o,0,i,i+e.nodeSize,Vt(s,e,a+1,Ft)),o+=3}}));let i=Ht(o?Ut(t):t,-n);for(let t=0;t<i.length;t++)i[t].type.valid(e,i[t])||i.splice(t--,1);return new Bt(i.length?this.local.concat(i).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 o,i=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>i&&t.to<s&&(e[n]=null,(o||(o=[])).push(t));if(!o)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(o,i+1);a!=zt?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,o=0;o<e.length;o++)if(n=e[o])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new 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 o=e+1,i=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<i&&t.to>o&&t.type instanceof Pt){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new 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(Pt.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Pt||t.push(this.local[e]);return t}}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 o=this.members[r].forChild(e,t);o!=zt&&(o instanceof $t?n=n.concat(o.members):n.push(o))}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 o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?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 o=e[r];n.push(new Lt(o.from+t,o.to+t,o.type))}return n}function Wt(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let t,i=0;i<e.length;i++)(t=e[i])&&t.from>n&&t.to<r&&((o||(o=[])).push(t),e[i]=null);return o}function Ut(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Vt(e,t,n,r){let o=[],i=!1;t.forEach(((t,s)=>{let a=Wt(e,t,s+n);if(a){i=!0;let e=Vt(a,t,n+s+1,r);e!=zt&&o.push(s,s+t.nodeSize,e)}}));let s=Ht(i?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||o.length?new Bt(s,o):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 o=n+1;o<t.length;o++){let i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Yt(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Yt(t,o+1,i.copy(r.to,i.to)))}}return t}function Yt(e,t,n){for(;t<e.length&&qt(n,e[t])>0;)t++;e.splice(t,0,n)}function Gt(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 Jt={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Qt=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()})),Qt&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Jt)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(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(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Ie(e)&&!this.ignoreSelectionChange(n),i=-1,s=-1,a=!1,l=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],l);n&&(i=i<0?n.from:Math.min(n.from,i),s=s<0?n.to:Math.max(n.to,s),n.typeOver&&(a=!0))}if(M&&l.length>1){let e=l.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let c=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&m(n)&&(c=Me(e))&&c.eq(r.Y1.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ee(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),function(e){if(!en.has(e)&&(en.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))){if(e.requiresGeckoHackNode=M,tn)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),tn=!0}}(e)),this.handleDOMChange(i,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||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,o=e.nextSibling;if(k&&C<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:i}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(e.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==e.target?s(r)+1:0,a=n.localPosFromDOM(e.target,i,-1),l=o&&o.parentNode==e.target?s(o):e.target.childNodes.length;return{from:a,to:n.localPosFromDOM(e.target,l,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let en=new WeakMap,tn=!1;function nn(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(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:Pe(e,t.resolve(n.anchor),t.resolve(n.head))}function sn(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}class an{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new 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(dn),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),Gt(this),this.dom,this),this.domObserver=new Zt(this,((e,t,n,i)=>function(e,t,n,i,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=Me(e,t);if(n&&!e.state.selection.eq(n)){if(E&&N&&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,d=e.state.selection,f=function(e,t,n){let r,{node:i,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=i.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){a=e;break}if(!n||n.size)break}let d=e.state.doc,f=e.someProp("domParser")||o.aw.fromSchema(e.state.schema),p=d.resolve(l),g=null,y=f.parse(i,{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(f.from,f.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,o){let i=e.findDiffStart(t,n);if(null==i)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);return"end"==o&&(r-=s+Math.max(0,i-Math.min(s,a))-i),s<i&&e.size<t.size?(i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i):a<i&&(i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i),{start:i,endA:s,endB:a}}(y.content,f.doc.content,f.from,u,h);if((D&&e.input.lastIOSEnter>Date.now()-225||N)&&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(!(i&&d instanceof r.Bs&&!d.empty&&d.$head.sameParent(d.$anchor))||e.composing||f.sel&&f.sel.anchor!=f.sel.head){if(f.sel){let t=on(e,e.state.doc,f.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:d.from,endA:d.to,endB:d.to}}if(E&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from&&f.sel.head==f.sel.anchor){let e=v.endB-v.start;f.sel={anchor:f.sel.anchor+e,head:f.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>=f.from?v.start=e.state.selection.from:v.endA<e.state.selection.to&&v.endA>=e.state.selection.to-2&&e.state.selection.to<=f.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>f.from&&" "==f.doc.textBetween(v.start-f.from-1,v.start-f.from+1)&&(v.start--,v.endA--,v.endB--);let b,w=f.doc.resolveNoCache(v.start-f.from),x=f.doc.resolveNoCache(v.endB-f.from),S=p.resolve(v.start),M=w.sameParent(x)&&w.parent.inlineContent&&S.end()>=v.endA;if((D&&e.input.lastIOSEnter>Date.now()-225&&(!M||s.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!M&&w.pos<f.doc.content.size&&!w.sameParent(x)&&(b=r.Y1.findFrom(f.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,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||sn(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=e.resolve(sn(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||sn(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(p,v.start,v.endA,w,x)&&e.someProp("handleKeyDown",(t=>t(e,g(8,"Backspace")))))return void(N&&E&&e.domObserver.suppressSelectionUpdates());E&&N&&v.endB==v.start&&(e.input.lastAndroidDelete=Date.now()),N&&!M&&w.start()!=x.start()&&0==x.parentOffset&&w.depth==x.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==v.endA&&(v.endB-=2,x=f.doc.resolveNoCache(v.endB-f.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,g(13,"Enter"))}))}),20));let O,A,T,_=v.start,R=v.endA;if(M)if(w.pos==x.pos)k&&C<=11&&0==w.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Ee(e)),20)),O=e.state.tr.delete(_,R),A=p.resolve(v.start).marksAcross(p.resolve(v.endA));else if(v.endA==v.endB&&(T=function(e,t){let n,r,i,s=e.firstChild.marks,a=t.firstChild.marks,l=s,c=a;for(let e=0;e<a.length;e++)l=a[e].removeFromSet(l);for(let e=0;e<s.length;e++)c=s[e].removeFromSet(c);if(1==l.length&&0==c.length)r=l[0],n="add",i=e=>e.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",i=e=>e.mark(r.removeFromSet(e.marks))}let u=[];for(let e=0;e<t.childCount;e++)u.push(i(t.child(e)));if(o.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()))))O=e.state.tr,"add"==T.type?O.addMark(_,R,T.mark):O.removeMark(_,R,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,t))))return;O=e.state.tr.insertText(t,_,R)}if(O||(O=e.state.tr.replace(_,R,f.doc.slice(v.start-f.from,v.endB-f.from))),f.sel){let t=on(e,O.doc,f.sel);t&&!(E&&N&&e.composing&&t.empty&&(v.start!=v.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==_||t.head==O.mapping.map(R)-1)||k&&t.empty&&t.head==_)&&O.setSelection(t)}A&&O.ensureMarks(A),a&&O.setMeta("composition",a),e.dispatch(O.scrollIntoView())}(this,e,t,n,i))),this.domObserver.start(),function(e){for(let t in st){let n=st[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!ft(e,t)||dt(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(dn),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,o=!1;e.storedMarks&&this.composing&&(Mt(this),o=!0),this.state=e;let i=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(i||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=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)}(i||t.handleDOMEvents!=this._props.handleDOMEvents)&&ht(this),this.editable=un(this),cn(this);let s=Gt(this),a=ln(this),l=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(e.doc,a,s);!c&&e.selection.eq(n.selection)||(o=!0);let h="preserve"==l&&o&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(i,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=o-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:z(e.dom)}}(this);if(o){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):(Re(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 o=this.directPlugins[r].props[e];if(null!=o&&(n=t?t(o):o))return n}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let i=o[r].props[e];if(null!=i&&(n=t?t(i):i))return n}}hasFocus(){if(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 J(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){return te==t&&ne==n?re:(te=t,ne=n,re="up"==n||"down"==n?function(e,t,n){let r=t.selection,o="up"==n?r.$from:r.$to;return Z(e,t,(()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=J(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=c(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return ee.test(r.parent.textContent)&&a.modify?Z(e,t,(()=>{let{focusNode:t,focusOffset:o,anchorNode:i,anchorOffset:s}=e.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:h}=e.domSelectionRange(),d=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&o==h;try{a.collapse(i,s),t&&(t!=i||o!=s)&&a.extend&&a.extend(t,o)}catch(e){}return null!=l&&(a.caretBidiLevel=l),d})):"left"==n||"backward"==n?i: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,[],Gt(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){dt(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,o=t.startOffset,i=t.endContainer,s=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return u(a.node,a.offset,i,s)&&([r,o,i,s]=[i,s,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function ln(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),t.translate||(t.translate="no"),[Lt.node(0,e.state.doc.content.size,t)]}function cn(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Lt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function un(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function 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 dn(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 o(){return(o=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 i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}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(),o=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((o.pageX-(r.left+c(e).pageXOffset))/r.width),top:a((o.pageY-(r.top+c(e).pageYOffset))/r.height)}},h=function(e){!l(e)&&e.preventDefault()},d=r.memo((function(e){var t=e.onMove,n=e.onKey,a=i(e,["onMove","onKey"]),d=(0,r.useRef)(null),f=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)&&d.current?f(u(d.current,e,m.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=g.current,o=c(d.current),i=n?o.addEventListener:o.removeEventListener;i(r?"touchmove":"mousemove",e),i(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=d.current;if(r&&(h(t),!function(e,t){return t&&!l(e)}(t,g.current)&&r)){if(l(t)){g.current=!0;var o=t.changedTouches||[];o.length&&(m.current=o[0].identifier)}r.focus(),f(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,f]),v=y[0],b=y[1],w=y[2];return(0,r.useEffect)((function(){return w}),[w]),r.createElement("div",o({},a,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:d,onKeyDown:b,tabIndex:0,role:"slider"}))})),f=function(e){return e.filter(Boolean).join(" ")},p=function(e){var t=e.color,n=e.left,o=e.top,i=void 0===o?.5:o,s=f(["react-colorful__pointer",e.className]);return r.createElement("div",{className:s,style:{top:100*i+"%",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,o=(200-t)*n/100;return{h:m(e.h),s:m(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:m(o/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,o=f(["react-colorful__hue",e.className]);return r.createElement("div",{className:o},r.createElement(d,{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,o={backgroundColor:y({h:t.h,s:100,v:100,a:1})};return r.createElement("div",{className:"react-colorful__saturation",style:o},r.createElement(d,{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 o=s(n),i=(0,r.useState)((function(){return e.toHsva(t)})),a=i[0],l=i[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},o(t))}),[a,e,o]);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,M=function(e){var t=e.className,n=e.hsva,o=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+v(Object.assign({},n,{a:0}))+", "+v(Object.assign({},n,{a:1}))+")"},s=f(["react-colorful__alpha",t]),l=m(100*n.a);return r.createElement("div",{className:s},r.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),r.createElement(d,{onMove:function(e){o({a:e.left})},onKey:function(e){o({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)})))},O=function(e){var t,s=e.className,a=e.colorModel,l=e.color,c=void 0===l?a.defaultColor:l,u=e.onChange,h=i(e,["className","colorModel","color","onChange"]),d=(0,r.useRef)(null);t=d,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 o=n.nc;o&&r.setAttribute("nonce",o),e.head.appendChild(r)}}),[]);var p=S(a,c,u),m=p[0],g=p[1],y=f(["react-colorful",s]);return r.createElement("div",o({},h,{ref:d,className:y}),r.createElement(w,{hsva:m,onChange:g}),r.createElement(b,{hue:m.h,onChange:g}),r.createElement(M,{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,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:m(60*(a<0?a+6:a)),s:m(i?s/i*100:0),v:m(i/255*100),a:o}},fromHsva:function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%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(o,2)}},equal:x},A=function(e){return r.createElement(O,o({},e,{colorModel:E}))}},2960:(e,t,n)=>{"use strict";n.d(t,{_W:()=>Et});var r={};n.r(r),n.d(r,{Button:()=>le,CaptionLabel:()=>ce,Chevron:()=>ue,Day:()=>he,DayButton:()=>de,Dropdown:()=>fe,DropdownNav:()=>pe,Footer:()=>me,Month:()=>ge,MonthCaption:()=>ye,MonthGrid:()=>ve,Months:()=>be,MonthsDropdown:()=>Se,Nav:()=>ke,NextMonthButton:()=>Ce,Option:()=>Me,PreviousMonthButton:()=>Oe,Root:()=>Ee,Select:()=>Ae,Week:()=>Te,WeekNumber:()=>Re,WeekNumberHeader:()=>Ne,Weekday:()=>De,Weekdays:()=>_e,Weeks:()=>Pe,YearsDropdown:()=>Ie});var o={};n.r(o),n.d(o,{formatCaption:()=>je,formatDay:()=>Be,formatMonthCaption:()=>Fe,formatMonthDropdown:()=>ze,formatWeekNumber:()=>$e,formatWeekNumberHeader:()=>He,formatWeekdayName:()=>We,formatYearCaption:()=>Ve,formatYearDropdown:()=>Ue});var i={};n.r(i),n.d(i,{labelCaption:()=>rt,labelDay:()=>st,labelDayButton:()=>it,labelGrid:()=>nt,labelGridcell:()=>ot,labelMonthDropdown:()=>lt,labelNav:()=>at,labelNext:()=>ct,labelPrevious:()=>ut,labelWeekNumber:()=>dt,labelWeekNumberHeader:()=>ft,labelWeekday:()=>ht,labelYearDropdown:()=>pt});var s,a,l,c=n(7294);!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(s||(s={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(a||(a={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(l||(l={})),Math.pow(10,8);const u=6048e5,h=864e5,d=Symbol.for("constructDateFrom");function f(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&d in e?e[d](t):e instanceof Date?new e.constructor(t):new Date(t)}function p(e,t){return f(t||e,e)}function m(e,t,n){const r=p(e,n?.in);return isNaN(t)?f(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function g(e,t,n){const r=p(e,n?.in);if(isNaN(t))return f(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),i=f(n?.in||e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function y(e){const t=p(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function v(e,...t){const n=f.bind(null,e||t.find((e=>"object"==typeof e)));return t.map(n)}function b(e,t){const n=p(e,t?.in);return n.setHours(0,0,0,0),n}function w(e,t,n){const[r,o]=v(n?.in,e,t),i=b(r),s=b(o),a=+i-y(i),l=+s-y(s);return Math.round((a-l)/h)}let x={};function S(){return x}function k(e,t){const n=S(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=p(e,t?.in),i=o.getDay(),s=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const C={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function M(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const O={date:M({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:M({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:M({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},E={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function A(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function T(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?function(e,t){for(let t=0;t<e.length;t++)if(e[t].test(s))return t}(a):function(e,t){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(s))return t}(a);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(s.length)}}}var D;const _={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=C[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:O,formatRelative:(e,t,n,r)=>E[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:A({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:A({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:A({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:A({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:A({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(D={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(D.matchPattern);if(!n)return null;const r=n[0],o=e.match(D.parsePattern);if(!o)return null;let i=D.valueCallback?D.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:T({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:T({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:T({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:T({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:T({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function R(e,t){const n=p(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function N(e,t){const n=S(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=p(e,t?.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function P(e,t){return N(e,{...t,weekStartsOn:1})}function I(e,t){const n=p(e,t?.in),r=n.getFullYear(),o=f(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=P(o),s=f(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=P(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function L(e,t){const n=p(e,t?.in),r=+P(n)-+function(e,t){const n=I(e,t),r=f(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),P(r)}(n);return Math.round(r/u)+1}function j(e,t){const n=p(e,t?.in),r=n.getFullYear(),o=S(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=f(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=N(s,t),l=f(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=N(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function F(e,t){const n=p(e,t?.in),r=+N(n,t)-+function(e,t){const n=S(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=j(e,t),i=f(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),N(i,t)}(n,t);return Math.round(r/u)+1}function B(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const z={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return B("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):B(n+1,2)},d:(e,t)=>B(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>B(e.getHours()%12||12,t.length),H:(e,t)=>B(e.getHours(),t.length),m:(e,t)=>B(e.getMinutes(),t.length),s:(e,t)=>B(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return B(Math.trunc(r*Math.pow(10,n-3)),t.length)}},$={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return z.y(e,t)},Y:function(e,t,n,r){const o=j(e,r),i=o>0?o:1-o;return"YY"===t?B(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):B(i,t.length)},R:function(e,t){return B(I(e),t.length)},u:function(e,t){return B(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return B(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return B(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return z.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return B(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=F(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):B(o,t.length)},I:function(e,t,n){const r=L(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):B(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):z.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=p(e,t?.in);return w(n,R(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):B(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return B(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return B(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return B(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return z.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):z.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):B(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):B(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):z.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):z.s(e,t)},S:function(e,t){return z.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return W(r);case"XXXX":case"XX":return U(r);default:return U(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return W(r);case"xxxx":case"xx":return U(r);default:return U(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+H(r,":");default:return"GMT"+U(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+H(r,":");default:return"GMT"+U(r,":")}},t:function(e,t,n){return B(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return B(+e,t.length)}};function H(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+B(i,2)}function W(e,t){return e%60==0?(e>0?"-":"+")+B(Math.abs(e)/60,2):U(e,t)}function U(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+B(Math.trunc(r/60),2)+t+B(r%60,2)}const V=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},q=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},K={p:q,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return V(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",V(r,t)).replace("{{time}}",q(o,t))}},Y=/^D+$/,G=/^Y+$/,J=["D","DD","YY","YYYY"];function Q(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}const X=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Z=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ee=/^'([^]*?)'?$/,te=/''/g,ne=/[a-zA-Z]/;function re(e,t,n){const r=S(),o=n?.locale??r.locale??_,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=p(e,n?.in);if(!function(e){return!(!Q(e)&&"number"!=typeof e||isNaN(+p(e)))}(a))throw new RangeError("Invalid time value");let l=t.match(Z).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,K[t])(e,o.formatLong):e})).join("").match(X).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:oe(e)};if($[t])return{isToken:!0,value:e};if(t.match(ne))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return G.test(e)}(i)||!n?.useAdditionalDayOfYearTokens&&function(e){return Y.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),J.includes(e))throw new RangeError(r)}(i,t,String(e)),(0,$[i[0]])(a,i,o.localize,c)})).join("")}function oe(e){const t=e.match(ee);return t?t[1].replace(te,"'"):e}function ie(e,t,n){const r=p(e,n?.in),o=r.getFullYear(),i=r.getDate(),s=f(n?.in||e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const a=function(e,t){const n=p(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=f(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}(s);return r.setMonth(t,Math.min(i,a)),r}class se{constructor(e,t){this.Date=Date,this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):m(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):g(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return m(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,n){return g(e,12*t,n)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):w(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t,n){const[r,o]=v(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}(e,t),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return k(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const n=p(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e),this.endOfWeek=e=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,this.options):k(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=p(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e),this.format=(e,t)=>this.overrides?.format?this.overrides.format(e,t,this.options):re(e,t,this.options),this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):L(e),this.getWeek=e=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):F(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):function(e,t){return+p(e)>+p(t)}(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):function(e,t){return+p(e)<+p(t)}(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):Q(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t,n){const[r,o]=v(n?.in,e,t);return+b(r)==+b(o)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t,n){const[r,o]=v(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t,n){const[r,o]=v(n?.in,e,t);return r.getFullYear()===o.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=f.bind(null,e));const t=p(e,r);(!n||n<t||isNaN(+t))&&(n=t)})),f(r,n||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=f.bind(null,e));const t=p(e,r);(!n||n>t||isNaN(+t))&&(n=t)})),f(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):ie(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const r=p(e,n?.in);return isNaN(+r)?f(n?.in||e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):b(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):P(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const n=p(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e),this.startOfWeek=e=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):N(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):R(e),this.options={locale:_,...e},this.overrides=t}}const ae=new se;function le(e){return c.createElement("button",{...e})}function ce(e){return c.createElement("span",{...e})}function ue(e){const{size:t=24,orientation:n="left",className:r}=e;return c.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&c.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&c.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&c.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&c.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))}function he(e){const{day:t,modifiers:n,...r}=e;return c.createElement("td",{...r})}function de(e){const{day:t,modifiers:n,...r}=e,o=c.useRef(null);return c.useEffect((()=>{n.focused&&o.current?.focus()}),[n.focused]),c.createElement("button",{ref:o,...r})}function fe(e){const{options:t,className:n,components:r,classNames:o,...i}=e,a=[o[s.Dropdown],n].join(" "),l=t?.find((({value:e})=>e===i.value));return c.createElement("span",{"data-disabled":i.disabled,className:o[s.DropdownRoot]},c.createElement(r.Select,{className:a,...i},t?.map((({value:e,label:t,disabled:n})=>c.createElement(r.Option,{key:e,value:e,disabled:n},t)))),c.createElement("span",{className:o[s.CaptionLabel],"aria-hidden":!0},l?.label,c.createElement(r.Chevron,{orientation:"down",size:18,className:o[s.Chevron]})))}function pe(e){return c.createElement("div",{...e})}function me(e){return c.createElement("div",{...e})}function ge(e){const{calendarMonth:t,displayIndex:n,...r}=e;return c.createElement("div",{...r},e.children)}function ye(e){const{calendarMonth:t,displayIndex:n,...r}=e;return c.createElement("div",{...r})}function ve(e){return c.createElement("table",{...e})}function be(e){return c.createElement("div",{...e})}const we=(0,c.createContext)(void 0);function xe(){const e=(0,c.useContext)(we);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}function Se(e){const{components:t}=xe();return c.createElement(t.Dropdown,{...e})}function ke(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:a,classNames:l,labels:{labelPrevious:u,labelNext:h}}=xe();return c.createElement("nav",{...i},c.createElement(a.PreviousMonthButton,{type:"button",className:l[s.PreviousMonthButton],tabIndex:r?void 0:-1,disabled:!r||void 0,"aria-label":u(r),onClick:e.onPreviousClick},c.createElement(a.Chevron,{disabled:!r||void 0,className:l[s.Chevron],orientation:"left"})),c.createElement(a.NextMonthButton,{type:"button",className:l[s.NextMonthButton],tabIndex:o?void 0:-1,disabled:!o||void 0,"aria-label":h(o),onClick:e.onNextClick},c.createElement(a.Chevron,{disabled:!o||void 0,orientation:"right",className:l[s.Chevron]})))}function Ce(e){const{components:t}=xe();return c.createElement(t.Button,{...e})}function Me(e){return c.createElement("option",{...e})}function Oe(e){const{components:t}=xe();return c.createElement(t.Button,{...e})}function Ee(e){return c.createElement("div",{...e})}function Ae(e){return c.createElement("select",{...e})}function Te(e){const{week:t,...n}=e;return c.createElement("tr",{...n})}function De(e){return c.createElement("th",{...e})}function _e(e){return c.createElement("thead",null,c.createElement("tr",{...e}))}function Re(e){const{week:t,...n}=e;return c.createElement("th",{...n})}function Ne(e){return c.createElement("th",{...e})}function Pe(e){return c.createElement("tbody",{...e})}function Ie(e){const{components:t}=xe();return c.createElement(t.Dropdown,{...e})}function Le(){const e={};for(const t in s)e[s[t]]=`rdp-${s[t]}`;for(const t in a)e[a[t]]=`rdp-${a[t]}`;for(const t in l)e[l[t]]=`rdp-${l[t]}`;return e}function je(e,t,n){return(n??new se(t)).format(e,"LLLL y")}const Fe=je;function Be(e,t,n){return(n??new se(t)).format(e,"d")}function ze(e,t=_){return t.localize?.month(e)}function $e(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function He(){return""}function We(e,t,n){return(n??new se(t)).format(e,"cccccc")}function Ue(e){return e.toString()}const Ve=Ue;Symbol.for("constructDateFrom");const qe={},Ke={};function Ye(e,t){try{const n=(qe[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return n in Ke?Ke[n]:Je(n,n.split(":"))}catch{if(e in Ke)return Ke[e];const t=e?.match(Ge);return t?Je(e,t.slice(1)):NaN}}const Ge=/([+-]\d\d):?(\d\d)?/;function Je(e,t){const n=+t[0],r=+(t[1]||0);return Ke[e]=n>0?60*n+r:60*n-r}class Qe extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Ye(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),et(this),Ze(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Qe(...t,e):new Qe(Date.now(),e)}withTimeZone(e){return new Qe(+this,e)}getTimezoneOffset(){return-Ye(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Ze(this),+this}[Symbol.for("constructDateFrom")](e){return new Qe(+new Date(e),this.timeZone)}}const Xe=/^(get|set)(?!UTC)/;function Ze(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function et(e){const t=Ye(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=r- -new Date(+n).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const a=Ye(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-a-s;if(a!==t&&l){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const t=a-Ye(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!Xe.test(e))return;const t=e.replace(Xe,"$1UTC");Qe.prototype[t]&&(e.startsWith("get")?Qe.prototype[e]=function(){return this.internal[t]()}:(Qe.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),et(e),+this},Qe.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ze(this),+this}))}));class tt extends Qe{static tz(e,...t){return t.length?new tt(...t,e):new tt(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${o=this.timeZone,i=this,new Intl.DateTimeFormat("en-GB",{timeZone:o,timeZoneName:"long"}).format(i).slice(12)})`;var o,i}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new tt(+this,e)}[Symbol.for("constructDateFrom")](e){return new tt(+new Date(e),this.timeZone)}}function nt(e,t,n){return(n??new se(t)).format(e,"LLLL y")}const rt=nt;function ot(e,t,n,r){let o=(r??new se(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function it(e,t,n,r){let o=(r??new se(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const st=it;function at(){return""}function lt(e){return"Choose the Month"}function ct(e){return"Go to the Next Month"}function ut(e){return"Go to the Previous Month"}function ht(e,t,n){return(n??new se(t)).format(e,"cccc")}function dt(e,t){return`Week ${e}`}function ft(e){return"Week Number"}function pt(e){return"Choose the Year"}const mt=42;function gt(e,t){const{month:n,defaultMonth:r,today:o=(e.timeZone?tt.tz(e.timeZone):t.Date?new t.Date:new Date),numberOfMonths:i=1,endMonth:s,startMonth:a}=e;let l=n||r||o;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:h}=t;return s&&c(s,l)<0&&(l=u(s,-1*(i-1))),a&&c(l,a)<0&&(l=a),h(l)}class yt{constructor(e,t,n=ae){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class vt{constructor(e,t){this.date=e,this.weeks=t}}class bt{constructor(e,t){this.days=t,this.weekNumber=e}}function wt(e,t){const[n,r]=(0,c.useState)(e);return[void 0===t?n:t,r]}function xt(e,t,n=!1,r=ae){let{from:o,to:i}=e;const{differenceInCalendarDays:s,isSameDay:a}=r;return o&&i?(s(i,o)<0&&([o,i]=[i,o]),s(t,o)>=(n?1:0)&&s(i,t)>=(n?1:0)):!n&&i?a(i,t):!(n||!o)&&a(o,t)}function St(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function kt(e,t,n=ae){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:s}=n;return r.some((t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(function(e,t){return Array.isArray(e)&&e.every(t.isDate)}(t,n))return t.includes(e);if(St(t))return xt(t,e,!1,n);if(r=t,Boolean(r&&"object"==typeof r&&"dayOfWeek"in r))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();var r;if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){const n=i(t.before,e)>0,r=i(t.after,e)<0;return s(t.before,t.after)?r&&n:n||r}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?i(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?i(t.before,e)>0:"function"==typeof t&&t(e)}))}function Ct(e,t,n,r,o,i,s,a=0){if(a>365)return;const l=function(e,t,n,r,o,i,s){const{ISOWeek:a}=i,{addDays:l,addMonths:c,addYears:u,addWeeks:h,startOfISOWeek:d,endOfISOWeek:f,startOfWeek:p,endOfWeek:m,max:g,min:y}=s;let v={day:l,week:h,month:c,year:u,startOfWeek:e=>a?d(e):p(e),endOfWeek:e=>a?f(e):m(e)}[e](n,"after"===t?1:-1);return"before"===t&&r?v=g([r,v]):"after"===t&&o&&(v=y([o,v])),v}(e,t,n.date,r,o,i,s),c=Boolean(i.disabled&&kt(l,i.disabled,s)),u=Boolean(i.hidden&&kt(l,i.hidden,s)),h=new yt(l,l,s);return c||u?Ct(e,t,h,r,o,i,s,a+1):h}function Mt(e,t,n,r,o){const{autoFocus:i}=e,[s,l]=(0,c.useState)(),u=function(e,t,n,r){let o,i=0,s=!1;for(;i<e.length&&!s;){const l=e[i],c=t(l);c[a.disabled]||c[a.hidden]||c[a.outside]||(c[a.focused]||r?.isEqualTo(l)||n(l.date)||c[a.today])&&(o=l,s=!0),i++}return o||(o=e.find((e=>{const n=t(e);return!n[a.disabled]&&!n[a.hidden]&&!n[a.outside]}))),o}(t.days,n,r||(()=>!1),s),[h,d]=(0,c.useState)(i?u:void 0);return{isFocusTarget:e=>Boolean(u?.isEqualTo(e)),setFocused:d,focused:h,blur:()=>{l(h),d(void 0)},moveFocus:(n,r)=>{if(!h)return;const i=Ct(n,r,h,t.navStart,t.navEnd,e,o);i&&(t.goToDay(i),d(i))}}}function Ot(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,s]=wt(n,o?n:void 0),a=o?n:i,{isSameDay:l}=t;return{selected:a,select:(e,t,n)=>{let i=e;return!r&&a&&a&&l(e,a)&&(i=void 0),o||s(i),o?.(i,e,t,n),i},isSelected:e=>!!a&&l(a,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,s]=wt(n,o?n:void 0),a=o?n:i,{isSameDay:l}=t,c=e=>a?.some((t=>l(t,e)))??!1,{min:u,max:h}=e;return{selected:a,select:(e,t,n)=>{let i=[...a??[]];if(c(e)){if(a?.length===u)return;if(r&&1===a?.length)return;i=a?.filter((t=>!l(t,e)))}else i=a?.length===h?[e]:[...i,e];return o||s(i),o?.(i,e,t,n),i},isSelected:c}}(e,t),o=function(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:i,onSelect:s}=e,[a,l]=wt(o,s?o:void 0),c=s?o:a;return{selected:c,select:(o,a,u)=>{const{min:h,max:d}=e,f=o?function(e,t,n=0,r=0,o=!1,i=ae){const{from:s,to:a}=t||{},{isSameDay:l,isAfter:c,isBefore:u}=i;let h;if(s||a){if(s&&!a)h=l(s,e)?o?{from:s,to:void 0}:void 0:u(e,s)?{from:e,to:s}:{from:s,to:e};else if(s&&a)if(l(s,e)&&l(a,e))h=o?{from:s,to:a}:void 0;else if(l(s,e))h={from:s,to:n>0?void 0:e};else if(l(a,e))h={from:e,to:n>0?void 0:e};else if(u(e,s))h={from:e,to:a};else if(c(e,s))h={from:s,to:e};else{if(!c(e,a))throw new Error("Invalid range");h={from:s,to:e}}}else h={from:e,to:n>0?void 0:e};if(h?.from&&h?.to){const t=i.differenceInCalendarDays(h.to,h.from);(r>0&&t>r||n>1&&t<n)&&(h={from:e,to:void 0})}return h}(o,c,h,d,i,t):void 0;if(f?.from&&f.to){let e=f.from;const i=t.differenceInCalendarDays(f.to,e);for(let s=0;s<i;s++)if(e=t.addDays(e,1),r&&n&&kt(e,n,t)){f.from=o,f.to=void 0;break}}return s||l(f),s?.(f,o,a,u),f},isSelected:e=>c&&xt(c,e,!1,t)}}(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Et(e){const{components:t,formatters:n,labels:u,dateLib:h,locale:d,classNames:f}=(0,c.useMemo)((()=>{const t={..._,...e.locale};return{dateLib:new se({locale:t,weekStartsOn:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens},e.dateLib),components:(s=e.components,{...r,...s}),formatters:(n=e.formatters,n?.formatMonthCaption&&!n.formatCaption&&(n.formatCaption=n.formatMonthCaption),n?.formatYearCaption&&!n.formatYearDropdown&&(n.formatYearDropdown=n.formatYearCaption),{...o,...n}),labels:{...i,...e.labels},locale:t,classNames:{...Le(),...e.classNames}};var n,s}),[e.classNames,e.components,e.dateLib,e.firstWeekContainsDate,e.formatters,e.labels,e.locale,e.useAdditionalDayOfYearTokens,e.useAdditionalWeekYearTokens,e.weekStartsOn]),{captionLayout:p,mode:m,onDayBlur:g,onDayClick:y,onDayFocus:v,onDayKeyDown:b,onDayMouseEnter:w,onDayMouseLeave:x,onNextClick:S,onPrevClick:k,showWeekNumber:C,styles:M}=e,{formatCaption:O,formatDay:E,formatMonthDropdown:A,formatWeekNumber:T,formatWeekNumberHeader:D,formatWeekdayName:R,formatYearDropdown:N}=n,P=function(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:s,endOfMonth:a,addYears:l,endOfYear:c}=t,{fromYear:u,toYear:h,fromMonth:d,toMonth:f}=e;!n&&d&&(n=d),!n&&u&&(n=new Date(u,0,1)),!r&&f&&(r=f),!r&&h&&(r=new Date(h,11,31));const p=e.captionLayout?.startsWith("dropdown");return n?n=s(n):u?n=new Date(u,0,1):!n&&p&&(n=o(l(e.today??(e.timeZone?tt.tz(e.timeZone):t.Date?new t.Date:new Date),-100))),r?r=a(r):h?r=new Date(h,11,31):!r&&p&&(r=c(e.today??(e.timeZone?tt.tz(e.timeZone):t.Date?new t.Date:new Date))),[n?i(n):n,r?i(r):r]}(e,t),{startOfMonth:o,endOfMonth:i}=t,s=gt(e,t),[a,l]=wt(s,e.month?o(e.month):void 0);(0,c.useEffect)((()=>{const n=gt(e,t);l(n)}),[e.timeZone]);const u=function(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;i.push(o)}return i}(a,r,e,t),h=function(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:s,fixedWeeks:a}=n??{},{startOfWeek:l,endOfWeek:c,startOfISOWeek:u,endOfISOWeek:h,addDays:d,differenceInCalendarDays:f,differenceInCalendarMonths:p,isAfter:m,endOfMonth:g}=r,y=s?u(o):l(o),v=f(s?h(g(i)):c(g(i)),y),b=p(i,o)+1,w=[];for(let e=0;e<=v;e++){const n=d(y,e);if(t&&m(n,t))break;w.push(n)}const x=mt*b;if(a&&w.length<x)for(let e=0;e<7;e++){const e=d(w[w.length-1],1);w.push(e)}return w}(u,e.endMonth?i(e.endMonth):void 0,e,t),d=function(e,t,n,r){const{startOfWeek:o,endOfWeek:i,startOfISOWeek:s,endOfISOWeek:a,endOfMonth:l,addDays:c,getWeek:u,getISOWeek:h}=r,d=e.reduce(((e,d)=>{const f=n.ISOWeek?s(d):o(d),p=n.ISOWeek?a(l(d)):i(l(d)),m=t.filter((e=>e>=f&&e<=p));if(n.fixedWeeks&&m.length<42){const e=t.filter((e=>e>p&&e<=c(p,7)));m.push(...e)}const g=m.reduce(((e,t)=>{const o=n.ISOWeek?h(t):u(t),i=e.find((e=>e.weekNumber===o)),s=new yt(t,d,r);return i?i.days.push(s):e.push(new bt(o,[s])),e}),[]),y=new vt(d,g);return e.push(y),e}),[]);return n.reverseMonths?d.reverse():d}(u,h,e,t),f=function(e){return e.reduce(((e,t)=>[...e,...t.weeks]),[])}(d),p=d.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]),m=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:s,addMonths:a,differenceInCalendarMonths:l}=r,c=o?i??1:1,u=s(e);return t&&l(u,t)<=0?void 0:a(u,-c)}(a,n,e,t),g=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:s,addMonths:a,differenceInCalendarMonths:l}=r,c=o?i:1,u=s(e);return t&&l(t,e)<i?void 0:a(u,c)}(a,r,e,t),{disableNavigation:y,onMonthChange:v}=e,b=e=>{if(y)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),l(t),v?.(t)};return{months:d,weeks:f,days:p,navStart:n,navEnd:r,previousMonth:m,nextMonth:g,goToMonth:b,goToDay:e=>{(e=>f.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||b(e.date)}}}(e,h),{days:I,months:L,navStart:j,navEnd:F,previousMonth:B,nextMonth:z,goToMonth:$}=P,H=function(e,t,n){const{disabled:r,hidden:o,modifiers:i,showOutsideDays:s,today:c}=t,{isSameDay:u,isSameMonth:h}=n,d={[a.focused]:[],[a.outside]:[],[a.disabled]:[],[a.hidden]:[],[a.today]:[]},f={},p={[l.range_end]:[],[l.range_middle]:[],[l.range_start]:[],[l.selected]:[]};for(const a of e){const{date:e,displayMonth:l}=a,p=Boolean(l&&!h(e,l)),m=Boolean(r&&kt(e,r,n)),g=Boolean(o&&kt(e,o,n))||!s&&p,y=u(e,c??(t.timeZone?tt.tz(t.timeZone):n.Date?new n.Date:new Date));p&&d.outside.push(a),m&&d.disabled.push(a),g&&d.hidden.push(a),y&&d.today.push(a),i&&Object.keys(i).forEach((t=>{const r=i?.[t];r&&kt(e,r,n)&&(f[t]?f[t].push(a):f[t]=[a])}))}return e=>{const t={[a.focused]:!1,[a.disabled]:!1,[a.hidden]:!1,[a.outside]:!1,[a.today]:!1},n={[l.range_end]:!1,[l.range_middle]:!1,[l.range_start]:!1,[l.selected]:!1},r={};for(const n in d){const r=d[n];t[n]=r.some((t=>t===e))}for(const t in p){const r=p[t];n[t]=r.some((t=>t===e))}for(const t in f)r[t]=f[t].some((t=>t===e));return{...n,...t,...r}}}(I,e,h),{isSelected:W,select:U,selected:V}=Ot(e,h)??{},{blur:q,focused:K,isFocusTarget:Y,moveFocus:G,setFocused:J}=Mt(e,P,H,W??(()=>!1),h),{labelDayButton:Q,labelGridcell:X,labelGrid:Z,labelMonthDropdown:ee,labelNav:te,labelWeekday:ne,labelWeekNumber:re,labelWeekNumberHeader:oe,labelYearDropdown:ie}=u,ae=(0,c.useMemo)((()=>function(e,t,n){const r=n?tt.tz(n):e.Date?new e.Date:new Date,o=t?e.startOfISOWeek(r):e.startOfWeek(r),i=[];for(let t=0;t<7;t++){const n=e.addDays(o,t);i.push(n)}return i}(h,e.ISOWeek,e.timeZone)),[h,e.ISOWeek,e.timeZone]),le=void 0!==m||void 0!==y,ce=(0,c.useCallback)((()=>{B&&($(B),k?.(B))}),[B,$,k]),ue=(0,c.useCallback)((()=>{z&&($(z),S?.(z))}),[$,z,S]),he=(0,c.useCallback)(((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),J(e),U?.(e.date,t,n),y?.(e.date,t,n)}),[U,y,J]),de=(0,c.useCallback)(((e,t)=>n=>{J(e),v?.(e.date,t,n)}),[v,J]),fe=(0,c.useCallback)(((e,t)=>n=>{q(),g?.(e.date,t,n)}),[q,g]),pe=(0,c.useCallback)(((t,n)=>r=>{const o={ArrowLeft:["day","rtl"===e.dir?"after":"before"],ArrowRight:["day","rtl"===e.dir?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[r.shiftKey?"year":"month","before"],PageDown:[r.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[r.key]){r.preventDefault(),r.stopPropagation();const[e,t]=o[r.key];G(e,t)}b?.(t.date,n,r)}),[G,b,e.dir]),me=(0,c.useCallback)(((e,t)=>n=>{w?.(e.date,t,n)}),[w]),ge=(0,c.useCallback)(((e,t)=>n=>{x?.(e.date,t,n)}),[x]),{className:ye,style:ve}=(0,c.useMemo)((()=>({className:[f[s.Root],e.className].filter(Boolean).join(" "),style:{...M?.[s.Root],...e.style}})),[f,e.className,e.style,M]),be=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0};return Object.entries(e).forEach((([e,n])=>{e.startsWith("data-")&&(t[e]=n)})),t}(e),xe={selected:V,select:U,isSelected:W,months:L,nextMonth:z,previousMonth:B,goToMonth:$,getModifiers:H,components:t,classNames:f,styles:M,labels:u,formatters:n};return c.createElement(we.Provider,{value:xe},c.createElement(t.Root,{className:ye,style:ve,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,...be},c.createElement(t.Months,{className:f[s.Months],style:M?.[s.Months]},!e.hideNavigation&&c.createElement(t.Nav,{className:f[s.Nav],style:M?.[s.Nav],"aria-label":te(),onPreviousClick:ce,onNextClick:ue,previousMonth:B,nextMonth:z}),L.map(((r,o)=>{const i=function(e,t,n,r,o){if(!t)return;if(!n)return;const{addMonths:i,startOfMonth:s,isBefore:a}=o,l=e.getFullYear(),c=[];let u=t;for(;c.length<12&&a(u,i(n,1));)c.push(u.getMonth()),u=i(u,1);const h=c.sort(((e,t)=>e-t)).map((e=>{const i=r.formatMonthDropdown(e,o.options.locale),a=o.Date?new o.Date(l,e):new Date(l,e);return{value:e,label:i,disabled:t&&a<s(t)||n&&a>s(n)||!1}}));return h}(r.date,j,F,n,h),u=function(e,t,n,r,o){if(!t)return;if(!n)return;const{startOfMonth:i,startOfYear:s,endOfYear:a,addYears:l,isBefore:c,isSameYear:u}=o,h=e.getMonth(),d=s(t),f=a(n),p=[];let m=d;for(;c(m,f)||u(m,f);)p.push(m.getFullYear()),m=l(m,1);return p.map((e=>{const s=o.Date?new o.Date(e,h):new Date(e,h),a=t&&s<i(t)||h&&n&&s>i(n)||!1;return{value:e,label:r.formatYearDropdown(e),disabled:a}}))}(L[0].date,j,F,n,h);return c.createElement(t.Month,{className:f[s.Month],style:M?.[s.Month],key:o,displayIndex:o,calendarMonth:r},c.createElement(t.MonthCaption,{className:f[s.MonthCaption],style:M?.[s.MonthCaption],calendarMonth:r,displayIndex:o},p?.startsWith("dropdown")?c.createElement(t.DropdownNav,{className:f[s.Dropdowns],style:M?.[s.Dropdowns]},"dropdown"===p||"dropdown-months"===p?c.createElement(t.MonthsDropdown,{className:f[s.MonthsDropdown],"aria-label":ee(),classNames:f,components:t,disabled:Boolean(e.disableNavigation),onChange:e=>{const t=Number(e.target.value),n=h.setMonth(h.startOfMonth(r.date),t);$(n)},options:i,style:M?.[s.Dropdown],value:r.date.getMonth()}):c.createElement("span",{role:"status","aria-live":"polite"},A(r.date.getMonth(),d)),"dropdown"===p||"dropdown-years"===p?c.createElement(t.YearsDropdown,{className:f[s.YearsDropdown],"aria-label":ie(h.options),classNames:f,components:t,disabled:Boolean(e.disableNavigation),onChange:e=>{const t=h.setYear(h.startOfMonth(r.date),Number(e.target.value));$(t)},options:u,style:M?.[s.Dropdown],value:r.date.getFullYear()}):c.createElement("span",{role:"status","aria-live":"polite"},N(r.date.getFullYear()))):c.createElement(t.CaptionLabel,{className:f[s.CaptionLabel],role:"status","aria-live":"polite"},O(r.date,h.options,h))),c.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===m||"range"===m,"aria-label":Z(r.date,h.options,h)||void 0,className:f[s.MonthGrid],style:M?.[s.MonthGrid]},!e.hideWeekdays&&c.createElement(t.Weekdays,{className:f[s.Weekdays],style:M?.[s.Weekdays]},C&&c.createElement(t.WeekNumberHeader,{"aria-label":oe(h.options),className:f[s.WeekNumberHeader],style:M?.[s.WeekNumberHeader],scope:"col"},D()),ae.map(((e,n)=>c.createElement(t.Weekday,{"aria-label":ne(e,h.options,h),className:f[s.Weekday],key:n,style:M?.[s.Weekday],scope:"col"},R(e,h.options,h))))),c.createElement(t.Weeks,{className:f[s.Weeks],style:M?.[s.Weeks]},r.weeks.map(((n,r)=>c.createElement(t.Week,{className:f[s.Week],key:n.weekNumber,style:M?.[s.Week],week:n},C&&c.createElement(t.WeekNumber,{week:n,style:M?.[s.WeekNumber],"aria-label":re(n.weekNumber,{locale:d}),className:f[s.WeekNumber],scope:"row"},T(n.weekNumber)),n.days.map((n=>{const{date:r}=n,o=H(n);if(o[a.focused]=!o.hidden&&Boolean(K?.isEqualTo(n)),o[l.selected]=!o.disabled&&(W?.(r)||o.selected),St(V)){const{from:e,to:t}=V;o[l.range_start]=Boolean(e&&t&&h.isSameDay(r,e)),o[l.range_end]=Boolean(e&&t&&h.isSameDay(r,t)),o[l.range_middle]=xt(V,r,!0,h)}const i=function(e,t={},n={}){let r={...t?.[s.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{r={...r,...n?.[e]}})),r}(o,M,e.modifiersStyles),u=function(e,t,n={}){return Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[r])=>(n[r]?e.push(n[r]):t[a[r]]?e.push(t[a[r]]):t[l[r]]&&e.push(t[l[r]]),e)),[t[s.Day]])}(o,f,e.modifiersClassNames),d=le?void 0:X(r,o,h.options,h);return c.createElement(t.Day,{key:`${h.format(r,"yyyy-MM-dd")}_${h.format(n.displayMonth,"yyyy-MM")}`,day:n,modifiers:o,className:u.join(" "),style:i,"aria-hidden":o.hidden||void 0,"aria-selected":o.selected||void 0,"aria-label":d,"data-day":h.format(r,"yyyy-MM-dd"),"data-month":n.outside?h.format(r,"yyyy-MM"):void 0,"data-selected":o.selected||void 0,"data-disabled":o.disabled||void 0,"data-hidden":o.hidden||void 0,"data-outside":n.outside||void 0,"data-focused":o.focused||void 0,"data-today":o.today||void 0},le?c.createElement(t.DayButton,{className:f[s.DayButton],style:M?.[s.DayButton],type:"button",day:n,modifiers:o,disabled:o.disabled||void 0,tabIndex:Y(n)?0:-1,"aria-label":Q(r,o,h.options,h),onClick:he(n,o),onBlur:fe(n,o),onFocus:de(n,o),onKeyDown:pe(n,o),onMouseEnter:me(n,o),onMouseLeave:ge(n,o)},E(r,h.options,h)):E(n.date,h.options,h))}))))))))}))),e.footer&&c.createElement(t.Footer,{className:f[s.Footer],style:M?.[s.Footer],role:"status","aria-live":"polite"},e.footer)))}},7536:(e,t,n)=>{"use strict";n.d(t,{Dq:()=>pe,Gc:()=>S,Qr:()=>L,RV:()=>k,cI:()=>Ie,qo:()=>R});var r=n(7294),o=e=>"checkbox"===e.type,i=e=>e instanceof Date,s=e=>null==e;const a=e=>"object"==typeof e;var l=e=>!s(e)&&!Array.isArray(e)&&a(e)&&!i(e),c=e=>l(e)&&e.target?o(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")},d="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function f(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(d&&(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]=f(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 o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==v.all&&(t._proxyFormState[o]=!r||v.all),n&&(n[o]=!0),e[o]}});return o},M=e=>l(e)&&!Object.keys(e).length,O=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return M(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).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 D=e=>"string"==typeof e,_=(e,t,n,r,o)=>D(e)?(r&&t.watch.add(e),g(n,e,o)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),g(n,e)))):(r&&(t.watchAll=!0),n);function R(e){const t=S(),{control:n=t.control,name:o,defaultValue:i,disabled:s,exact:a}=e||{},l=r.useRef(o);l.current=o,T({disabled:s,subject:n._subjects.values,next:e=>{A(l.current,e.name,a)&&u(f(_(l.current,n._names,e.values||n._formValues,!1,i)))}});const[c,u]=r.useState(n._getWatch(o,i));return r.useEffect((()=>n._removeUnmounted())),c}var N=e=>/^\w*$/.test(e),P=e=>p(e.replace(/["|']|\]/g,"").split(/\.|\[/));function I(e,t,n){let r=-1;const o=N(t)?[t]:P(t),i=o.length,s=i-1;for(;++r<i;){const t=o[r];let i=n;if(r!==s){const n=e[t];i=l(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}e[t]=i,e=e[t]}return e}const L=e=>e.render(function(e){const t=S(),{name:n,control:o=t.control,shouldUnregister:i}=e,s=u(o._names.array,n),a=R({control:o,name:n,defaultValue:g(o._formValues,n,g(o._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=S(),{control:n=t.control,disabled:o,name:i,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(i);return h.current=i,T({disabled:o,next:e=>c.current&&A(h.current,e.name,s)&&O(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:o,name:n}),h=r.useRef(o.register(n,{...e.rules,value:a}));return r.useEffect((()=>{const e=o._options.shouldUnregister||i,t=(e,t)=>{const n=g(o._fields,e);n&&(n._f.mount=t)};if(t(n,!0),e){const e=f(g(o._options.defaultValues,n));I(o._defaultValues,n,e),m(g(o._formValues,n))&&I(o._formValues,n,e)}return()=>{(s?e&&!o._state.action:e)?o.unregister(n):t(n,!1)}}),[n,o,s,i]),{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(o._formValues,n),name:n},type:y.BLUR})),[n,o]),ref:e=>{const t=g(o._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,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!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))))),W=(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,V=e=>"file"===e.type,q=e=>"function"==typeof e,K=e=>{if(!d)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Y=e=>D(e),G=e=>"radio"===e.type,J=e=>e instanceof RegExp;const Q={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:Q}return Q};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(Y(e)||Array.isArray(e)&&e.every(Y)||U(e)&&!e)return{type:n,message:Y(e)?e:"",ref:t}}var re=e=>l(e)&&!J(e)?e:{value:e,message:""},oe=async(e,t,n,r,i)=>{const{ref:a,refs:c,required:u,maxLength:h,minLength:d,min:f,max:p,pattern:y,validate:v,name:x,valueAsNumber:S,mount:k,disabled:C}=e._f,O=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={},_=G(a),R=o(a),N=_||R,P=(S||V(a))&&m(a.value)&&m(O)||K(a)&&""===a.value||""===O||Array.isArray(O)&&!O.length,I=j.bind(null,x,n,T),L=(e,t,n,r="maxLength",o="minLength")=>{const i=e?t:n;T[x]={type:e?r:o,message:i,ref:a,...I(e?r:o,i)}};if(i?!Array.isArray(O)||!O.length:u&&(!N&&(P||s(O))||U(O)&&!O||R&&!Z(c).isValid||_&&!te(c).isValid)){const{value:e,message:t}=Y(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(!(P||s(f)&&s(p))){let e,t;const r=re(p),o=re(f);if(s(O)||isNaN(O)){const n=a.valueAsDate||new Date(O),i=e=>new Date((new Date).toDateString()+" "+e),s="time"==a.type,l="week"==a.type;D(r.value)&&O&&(e=s?i(O)>i(r.value):l?O>r.value:n>new Date(r.value)),D(o.value)&&O&&(t=s?i(O)<i(o.value):l?O<o.value:n<new Date(o.value))}else{const n=a.valueAsNumber||(O?+O:O);s(r.value)||(e=n>r.value),s(o.value)||(t=n<o.value)}if((e||t)&&(L(!!e,r.message,o.message,"max","min"),!n))return A(T[x].message),T}if((h||d)&&!P&&(D(O)||i&&Array.isArray(O))){const e=re(h),t=re(d),r=!s(e.value)&&O.length>+e.value,o=!s(t.value)&&O.length<+t.value;if((r||o)&&(L(r,e.message,t.message),!n))return A(T[x].message),T}if(y&&!P&&D(O)){const{value:e,message:t}=re(y);if(J(e)&&!O.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(O,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(!M(e)&&!n)break;const o=ne(await v[r](O,t),E,r);o&&(e={...o,...I(r,o.message)},A(o.message),n&&(T[x]=e))}if(!M(e)&&(T[x]={ref:E,...e},!n))return T}return A(!0),T};function ie(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 de(e,t){const n=Array.isArray(t)?t:N(t)?[t]:P(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),o=n.length-1,i=n[o];return r&&delete r[i],0!==o&&(l(r)&&M(r)||Array.isArray(r)&&function(e){for(const t in e)if(!m(e[t]))return!1;return!0}(r))&&de(e,n.slice(0,-1)),e}var fe=(e,t,n)=>(e[t]=n,e);function pe(e){const t=S(),{control:n=t.control,name:o,keyName:i="id",shouldUnregister:s}=e,[a,l]=r.useState(n._getFieldArray(o)),c=r.useRef(n._getFieldArray(o).map(B)),u=r.useRef(a),h=r.useRef(o),d=r.useRef(!1);h.current=o,u.current=a,n._names.array.add(o),e.rules&&n.register(o,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=>{d.current=!0,n._updateFieldArray(o,e)}),[n,o]);return r.useEffect((()=>{if(n._state.action=!1,H(o,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!$(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([o]).then((e=>{const t=g(e.errors,o),r=g(n._formState.errors,o);(r?!t&&r.type:t&&t.type)&&(t?I(n._formState.errors,o,t):de(n._formState.errors,o),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=g(n._fields,o);e&&e._f&&oe(e,n._formValues,n._options.criteriaMode===v.all,n._options.shouldUseNativeValidation,!0).then((e=>!M(e)&&n._subjects.state.next({errors:W(n._formState.errors,e,o)})))}n._subjects.values.next({name:o,values:{...n._formValues}}),n._names.focus&&F(n._fields,(e=>!!e&&e.startsWith(n._names.focus||""))),n._names.focus="",n._updateValid()}),[a,o,n]),r.useEffect((()=>(!g(n._formValues,o)&&n._updateFieldArray(o),()=>{(n._options.shouldUnregister||s)&&n.unregister(o)})),[o,n,i,s]),{swap:r.useCallback(((e,t)=>{const r=n._getFieldArray(o);he(r,e,t),he(c.current,e,t),p(r),l(r),n._updateFieldArray(o,r,he,{argA:e,argB:t},!1)}),[p,o,n]),move:r.useCallback(((e,t)=>{const r=n._getFieldArray(o);le(r,e,t),le(c.current,e,t),p(r),l(r),n._updateFieldArray(o,r,le,{argA:e,argB:t},!1)}),[p,o,n]),prepend:r.useCallback(((e,t)=>{const r=E(f(e)),i=ce(n._getFieldArray(o),r);n._names.focus=z(o,0,t),c.current=ce(c.current,r.map(B)),p(i),l(i),n._updateFieldArray(o,i,ce,{argA:se(e)})}),[p,o,n]),append:r.useCallback(((e,t)=>{const r=E(f(e)),i=ie(n._getFieldArray(o),r);n._names.focus=z(o,i.length-1,t),c.current=ie(c.current,r.map(B)),p(i),l(i),n._updateFieldArray(o,i,ie,{argA:se(e)})}),[p,o,n]),remove:r.useCallback((e=>{const t=ue(n._getFieldArray(o),e);c.current=ue(c.current,e),p(t),l(t),n._updateFieldArray(o,t,ue,{argA:e})}),[p,o,n]),insert:r.useCallback(((e,t,r)=>{const i=E(f(t)),s=ae(n._getFieldArray(o),e,i);n._names.focus=z(o,e,r),c.current=ae(c.current,e,i.map(B)),p(s),l(s),n._updateFieldArray(o,s,ae,{argA:e,argB:se(t)})}),[p,o,n]),update:r.useCallback(((e,t)=>{const r=f(t),i=fe(n._getFieldArray(o),e,r);c.current=[...i].map(((t,n)=>t&&n!==e?c.current[n]:B())),p(i),l([...i]),n._updateFieldArray(o,i,fe,{argA:e,argB:r},!0,!1)}),[p,o,n]),replace:r.useCallback((e=>{const t=E(f(e));c.current=t.map(B),p([...t]),l([...t]),n._updateFieldArray(o,[...t],(e=>e),{},!0,!1)}),[p,o,n]),fields:r.useMemo((()=>a.map(((e,t)=>({...e,[i]:c.current[t]||B()})))),[a,i])}}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(i(e)&&i(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const n=e[o];if(!r.includes(o))return!1;if("ref"!==o){const e=t[o];if(i(n)&&i(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=>G(e)||o(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)),Me=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>m(e)?e:t?""===e?NaN:e?+e:e:n&&D(e)?new Date(e):r?r(e):e;function Oe(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return V(t)?t.files:G(t)?te(e.refs).value:ve(t)?[...t.selectedOptions].map((({value:e})=>e)):o(t)?Z(e.refs).value:Me(m(t.value)?e.ref.value:t.value,e)}var Ee=(e,t,n,r)=>{const o={};for(const n of e){const e=g(t,n);e&&I(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Ae=e=>m(e)?e:J(e)?e.source:l(e)?J(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 De(e,t,n){const r=g(e,n);if(r||N(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),i=g(t,r),s=g(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};o.pop()}return{name:n}}var _e=(e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e),Re=(e,t)=>!p(g(e,t)).length&&de(e,t);const Ne={mode:v.onSubmit,reValidateMode:v.onChange,shouldFocusError:!0};function Pe(e={},t){let n,r={...Ne,...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))&&f(r.defaultValues||r.values)||{},w=r.shouldUnregister?{}:f(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},O={values:me(),array:me(),state:me()},A=e.resetOptions&&e.resetOptions.keepDirtyValues,T=$(r.mode),R=$(r.reValidateMode),N=r.criteriaMode===v.all,P=async e=>{if(C.isValid||e){const e=r.resolver?M((await z()).errors):await Y(h,!0);e!==a.isValid&&O.state.next({isValid:e})}},L=e=>C.isValidating&&O.state.next({isValidating:e}),j=(e,t,n,r)=>{const o=g(h,e);if(o){const i=g(w,e,m(n)?g(b,e):n);m(i)||r&&r.defaultChecked||t?I(w,e,t?i:Oe(o._f)):Q(e,i),x.mount&&P()}},B=(e,t,n,r,o)=>{let i=!1,s=!1;const l={name:e};if(!n||r){C.isDirty&&(s=a.isDirty,a.isDirty=l.isDirty=G(),i=s!==l.isDirty);const n=ye(g(b,e),t);s=g(a.dirtyFields,e),n?de(a.dirtyFields,e):I(a.dirtyFields,e,!0),l.dirtyFields=a.dirtyFields,i=i||C.dirtyFields&&s!==!n}if(n){const t=g(a.touchedFields,e);t||(I(a.touchedFields,e,n),l.touchedFields=a.touchedFields,i=i||C.touchedFields&&t!==n)}return i&&o&&O.state.next(l),i?l:{}},z=async e=>r.resolver(w,r.context,Ee(e||S.mount,h,r.criteriaMode,r.shouldUseNativeValidation)),Y=async(e,t,n={valid:!0})=>{for(const o in e){const i=e[o];if(i){const{_f:e,...o}=i;if(e){const o=S.array.has(e.name),s=await oe(i,w,N,r.shouldUseNativeValidation&&!t,o);if(s[e.name]&&(n.valid=!1,t))break;!t&&(g(s,e.name)?o?W(a.errors,s,e.name):I(a.errors,e.name,s[e.name]):de(a.errors,e.name))}o&&await Y(o,t,n)}}return n.valid},G=(e,t)=>(e&&t&&I(w,e,t),!ye(ne(),b)),J=(e,t,n)=>_(e,S,{...x.mount?w:m(t)?b:D(e)?{[e]:t}:t},n,t),Q=(e,t,n={})=>{const r=g(h,e);let i=t;if(r){const n=r._f;n&&(!n.disabled&&I(w,e,Me(t,n)),i=K(n.ref)&&s(t)?"":t,ve(n.ref)?[...n.ref.options].forEach((e=>e.selected=i.includes(e.value))):n.refs?o(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value))):n.refs[0]&&(n.refs[0].checked=!!i):n.refs.forEach((e=>e.checked=e.value===i)):V(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||O.values.next({name:e,values:{...w}})))}(n.shouldDirty||n.shouldTouch)&&B(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&te(e)},X=(e,t,n)=>{for(const r in t){const o=t[r],s=`${e}.${r}`,a=g(h,s);!S.array.has(e)&&ge(o)&&(!a||a._f)||i(o)?Q(s,o,n):X(s,o,n)}},Z=(e,n,r={})=>{const o=g(h,e),i=S.array.has(e),l=f(n);I(w,e,l),i?(O.array.next({name:e,values:{...w}}),(C.isDirty||C.dirtyFields)&&r.shouldDirty&&O.state.next({name:e,dirtyFields:Ce(b,w),isDirty:G(e,l)})):!o||o._f||s(l)?Q(e,l,r):X(e,l,r),H(e,S)&&O.state.next({...a}),O.values.next({name:e,values:{...w}}),!x.mount&&t()},ee=async t=>{const o=t.target;let i=o.name,s=!0;const l=g(h,i);if(l){let u,d;const f=o.type?Oe(l._f):c(t),p=t.type===y.BLUR||t.type===y.FOCUS_OUT,m=!Te(l._f)&&!r.resolver&&!g(a.errors,i)&&!l._f.deps||_e(p,g(a.touchedFields,i),a.isSubmitted,R,T),v=H(i,S,p);I(w,i,f),p?(l._f.onBlur&&l._f.onBlur(t),n&&n(0)):l._f.onChange&&l._f.onChange(t);const b=B(i,f,p,!1),x=!M(b)||v;if(!p&&O.values.next({name:i,type:t.type,values:{...w}}),m)return C.isValid&&P(),x&&O.state.next({name:i,...v?{}:b});if(!p&&v&&O.state.next({...a}),L(!0),r.resolver){const{errors:e}=await z([i]),t=De(a.errors,h,i),n=De(e,h,t.name||i);u=n.error,i=n.name,d=M(e)}else u=(await oe(l,w,N,r.shouldUseNativeValidation))[i],s=isNaN(f)||f===g(w,i,f),s&&(u?d=!1:C.isValid&&(d=await Y(h,!0)));s&&(l._f.deps&&te(l._f.deps),((t,r,o,i)=>{const s=g(a.errors,t),l=C.isValid&&U(r)&&a.isValid!==r;var c;if(e.delayError&&o?(c=()=>((e,t)=>{I(a.errors,e,t),O.state.next({errors:a.errors})})(t,o),n=e=>{clearTimeout(k),k=setTimeout(c,e)},n(e.delayError)):(clearTimeout(k),n=null,o?I(a.errors,t,o):de(a.errors,t)),(o?!ye(s,o):s)||!M(i)||l){const e={...i,...l&&U(r)?{isValid:r}:{},errors:a.errors,name:t};a={...a,...e},O.state.next(e)}L(!1)})(i,d,u,b))}},te=async(e,t={})=>{let n,o;const i=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):de(a.errors,n)}else a.errors=t;return t})(m(e)?e:i);n=M(t),o=e?!i.some((e=>g(t,e))):n}else e?(o=(await Promise.all(i.map((async e=>{const t=g(h,e);return await Y(t&&t._f?{[e]:t}:t)})))).every(Boolean),(o||a.isValid)&&P()):o=n=await Y(h);return O.state.next({...!D(e)||C.isValid&&n!==a.isValid?{}:{name:e},...r.resolver||!e?{isValid:n}:{},errors:a.errors,isValidating:!1}),t.shouldFocus&&!o&&F(h,(e=>e&&g(a.errors,e)),e?i:S.mount),o},ne=e=>{const t={...b,...x.mount?w:{}};return m(e)?t:D(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)}),ie=(e,t={})=>{for(const n of e?E(e):S.mount)S.mount.delete(n),S.array.delete(n),t.keepValue||(de(h,n),de(w,n)),!t.keepError&&de(a.errors,n),!t.keepDirty&&de(a.dirtyFields,n),!t.keepTouched&&de(a.touchedFields,n),!r.shouldUnregister&&!t.keepDefaultValue&&de(b,n);O.values.next({values:{...w}}),O.state.next({...a,...t.keepDirty?{isDirty:G()}:{}}),!t.keepIsValid&&P()},se=(e,t={})=>{let n=g(h,e);const o=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?o&&I(w,e,t.disabled?void 0:g(w,e,Oe(n._f))):j(e,!0,t.value),{...o?{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:o=>{if(o){se(e,t),n=g(h,e);const r=m(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,i=be(r),s=n._f.refs||[];if(i?s.find((e=>e===r)):r===n._f.ref)return;I(h,e,{_f:{...n._f,...i?{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 o=n||b,i=f(o),s=n&&!M(n)?i:b;if(r.keepDefaultValues||(b=o),!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(d&&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?f(b):{}:i,O.array.next({values:{...s}}),O.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,O.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:ie,getFieldState:re,_executeSchema:z,_getWatch:J,_getDirty:G,_updateValid:P,_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))&&ie(e)}S.unMount=new Set},_updateFieldArray:(e,t=[],n,r,o=!0,i=!0)=>{if(r&&n){if(x.action=!0,i&&Array.isArray(g(h,e))){const t=n(g(h,e),r.argA,r.argB);o&&I(h,e,t)}if(i&&Array.isArray(g(a.errors,e))){const t=n(g(a.errors,e),r.argA,r.argB);o&&I(a.errors,e,t),Re(a.errors,e)}if(C.touchedFields&&i&&Array.isArray(g(a.touchedFields,e))){const t=n(g(a.touchedFields,e),r.argA,r.argB);o&&I(a.touchedFields,e,t)}C.dirtyFields&&(a.dirtyFields=Ce(b,w)),O.state.next({name:e,isDirty:G(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),O.state.next({isLoading:!1})})),_updateFormState:e=>{a={...a,...e}},_subjects:O,_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 o=f(w);if(O.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await z();a.errors=e,o=t}else await Y(h);de(a.errors,"root"),M(a.errors)?(O.state.next({errors:{}}),await e(o,n)):(t&&await t({...a.errors},n),ae(),setTimeout(ae)),O.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:M(a.errors),submitCount:a.submitCount+1,errors:a.errors})},watch:(e,t)=>q(e)?O.values.subscribe({next:n=>e(J(void 0,t),n)}):J(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||de(a.touchedFields,e),t.keepDirty||(de(a.dirtyFields,e),a.isDirty=t.defaultValue?G(e,g(b,e)):G()),t.keepError||(de(a.errors,e),C.isValid&&P()),O.state.next({...a}))},clearErrors:e=>{e&&E(e).forEach((e=>de(a.errors,e))),O.state.next({errors:e?a.errors:{}})},unregister:ie,setError:(e,t,n)=>{const r=(g(h,e,{_f:{}})._f||{}).ref;I(a.errors,e,{...t,ref:r}),O.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,o]=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={...Pe(e,(()=>o((e=>({...e}))))),formState:n});const i=t.current.control;return i._options=e,T({subject:i._subjects.state,next:e=>{O(e,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),r.useEffect((()=>{e.values&&!ye(e.values,i._defaultValues)?i._reset(e.values,i._options.resetOptions):i._resetDefaultValues()}),[e.values,i]),r.useEffect((()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()})),t.current.formState=C(n,i),t.current}},8699:(e,t,n)=>{"use strict";n.d(t,{V:()=>s});const r="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),o="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),i="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 o(e,t,i,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return i.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))o(n.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),s,i);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");o(r(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+s+";")}(a.length||c)&&i.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)o(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=i[r]||1;return i[r]=e+1,"ͼ"+e.toString(36)}static mount(e,t){(e[o]||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[o]=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[o]=this}mount(e){let t=this.sheet,n=0,r=0;for(let o=0;o<e.length;o++){let i=e[o],s=this.modules.indexOf(i);if(s<r&&s>-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,i),t)for(let e=0;e<i.rules.length;e++)t.insertRule(i.rules[e],n++)}else{for(;r<s;)n+=this.modules[r++].rules.length;n+=i.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$:()=>i,K$:()=>u,MS:()=>r,QY:()=>h,h5:()=>l,iD:()=>c,lK:()=>d,uj:()=>o});var r="-ms-",o="-moz-",i="-webkit-",s="comm",a="rule",l="decl",c="@media",u="@import",h="@supports",d="@keyframes"},2190:(e,t,n)=>{"use strict";n.d(t,{MY:()=>s});var r=n(7563),o=n(6686),i=n(6411);function s(e){return(0,i.cE)(a("",null,null,null,[""],e=(0,i.un)(e),0,[0],e))}function a(e,t,n,r,s,h,d,f,p){for(var m=0,g=0,y=d,v=0,b=0,w=0,x=1,S=1,k=1,C=0,M="",O=s,E=h,A=r,T=M;S;)switch(w=C,C=(0,i.lp)()){case 40:if(108!=w&&58==(0,o.uO)(T,y-1)){-1!=(0,o.Cw)(T+=(0,o.gx)((0,i.iF)(C),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:T+=(0,i.iF)(C);break;case 9:case 10:case 13:case 32:T+=(0,i.Qb)(w);break;case 92:T+=(0,i.kq)((0,i.Ud)()-1,7);continue;case 47:switch((0,i.fj)()){case 42:case 47:(0,o.R3)(c((0,i.q6)((0,i.lp)(),(0,i.Ud)()),t,n),p);break;default:T+="/"}break;case 123*x:f[m++]=(0,o.to)(T)*k;case 125*x:case 59:case 0:switch(C){case 0:case 125:S=0;case 59+g:b>0&&(0,o.to)(T)-y&&(0,o.R3)(b>32?u(T+";",r,n,y-1):u((0,o.gx)(T," ","")+";",r,n,y-2),p);break;case 59:T+=";";default:if((0,o.R3)(A=l(T,t,n,m,g,s,f,M,O=[],E=[],y),h),123===C)if(0===g)a(T,t,A,A,O,h,y,f,E);else switch(99===v&&110===(0,o.uO)(T,3)?100:v){case 100:case 109:case 115:a(e,A,A,r&&(0,o.R3)(l(e,A,A,0,0,s,f,M,s,O=[],y),E),s,E,y,f,r?O:E);break;default:a(T,A,A,A,[""],E,0,f,E)}}m=g=b=0,x=k=1,M=T="",y=d;break;case 58:y=1+(0,o.to)(T),b=w;default:if(x<1)if(123==C)--x;else if(125==C&&0==x++&&125==(0,i.mp)())continue;switch(T+=(0,o.Dp)(C),C*x){case 38:k=g>0?1:(T+="\f",-1);break;case 44:f[m++]=((0,o.to)(T)-1)*k,k=1;break;case 64:45===(0,i.fj)()&&(T+=(0,i.iF)((0,i.lp)())),v=(0,i.fj)(),g=y=(0,o.to)(M=T+=(0,i.QU)((0,i.Ud)())),C++;break;case 45:45===w&&2==(0,o.to)(T)&&(x=0)}}return h}function l(e,t,n,s,a,l,c,u,h,d,f){for(var p=a-1,m=0===a?l:[""],g=(0,o.Ei)(m),y=0,v=0,b=0;y<s;++y)for(var w=0,x=(0,o.tb)(e,p+1,p=(0,o.Wn)(v=c[y])),S=e;w<g;++w)(S=(0,o.fy)(v>0?m[w]+" "+x:(0,o.gx)(x,/&\f/g,m[w])))&&(h[b++]=S);return(0,i.dH)(e,t,n,0===a?r.Fr:u,h,d,f)}function c(e,t,n){return(0,i.dH)(e,t,n,r.Ab,(0,o.Dp)((0,i.Tb)()),(0,o.tb)(e,2,-2),0)}function u(e,t,n,s){return(0,i.dH)(e,t,n,r.h5,(0,o.tb)(e,0,s),(0,o.tb)(e,s+1,-1),s)}},211:(e,t,n)=>{"use strict";n.d(t,{P:()=>s,q:()=>i});var r=n(7563),o=n(6686);function i(e,t){for(var n="",r=(0,o.Ei)(e),i=0;i<r;i++)n+=t(e[i],i,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+"{"+i(e.children,s)+"}";case r.Fr:e.value=e.props.join(",")}return(0,o.to)(n=i(e.children,s))?e.return=e.value+"{"+n+"}":""}},6411:(e,t,n)=>{"use strict";n.d(t,{FK:()=>a,JG:()=>h,QU:()=>O,Qb:()=>S,Tb:()=>d,Ud:()=>g,cE:()=>w,dH:()=>u,fj:()=>m,iF:()=>x,kq:()=>k,lp:()=>p,mp:()=>f,q6:()=>M,r:()=>v,tP:()=>y,un:()=>b});var r=n(6686),o=1,i=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:o,column:i,length:l,return:""}}function h(e,t){return(0,r.f0)(u("",null,null,"",null,null,0),e,{length:-e.length},t)}function d(){return l}function f(){return l=a>0?(0,r.uO)(c,--a):0,i--,10===l&&(i=1,o--),l}function p(){return l=a<s?(0,r.uO)(c,a++):0,i++,10===l&&(i=1,o++),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 o=i=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 M(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 O(e){for(;!v(m());)p();return y(e,a)}},6686:(e,t,n)=>{"use strict";n.d(t,{$e:()=>g,Cw:()=>u,Dp:()=>o,EQ:()=>l,Ei:()=>p,R3:()=>m,Wn:()=>r,f0:()=>i,fy:()=>a,gx:()=>c,tb:()=>d,to:()=>f,uO:()=>h,vp:()=>s});var r=Math.abs,o=String.fromCharCode,i=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 d(e,t,n){return e.slice(t,n)}function f(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 o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,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,o,i),i};var o=n(7294),i=n(2798);const{useSyncExternalStoreWithSelector:s}=i,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,o.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:()=>i});const r=new Map,o=e=>{const t=r.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},i=(e,t={})=>(n,i,a)=>{const{enabled:l,anonymousActionType:c,store:u,...h}=t;let d;try{d=(null==l||l)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!d)return l&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,i,a);const{connection:f,...p}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const o=r.get(n.name);if(o)return{type:"tracked",store:e,...o};const i={connection:t.connect(n),stores:{}};return r.set(n.name,i),{type:"tracked",store:e,...i}})(u,d,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==f||f.send(l,i()),s):(null==f||f.send({...l,type:`${u}/${l.type}`},{...o(h.name),[u]:a.getState()}),s)};const g=(...e)=>{const t=m;m=!1,n(...e),m=t},y=e(a.setState,i,a);if("untracked"===p.type?null==f||f.init(y):(p.stores[p.store]=a,null==f||f.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 f.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==f?void 0:f.init(a.getState()):null==f?void 0:f.init(o(h.name));case"COMMIT":return void 0===u?void(null==f||f.init(a.getState())):null==f?void 0:f.init(o(h.name));case"ROLLBACK":return s(e.state,(e=>{if(void 0===u)return g(e),void(null==f||f.init(a.getState()));g(e[u]),null==f||f.init(o(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==f||f.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:()=>o});var r=n(2902);const o=e=>(t,n,o)=>(o.setState=(e,n,...o)=>{const i="function"==typeof e?(0,r.Uy)(e):e;return t(i,n,...o)},e(o.setState,n,o))},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})}}]);