(self.webpackChunk_studyhub_co_react_comments_django_client=self.webpackChunk_studyhub_co_react_comments_django_client||[]).push([[5023],{5158:(e,t,n)=>{var r=n(57257);e.exports=function(e){const t=this.Parser,n=t.prototype.blockTokenizers,i=t.prototype.blockMethods;n.math=function(e,t,n){for(var i,o,c,l,a,s,h,u,p,f,d=t.length+1,$=0,m="";$<d&&(" "===(c=t.charAt($))||"\t"===c);)m+=c,$++;if(p=$,"$"!==(c=t.charAt($)))return;for($++,o=c,i=1,m+=c;$<d&&(c=t.charAt($))===o;)m+=c,i++,$++;if(i<2)return;for(;$<d&&"\n"!==(c=t.charAt($));){if("$"===c)return;m+=c,$++}if(c=t.charAt($),n)return!0;for((f=e.now()).column+=m.length,f.offset+=m.length,l=h=u=a=s="";$<d;)if(a+=h,s+=u,h=u="","\n"===(c=t.charAt($))){for(a?(h+=c,u+=c):m+=c,l="",$++;$<d&&" "===(c=t.charAt($));)l+=c,$++;if(h+=l,u+=l.slice(p),!(l.length>=4)){for(l="";$<d&&(c=t.charAt($))===o;)l+=c,$++;if(h+=l,u+=l,!(l.length<i)){for(l="";$<d&&"\n"!==(c=t.charAt($));)h+=c,u+=c,$++;break}}}else a+=c,u+=c,$++;m+=a+h;const x=r(s);return e(m)({type:"math",value:x,data:{hName:"div",hProperties:{className:"math"},hChildren:[{type:"text",value:x}]}})},i.splice(i.indexOf("fencedCode")+1,0,"math");const o=t.prototype.interruptParagraph,c=t.prototype.interruptList,l=t.prototype.interruptBlockquote;o.splice(o.indexOf("fencedCode")+1,0,["math"]),c.splice(c.indexOf("fencedCode")+1,0,["math"]),l.splice(l.indexOf("fencedCode")+1,0,["math"]);const a=this.Compiler;if(null!=a){a.prototype.visitors.math=function(e){return"$$\n"+e.value+"\n$$"}}}},93545:(e,t,n)=>{const r=n(9785),i=n(5158);e.exports=function(e){null==e&&(e={}),i.call(this,e),r.call(this,e)}},9785:e=>{function t(e,t){return e.indexOf("$",t)}const n=/^\\\$/,r=/^\$((?:\\\$|[^$])+)\$/,i=/^\$\$((?:\\\$|[^$])+)\$\$/;e.exports=function(e){function o(t,o,c){let l=!0,a=i.exec(o);a||(a=r.exec(o),l=!1);const s=n.exec(o);if(s)return!!c||t(s[0])({type:"text",value:"$"});if("\\$"===o.slice(-2))return t(o)({type:"text",value:o.slice(0,-2)+"$"});if(a){if(c)return!0;if(a[0].includes("`")&&o.slice(a[0].length).includes("`")){const e=o.slice(0,o.indexOf("`"));return t(e)({type:"text",value:e})}const n=a[1].trim();return t(a[0])({type:"inlineMath",value:n,data:{hName:"span",hProperties:{className:"inlineMath"+(l&&e.inlineMathDouble?" inlineMathDouble":"")},hChildren:[{type:"text",value:n}]}})}}o.locator=t;const c=this.Parser,l=c.prototype.inlineTokenizers,a=c.prototype.inlineMethods;l.math=o,a.splice(a.indexOf("text"),0,"math");const s=this.Compiler;if(null!=s){s.prototype.visitors.inlineMath=function(e){return"$"+e.value+"$"}}}}}]);