951f32add4fcf36e09deb5355fdc65530330888971f87df52fb4ea2d3402030d.json 8.9 KB

1
  1. {"ast":null,"code":"\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CommonMrootMixin = void 0;\nfunction CommonMrootMixin(Base) {\n return function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(class_1.prototype, \"surd\", {\n get: function () {\n return 2;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(class_1.prototype, \"root\", {\n get: function () {\n return 1;\n },\n enumerable: false,\n configurable: true\n });\n class_1.prototype.combineRootBBox = function (BBOX, sbox, H) {\n var bbox = this.childNodes[this.root].getOuterBBox();\n var h = this.getRootDimens(sbox, H)[1];\n BBOX.combine(bbox, 0, h);\n };\n class_1.prototype.getRootDimens = function (sbox, H) {\n var surd = this.childNodes[this.surd];\n var bbox = this.childNodes[this.root].getOuterBBox();\n var offset = (surd.size < 0 ? .5 : .6) * sbox.w;\n var w = bbox.w,\n rscale = bbox.rscale;\n var W = Math.max(w, offset / rscale);\n var dx = Math.max(0, W - w);\n var h = this.rootHeight(bbox, sbox, surd.size, H);\n var x = W * rscale - offset;\n return [x, h, dx];\n };\n class_1.prototype.rootHeight = function (rbox, sbox, size, H) {\n var h = sbox.h + sbox.d;\n var b = (size < 0 ? 1.9 : .55 * h) - (h - H);\n return b + Math.max(0, rbox.d * rbox.rscale);\n };\n return class_1;\n }(Base);\n}\nexports.CommonMrootMixin = CommonMrootMixin;","map":{"version":3,"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","defineProperty","exports","value","CommonMrootMixin","Base","_super","class_1","apply","arguments","get","enumerable","configurable","combineRootBBox","BBOX","sbox","H","bbox","childNodes","root","getOuterBBox","h","getRootDimens","combine","surd","offset","size","w","rscale","W","Math","max","dx","rootHeight","x","rbox"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/mathjax-full/js/output/common/Wrappers/mroot.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CommonMrootMixin = void 0;\nfunction CommonMrootMixin(Base) {\n return (function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(class_1.prototype, \"surd\", {\n get: function () {\n return 2;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(class_1.prototype, \"root\", {\n get: function () {\n return 1;\n },\n enumerable: false,\n configurable: true\n });\n class_1.prototype.combineRootBBox = function (BBOX, sbox, H) {\n var bbox = this.childNodes[this.root].getOuterBBox();\n var h = this.getRootDimens(sbox, H)[1];\n BBOX.combine(bbox, 0, h);\n };\n class_1.prototype.getRootDimens = function (sbox, H) {\n var surd = this.childNodes[this.surd];\n var bbox = this.childNodes[this.root].getOuterBBox();\n var offset = (surd.size < 0 ? .5 : .6) * sbox.w;\n var w = bbox.w, rscale = bbox.rscale;\n var W = Math.max(w, offset / rscale);\n var dx = Math.max(0, W - w);\n var h = this.rootHeight(bbox, sbox, surd.size, H);\n var x = W * rscale - offset;\n return [x, h, dx];\n };\n class_1.prototype.rootHeight = function (rbox, sbox, size, H) {\n var h = sbox.h + sbox.d;\n var b = (size < 0 ? 1.9 : .55 * h) - (h - H);\n return b + Math.max(0, rbox.d * rbox.rscale);\n };\n return class_1;\n }(Base));\n}\nexports.CommonMrootMixin = CommonMrootMixin;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAI,IAAI,IAAI,IAAI,CAACA,SAAS,IAAM,YAAY;EACrD,IAAIC,aAAa,GAAG,SAAAA,CAAUC,CAAC,EAAEC,CAAC,EAAE;IAChCF,aAAa,GAAGG,MAAM,CAACC,cAAc,IAChC;MAAEC,SAAS,EAAE;IAAG,CAAC,YAAYC,KAAK,IAAI,UAAUL,CAAC,EAAEC,CAAC,EAAE;MAAED,CAAC,CAACI,SAAS,GAAGH,CAAC;IAAE,CAAE,IAC5E,UAAUD,CAAC,EAAEC,CAAC,EAAE;MAAE,KAAK,IAAIK,CAAC,IAAIL,CAAC,EAAE,IAAIC,MAAM,CAACK,SAAS,CAACC,cAAc,CAACC,IAAI,CAACR,CAAC,EAAEK,CAAC,CAAC,EAAEN,CAAC,CAACM,CAAC,CAAC,GAAGL,CAAC,CAACK,CAAC,CAAC;IAAE,CAAC;IACrG,OAAOP,aAAa,CAACC,CAAC,EAAEC,CAAC,CAAC;EAC9B,CAAC;EACD,OAAO,UAAUD,CAAC,EAAEC,CAAC,EAAE;IACnB,IAAI,OAAOA,CAAC,KAAK,UAAU,IAAIA,CAAC,KAAK,IAAI,EACrC,MAAM,IAAIS,SAAS,CAAC,sBAAsB,GAAGC,MAAM,CAACV,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