afg-website/static/js/mathjax/input/tex/extensions/physics.js

1 line
23 KiB
JavaScript
Raw Normal View History

2024-05-11 13:51:37 +02:00
!function(t){var e={};function a(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=e,a.d=function(t,e,r){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(r,n,function(e){return t[e]}.bind(null,n));return r},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=17)}([function(t,e,a){"use strict";var r,n=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(t,e)},function(t,e){function a(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)});Object.defineProperty(e,"__esModule",{value:!0}),e.AutoOpen=void 0;var i=a(8),o=a(2),s=a(3),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),Object.defineProperty(e.prototype,"kind",{get:function(){return"auto open"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.toMml=function(){var e=this.factory.configuration.parser,a=this.getProperty("right");if(this.getProperty("smash")){var r=t.prototype.toMml.call(this),n=e.create("node","mpadded",[r],{height:0,depth:0});this.Clear(),this.Push(e.create("node","TeXAtom",[n]))}a&&this.Push(new s.default(a,e.stack.env,e.configuration).mml());var i=t.prototype.toMml.call(this);return o.default.fenced(this.factory.configuration,this.getProperty("open"),i,this.getProperty("close"),this.getProperty("big"))},e.prototype.checkItem=function(e){var a=e.getProperty("autoclose");return a&&a===this.getProperty("close")?this.getProperty("ignore")?(this.Clear(),[[],!0]):[[this.toMml()],!0]:t.prototype.checkItem.call(this,e)},e}(i.BaseItem);e.AutoOpen=c},function(t,e,a){"use strict";var r=this&&this.__read||function(t,e){var a="function"==typeof Symbol&&t[Symbol.iterator];if(!a)return t;var r,n,i=a.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(t){n={error:t}}finally{try{r&&!r.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}return o};Object.defineProperty(e,"__esModule",{value:!0});var n=a(11),i=a(3),o=a(12),s=a(4),c=a(2),l=a(13),u=a(14),m={},d={"(":")","[":"]","{":"}","|":"|"},f=/^(b|B)i(g{1,2})$/;m.Quantity=function(t,e,a,r,n,u,m){void 0===a&&(a="("),void 0===r&&(r=")"),void 0===n&&(n=!1),void 0===u&&(u=""),void 0===m&&(m="");var p=!!n&&t.GetStar(),v=t.GetNext(),g=t.i,h=null;if("\\"===v){if(t.i++,!(h=t.GetCS()).match(f)){var x=t.create("node","mrow");return t.Push(c.default.fenced(t.configuration,a,x,r)),void(t.i=g)}v=t.GetNext()}var M=d[v];if(n&&"{"!==v)throw new o.default("MissingArgFor","Missing argument for %1",t.currentCS);if(!M){x=t.create("node","mrow");return t.Push(c.default.fenced(t.configuration,a,x,r)),void(t.i=g)}if(u){var y=t.create("token","mi",{texClass:s.TEXCLASS.OP},u);m&&l.default.setAttribute(y,"mathvariant",m),t.Push(t.itemFactory.create("fn",y))}if("{"===v){var b=t.GetArgument(e);return v=n?a:"\\{",M=n?r:"\\}",b=p?v+" "+b+" "+M:h?"\\"+h+"l"+v+" "+b+" \\"+h+"r"+M:"\\left"+v+" "+b+" \\right"+M,void t.Push(new i.default(b,t.stack.env,t.configuration).mml())}n&&(v=a,M=r),t.i++,t.Push(t.itemFactory.create("auto open").setProperties({open:v,close:M,big:h}))},m.Eval=function(t,e){var a=t.GetStar(),r=t.GetNext();if("{"!==r){if("("===r||"["===r)return t.i++,void t.Push(t.itemFactory.create("auto open").setProperties({open:r,close:"|",smash:a,righ