mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-12-29 04:11:52 +00:00
1 line
1.9 MiB
JavaScript
1 line
1.9 MiB
JavaScript
|
(function(){"use strict";var __webpack_modules__={351:function(t,e,r){var n,Q=this&&this.__extends||(n=function(t,e){return n=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])},n(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}n(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,n=arguments.length;r<n;r++)for(var Q in e=arguments[r])Object.prototype.hasOwnProperty.call(e,Q)&&(t[Q]=e[Q]);return t},T.apply(this,arguments)},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,Q,T=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=T.next()).done;)o.push(n.value)}catch(t){Q={error:t}}finally{try{n&&!n.done&&(r=T.return)&&r.call(T)}finally{if(Q)throw Q.error}}return o},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,Q=0,T=e.length;Q<T;Q++)!n&&Q in e||(n||(n=Array.prototype.slice.call(e,0,Q)),n[Q]=e[Q]);return t.concat(n||Array.prototype.slice.call(e))},s=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],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 a=r(4474),l=r(9259),c=r(7233),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(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 Q(e,t),e.prototype.assistiveMml=function(t,e){if(void 0===e&&(e=!1),!(this.state()>=a.STATE.ASSISTIVEMML)){if(!this.isEscaped&&(t.options.enableAssistiveMml||e)){var r=t.adaptor,n=t.toMML(this.root).replace(/\n */g,"").replace(/<!--.*?-->/g,""),Q=r.firstChild(r.body(r.parse(n,"text/html"))),T=r.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[Q]);r.setAttribute(r.firstChild(this.typesetRoot),"aria-hidden","true"),r.setStyle(this.typesetRoot,"position","relative"),r.append(this.typesetRoot,T)}this.state(a.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 n=t.apply(this,i([],o(e),!1))||this,Q=n.constructor,T=Q.ProcessBits;return T.has("assistive-mml")||T.allocate("assistive-mml"),n.visitor=new u(n.mmlFactory),n.options.MathItem=p(n.options.MathItem),"addStyles"in n&&n.addStyles(Q.assistiveStyles),n}return Q(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=s(this.math),n=r.next();!n.done;n=r.next()){n.value.assistiveMml(this)}}catch(e){t={error:e}}finally{try{n&&!n.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<a.STATE.ASSISTIVEMML&&this.processed.clear("assistive-mml"),this},e}(t),e.OPTIONS=T(T({},t.OPTIONS),{enableAssistiveMml:!0,renderActions:(0,c.expandable)(T(T({},t.OPTIONS.renderActions),{assistiveMml:[a.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","-webki
|