This repository has been archived on 2024-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
cs763/website/docs/assets/custom-js/katex/contrib/auto-render.min.js

1 line
8.7 KiB
JavaScript

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("katex")):"function"==typeof define&&define.amd?define(["katex"],e):"object"==typeof exports?exports.renderMathInElement=e(require("katex")):t.renderMathInElement=e(t.katex)}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=12)}([function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){t.exports=!n(0)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,n){e.exports=t},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(24);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(8),o=n(7);t.exports=function(t){return r(o(t))}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports={default:n(39),__esModule:!0}},function(t,e,n){"use strict";n.r(e);var r=n(11),o=n.n(r),i=n(5),u=n.n(i),c=function(t,e,n){for(var r=n,o=0,i=t.length;r<e.length;){var u=e[r];if(o<=0&&e.slice(r,r+i)===t)return r;"\\"===u?r++:"{"===u?o++:"}"===u&&o--,r++}return-1},f=function(t,e,n,r){for(var o=[],i=0;i<t.length;i++)if("text"===t[i].type){var u=t[i].data,f=!0,a=0,s=void 0;for(-1!==(s=u.indexOf(e))&&(a=s,o.push({type:"text",data:u.slice(0,a)}),f=!1);;){if(f){if(-1===(s=u.indexOf(e,a)))break;o.push({type:"text",data:u.slice(a,s)}),a=s}else{if(-1===(s=c(n,u,a+e.length)))break;o.push({type:"math",data:u.slice(a+e.length,s),rawData:u.slice(a,s+n.length),display:r}),a=s+n.length}f=!f}o.push({type:"text",data:u.slice(a)})}else o.push(t[i]);return o},a=function(t,e){for(var n=function(t,e){for(var n=[{type:"text",data:t}],r=0;r<e.length;r++){var o=e[r];n=f(n,o.left,o.right,o.display||!1)}return n}(t,e.delimiters),r=document.createDocumentFragment(),o=0;o<n.length;o++)if("text"===n[o].type)r.appendChild(document.createTextNode(n[o].data));else{var i=document.createElement("span"),c=n[o].data;e.displayMode=n[o].display;try{u.a.render(c,i,e)}catch(t){if(!(t instanceof u.a.ParseError))throw t;e.errorCallback("KaTeX auto-render: Failed to parse `"+n[o].data+"` with ",t),r.appendChild(document.createTextNode(n[o].rawData));continue}r.appendChild(i)}return r},s={delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],ignoredTags:["script","noscript","style","textarea","pre","code"],errorCallback:function(t,e){console.error(t,e)}};e.default=function(t,e){if(!t)throw new Error("No element provided to render");!function t(e,n){for(var r=0;r<e.childNodes.length;r++){var o=e.childNodes[r];if(3===o.nodeType){var i=a(o.textContent,n);r+=i.childNodes.length-1,e.replaceChild(i,o)}else 1===o.nodeType&&-1===n.ignoredTags.indexOf(o.nodeName.toLowerCase())&&t(o,n)}}(t,o()({},s,e))}},function(t,e,n){var r=n(7);t.exports=function(t){return Object(r(t))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=!0},function(t,e,n){var r=n(3),o=n(4),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(18)?"pure":"global",copyright:"\xa9 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(19)("keys"),o=n(17);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(6),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(6),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(9),o=n(22),i=n(21);t.exports=function(t){return function(e,n,u){var c,f=r(e),a=o(f.length),s=i(u,a);if(t&&n!=n){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===n)return t||s||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(10),o=n(9),i=n(23)(!1),u=n(20)("IE_PROTO");t.exports=function(t,e){var n,c=o(t),f=0,a=[];for(n in c)n!=u&&r(c,n)&&a.push(n);for(;e.length>f;)r(c,n=e[f++])&&(~i(a,n)||a.push(n));return a}},function(t,e,n){var r=n(25),o=n(16);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(26),o=n(15),i=n(14),u=n(13),c=n(8),f=Object.assign;t.exports=!f||n(0)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=f({},t)[n]||Object.keys(f({},e)).join("")!=r})?function(t,e){for(var n=u(t),f=arguments.length,a=1,s=o.f,l=i.f;f>a;)for(var p,d=c(arguments[a++]),y=s?r(d).concat(s(d)):r(d),v=y.length,h=0;v>h;)l.call(d,p=y[h++])&&(n[p]=d[p]);return n}:f},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(2);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(2),o=n(4).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){t.exports=!n(1)&&!n(0)(function(){return 7!=Object.defineProperty(n(30)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(2);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(32),o=n(31),i=n(29),u=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(33),o=n(28);t.exports=n(1)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(35);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(4),o=n(3),i=n(36),u=n(34),c=n(10),f=function(t,e,n){var a,s,l,p=t&f.F,d=t&f.G,y=t&f.S,v=t&f.P,h=t&f.B,x=t&f.W,g=d?o:o[e]||(o[e]={}),b=g.prototype,m=d?r:y?r[e]:(r[e]||{}).prototype;for(a in d&&(n=e),n)(s=!p&&m&&void 0!==m[a])&&c(g,a)||(l=s?m[a]:n[a],g[a]=d&&"function"!=typeof m[a]?n[a]:h&&s?i(l,r):x&&m[a]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?i(Function.call,l):l,v&&((g.virtual||(g.virtual={}))[a]=l,t&f.R&&b&&!b[a]&&u(b,a,l)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,e,n){var r=n(37);r(r.S+r.F,"Object",{assign:n(27)})},function(t,e,n){n(38),t.exports=n(3).Object.assign}]).default});