mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-12-04 21:23:07 +00:00
34 lines
1.8 MiB
JavaScript
34 lines
1.8 MiB
JavaScript
|
!function(){"use strict";var t={351:function(t,e,r){var Q,n=this&&this.__extends||(Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),T=this&&this.__assign||function(){return(T=Object.assign||function(t){for(var e,r=1,Q=arguments.length;r<Q;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var Q,n,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(Q=T.next()).done;)o.push(Q.value)}catch(t){n={error:t}}finally{try{Q&&!Q.done&&(r=T.return)&&r.call(T)}finally{if(n)throw n.error}}return o},i=this&&this.__spreadArray||function(t,e){for(var r=0,Q=e.length,n=t.length;r<Q;r++,n++)t[n]=e[r];return t},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],Q=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&Q>=t.length&&(t=void 0),{value:t&&t[Q++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AssistiveMmlHandler=e.AssistiveMmlMathDocumentMixin=e.AssistiveMmlMathItemMixin=e.LimitedMmlVisitor=void 0;var s=r(4474),l=r(9259),c=r(7233),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getAttributes=function(e){return t.prototype.getAttributes.call(this,e).replace(/ ?id=".*?"/,"")},e}(l.SerializedMmlVisitor);function p(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.assistiveMml=function(t,e){if(void 0===e&&(e=!1),!(this.state()>=s.STATE.ASSISTIVEMML)){if(!this.isEscaped&&(t.options.enableAssistiveMml||e)){var r=t.adaptor,Q=t.toMML(this.root).replace(/\n */g,"").replace(/<!--.*?-->/g,""),n=r.firstChild(r.body(r.parse(Q,"text/html"))),T=r.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[n]);r.setAttribute(r.firstChild(this.typesetRoot),"aria-hidden","true"),r.setStyle(this.typesetRoot,"position","relative"),r.append(this.typesetRoot,T)}this.state(s.STATE.ASSISTIVEMML)}},e}(t)}function h(t){var e;return(e=function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var Q=t.apply(this,i([],o(e)))||this,n=Q.constructor,T=n.ProcessBits;return T.has("assistive-mml")||T.allocate("assistive-mml"),Q.visitor=new u(Q.mmlFactory),Q.options.MathItem=p(Q.options.MathItem),"addStyles"in Q&&Q.addStyles(n.assistiveStyles),Q}return n(e,t),e.prototype.toMML=function(t){return this.visitor.visitTree(t)},e.prototype.assistiveMml=function(){var t,e;if(!this.processed.isSet("assistive-mml")){try{for(var r=a(this.math),Q=r.next();!Q.done;Q=r.next()){Q.value.assistiveMml(this)}}catch(e){t={error:e}}finally{try{Q&&!Q.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.processed.set("assistive-mml")}return this},e.prototype.state=function(e,r){return void 0===r&&(r=!1),t.prototype.state.call(this,e,r),e<s.STATE.ASSISTIVEMML&&this.processed.clear("assistive-mml"),this},e}(t)).OPTIONS=T(T({},t.OPTIONS),{enableAssistiveMml:!0,renderActions:c.expandable(T(T({},t.OPTIONS.renderActions),{assistiveMml:[s.STATE.ASSISTIVEMML]}))}),e.assistiveStyles={"mjx-assistive-mml":{position:"absolute !important",top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)",padding:"1px 0px 0px 0px !important",border:"0px !important",display:"block !important",width:"auto !important",overflow:"hidden !important","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},'mjx-assistive-mm
|
||
|
/*!
|
||
|
*************************************************************************
|
||
|
*
|
||
|
* mhchemParser.ts
|
||
|
* 4.1.0
|
||
|
*
|
||
|
* Parser for the \ce command and \pu command for MathJax and Co.
|
||
|
*
|
||
|
* mhchem's \ce is a tool for writing beautiful chemical equations easily.
|
||
|
* mhchem's \pu is a tool for writing physical units easily.
|
||
|
*
|
||
|
* ----------------------------------------------------------------------
|
||
|
*
|
||
|
* Copyright (c) 2015-2021 Martin Hensel
|
||
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*
|
||
|
* ----------------------------------------------------------------------
|
||
|
*
|
||
|
* https://github.com/mhchem/mhchemParser
|
||
|
*
|
||
|
*/
|
||
|
Object.defineProperty(e,"__esModule",{value:!0}),e.mhchemParser=void 0;var r=function(){function t(){}return t.toTex=function(t,e){return T.go(n.go(t,e),"tex"!==e)},t}();function Q(t){var e,r,Q={};for(e in t)for(r in t[e]){var n=r.split("|");t[e][r].stateArray=n;for(var T=0;T<n.length;T++)Q[n[T]]=[]}for(e in t)for(r in t[e])for(n=t[e][r].stateArray||[],T=0;T<n.length;T++){var o=t[e][r];o.action_=[].concat(o.action_);for(var i=0;i<o.action_.length;i++)"string"==typeof o.action_[i]&&(o.action_[i]={type_:o.action_[i]});for(var a=e.split("|"),s=0;s<a.length;s++)if("*"===n[T]){var l=void 0;for(l in Q)Q[l].push({pattern:a[s],task:o})}else Q[n[T]].push({pattern:a[s],task:o})}return Q}e.mhchemParser=r;var n={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var r,Q="0",T={};T.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var o=10,i=[];;){r!==t?(o=10,r=t):o--;var a=n.stateMachines[e],s=a.transitions[Q]||a.transitions["*"];t:for(var l=0;l<s.length;l++){var c=n.patterns.match_(s[l].pattern,t);if(c){for(var u=s[l].task,p=0;p<u.action_.length;p++){var h=void 0;if(a.actions[u.action_[p].type_])h=a.actions[u.action_[p].type_](T,c.match_,u.action_[p].option);else{if(!n.actions[u.action_[p].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+u.action_[p].type_+")"];h=n.actions[u.action_[p].type_](T,c.match_,u.action_[p].option)}n.concatArray(i,h)}if(Q=u.nextState||Q,!(t.length>0))return i;if(u.revisit||(t=c.remainder),!u.toContinue)break t}}if(o<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.slice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/,"state of aggregation $":function(t){var e=n.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var r=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return r?{match_:r[0],remainder:t.substr(r[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". __* ":/^([.\u22C5\u00B7\u2022]|[*])\s*/,"...":/^\.\.\.(?=$|[^.])/,"^{(...)}":function(t){return n.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return n.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return n.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return n.patterns.f
|