"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[1600,6840],{31600:(e,t,a)=>{a.r(t),a.d(t,{MathJaxTypesetter:()=>o,default:()=>r});var n,i=a(11296),s=a(89220);!function(e){e.copy="mathjax:clipboard",e.scale="mathjax:scale"}(n||(n={}));class o{constructor(){this._initialized=!1}async _ensureInitialized(){this._initialized||(this._mathDocument=await c.ensureMathDocument(),this._initialized=!0)}async mathDocument(){return await this._ensureInitialized(),this._mathDocument}async typeset(e){try{await this._ensureInitialized()}catch(e){return void console.error(e)}this._mathDocument.options.elements=[e],this._mathDocument.clear().render(),delete this._mathDocument.options.elements}}const r={id:"@jupyterlab/mathjax-extension:plugin",description:"Provides the LaTeX mathematical expression interpreter.",provides:s.ILatexTypesetter,activate:e=>{const t=new o;return e.commands.addCommand(n.copy,{execute:async()=>{const e=(await t.mathDocument()).outputJax;await navigator.clipboard.writeText(e.math.math)},label:"MathJax Copy Latex"}),e.commands.addCommand(n.scale,{execute:async e=>{const a=await t.mathDocument(),n=e.scale||1;a.outputJax.options.scale=n,a.rerender()},label:e=>"Mathjax Scale "+(e.scale?`x${e.scale}`:"Reset")}),t},autoStart:!0};var c;!function(e){let t=null;e.ensureMathDocument=async function(){if(!t){t=new i.PromiseDelegate,Promise.all([a.e(8477),a.e(7660),a.e(2684)]).then(a.t.bind(a,22684,23));const[{mathjax:e},{CHTML:n},{TeX:s},{TeXFont:o},{AllPackages:r},{SafeHandler:c},{HTMLHandler:l},{browserAdaptor:m},{AssistiveMmlHandler:h}]=await Promise.all([a.e(2600).then(a.bind(a,32600)),Promise.all([a.e(8477),a.e(1904),a.e(1156),a.e(3800)]).then(a.t.bind(a,13800,23)),Promise.all([a.e(8477),a.e(7660),a.e(9128),a.e(4944)]).then(a.t.bind(a,62564,23)),Promise.all([a.e(1156),a.e(9272)]).then(a.t.bind(a,31156,23)),Promise.all([a.e(8477),a.e(7660),a.e(9128),a.e(716)]).then(a.bind(a,30716)),a.e(9780).then(a.t.bind(a,39780,23)),Promise.all([a.e(8477),a.e(1904),a.e(8904),a.e(3844)]).then(a.t.bind(a,83844,23)),a.e(7220).then(a.bind(a,39600)),Promise.all([a.e(8477),a.e(1904),a.e(8904),a.e(8344)]).then(a.t.bind(a,25964,23))]);e.handlers.register(h(c(new l(m()))));class d extends o{}d.defaultFonts={};const u=new n({font:new d}),p=new s({packages:r.concat("require"),inlineMath:[["$","$"],["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,processEnvironments:!0}),x=e.document(window.document,{InputJax:p,OutputJax:u});t.resolve(x)}return t.promise}}(c||(c={}))}}]);